/* Couri — "Editorial Drama" shared system.
 * Loaded on every page after Tailwind + tokens.css. Owns all theme-aware color,
 * typography, components, and motion. Tailwind handles layout utilities only.
 * Theme flips via [data-theme="dark"] on <html> (see tokens.css). */

/* ============================ base ============================ */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

/* a11y: skip link + focus ring */
.skip { position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ============================ type ============================ */
.kicker { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); }
.kicker--muted { color: var(--text-muted); }
.muted { color: var(--text-muted); }
.surface { background: var(--surface); }

.display-hero { font-family: var(--font-display); font-size: var(--step-6); line-height: .9; letter-spacing: -.015em; }
.display-xl   { font-family: var(--font-display); font-size: var(--step-5); line-height: .95; }
.display-lg   { font-family: var(--font-display); font-size: var(--step-4); line-height: 1; }
.display-md   { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.05; }
.display-hero em, .display-xl em, .display-lg em, .display-md em { font-style: italic; }

.lede { font-size: 1.15rem; line-height: 1.55; color: var(--text); }
.measure { max-width: 42rem; }      /* ~65ch */
.measure-sm { max-width: 32rem; }
.balance { text-wrap: balance; }
.pretty  { text-wrap: pretty; }

.slash { height: 7px; width: 78px; background: var(--accent); border-radius: 2px; }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); animation: livepulse 2s infinite; }
@keyframes livepulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* numerals: tabular for data */
.tnum { font-variant-numeric: tabular-nums; }

/* ============================ nav ============================ */
.nav { position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__logo { font-family: var(--font-display); font-size: 1.65rem; color: var(--text); letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { position: relative; font-size: .9rem; color: var(--text-muted); transition: color var(--dur-fast) var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -21px;
  height: 2px; background: var(--accent); }
.nav__right { display: flex; align-items: center; gap: 12px; }

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: transparent; color: var(--text);
  transition: border-color var(--dur-fast), transform var(--dur-fast); }
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); background: transparent; align-items: center; justify-content: center; }
.nav__burger span { display: block; width: 16px; height: 1.6px; background: var(--text); position: relative; }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.6px; background: var(--text); }
.nav__burger span::before { top: -5px; } .nav__burger span::after { top: 5px; }

@media (max-width: 800px) {
  .nav__links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity var(--dur), transform var(--dur); }
  .nav__links a { width: 100%; padding: 13px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav__links a[aria-current="page"]::after { display: none; }
  body.nav-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__burger { display: inline-flex; }
}

/* ============================ buttons ============================ */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--text); color: var(--bg);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast), opacity var(--dur-fast); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }

.btn--flame { background: var(--accent); color: var(--on-accent); border-radius: var(--radius-pill); }
.btn--flame:hover { background: var(--accent-deep); }
.btn--pill { border-radius: var(--radius-pill); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }

.link-underline { color: var(--text); border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: color var(--dur-fast); }
.link-underline:hover { color: var(--accent); }
.link-arrow::after { content: " \2192"; }

/* tags / pills */
.tag { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); color: var(--text-muted); }
.tag--flame { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ============================ bands (deliberate full-bleed punctuation) ============================ */
.band--flame { background: var(--accent); color: var(--on-flame); }
.band--flame .kicker { color: color-mix(in srgb, var(--on-flame) 62%, transparent); }
.band--flame .muted { color: color-mix(in srgb, var(--on-flame) 70%, transparent); }
.band--ink { background: var(--ink-bg); color: var(--on-ink); }
.band--ink .kicker { color: var(--c-flame-dk); }
.band--ink .muted { color: color-mix(in srgb, var(--on-ink) 64%, transparent); }
:root[data-theme="dark"] .band--ink { background: #000; }

/* ============================ cards ============================ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease), border-color var(--dur); }
.card--hover:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }

/* numbered editorial step */
.step__num { font-family: var(--font-accent); font-size: 3.2rem; line-height: .8; color: var(--accent); }

/* image frames */
.imgframe { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); }
.imgframe img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.imgframe--editorial img { filter: sepia(.14) contrast(1.02); }
.card--hover:hover .imgframe img, .imgframe--zoom:hover img { transform: scale(1.035); }
.imgcaption { position: absolute; left: 14px; bottom: 14px; right: 14px;
  background: color-mix(in srgb, var(--c-paper) 92%, transparent); color: var(--c-ink);
  backdrop-filter: blur(4px); border-radius: var(--radius); padding: 10px 13px; }
.imgcaption .t { font-size: .82rem; font-weight: 600; }
.imgcaption .m { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--c-muted); margin-top: 3px; }
.imglabel { position: absolute; top: 18px; right: 16px; writing-mode: vertical-rl;
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--c-paper); opacity: .92; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
/* dev marker for placeholder imagery */
/* placeholder badge hidden in production — images remain curated placeholders per DESIGN.md [P0] */

/* ============================ concierge result cards ============================ */
.concierge { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 70px -44px color-mix(in srgb, var(--text) 55%, transparent); }
.concierge__bar { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.concierge__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.concierge__body { padding: 18px; }
.prompt-line { border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius); padding: 11px 14px; font-size: .95rem; }
.caret::after { content: "▌"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.result { border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius); padding: 12px 14px; }
.result__fit { font-family: var(--font-accent); font-size: 1.6rem; line-height: .8; color: var(--accent); }

/* ============================ forms ============================ */
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.input { flex: 1; min-width: 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit; transition: border-color var(--dur-fast); }
.input::placeholder { color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--text); }
.form-msg { min-height: 1.25rem; font-size: .85rem; color: var(--text-muted); }

/* ============================ marquee ============================ */
.marquee { overflow: hidden; white-space: nowrap; background: var(--ink-bg); color: var(--on-ink); border-block: 1px solid var(--line); }
:root[data-theme="dark"] .marquee { background: #000; }
.marquee__track { display: inline-block; padding-block: 12px; font-family: var(--font-accent);
  font-size: 1.3rem; letter-spacing: .05em; animation: marquee 26s linear infinite; }
.marquee__track b { color: var(--c-flame-dk); font-weight: 400; padding-inline: 14px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ============================ proof grid ============================ */
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.proof > div { background: var(--bg); padding: clamp(24px,3vw,38px) clamp(20px,2.4vw,30px); }
.proof .n { font-family: var(--font-accent); font-size: clamp(2.4rem,4vw,3.3rem); line-height: .85; color: var(--text); }
.proof .l { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 8px; }
@media (max-width: 720px) { .proof { grid-template-columns: 1fr; } }

/* ============================ FAQ (side-by-side, no accordion) ============================ */
.qa { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px 40px; padding-block: 26px; border-top: 1px solid var(--line); }
.qa h3 { font-family: var(--font-display); font-size: 1.4rem; }
@media (max-width: 720px) { .qa { grid-template-columns: 1fr; gap: 8px; } }

/* ============================ footer ============================ */
.footer { border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 56px 28px; }
.footer__col h4 { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.footer__col a { display: block; font-size: .92rem; color: var(--text-muted); padding: 5px 0; transition: color var(--dur-fast); }
.footer__col a:hover { color: var(--text); }
.footer__logo { font-family: var(--font-display); font-size: 2rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 22px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--text-muted); }
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ============================ motion: reveal ============================ */
/* Hidden state is gated behind html.js so content is visible without JS (SEO / no-JS).
 * The shown (.in) rules carry the same html.js prefix so they out-specify the hidden state. */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
html.js .reveal-stagger.in > * { opacity: 1; transform: none; }
html.js .reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
html.js .reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
html.js .reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }

/* ============================ reduced motion ============================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
