/*
 * CSS-ONLY-CONSUMES / JS-ONLY-WRITES CONVENTION
 * ─────────────────────────────────────────────
 * CSS rules in this file CONSUME custom properties (var(--name)) but never WRITE them.
 * JS in script-v2.js WRITES custom properties but never reads computed CSS values.
 *
 * Examples:
 *  - --scroll-progress: written by scroll listener, consumed by .scroll-progress::after + .pinned-scrub-track
 *  - .revealed class:   added by IntersectionObserver, consumed by [data-reveal].revealed
 *  - .active class:     added by nav-spy IO, consumed by .nav-links a.active
 *
 * Keep the contract clean: any new scroll-driven effect should follow the same pattern.
 * If you find yourself reading computed styles in JS, stop — set a custom property instead.
 */
/* colbytalley.com — modern luxury styles */

:root {
  --bg: #f8f5ee;
  --bg-soft: #f0ebe1;
  --bg-card: #ffffff;
  --text: #1c1c1c;
  --text-soft: #5a5a5a;
  --text-faint: #8a8a8a;
  --accent: #1c1c1c;           /* R2: Pure Salt — no accent, maps to --text */
  --accent-soft: #5a5a5a;     /* R2: maps to --text-soft */
  --accent-deep: #1c1c1c;     /* R2: maps to --text for borders/fills */
  --border: #e5e0d6;
  --border-soft: #efeae0;
  --radius: 12px;
  --max-w: 1200px;
  --font-display: "Cormorant Garamond", "GT Sectra", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-soft);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  margin-bottom: 0.75rem;
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .cta-link {
  color: var(--accent);
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.nav-links .cta-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Desktop header phone (hidden on mobile) */
.header-phone {
  display: inline-block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: auto;
  margin-right: 1rem;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.header-phone:hover {
  border-bottom-color: var(--accent);
}

/* Sticky mobile call bar (hidden on desktop) */
.sticky-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(10, 10, 10, 0.98);
  border-top: 1px solid var(--border);
  padding: 0.5rem;
  gap: 0.5rem;
  /* flex layout (Grok 4.6 audit bug fix — bar was rendering as inline text on mobile) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* lift above mobile safe area */
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
}

.sticky-call-bar .sticky-call,
.sticky-call-bar .sticky-cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  text-align: center;
}

.sticky-call-bar .sticky-call {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
}

.sticky-call-bar .sticky-cta {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

/* Hero (R2 — Pure Salt: warm cream text on dark editorial photograph, scroll-driven walkthrough) */
/* R2 hides video-story section in production until clip.mp4 lands */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem 2rem;
  overflow: hidden;
  background-color: var(--text);
}

.hero-image-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-image.is-active {
  opacity: 1;
}

/* Soft dark wash for legibility of cream text over photography */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,28,28,0.45) 0%, rgba(28,28,28,0.72) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding-top: 3rem;
  padding-bottom: 2rem;
  color: var(--bg);
}

.hero-content h1,
.hero-content .hero-sub,
.hero-content .hero-micro,
.hero-content .hero-kicker,
.hero-content .hero-trust,
.hero-content .hero-disclaimer {
  color: var(--bg);
}

.hero-content .hero-sub {
  color: rgba(248, 245, 238, 0.85);
}

.hero-content .hero-trust,
.hero-content .hero-disclaimer {
  color: rgba(248, 245, 238, 0.7);
}

.hero-content .btn-primary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--bg);
}

.hero-content .btn-primary:hover {
  background: transparent;
  color: var(--bg);
}

.kicker {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-soft);
  margin-bottom: 1.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero kicker (Bay Area native · 9+ years · $47M+ advised) */
.hero-kicker {
  font-size: 0.8125rem;
  color: var(--bg);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

/* Hero micro-line (1-hour reply. No pitch decks.) */
.hero-micro {
  font-size: 0.875rem;
  color: rgba(248, 245, 238, 0.78);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.hero-sla {
  font-size: 0.95rem;
  color: var(--bg);
  margin-bottom: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-trust {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 1rem 2rem;
  box-shadow: 0 4px 12px rgba(184, 82, 28, 0.25);
}

.btn-primary:hover {
  background: var(--accent-soft);
  color: var(--bg);
  box-shadow: 0 6px 18px rgba(184, 82, 28, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text-soft);
  margin-left: 0.75rem;
}

.btn-secondary:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.05);
}

.hero-cta {
  margin-top: 1rem;
}



/* Hero CTA tertiary (audit link) — keeps audit discoverable but not co-equal */
.hero-cta-audit {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.hero-cta-audit a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.hero-cta-audit a:hover {
  color: var(--accent);
}

/* Larger primary CTA variant for hero */
.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

/* Trust-signal one-liner (above testimonials) */
.trust-line {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
  letter-spacing: 0.01em;
}

/* Testimonials container (stacked) */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0 1rem 0;
}
.testimonials blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 0;
  font-style: italic;
  color: var(--text-soft);
}
.testimonials blockquote p {
  margin: 0;
}
.quote-by {
  margin-top: 0.5rem !important;
  font-size: 0.85rem !important;
  font-style: normal;
  color: var(--text-soft);
  opacity: 0.85;
}
.review-source {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.review-source a {
  color: var(--accent);
}

/* Sections */
section {
  padding: 4rem 0;
}

/* Case study section removed 2026-08-22: placeholder content with fabricated
   specifics shipped in earlier build; user has no equity-specific case study
   to publish. Section pulled per Colby approval; CSS rules cleaned up to
   avoid dead code. Re-add when real proof asset exists. */

.section-intro {
  color: var(--text-soft);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Services */
.services {
  background: var(--bg-soft);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.service-card h3 {
  color: var(--accent);
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Areas */
.area-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  list-style: none;
  margin-top: 2rem;
}

.area-list li {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
}

.area-list a {
  color: var(--text);
}

/* Lead form */
.lead-form-section {
  background: var(--bg-soft);
}

.lead-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.lead-form {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
}

.lead-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lead-form span {
  font-size: 0.85rem;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lead-form input,
.lead-form select {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.lead-form input:focus,
.lead-form select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 0.4rem;
}

.footer-grid a {
  color: var(--text-soft);
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-fine {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  /* Swap header phone for sticky mobile bar */
  .header-phone {
    display: none;
  }

  .sticky-call-bar {
    display: flex;
  }

  /* Prevent the sticky bar from covering the last bit of content */
  body {
    padding-bottom: 72px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 1rem 2rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .btn-secondary {
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .btn-primary {
    padding: 0.875rem 1.75rem;
  }

  .btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
  }

  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  /* Mobile overflow fix: prevent text from clipping at 375px (Opus 5 finding) */
  .hero-content {
    padding: 0 1rem;
    max-width: 100%;
  }
  h1 {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
  .hero-sub {
    max-width: 100%;
    padding: 0 0.25rem;
    overflow-wrap: break-word;
  }
  .hero-trust, .trust-line, .hero-cta-audit {
    padding: 0 0.5rem;
    overflow-wrap: break-word;
  }

  .area-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Mobile-first section rhythm (per Change 4: tighter mobile padding) */
  section {
    padding: 2rem 0;
  }
}

/* Realtor audit banner (moved from hero to footer banner per Opus 5 + M3 finding) */
.audit-banner {
  text-align: center;
  padding: 1.25rem 2rem;
  background: var(--bg-soft);
  font-size: 0.95rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.audit-banner a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.audit-banner a:hover {
  color: var(--accent-soft);
}

/* Video Story placeholder (DoorLight interview) — R2 hides in production; restore when clip.mp4 lands */
.video-story {
  padding: 4rem 2rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* R2: hide video-story section until clip.mp4 is wired.
   Restore: remove the .video-story-hide rule below. */
.video-story-hide .video-story {
  display: none !important;
}

.video-story-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
  text-align: center;
  font-weight: 500;
}

.video-story-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  text-align: center;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.video-story-sub {
  text-align: center;
  color: var(--text-soft);
  margin: 0 0 2rem;
  font-size: 1rem;
}

.video-frame {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.video-story-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg);
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(10,10,10,0.2) 0%, rgba(10,10,10,0.55) 100%);
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

.video-story-video[src] + .video-overlay,
.video-frame:hover .video-overlay {
  opacity: 0;
}

.video-play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(184, 82, 28, 0.92);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.video-play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.video-overlay-label {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.video-caption {
  text-align: center;
  margin: 1.25rem auto 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  max-width: 720px;
}

.video-caption a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-caption a:hover {
  color: var(--accent-soft);
}

@media (max-width: 768px) {
  .video-story { padding: 3rem 1.25rem; }
  .video-play-icon { width: 52px; height: 52px; }
  .video-play-icon::after { border-width: 8px 0 8px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .video-overlay { transition: none; }
}

/* DRE compliance — EHO + hero disclaimer (added 2026-08-24 per PROJECTS/colbytalley-dre-compliance-draft.md) */
.eho-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem auto 0;
  padding: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.eho-logo {
  width: 28px;
  height: 28px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.eho-text {
  text-align: left;
  line-height: 1.3;
}

.eho-text strong {
  color: var(--text);
  font-weight: 600;
}

.hero-disclaimer {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin: 0.5rem 0 0;
  font-style: italic;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .eho-line { font-size: 0.72rem; gap: 0.4rem; }
  .eho-logo { width: 24px; height: 24px; }
}


/* B5 scroll-spy — active nav link */
.nav-links a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}


/* B6 scroll progress + pinned-scrub pattern */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 200;
  pointer-events: none;
}
.scroll-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--scroll-progress, 0);
  background: var(--accent);
  transition: width 0.1s linear;
}
.pinned-scrub {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.pinned-scrub-track {
  display: flex;
  width: 300%;
  height: 100%;
  transform: translateX(calc(var(--scroll-progress, 0) * -66.666%));
  transition: transform 0.1s linear;
}
.pinned-scrub-panel {
  width: 33.333%;
  flex-shrink: 0;
}


/* B7 reveal pattern — fade in + slide up on viewport entry */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}


/* B9 swipe cards — Pointer Events-based container */
[data-swipe-cards] {
  touch-action: pan-y;
  user-select: none;
}
[data-swipe-cards].swiping {
  cursor: grabbing;
}


/* C1 equity clock - mobile deck, desktop grid */
.equity-clock {
  padding: 4rem 1.25rem;
  background: var(--bg-elev, #f8f5ee);
}
.equity-clock .kicker { color: var(--accent); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.equity-clock h2 { font-size: 2rem; margin: 0.5rem 0; }
.equity-clock .sub { color: var(--text-muted, #888); margin-bottom: 2rem; }
.equity-deck {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
}
.equity-card {
  flex: 0 0 85%;
  scroll-snap-align: start;
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, #222);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.equity-icon { font-size: 2rem; }
.equity-card h3 { font-size: 1.25rem; margin: 0.25rem 0; }
.equity-card p { color: var(--text-muted, #888); font-size: 0.95rem; line-height: 1.5; flex: 1; }
.equity-cta { color: var(--accent); text-decoration: none; font-weight: 500; margin-top: 0.5rem; }
.equity-cta:hover { text-decoration: underline; }
.equity-foot { color: var(--text-faint, #555); font-size: 0.8rem; text-align: center; margin-top: 1rem; }
@media (min-width: 768px) {
  .equity-deck {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
  .equity-card { flex: 1; }
}


/* C2 Map My Equity - inline calculator */
.equity-calculator {
  padding: 4rem 1.25rem;
  background: var(--bg, #050505);
}
.equity-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  max-width: 900px;
}
.equity-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.equity-form input {
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, #222);
  color: var(--text, #fff);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 1rem;
}
.equity-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.equity-hint { color: var(--text-faint, #555); font-size: 0.8rem; }
.equity-output {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, #222);
  border-radius: 8px;
  margin-top: 1rem;
}
.equity-stat-label { color: var(--text-muted, #888); font-size: 0.85rem; margin-bottom: 0.25rem; }
.equity-stat-value { color: var(--accent); font-size: 1.5rem; font-weight: 600; margin: 0; }
.equity-footnote { grid-column: 1 / -1; color: var(--text-faint, #555); font-size: 0.8rem; margin: 0.5rem 0; }
.equity-form [data-equity-submit] { grid-column: 1 / -1; margin-top: 1rem; }
@media (max-width: 768px) {
  .equity-form { grid-template-columns: 1fr; }
  .equity-output { grid-template-columns: 1fr; }
}


/* C5 Threshold chapter - long-form article layout */
.chapter {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}
.chapter-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border, #222);
  margin-bottom: 2rem;
}
.chapter-hero .kicker { color: var(--accent); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.chapter-hero h1 { font-size: 3rem; line-height: 1.1; margin: 0.5rem 0; }
.chapter-sub { color: var(--text-muted, #aaa); font-size: 1.25rem; margin: 1rem 0; line-height: 1.4; }
.chapter-meta { color: var(--text-faint, #555); font-size: 0.875rem; }
.chapter-toc {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, #222);
  border-radius: 8px;
  margin-bottom: 3rem;
}
.chapter-toc a { color: var(--accent); text-decoration: none; padding: 0.25rem 0; }
.chapter-toc a:hover { text-decoration: underline; }
.toc-future { color: var(--text-faint, #555); font-size: 0.875rem; padding: 0.25rem 0; font-style: italic; }
.chapter-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border, #1a1a1a);
}
.chapter-section h2 { font-size: 1.75rem; margin: 0 0 1.5rem; line-height: 1.2; }
.chapter-section p { line-height: 1.7; margin: 1rem 0; color: var(--text, #e0e0e0); }
.chapter-list { padding-left: 1.5rem; line-height: 1.7; }
.chapter-list li { margin: 0.75rem 0; }
.chapter-list strong { color: var(--accent); }
.chapter-cta {
  margin: 3rem 0 1rem;
  padding: 2rem;
  background: var(--bg-card, #141414);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-align: center;
}
.chapter-cta-text { color: var(--text-muted, #aaa); margin-bottom: 1rem; }
.chapter-footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border, #222); }
.chapter-disclaimer, .chapter-advice {
  color: var(--text-faint, #666);
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0.5rem 0;
}
.back-link { margin-top: 2rem; }
.back-link a { color: var(--accent); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }


/* R1.2 Mesh gradient bg layer - scroll-craft primitive 1 */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(
    from calc(var(--scroll-progress, 0) * 360deg) at 50% 50%,
    #f8f5ee 0deg,
    #d6e4f5 90deg,
    #f8f5ee 180deg,
    #d6e4f5 270deg,
    #f8f5ee 360deg
  );
  opacity: 0.5;
  transition: opacity 0.3s ease-out;
  will-change: opacity;
}


/* R1.3 Section draw lines - scroll-craft primitive 2 */
.section-line {
  position: absolute;
  left: 1.25rem;
  top: 0;
  height: 100%;
  width: 1px;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.section-line line {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1.2s ease-out;
}
.revealed .section-line line,
[data-reveal].revealed .section-line line {
  stroke-dashoffset: 0;
}
section { position: relative; }
@media (max-width: 768px) {
  .section-line { display: none; }
}


/* R1.5 Grain overlay - scroll-craft primitive 3 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  background-repeat: repeat;
}


/* R1.6 Left-rail spine - scroll-craft primitive 5 */
.spine {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: rgba(248, 245, 238, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid var(--border-soft);
  border-radius: 0 4px 4px 0;
}
.spine-link {
  color: var(--text-faint);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.spine-link:hover {
  color: var(--accent);
}
.spine-link.active {
  color: var(--accent);
  font-weight: 600;
}
@media (max-width: 1024px) {
  .spine { display: none; }
}
