/* ============================================================
   fairywren — redesign concept 2: "paper ledger"
   The bone-paper light mode leads. Editorial, typographic,
   print-like — pricing as a beautifully set rate card.
   Tokens: brand/tokens.css (light theme resolved). One easing.
   ============================================================ */

:root {
  --bg:        #f6f5f1;   /* warm bone — never pure white */
  --bg-raise:  #fbfaf7;
  --card:      #ffffff;   /* cards only, on paper */
  --line:      #e3e1d8;
  --line-soft: #edebe3;
  --line-ink:  #14162a;   /* heavy editorial rules */
  --text:      #14162a;
  --text-dim:  #4c5068;
  --text-mute: #6b6f86;
  --accent:       #4f6bff;  /* shapes / wordmark dot */
  --accent-text:  #3a4fd6;  /* accent text on light */
  --accent-hover: #2d3da8;
  --ok: #1c7d57;

  --font-head: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1000px;
  --maxw-text: 720px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-ui: 280ms;
  --t-reveal: 600ms;
  --t-hero: 900ms;
  --shadow-1: 0 2px 10px -2px rgba(20,22,42,.10);
  --shadow-2: 0 16px 44px -18px rgba(20,22,42,.22);
  --focus-ring: 0 0 0 3px rgba(79,107,255,.22), 0 0 0 1.5px #4f6bff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
a:not(.btn):focus-visible { border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: #3a4fd6;
  color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -0.03em;
  text-decoration: none; color: var(--text);
}
.wordmark .dot { color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(246,245,241,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-ui) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 18px; }
.nav .wordmark { font-size: 1.32rem; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { white-space: nowrap;
  text-decoration: none; color: var(--text-dim); font-size: .95rem; font-weight: 500;
  transition: color var(--t-ui) var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .btn { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .92rem 1.7rem; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease),
              transform var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease);
}
.btn-primary { background: #3a4fd6; color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(58,79,214,.45); }
.btn-ghost:hover { border-color: #3a4fd6; background: rgba(79,107,255,.07); transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.16rem; letter-spacing: -0.02em; }
.lead { color: var(--text-dim); font-size: clamp(1.02rem, 2.1vw, 1.18rem); max-width: var(--maxw-text); }
.mono { font-family: var(--font-mono); letter-spacing: .04em; }
a.text-link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
a.text-link:hover { color: var(--accent-hover); }

/* ---------- editorial rules ---------- */
.rule { height: 2px; background: var(--line-ink); border: 0; margin: 0; }
.rule-hair { height: 1px; background: var(--line); border: 0; margin: 0; }
.js .rule-draw { transform: scaleX(0); transform-origin: left; transition: transform var(--t-hero) var(--ease); }
.js .rule-draw.in { transform: scaleX(1); }

/* ---------- hero ---------- */
.hero { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.hero .home-wordmark {
  font-size: clamp(3.4rem, 13vw, 7rem); font-weight: 600;
  letter-spacing: -0.045em; line-height: .98; margin: 0 0 clamp(20px, 3.5vw, 36px);
}
.hero-grid {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(20px, 3.5vw, 36px); align-items: start;
}
.hero-tag { font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.hero-sub { margin: 1rem 0 0; color: var(--text-dim); font-size: clamp(1rem, 2vw, 1.14rem); max-width: 34em; }
.hero-cta { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-facts { display: grid; gap: 0; align-content: start; }
.hero-facts .hf {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: .95rem; color: var(--text-dim);
}
.hero-facts .hf:first-child { border-top: 1px solid var(--line); }
.hero-facts .hf .v { font-family: var(--font-mono); font-size: .85rem; letter-spacing: .02em; color: var(--text); white-space: nowrap; }

/* hero rise (paired with the drawn rule = the one hero moment) */
.js .rise { opacity: 0; transform: translateY(20px); animation: rise var(--t-hero) var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.rise-2 { animation-delay: 90ms !important; }
.rise-3 { animation-delay: 180ms !important; }
.rise-4 { animation-delay: 270ms !important; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }

/* ---------- claim ledger (two-col editorial rows) ---------- */
.claims { border-top: 2px solid var(--line-ink); }
.claim {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 12px 40px;
  padding: clamp(20px, 3vw, 30px) 0; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.claim h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }
.claim p { margin: 0; color: var(--text-dim); font-size: .98rem; }
.claim .spec { display: block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .03em; color: var(--accent-text); margin-top: .5rem; }

/* ---------- the plate (framed gallery mock, light chrome) ---------- */
.plate-wrap { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.plate {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-2);
}
.plate-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 15px;
  border-bottom: 1px solid var(--line-soft); background: var(--bg-raise);
}
.plate-bar .dot3 { width: 9px; height: 9px; border-radius: 999px; background: #d5d2c6; }
.plate-bar .url { margin-left: 10px; font-family: var(--font-mono); font-size: .72rem; color: var(--text-mute); }
.plate-still {
  position: relative; aspect-ratio: 16 / 10;
  background:
    radial-gradient(50% 55% at 35% 40%, rgba(244,205,160,.35), transparent 72%),
    radial-gradient(16% 22% at 72% 32%, rgba(255,226,182,.3), transparent 70%),
    linear-gradient(170deg, #3a2f3a 0%, #57414a 55%, #241f2c 100%);
}
.plate-still::after {
  content: ""; position: absolute; inset: 0; opacity: .45; pointer-events: none;
  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.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.plate-still .play-puck {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 999px;
  background: rgba(255,255,255,.92); display: grid; place-items: center;
  box-shadow: 0 8px 30px -8px rgba(0,0,0,.5);
}
.plate-still .play-puck::after {
  content: ""; border-left: 13px solid #0a0b12;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 3px;
}
.plate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--card); }
.plate-grid span { aspect-ratio: 1; border-radius: 4px; }
.plate-grid span:nth-child(1) { background: linear-gradient(150deg, #4a3a42, #2c2530); }
.plate-grid span:nth-child(2) { background: linear-gradient(200deg, #57454a, #332a34); }
.plate-grid span:nth-child(3) { background: linear-gradient(165deg, #3d3340, #241f2b); }
.plate-grid span:nth-child(4) { background: linear-gradient(185deg, #524049, #2e2731); }
.plate-credit { padding: 11px 15px; font-family: var(--font-mono); font-size: .68rem; color: var(--text-mute); border-top: 1px solid var(--line-soft); }
.plate-caption { margin-top: 12px; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .03em; color: var(--text-mute); }

.feature-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 26px; color: var(--text-dim); font-size: .98rem; }
.feature-list li strong { color: var(--text); font-weight: 600; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}

/* ---------- rate card ---------- */
.p-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(16px, 3vw, 32px); }
.p-hero h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); letter-spacing: -0.04em; }
.p-hero .lead { margin-top: 1rem; }

.rate-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: clamp(24px, 4.5vw, 56px);
}
.rc-section { margin-top: clamp(28px, 4.5vw, 44px); }
.rc-section:first-child { margin-top: 0; }
.rc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding-bottom: 12px; border-bottom: 2px solid var(--line-ink); }
.rc-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.rc-head .meta { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; color: var(--text-mute); }
.rc-note { margin: .8rem 0 0; color: var(--text-dim); font-size: .93rem; max-width: 60em; }

.rc-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft);
}
.rc-row .item { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
.rc-row .item .flag {
  font-family: var(--font-mono); font-weight: 500; font-size: .66rem; letter-spacing: .04em;
  color: var(--ok); border: 1px solid rgba(28,125,87,.4); border-radius: 999px;
  padding: 2px 8px; margin-left: 10px; vertical-align: 2px; white-space: nowrap;
}
.rc-row .spec { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .03em; color: var(--text-mute); white-space: nowrap; }
.rc-row .leader { flex: 1; border-bottom: 1px dotted #c9c6b8; transform: translateY(-4px); min-width: 20px; }
.rc-row .price { font-family: var(--font-mono); font-size: .95rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.rc-row .price .per { color: var(--text-mute); font-size: .74rem; font-weight: 400; }

.rc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 5vw, 56px); }
.rc-cols .col-head { font-weight: 600; font-size: .95rem; padding: 13px 0 6px; color: var(--text-dim); }

.rc-foot { margin-top: clamp(28px, 4.5vw, 44px); padding-top: 16px; border-top: 2px solid var(--line-ink); color: var(--text-mute); font-size: .86rem; }
.rc-foot strong { color: var(--text-dim); font-weight: 500; }

/* ---------- callout ---------- */
.callout {
  border-top: 2px solid var(--line-ink); padding-top: clamp(24px, 4vw, 40px);
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.callout h2 { font-size: clamp(1.4rem, 3vw, 2rem); max-width: 22em; }
.callout .sub { margin: .5rem 0 0; color: var(--text-dim); font-size: .96rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; margin-top: clamp(40px, 6vw, 72px); background: var(--bg-raise); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .wordmark { font-size: 1.05rem; }
.foot-by { color: var(--text-mute); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em; margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { text-decoration: none; color: var(--text-dim); font-size: .92rem; transition: color var(--t-ui) var(--ease); }
.footer-links a:hover { color: var(--text); }

/* ---------- reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d2 { transition-delay: 70ms; }
.reveal.d3 { transition-delay: 140ms; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .plate-wrap { grid-template-columns: 1fr; }
  .claim { grid-template-columns: 1fr; gap: 6px; }
  .callout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .rc-row { flex-wrap: wrap; gap: 4px 12px; }
  .rc-row .leader { display: none; }
  .rc-row .price { margin-left: auto; }
  .rc-cols { grid-template-columns: 1fr; }
}

/* ---------- reduced motion (mandatory) ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .rise { animation: none; opacity: 1; transform: none; }
  .js .rule-draw { transform: none; transition: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .btn, .nav { transition: none; }
}
