/* hooklab.css — Hooklab design system v2
   Reference lane: OpusClip / Vercel pure-black monochrome pill system.
   Black canvas, white type, glassy dark cards, pill shapes everywhere.
   Color lives in the content (video thumbnails, slides); the one signal
   accent (#FF4D00) is reserved for receipts and generation actions.
   Type: Geist (everything) / Geist Mono (data, receipts). */

:root {
  /* canvas & surfaces */
  --bg: #000000;
  --surface: #101114;          /* solid card */
  --surface-2: #17191D;        /* raised: inputs, hover fills */
  --glass: rgba(255,255,255,.05);
  --glass-2: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.10);
  --line-2: rgba(255,255,255,.20);

  /* text */
  --ink: #F5F5F6;
  --ink-2: #C9CCD1;
  --muted: #9C9FA6;            /* ≥4.5:1 on --bg and --surface */

  /* signal — receipts + generate actions only */
  --signal: #FF4D00;
  --signal-hi: #FF6A2B;
  --signal-soft: rgba(255,77,0,.14);
  --signal-line: rgba(255,77,0,.35);

  --font: 'Geist', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --radius: 24px;              /* cards */
  --radius-s: 14px;            /* inner elements, form fields */
  --nav-h: 64px;

  /* z-scale */
  --z-sticky: 100;
  --z-drawer: 900;
  --z-nav: 1000;
  --z-dropdown: 1001;
  --z-modal-backdrop: 1100;
  --z-modal: 1101;
  --z-toast: 1200;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3 { text-wrap: balance; }

/* ============ LAYOUT ============ */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(88px, 12vw, 150px) 0; }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.section-head p { color: var(--muted); font-size: 17px; margin: 16px auto 0; max-width: 56ch; }

/* one kicker, hero only — not section grammar */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.kicker::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }

.display { font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; }

/* ============ BUTTONS (pills) ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600; line-height: 1;
  padding: 15px 28px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s cubic-bezier(.22,1,.36,1), background .18s, border-color .18s, box-shadow .18s, color .18s;
}
.btn:active { transform: scale(.97); }
/* primary — white pill on black (the opus CTA) */
.btn-primary { background: var(--ink); color: #000; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 12px 32px -12px rgba(255,255,255,.35); }
/* generate — the one saturated action. Black type on signal orange:
   white fails AA (3.3:1) at this size, black passes (6.3:1). */
.btn-signal { background: var(--signal); color: #000; }
.btn-signal:hover { background: var(--signal-hi); transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgba(255,77,0,.6); }
.btn-signal:disabled, .btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
/* quiet glass */
.btn-ghost { background: var(--glass); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--glass-2); border-color: var(--line-2); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ============ PILL INPUT (hero paste bar) ============ */
.pastebar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 6px 6px 22px; max-width: 560px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.pastebar:focus-within { border-color: rgba(255,255,255,.45); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.pastebar input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font-family: var(--font); font-size: 15px; color: var(--ink); padding: 10px 0;
}
.pastebar input::placeholder { color: var(--muted); }
.pastebar .btn { flex-shrink: 0; }

@media (max-width: 560px) {
  .pastebar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    border-radius: 20px;
    padding: 12px;
  }

  .pastebar input {
    width: 100%;
    min-height: 50px;
    font-size: 16px;
    padding: 0 10px;
  }

  .pastebar .btn {
    width: 100%;
  }
}

/* ============ CARDS ============ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.glass-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

/* hook card — receipts are the loudest thing on it */
.hook-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  transition: transform .22s cubic-bezier(.22,1,.36,1), border-color .22s, box-shadow .22s;
}
.hook-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 60px -24px rgba(0,0,0,.9); }
.hook-thumb {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9;
  background: var(--surface-2); margin: -4px -4px 0;
}
.hook-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hook-thumb .score-chip { position: absolute; top: 10px; right: 10px; }
.hook-card .hook-text { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.hook-card .hook-verbatim { font-size: 13px; color: var(--muted); line-height: 1.5; }
.hook-card .hook-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }

/* receipts — on hook cards they're the proof, so they read louder than chrome */
.stat { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hook-card .stat { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.score-chip {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  background: var(--signal); color: #000;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted);
}

/* filter chips */
.chip {
  font-family: var(--font); font-size: 13.5px; font-weight: 500; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; color: var(--ink-2); transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #000; font-weight: 600; }
select.chip { appearance: none; }

/* ============ FORMS ============ */
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin: -2px 0 8px; }
.field textarea, .field input[type=text], .field input[type=url], .field select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 16px;
  font-family: var(--font); font-size: 14.5px; background: var(--surface-2); color: var(--ink); resize: vertical;
}
.field textarea::placeholder, .field input::placeholder { color: var(--muted); }
.field textarea:focus, .field input:focus, .field select:focus { outline: 2px solid rgba(255,255,255,.5); outline-offset: 1px; }

.msg { padding: 12px 18px; border-radius: var(--radius-s); font-size: 14px; margin-bottom: 18px; display: none; }
.msg.err { background: rgba(255,90,90,.1); border: 1px solid rgba(255,90,90,.3); color: #FF9B9B; display: block; }
.msg.ok { background: rgba(60,200,120,.1); border: 1px solid rgba(60,200,120,.3); color: #7BE3A6; display: block; }

/* ============ MISC ============ */
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.skel { border-radius: 20px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: hlsh 1.2s infinite; }
@keyframes hlsh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.footer { border-top: 1px solid var(--line); padding: 48px 0 64px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer .brand { font-weight: 700; letter-spacing: -0.02em; }
.footer .brand::after { content: '_'; color: var(--signal); }
.footer nav { display: flex; gap: 22px; }
.footer a { font-size: 13.5px; color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* reveal on scroll — JS adds .rv to observed [data-reveal] nodes, then .rv-in.
   Without JS nothing is hidden; content is always visible by default. */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.rv-in { opacity: 1; transform: none; }

/* entrance rise — animations (not class-gated transitions) so content
   always ends visible; reduced-motion override truncates them globally */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hook-card { animation: rise .55s cubic-bezier(.22,1,.36,1) backwards; }

/* focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}

@media (max-width: 640px) {
  :root { --radius: 20px; --radius-s: 13px; }

  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 16px; line-height: 1.55; }

  .wrap { padding-left: 18px; padding-right: 18px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 32px; line-height: 1.08; letter-spacing: 0; }
  .section-head p { font-size: 16px; line-height: 1.55; margin-top: 14px; }

  .kicker { font-size: 13px; letter-spacing: .08em; }

  .btn {
    min-height: 50px;
    padding: 15px 22px;
    font-size: 16px;
    touch-action: manipulation;
  }
  .btn-sm { min-height: 44px; padding: 11px 18px; font-size: 14.5px; }

  .hook-card { border-radius: 18px; padding: 16px; gap: 14px; }
  .hook-card .hook-text { font-size: 19px; line-height: 1.32; letter-spacing: 0; }
  .hook-card .hook-verbatim { font-size: 15px; line-height: 1.55; }
  .stat, .hook-card .stat { font-size: 13px; line-height: 1.45; }
  .score-chip { font-size: 13px; }
  .tag { font-size: 12px; }

  .chip {
    min-height: 44px;
    padding: 10px 17px;
    font-size: 14.5px;
    touch-action: manipulation;
  }

  .field { margin-bottom: 22px; }
  .field label { font-size: 15.5px; margin-bottom: 8px; }
  .field .hint { font-size: 13.5px; line-height: 1.5; }
  .field textarea, .field input[type=text], .field input[type=url], .field select {
    min-height: 50px;
    padding: 13px 15px;
    font-size: 16px;
    line-height: 1.45;
  }

  .msg { font-size: 15px; line-height: 1.5; }
  .empty { padding: 48px 0; font-size: 16px; }

  .footer { padding: 38px 0 48px; margin-top: 24px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer .brand { font-size: 18px; }
  .footer nav { width: 100%; gap: 18px; flex-wrap: wrap; }
  .footer a { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
}
