/* HD Installs — tokens.json values as CSS custom properties. Components reference these vars only. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-var.woff2') format('woff2-variations'), url('../fonts/bricolage-grotesque-var.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-var.woff2') format('woff2-variations'), url('../fonts/ibm-plex-sans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --color-ink: #10151A;
  --color-ink-rgb: 16, 21, 26;
  --color-paper: #F6F3EE;
  --color-paper-alt: #ECE5D6;
  --color-signal-teal: #14A38C;
  --color-copper: #C97B3D;
  --color-ink-muted: #3A4147;
  --color-border-muted: #9CA3A8;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --scale-ratio: 1.333;
  --size-body: 16px;
  --size-h1: clamp(32px, 6vw, 64px);
  --size-h2: clamp(26px, 4vw, 48px);
  --size-h3: clamp(20px, 2.6vw, 34px);
  --line-height-body: 1.5;

  --space-section-mobile: 80px;
  --space-section-desktop: 140px;
  --content-max-width: 1200px;
  --grid-unit: 8px;

  --radius-cta: 6px;
  --radius-card: 4px;

  --shadow-card-resting: 0 2px 6px rgba(16,21,26,0.06), 0 1px 2px rgba(16,21,26,0.05);
  --shadow-card-hover: 0 16px 32px rgba(16,21,26,0.16), 0 4px 10px rgba(16,21,26,0.08);
  --shadow-cta-hover: 0 4px 12px rgba(20,163,140,0.25);

  --motion-entrance: 200ms ease-out;
  --motion-hover: 150ms ease-out;
  --rise-distance: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--line-height-body);
  color: var(--color-ink);
  background-color: var(--color-paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; }
h1 { font-size: var(--size-h1); font-weight: 700; }
h2 { font-size: var(--size-h2); font-weight: 700; }
h3 { font-size: var(--size-h3); font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--color-signal-teal); }
img, video { max-width: 100%; height: auto; display: block; }
.job-photo { filter: saturate(1.06) contrast(1.04) brightness(1.01); }

.container { max-width: var(--content-max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--space-section-mobile) 0; }
@media (min-width: 900px) { .section { padding: var(--space-section-desktop) 0; } }

/* Signature copper rule under headings on light (paper) sections only */
.section h1::after, .section h2::after {
  content: ""; display: block; width: 56px; height: 3px;
  background: var(--color-copper); border-radius: 2px; margin-top: 14px;
}
.founder h1::after, .contact h1::after { display: none; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-signal-teal); color: #fff;
  padding: 12px 20px; z-index: 100; border-radius: 0 0 var(--radius-cta) 0;
}
.skip-link:focus { left: 0; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,21,26,0.92);
  backdrop-filter: blur(6px);
  color: #fff;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.site-header .logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; color: #fff; text-decoration: none; font-size: 1.1rem; }
.site-header .logo img { height: 32px; width: auto; }
.nav-links { display: none; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 500; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { color: var(--color-signal-teal); }
.mobile-menu a[aria-current="page"] { color: var(--color-signal-teal); }
@media (min-width: 860px) { .nav-links { display: flex; } }

.call-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-signal-teal); color: #fff; text-decoration: none;
  font-weight: 700; padding: 10px 18px; border-radius: var(--radius-cta);
  transition: box-shadow var(--motion-hover), transform var(--motion-hover);
  white-space: nowrap;
}
.call-btn:hover, .call-btn:focus-visible { box-shadow: var(--shadow-cta-hover); transform: translateY(-1px); }

.nav-toggle { display: inline-flex; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
@media (min-width: 860px) { .nav-toggle { display: none; } }
.mobile-menu { display: none; flex-direction: column; gap: 16px; padding: 16px 24px 24px; background: rgba(16,21,26,0.98); list-style: none; margin: 0; }
.mobile-menu.is-open { display: flex; }
.mobile-menu a { color: #fff; text-decoration: none; font-weight: 500; }

/* Sticky mobile call bar */
.sticky-call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--color-signal-teal); color: #fff; text-align: center;
  padding: 14px; font-weight: 700; text-decoration: none; display: block;
}
@media (min-width: 860px) { .sticky-call-bar { display: none; } }

/* Hero */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-media picture, .hero-media video { position: absolute; inset: 0; }
.hero-media picture, .hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to top, rgba(var(--color-ink-rgb),0.75) 0%, rgba(var(--color-ink-rgb),0.25) 45%, transparent 75%);
}
.hero-content { position: relative; z-index: 2; padding: 32px 24px 130px 24px; width: 100%; }
@media (min-width: 640px) { .hero-content { padding-left: clamp(24px, 4vw, 64px); } }

/* Soft shadow hugging the glyphs themselves, not a visible glass panel behind
   them — keeps legibility over the busy brick photo without reading as a UI box. */
.hero-text-panel .glass-text {
  text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 2px 8px rgba(0,0,0,0.6), 0 6px 18px rgba(0,0,0,0.4);
}
.hero-text-panel h1 .glass-text {
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 4px 14px rgba(0,0,0,0.7), 0 8px 26px rgba(0,0,0,0.45);
}
.hero-content .eyebrow .glass-text {
  background: rgba(var(--color-ink-rgb),0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 0.12em 0.3em;
  border-radius: 3px;
}
.eyebrow { display: block; color: var(--color-signal-teal); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; margin: 0 0 0.6em; }
.hero-content h1 { margin-bottom: 0.3em; max-width: 20ch; font-size: clamp(28px, 4.5vw, 52px); font-weight: 800; }
.hero-content .support-line { font-size: 1.15rem; max-width: 42ch; margin-bottom: 1.5em; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.video-toggle {
  position: absolute; right: 20px; bottom: 20px; z-index: 3;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: rgba(16,21,26,0.35); border: 1px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.6);
  border-radius: 50%; cursor: pointer; padding: 0;
  opacity: 0.45; transition: opacity var(--motion-hover), background var(--motion-hover);
}
.video-toggle:hover, .video-toggle:focus-visible { opacity: 1; background: rgba(16,21,26,0.6); color: #fff; }

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-signal-teal); color: #fff; text-decoration: none; font-weight: 700;
  padding: 16px 28px; border-radius: var(--radius-cta); font-size: 1.05rem;
}
.hero-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(0,0,0,0.4); }
.hero-secondary { color: #fff; text-decoration: underline; font-weight: 500; }

/* Proof point */
.proof-point .grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .proof-point .grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }
.proof-point img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%;
  border-radius: var(--radius-card); box-shadow: var(--shadow-card-resting);
}
.proof-point .claim { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.25; }

/* Services */
.services-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  background: #fff; border-radius: var(--radius-card);
  padding: 28px; box-shadow: var(--shadow-card-resting);
  transition: transform var(--motion-hover), box-shadow var(--motion-hover);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.service-card .icon { width: 36px; height: 36px; margin-bottom: 18px; color: var(--color-signal-teal); }
/* Founder */
.founder { background: var(--color-ink); color: #fff; }
.founder .grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .founder .grid { grid-template-columns: 0.9fr 1.1fr; align-items: center; } }
.founder blockquote {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.4;
  margin: 0 0 1em; padding-left: 20px; border-left: 3px solid var(--color-copper);
}
.founder cite { color: var(--color-signal-teal); font-style: normal; font-weight: 600; }
.founder .entity-note { color: var(--color-border-muted); font-size: 0.9rem; }

/* Before/after + generic TODO block (visible, marked, never a silent gradient placeholder) */
.needs-client-material {
  border: 2px dashed var(--color-copper); border-radius: var(--radius-card);
  background: repeating-linear-gradient(45deg, rgba(201,123,61,0.06), rgba(201,123,61,0.06) 10px, rgba(201,123,61,0.12) 10px, rgba(201,123,61,0.12) 20px);
  padding: 40px 24px; text-align: center; color: var(--color-ink-muted);
}
.needs-client-material .label {
  display: inline-block; background: var(--color-copper); color: #fff; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; margin-bottom: 12px;
}

/* Recent work gallery */
.work-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
@media (min-width: 640px) { .work-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .work-gallery { grid-template-columns: repeat(4, 1fr); } }
.work-gallery img {
  width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-resting);
  transition: transform var(--motion-hover), box-shadow var(--motion-hover);
}
.work-gallery img:hover { transform: scale(1.045); box-shadow: var(--shadow-card-hover); position: relative; z-index: 1; }

/* How it works */
.section-intro { font-size: 1.1rem; color: var(--color-ink-muted); max-width: 60ch; margin-top: -0.5em; margin-bottom: 2em; }
.how-steps { display: grid; gap: 32px; counter-reset: step; }
@media (min-width: 780px) { .how-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .how-steps-3 { grid-template-columns: repeat(3, 1fr); } }
.how-step { position: relative; padding-left: 56px; border-left: 2px solid var(--color-signal-teal); padding-bottom: 8px; }
.how-step .num {
  position: absolute; left: -22px; top: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-signal-teal); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
}
.how-icon { width: 32px; height: 32px; color: var(--color-signal-teal); margin: 4px 0 14px; }

/* Comparison table */
.comparison-table { display: grid; gap: 0; margin-top: 32px; border: 1px solid var(--color-border-muted); border-radius: var(--radius-card); overflow: hidden; }
.comparison-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; border-top: 1px solid var(--color-border-muted); }
.comparison-row:first-child { border-top: none; }
.comparison-row > div { padding: 16px 18px; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.comparison-row > div:first-child { font-weight: 600; background: var(--color-paper); }
.comparison-head { font-family: var(--font-display); font-weight: 700; }
.comparison-head > div:nth-child(2) { color: var(--color-ink-muted); }
.comparison-highlight { background: rgba(20,163,140,0.07); color: var(--color-ink); font-weight: 600; }
.comparison-head .comparison-highlight { background: var(--color-signal-teal); color: #fff; }
.x-icon { width: 16px; height: 16px; color: var(--color-border-muted); flex-shrink: 0; }
.check-icon { width: 16px; height: 16px; color: var(--color-signal-teal); flex-shrink: 0; }
@media (max-width: 640px) {
  .comparison-row { grid-template-columns: 1fr; }
  .comparison-row > div:first-child { border-bottom: 1px solid var(--color-border-muted); }
  .comparison-head { display: none; }
}

/* Contact */
.contact { background: var(--color-ink); color: #fff; }
.contact .grid { display: grid; gap: 40px; }
.contact-line { display: flex; align-items: center; gap: 10px; }
.contact-icon { width: 20px; height: 20px; color: var(--color-signal-teal); flex-shrink: 0; }
@media (min-width: 900px) { .contact .grid { grid-template-columns: 1fr 1fr; } }
.contact-phone { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--color-signal-teal); text-decoration: none; }
form .field { margin-bottom: 18px; }
form label { display: block; font-weight: 600; margin-bottom: 6px; }
form input, form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-cta); border: 1px solid var(--color-border-muted);
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--color-ink);
}
form input:focus, form textarea:focus { outline: 2px solid var(--color-signal-teal); outline-offset: 1px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--color-border-muted); }
.consent-row input { width: auto; margin-top: 4px; }
/* Secondary/outline treatment — the phone number stays the one dominant CTA;
   this form submit is a real but clearly-quieter second path. */
.submit-btn {
  background: transparent; color: var(--color-signal-teal); border: 2px solid var(--color-signal-teal);
  font-weight: 700; padding: 12px 28px; border-radius: var(--radius-cta); font-size: 1rem; cursor: pointer;
  transition: background var(--motion-hover), color var(--motion-hover);
}
.submit-btn:hover, .submit-btn:focus-visible { background: var(--color-signal-teal); color: #fff; }
.submit-btn:disabled { opacity: 0.7; cursor: default; }
.form-confirmation { margin-top: 12px; color: var(--color-signal-teal); font-weight: 600; }

/* Footer */
.site-footer { background: var(--color-ink); color: var(--color-border-muted); padding: 48px 0 100px; font-size: 0.9rem; }
@media (min-width: 860px) { .site-footer { padding-bottom: 48px; } }
.site-footer a { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 16px 0 0; }
.surveillance-notice { max-width: 70ch; margin-top: 24px; font-size: 0.8rem; line-height: 1.6; }

/* Scroll reveals (below-fold content) — native CSS, no JS/IntersectionObserver
   per the motion-defaults rule (this page has far fewer than 3 scroll effects,
   so no animation library). Real scroll-linked reveal where supported; browsers
   without it just show content immediately rather than firing on page load. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    /* Opacity-only variant for elements that already animate `transform` on :hover
       (service cards lift, gallery photos zoom) — animations win the cascade over
       a plain :hover rule on the same property, so a translateY reveal here would
       silently cancel the hover effect once the fill-mode holds its end state. */
    .reveal-fade {
      animation: fade-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    /* Cascade same-row grid reveals instead of firing all at once */
    .service-card.reveal-fade:nth-child(2), .work-gallery img.reveal-fade:nth-child(2) { animation-range: entry 4% cover 34%; }
    .service-card.reveal-fade:nth-child(3), .work-gallery img.reveal-fade:nth-child(3) { animation-range: entry 8% cover 38%; }
    .service-card.reveal-fade:nth-child(4), .work-gallery img.reveal-fade:nth-child(4) { animation-range: entry 12% cover 42%; }
    .service-card.reveal-fade:nth-child(5), .work-gallery img.reveal-fade:nth-child(5) { animation-range: entry 16% cover 46%; }
    .service-card.reveal-fade:nth-child(6), .work-gallery img.reveal-fade:nth-child(6) { animation-range: entry 20% cover 50%; }
    .work-gallery img.reveal-fade:nth-child(7) { animation-range: entry 24% cover 54%; }
    .work-gallery img.reveal-fade:nth-child(8) { animation-range: entry 28% cover 58%; }
    .how-step.reveal:nth-child(2) { animation-range: entry 5% cover 35%; }
    .how-step.reveal:nth-child(3) { animation-range: entry 10% cover 40%; }
  }
  /* Hero entrance (above the fold — this one legitimately fires once on load,
     staggered, per Hero-First Part 1 Step 6 — not a scroll effect). */
  .hero-enter { animation: rise var(--motion-entrance) both; }
  .hero-enter.support-line { animation-delay: 100ms; }
  .hero-enter.hero-cta-row { animation-delay: 200ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise-distance)); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
