/* ============================================================
   Open Book — dark-canvas system per Framer DESIGN.md
   Canvas #090909 · white pills · single blue accent #0099ff
   ============================================================ */

:root {
  /* colors */
  --primary: #ffffff;
  --on-primary: #000000;
  --accent-blue: #0099ff;
  --ink: #ffffff;
  --ink-muted: #999999;
  --canvas: #090909;
  --surface-1: #141414;
  --surface-2: #1c1c1c;
  --hairline: #262626;
  --hairline-soft: #1a1a1a;
  --gradient-magenta: #d44df0;
  --gradient-violet: #6a4cf5;
  --gradient-orange: #ff7a3d;
  --gradient-coral: #ff5577;
  --success: #22c55e;

  /* radius */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 15px;
  --r-xl: 20px; --r-xxl: 30px; --r-pill: 100px; --r-full: 9999px;

  /* spacing (5px base) */
  --sp-xs: 8px; --sp-sm: 12px; --sp-md: 15px; --sp-lg: 20px;
  --sp-xl: 30px; --sp-xxl: 40px; --sp-section: 96px;

  --container: 1199px;

  --font-display: "Mona Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-feature-settings: "cv01", "cv05", "cv09", "cv11", "ss03", "ss07";
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 153, 255, 0.35); color: var(--ink); }

a { color: inherit; text-decoration: none; }
p a, .body-copy a { color: var(--accent-blue); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 153, 255, 0.6), 0 0 0 4px rgba(0, 153, 255, 0.15);
  border-radius: var(--r-xs);
}

/* ============ TYPE SCALE ============ */

.display-xxl, .display-xl, .display-lg, .display-md {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.display-xxl {
  font-size: clamp(44px, 8.5vw, 110px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.display-xl {
  font-size: clamp(36px, 6.5vw, 85px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.display-lg {
  font-size: clamp(30px, 4.8vw, 62px);
  line-height: 1.0;
  letter-spacing: -0.05em;
}
.display-md {
  font-size: 32px;
  line-height: 1.13;
  letter-spacing: -0.031em;
}
.headline {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.036em;
}
.subhead {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-muted);
  max-width: 640px;
}
.body-lg { font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.body-copy { font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.body-copy b { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--sp-lg);
}
.eyebrow-onbright { color: rgba(255, 255, 255, 0.75); }

/* ============ BUTTONS (pills only) ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  border-radius: var(--r-pill);
  padding: 10px 15px;
  min-height: 44px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.96); }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: #e8e8e8; }

.btn-secondary { background: var(--surface-1); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); }

.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ============ NAV ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 9, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding: 0 var(--sp-xl);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.wordmark span { color: var(--ink-muted); }

.nav-links {
  display: flex;
  gap: var(--sp-xl);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-links a { color: var(--ink-muted); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }

.nav-ctas { display: flex; align-items: center; gap: var(--sp-sm); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface-1);
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  align-items: center;
}
.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.hamburger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ============ HERO ============ */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--sp-xl) var(--sp-section);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero .subhead { margin-top: var(--sp-xl); }

.cta-row {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-xxl);
  flex-wrap: wrap;
  justify-content: center;
}

.trust-strip {
  margin-top: var(--sp-xxl);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}
.trust-strip b { color: var(--ink); font-weight: 600; }
.trust-strip .dot {
  width: 3px; height: 3px;
  border-radius: var(--r-full);
  background: var(--hairline);
}

/* ============ STATS ============ */

.stats {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}
.stats-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-section) var(--sp-xl);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-xxl);
}
.stat { display: flex; flex-direction: column; gap: var(--sp-sm); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.5vw, 58px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 14px; line-height: 1.4; color: var(--ink-muted); max-width: 240px; }

/* ============ SECTIONS ============ */

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-section) var(--sp-xl);
}
.section-narrow { max-width: 860px; }
.section-lede {
  margin-top: var(--sp-lg);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-muted);
  max-width: 560px;
}

/* ============ WORK CARDS ============ */

.work-grid {
  margin-top: calc(var(--sp-xxl) + 16px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.card {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
}
.work-metric { line-height: 1; }
.work-metric-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-top: calc(-1 * var(--sp-xs));
}
.work-card blockquote, .spotlight blockquote {
  margin-top: auto;
  padding-top: var(--sp-md);
  border-top: 1px solid var(--hairline-soft);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}
blockquote cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; }

/* gradient spotlight cards — the signature; max two per page */
.spotlight {
  border-radius: var(--r-xxl);
  padding: 32px;
  box-shadow: none;
}
.spotlight-violet {
  background: radial-gradient(120% 120% at 15% 0%, var(--gradient-magenta) 0%, var(--gradient-violet) 55%, #3c2bb3 100%);
}
.spotlight-violet .body-copy,
.spotlight-violet blockquote,
.spotlight-violet .work-metric-label { color: rgba(255, 255, 255, 0.82); }
.spotlight-violet .body-copy b { color: #fff; }
.spotlight-violet blockquote { border-top-color: rgba(255, 255, 255, 0.25); }

/* ============ HOW IT WORKS (approach + steps) ============ */

.approach-grid {
  margin-top: calc(var(--sp-xxl) + 16px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: start;
}
.approach-grid .spotlight { gap: var(--sp-md); }
.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}
.step-card {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-xl);
}
.step-card .headline { margin-bottom: 6px; }
.step-n {
  flex: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

/* ============ SERVICES ============ */

.services-grid {
  margin-top: calc(var(--sp-xxl) + 16px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}
.service-card { gap: var(--sp-sm); }
.service-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border-radius: var(--r-full);
  font-size: 17px;
  margin-bottom: var(--sp-xs);
}

/* ============ OWNERSHIP ============ */

.ownership-list {
  margin-top: calc(var(--sp-xxl) + 16px);
  list-style: none;
  display: flex;
  flex-direction: column;
  max-width: 760px;
}
.ownership-list li {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.ownership-list li b { color: var(--ink); font-weight: 600; }
.check {
  flex: none;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  font-size: 13px;
  margin-top: 2px;
}

/* ============ PRICING ============ */

.pricing-grid {
  margin-top: calc(var(--sp-xxl) + 16px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  align-items: stretch;
}
.pricing-card {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  position: relative;
}
.pricing-card.featured {
  background: var(--surface-2);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.25);
}
.tag {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-1);
  padding: 5px 10px;
  border-radius: var(--r-pill);
}
.price {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.price span { font-size: 16px; font-weight: 500; color: var(--ink-muted); letter-spacing: -0.01em; }
.price-note { font-size: 13px; color: var(--ink-muted); margin-top: calc(-1 * var(--sp-xs)); }
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  padding: var(--sp-md) 0;
  flex: 1;
}
.feature-list li {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding-left: 22px;
  position: relative;
  line-height: 1.4;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-size: 12px;
}
.pricing-footnote {
  margin-top: var(--sp-xl);
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}

/* ============ AUDIT PANEL ============ */

.audit-panel {
  border-radius: var(--r-xxl);
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.spotlight-orange {
  background: radial-gradient(130% 130% at 85% 0%, var(--gradient-coral) 0%, var(--gradient-orange) 55%, #c2410c 100%);
}
.audit-copy .body-lg { margin-top: var(--sp-lg); color: rgba(255, 255, 255, 0.88); max-width: 480px; }
.audit-copy .display-lg { margin-top: var(--sp-xs); }
.audit-points {
  list-style: none;
  margin-top: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.audit-points li {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  padding-left: 24px;
  position: relative;
  line-height: 1.4;
}
.audit-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.7);
}

.audit-form {
  background: rgba(9, 9, 9, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.audit-form label { display: flex; flex-direction: column; gap: 6px; }
.audit-form label span { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.audit-form input,
.audit-form select,
.audit-form textarea {
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: -0.01em;
  width: 100%;
}
.audit-form input::placeholder,
.audit-form textarea::placeholder { color: #666; }
.audit-form textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.audit-form select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  /* custom chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.audit-form select:invalid { color: #666; }
.audit-form input:focus,
.audit-form select:focus,
.audit-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 153, 255, 0.6), 0 0 0 4px rgba(0, 153, 255, 0.15);
}
.audit-form .btn { margin-top: var(--sp-xs); }
.form-micro { font-size: 12px; line-height: 1.4; color: rgba(255, 255, 255, 0.6); text-align: center; }
.form-success {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(34, 197, 94, 0.25);
  border-radius: var(--r-md);
  padding: 12px 14px;
  text-align: center;
}
.form-error {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(239, 68, 68, 0.25);
  border-radius: var(--r-md);
  padding: 12px 14px;
  text-align: center;
}

/* ============ FAQ ============ */

.faq-list {
  margin-top: calc(var(--sp-xxl) + 16px);
  display: flex;
  flex-direction: column;
}
.faq-row { border-bottom: 1px solid var(--hairline-soft); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: left;
  padding: 24px 0;
  cursor: pointer;
}
.faq-icon {
  flex: none;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  background: var(--surface-1);
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.25s ease;
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-a p {
  padding: 0 48px 24px 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 640px;
}

/* ============ FINAL CTA ============ */

.final-cta {
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--sp-section) + 24px) var(--sp-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============ FOOTER ============ */

.footer {
  border-top: 1px solid var(--hairline-soft);
}
.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-xxl);
}
.footer-brand p {
  margin-top: var(--sp-md);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.footer-brand a { color: var(--ink-muted); }
.footer-brand .wordmark { color: var(--ink); }
.footer h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-md);
}
.footer-grid div a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 5px 0;
  transition: color 0.15s ease;
}
.footer-grid div a:hover { color: var(--ink); }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-lg) 32px 40px;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-lg);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-muted);
  border-top: 1px solid var(--hairline-soft);
}

/* ============ REVEAL MOTION ============ */

/* hidden state only applies once JS has confirmed it will reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.d-1 { transition-delay: 0.08s; }
.d-2 { transition-delay: 0.16s; }
.d-3 { transition-delay: 0.24s; }
.d-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 810px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: rgba(9, 9, 9, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    padding: var(--sp-md) var(--sp-xl) var(--sp-xl);
    border-bottom: 1px solid var(--hairline-soft);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--hairline-soft); }
  .hamburger { display: flex; }
  .nav-hide-sm { display: none; }

  .work-grid, .pricing-grid { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: 1fr; }
  .audit-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .services-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px var(--sp-lg); }
  .hero { padding-left: var(--sp-lg); padding-right: var(--sp-lg); }
  .cta-row .btn { width: 100%; }
}
