/* ── HOMEPAGE (index.html only) ──
   Editorial layout in the LocalEyes black and sky blue: one light serif,
   hairline rules, blue used as a flat accent — no glows or gradients.
   Loaded after styles.css and scoped to body.home. */

body.home {
  /* Same palette as the rest of the site (see :root in styles.css). */
  --paper:   var(--bg);
  --ink:     var(--text);
  --ink-2:   var(--gray);
  --line:    var(--border);
  --grey:    var(--bg-2);
  --grey-2:  var(--bg-3);
  /* How We Work band: warm earth tones instead of blue-steel, so it reads
     natural rather than metallic. */
  --dark:    #16130f;          /* warm near-black, like dark walnut */
  --dark-2:  #b5aca0;          /* warm stone grey for body copy */
  --dark-card: #1f1b16;
  --dark-num:  #c8a97e;        /* muted sand */
  --accent:  var(--sky);
  --gutter:  var(--gutter-x); /* same side margin as the nav (styles.css) */

  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(16px, 1.1111vw, 28.8px);
  line-height: 1.7;
}
body.home h1,
body.home h2,
body.home h3 {
  font-family: inherit;
  font-weight: 300;
  line-height: 1.2;
}
body.home :focus-visible,
body.home a:focus-visible,
body.home button:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ── LAYOUT ── */
.h-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.h-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, clamp(330px, 22.9167vw, 594px));
  gap: clamp(48px, 3.3333vw, 86.4px);
  align-items: start;
}
.h-rule { border-top: 1px solid var(--line); }
.h-aside { font-size: clamp(15px, 1.0417vw, 27px); color: var(--ink-2); }
.h-aside p { margin-bottom: clamp(28px, 1.9444vw, 50.4px); }

/* ── NAV ── */
body.home nav {
  height: clamp(88px, 6.1111vw, 158.4px);
  background: var(--paper);
  border-bottom: 1px solid transparent;
}
body.home nav.scrolled {
  background: var(--paper);
  backdrop-filter: none;
  border-color: var(--line);
}
body.home .logo {
  gap: 0;
  font-family: inherit;
  font-size: clamp(20px, 1.3889vw, 36px);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
body.home .nav-links { gap: clamp(36px, 2.5vw, 64.8px); }
body.home .nav-links a {
  color: var(--ink);
  font-size: clamp(15px, 1.0417vw, 27px);
  font-weight: 300;
}
body.home .nav-links a:hover { color: var(--accent); }
body.home .nav-toggle { border-color: var(--line); border-radius: 0; }
body.home .nav-toggle span,
body.home .nav-toggle::before,
body.home .nav-toggle::after { background: var(--ink); }

/* ── BUTTONS ── */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(11px, 0.7639vw, 19.8px) clamp(38px, 2.6389vw, 68.4px);
  border: 1px solid var(--ink);
  border-radius: clamp(100px, 6.9444vw, 180px);
  font-size: clamp(15px, 1.0417vw, 27px);
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.h-btn:hover { background: var(--accent); border-color: var(--accent); color: #071019; }
/* Solid sky fill, same as .btn-primary on the interior pages, minus the glow. */
.h-btn-primary { background: var(--accent); border-color: var(--accent); color: #071019; font-weight: 400; }
.h-btn-primary:hover { background: transparent; color: var(--accent); }
.h-btn-block { width: 100%; padding: clamp(8px, 0.5556vw, 14.4px) clamp(20px, 1.3889vw, 36px); font-size: clamp(13px, 0.9028vw, 23.4px); }

/* ── TYPE ── */
.h-display {
  font-size: clamp(44px, 6vw, clamp(84px, 5.8333vw, 151.2px));
  letter-spacing: -0.01em;
  color: var(--ink);
}
.h-heading { font-size: clamp(28px, 2.6vw, clamp(36px, 2.5vw, 64.8px)); }
.h-heading-lg { font-size: clamp(30px, 3.1vw, clamp(44px, 3.0556vw, 79.2px)); line-height: 1.35; }
.h-heading-center { text-align: center; }

/* ── INTRO ── */
#intro { padding-top: clamp(220px, 15.2778vw, 396px); padding-bottom: clamp(140px, 9.7222vw, 252px); align-items: start; }
#intro .h-aside { padding-top: clamp(14px, 0.9722vw, 25.2px); }
/* The slow-pulsing logo from the old hero (.hero-logo-glow in styles.css).
   isolation keeps its z-index:-1 above the page background but behind the
   intro text; it's absolutely positioned, so it takes no grid cell. */
#intro { position: relative; isolation: isolate; }
#intro .hero-logo-glow {
  --glow-w: min(clamp(700px, 48.6111vw, 1260px), 100vw);
  /* The pulse keyframes centre it with translate(-50%, -50%), so `top` is its
     centre: half its height (logo is ~0.94 as tall as wide) plus room for the
     nav, so the top of the mark isn't hidden behind the solid header. */
  top: calc(var(--glow-w) * 0.47 + 100px);
  z-index: -1;
  width: var(--glow-w);
}
#intro .h-lead { font-size: clamp(17px, 1.1806vw, 30.6px); line-height: 1.5; color: var(--ink); margin-bottom: clamp(12px, 0.8333vw, 21.6px); }


/* ── WHAT WE DO ── */
#what-we-do { padding-top: clamp(64px, 4.4444vw, 115.2px); padding-bottom: clamp(120px, 8.3333vw, 216px); }
.h-split-head { margin-bottom: clamp(64px, 4.4444vw, 115.2px); }
.h-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(56px, 3.8889vw, 100.8px) clamp(32px, 2.2222vw, 57.6px);
}
.h-card {
  display: flex;
  flex-direction: column;
  padding-top: clamp(24px, 1.6667vw, 43.2px);
  border-top: 1px solid var(--line);
}
.h-card h3 { font-size: clamp(21px, 1.4583vw, 37.8px); margin-bottom: clamp(6px, 0.4167vw, 10.8px); }
.h-card-meta { font-size: clamp(12px, 0.8333vw, 21.6px); color: var(--ink-2); margin-bottom: clamp(16px, 1.1111vw, 28.8px); letter-spacing: 0.02em; }
.h-card p:not(.h-card-meta) { font-size: clamp(15px, 1.0417vw, 27px); color: var(--ink-2); margin-bottom: clamp(24px, 1.6667vw, 43.2px); flex: 1; }

/* ── BANDS ── */
.h-band { padding: clamp(100px, 6.9444vw, 180px) 0 clamp(120px, 8.3333vw, 216px); }
.h-band-grey { background: var(--grey); }
.h-band-dark { background: var(--dark); color: var(--ink); }

/* ── GROWTH CHART ──
   The SVG stretches to the box (preserveAspectRatio="none"), so strokes use
   non-scaling-stroke and the dots/chips are HTML placed by --x/--y percent
   of the same box — they stay round and legible at any width. */
.h-chart {
  position: relative;
  height: clamp(300px, 34vw, 440px);
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.h-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.h-chart-area { fill: var(--accent); fill-opacity: 0.08; }
.h-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.h-chart-guide {
  stroke: var(--accent);
  stroke-opacity: 0.35;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.h-chart-marks { list-style: none; }
.h-mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
}
/* The dot sits on the line; the chip floats above it. */
.h-mark::before {
  content: '';
  position: absolute;
  left: clamp(-10.8px, -0.4167vw, -6px);
  top: clamp(-10.8px, -0.4167vw, -6px);
  width: clamp(12px, 0.8333vw, 21.6px);
  height: clamp(12px, 0.8333vw, 21.6px);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}
.h-mark-chip {
  position: absolute;
  bottom: clamp(22px, 1.5278vw, 39.6px);
  left: 0;
  transform: translateX(-24px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: clamp(10px, 0.6944vw, 18px) clamp(16px, 1.1111vw, 28.8px);
  white-space: nowrap;
  font-size: clamp(14px, 0.9722vw, 25.2px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(56,189,248,0.28);
  border-radius: clamp(10px, 0.6944vw, 18px);
}
.h-mark-end .h-mark-chip { left: auto; right: 0; transform: translateX(24px); }
.h-mark-tag { font-size: clamp(11px, 0.7639vw, 19.8px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* Draw-in once the chart scrolls into view (main.js adds .in).
   Wipe left to right with clip-path: a dash-offset draw doesn't work here,
   because non-scaling-stroke measures dashes in screen pixels. */
.h-chart.reveal { opacity: 1; transform: none; }
.h-chart .h-chart-svg { clip-path: inset(-2px 100% -2px 0); transition: clip-path 1.8s cubic-bezier(.4,0,.2,1); }
.h-chart .h-mark { opacity: 0; transition: opacity .6s ease var(--d); }
.h-chart.in .h-chart-svg { clip-path: inset(-2px -2px -2px 0); }
.h-chart.in .h-mark { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .h-chart .h-chart-svg,
  .h-chart .h-mark { transition: none; }
}

/* Steps alternate left/right like the reference's testimonial column. */
.h-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 1.9444vw, 50.4px);
  margin-top: clamp(64px, 4.4444vw, 115.2px);
}
.h-step {
  width: min(100%, 520px);
  padding: clamp(28px, 1.9444vw, 50.4px) clamp(32px, 2.2222vw, 57.6px);
  background: var(--dark-card);
  border: 1px solid rgba(255,236,210,0.06);
  border-radius: clamp(14px, 0.9722vw, 25.2px);
}
.h-step:nth-child(even) { align-self: flex-end; }
.h-step-num { display: block; font-size: clamp(14px, 0.9722vw, 25.2px); font-style: italic; color: var(--dark-num); margin-bottom: clamp(10px, 0.6944vw, 18px); }
.h-step h3 { font-size: clamp(21px, 1.4583vw, 37.8px); margin-bottom: clamp(8px, 0.5556vw, 14.4px); color: #f3ece2; }
.h-step p { font-size: clamp(15px, 1.0417vw, 27px); color: var(--dark-2); }

/* ── CONTACT ── */
.h-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(48px, 3.3333vw, 86.4px);
  align-items: end;
  padding-top: clamp(100px, 6.9444vw, 180px);
  padding-bottom: clamp(72px, 5vw, 129.6px);
}
.h-contact .h-heading { margin-bottom: clamp(16px, 1.1111vw, 28.8px); }
.h-contact p { font-size: clamp(15px, 1.0417vw, 27px); color: var(--ink-2); margin-bottom: clamp(28px, 1.9444vw, 50.4px); }
.h-contact-info {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.4167vw, 10.8px);
  font-style: normal;
  font-size: clamp(15px, 1.0417vw, 27px);
}
.h-contact-info a { color: var(--ink); text-decoration: none; }
.h-contact-info a:hover { color: var(--accent); }

/* ── FOOTER ── */
body.home footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(24px, 1.6667vw, 43.2px);
  padding: clamp(28px, 1.9444vw, 50.4px) var(--gutter) clamp(40px, 2.7778vw, 72px);
  border-top: none;
  background: transparent;
}
body.home .footer-links { gap: clamp(32px, 2.2222vw, 57.6px); }
body.home .footer-links a,
body.home #cookie-pref-link { font-size: clamp(13px, 0.9028vw, 23.4px) !important; color: var(--ink-2) !important; text-decoration: none; }
body.home .footer-links a:hover { color: var(--ink) !important; }
body.home .footer-copy { font-size: clamp(13px, 0.9028vw, 23.4px); color: var(--ink-2); }

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .h-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body.home nav { height: clamp(68px, 4.7222vw, 122.4px); }
  body.home .nav-links {
    top: clamp(68px, 4.7222vw, 122.4px);
    background: var(--paper);
    backdrop-filter: none;
    border-top: 1px solid var(--line);
  }
  body.home .nav-links li { border-bottom: 1px solid var(--line); }
  body.home .nav-links li:last-child { border-bottom: 1px solid var(--line); margin-top: 0; }

  .h-split,
  .h-contact { grid-template-columns: minmax(0, 1fr); }
  .h-split { gap: clamp(28px, 1.9444vw, 50.4px); }

  #intro { padding-top: clamp(132px, 9.1667vw, 237.6px); padding-bottom: clamp(80px, 5.5556vw, 144px); }
  #intro .h-aside { padding-top: 0; }
  .h-split-head { margin-bottom: clamp(40px, 2.7778vw, 72px); }
  #what-we-do { padding-bottom: clamp(88px, 6.1111vw, 158.4px); }
  .h-band { padding: clamp(72px, 5vw, 129.6px) 0 clamp(88px, 6.1111vw, 158.4px); }
  .h-steps { margin-top: clamp(40px, 2.7778vw, 72px); }
  .h-step { width: 100%; }
  .h-contact { align-items: start; padding-top: clamp(72px, 5vw, 129.6px); }

  /* Sticky Book a Call bar from main.js, restyled to match. */
  body.home .mobile-cta-bar {
    background: var(--paper);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--line);
  }
  body.home .mobile-cta-bar .btn {
    background: var(--accent);
    color: #071019;
    border-radius: clamp(100px, 6.9444vw, 180px);
    font-family: inherit;
    font-weight: 400;
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  .h-cards { grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 2.7778vw, 72px); }
  .h-step { padding: clamp(24px, 1.6667vw, 43.2px); }
  /* Phone: taller plot, one-line chips, so the three callouts clear each other. */
  .h-chart { height: clamp(360px, 25vw, 648px); }
  .h-mark-tag { display: none; }
  .h-mark-chip { padding: clamp(5px, 0.3472vw, 9px) clamp(10px, 0.6944vw, 18px); font-size: clamp(12px, 0.8333vw, 21.6px); border-radius: clamp(8px, 0.5556vw, 14.4px); bottom: clamp(16px, 1.1111vw, 28.8px); transform: translateX(-16px); }
  .h-mark-end .h-mark-chip { transform: translateX(16px); }
  body.home footer { flex-direction: column; align-items: flex-start; }
  body.home .footer-links { gap: clamp(12px, 0.8333vw, 21.6px) clamp(24px, 1.6667vw, 43.2px); }
}
