/* FrictionLens — premium dark, a "lens" that reveals the pattern behind a
   pile of tickets. Teal accent (analytical, focused), aurora in teal/green,
   the paste-tickets tool as the live hero centrepiece. */
:root {
  --bg: #08110f;
  --bg-2: #0b1613;
  --panel: rgba(255,255,255,0.028);
  --panel-2: rgba(255,255,255,0.05);
  --line: rgba(255,255,255,0.09);
  --line-2: rgba(255,255,255,0.15);
  --ink: #eef5f2;
  --muted: #93a49e;
  --muted-dim: #5f6f6a;
  --accent: #35c2a8;
  --accent-rgb: 53, 194, 168;
  --accent-2: #46b1ff;
  --danger: #ff6a78;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, monospace;
  --wrap: 1120px; --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; position: relative; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-image: linear-gradient(rgba(53,194,168,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(53,194,168,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 72% 60% at 62% 0%, #000, transparent 76%); mask-image: radial-gradient(ellipse 72% 60% at 62% 0%, #000, transparent 76%); }
.aurora b { display: none; }
.aurora::after { content: ""; position: absolute; left: 0; right: 0; height: 200px; background: linear-gradient(180deg, transparent, rgba(53,194,168,.09), transparent); will-change: top; animation: scan 8s linear infinite; }
@keyframes scan { 0% { top: -200px; } 100% { top: 100%; } }
body::after { content:''; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.pulse { display:inline-block; width:6px; height:6px; border-radius:50%; background: var(--accent); margin-right:8px; box-shadow:0 0 0 0 rgba(var(--accent-rgb),.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),.5);} 70%{box-shadow:0 0 0 7px rgba(var(--accent-rgb),0);} 100%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),0);} }

header.site { position: sticky; top: 0; z-index: 30; background: rgba(8,17,15,.6); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--ink); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 550; }
.nav-links a:hover { color: var(--ink); }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit; font-weight:650; font-size:0.95rem; cursor:pointer;
  background: var(--accent); color:#04140f; border:1px solid var(--accent); padding:12px 20px; border-radius:11px; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -12px rgba(var(--accent-rgb),.7); }
.btn:focus-visible { outline: 3px solid rgba(var(--accent-rgb),.5); outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--accent); box-shadow: none; }
.btn:disabled { opacity:.55; cursor:default; transform:none; box-shadow:none; }

.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.kicker { display:inline-flex; align-items:center; font-family: var(--mono); font-size:0.74rem; text-transform:uppercase; letter-spacing:0.13em; color: var(--muted); border:1px solid var(--line); background: var(--panel); border-radius:999px; padding:6px 13px; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.1rem); font-weight: 830; margin-top: 20px; text-wrap: balance; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; background: linear-gradient(110deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { color: var(--muted); font-size: 1.08rem; margin: 20px 0 0; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Console (the live ticket tool) */
.console { background: linear-gradient(180deg, var(--bg-2), #0a120f); border:1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 30px 70px -30px rgba(0,0,0,.85); overflow:hidden; }
.console-bar { display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); background: rgba(255,255,255,.02); }
.console-bar .dot { width:10px; height:10px; border-radius:50%; background:#2c3b37; }
.console-title { font-family: var(--mono); font-size:0.8rem; color: var(--muted-dim); margin-left:6px; }
.console-live { margin-left:auto; font-size:0.74rem; color: var(--muted); font-family: var(--mono); display:inline-flex; align-items:center; }
.console-body { padding: 20px; }
.console-body label { display:block; font-size:0.76rem; text-transform:uppercase; letter-spacing:.07em; color: var(--muted); font-weight:700; margin-bottom:8px; }
#tickets { width:100%; min-height:150px; resize:vertical; font:inherit; font-size:0.9rem; background: var(--bg); color: var(--ink); border:1px solid var(--line-2); border-radius:10px; padding:12px 14px; line-height:1.5; }
#tickets::placeholder { color: var(--muted-dim); }
#tickets:focus-visible { outline:none; border-color: var(--accent); box-shadow:0 0 0 3px rgba(var(--accent-rgb),.18); }
.tool-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.status-msg { margin-top:12px; font-size:0.88rem; color: var(--muted); }
.status-msg.error { color: var(--danger); } .status-msg.success { color: var(--accent); }

section.how, section.signup { padding: 64px 0; }
.section-label { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.how h2, .signup h2 { font-size: 1.9rem; font-weight: 790; margin-top: 14px; text-wrap: balance; }
.how .sub, .signup .sub { color: var(--muted); margin: 12px 0 0; max-width: 46em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.step-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; position: relative; overflow: hidden; }
.step-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background: linear-gradient(90deg, var(--accent), transparent); }
.step-card .num { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); font-weight: 700; }
.step-card h3 { font-size: 1.08rem; font-weight: 700; margin: 12px 0 8px; }
.step-card p { color: var(--muted); font-size: 0.94rem; margin: 0; }

.inline-form { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; max-width: 460px; }
.inline-form input { flex: 1 1 220px; font: inherit; padding: 12px 14px; border-radius: 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); }
.inline-form input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18); }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 46px; margin-top: 24px; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 0.88rem; }
.footer-row a { color: var(--muted); } .footer-row a:hover { color: var(--accent); }

/* ---------- Workspace (analysis results) ---------- */
.ws-head { padding: 52px 0 28px; }
.ws-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 820; margin-top: 12px; letter-spacing: -0.03em; }
.ws-head .sub { color: var(--muted); font-size: 1rem; margin: 14px 0 0; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin-top: 16px; max-width: 420px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .4s ease; }

.ws-body { padding: 8px 0 70px; }
#content { display: flex; flex-direction: column; gap: 14px; }
.empty-state { color: var(--muted-dim); font-size: 0.95rem; padding: 30px 0; }

.friction { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; position: relative; overflow: hidden; }
.friction::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px; background: var(--sev-color, var(--accent)); }
.friction-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.friction-head h3 { font-size: 1.14rem; font-weight: 730; letter-spacing: -0.015em; }

/* Severity: colour ramps from muted (1) through accent (3) to danger (5) —
   scored data reads as measurement, not decoration. */
.severity { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.severity[data-level="1"], .severity[data-level="2"] { color: var(--muted); background: var(--panel-2); }
.severity[data-level="3"] { color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.severity[data-level="4"] { color: #ffb020; background: rgba(255,176,32,.14); }
.severity[data-level="5"] { color: var(--danger); background: rgba(255,106,120,.14); }
.friction:has(.severity[data-level="1"]), .friction:has(.severity[data-level="2"]) { --sev-color: var(--muted-dim); }
.friction:has(.severity[data-level="3"]) { --sev-color: var(--accent); }
.friction:has(.severity[data-level="4"]) { --sev-color: #ffb020; }
.friction:has(.severity[data-level="5"]) { --sev-color: var(--danger); }

.evidence { color: var(--ink); font-size: 0.95rem; font-style: italic; margin: 14px 0 0; padding-left: 14px; border-left: 2px solid var(--line-2); opacity: .88; }
.ticket-count { font-family: var(--mono); font-size: 0.78rem; color: var(--muted-dim); margin: 12px 0 0; }

.task-list { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.task-title { font-size: 0.92rem; font-weight: 550; color: var(--ink); }
.task-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted-dim); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }
.status-btn { font-family: var(--mono); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; transition: border-color .15s, color .15s, background .15s; }
.status-btn:hover { border-color: var(--accent); color: var(--ink); }
.status-btn[data-status="in_progress"] { color: #ffb020; border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.08); }
.status-btn[data-status="done"] { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.1); }

.ws-actions { margin-top: 22px; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .steps { grid-template-columns: 1fr; }
  .nav-links a { display: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .friction-head { flex-direction: column; }
  .task-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } * { animation: none !important; transition: none !important; } }
