:root {
  --bg: #f7f3ec;
  --bg-elevated: #fdfbf6;
  --ink: #2a1f1a;
  --ink-muted: #6b5d54;
  --ink-subtle: #9a8e83;
  --accent: #c2573f;
  --accent-soft: #f2d9cb;
  --accent-deep: #8c3a28;
  --accent-2: #5c4a2e;
  --border: #e8e0d3;
  --border-strong: #d0c5b3;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-deep);
}

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

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><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>");
}

/* ---------- Nav ---------- */

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 56px);
  max-width: 1240px;
  margin: 0 auto;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nav__mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav__links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__links a.nav__cta {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__links a.nav__cta:hover {
  border-bottom-color: var(--ink);
}

@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) {
    display: none;
  }
}

/* ---------- Shared section primitives ---------- */

.section__inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) clamp(20px, 5vw, 56px);
}

.section__eyebrow {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-subtle);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 56px)
    clamp(72px, 10vw, 120px);
  max-width: 1240px;
  margin: 0 auto;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  padding-top: clamp(16px, 4vw, 48px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(28px, 5vw, 40px);
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.hero__dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(194, 87, 63, 0.5);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(194, 87, 63, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(194, 87, 63, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(194, 87, 63, 0);
  }
}

/* ---------- Mascot ---------- */

.hero__mascot-wrap {
  position: relative;
  width: 150px;
  height: 244px;
  margin-bottom: 8px;
  transform-style: preserve-3d;
  perspective: 600px;
}

.hero__mascot {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: auto;
  transform-origin: 50% 100%;
  animation: mascotBob 4.6s ease-in-out infinite;
  will-change: transform;
}

.hero__mascot-shadow {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(42, 31, 26, 0.22) 0%,
    rgba(42, 31, 26, 0) 70%
  );
  animation: shadowPulse 4.6s ease-in-out infinite;
}

@keyframes mascotBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1.2deg);
  }
  50% {
    transform: translateY(-6px) rotate(1.2deg);
  }
}

@keyframes shadowPulse {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(0.78);
    opacity: 0.7;
  }
}

/* ---------- Headline ---------- */

.hero__headline {
  margin: 0 0 clamp(20px, 3vw, 28px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* ---------- Sub + CTAs ---------- */

.hero__sub {
  margin: 0 0 clamp(28px, 4vw, 36px);
  max-width: 640px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-elevated);
  box-shadow: 0 1px 0 0 rgba(42, 31, 26, 0.08),
    0 8px 24px -8px rgba(194, 87, 63, 0.55);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 0 rgba(42, 31, 26, 0.1),
    0 12px 30px -8px rgba(194, 87, 63, 0.65);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--ink-subtle);
}

.btn--large {
  padding: 16px 28px;
  font-size: 16px;
}

.btn__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn--ghost:hover .btn__arrow {
  transform: translateX(3px);
}

.hero__proof {
  margin: 0;
  font-size: 13px;
  color: var(--ink-subtle);
  letter-spacing: 0.01em;
}

/* ---------- Ambient bg ---------- */

.hero__ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
      ellipse 80% 60% at 15% 20%,
      rgba(242, 217, 203, 0.55) 0%,
      rgba(242, 217, 203, 0) 60%
    ),
    radial-gradient(
      ellipse 70% 50% at 85% 80%,
      rgba(194, 87, 63, 0.1) 0%,
      rgba(194, 87, 63, 0) 55%
    ),
    linear-gradient(180deg, #fdfbf6 0%, #f7f3ec 100%);
}

/* ---------- Why now (elevated background) ---------- */

.why {
  background: var(--bg-elevated);
}

.why__grid {
  display: grid;
  grid-template-columns: 42fr 58fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.why__col {
  min-width: 0;
}

.why__col--head .why__headline {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .why__grid {
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 32px);
  }
}

.why__headline {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}

.why__body {
  margin: 0;
  max-width: 64ch;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ---------- Pillars ---------- */

.pillars {
  background: var(--bg);
}

.pillars__headline {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}

.pillars__lede {
  margin: 0 0 clamp(36px, 5vw, 56px);
  max-width: 56ch;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.pillars__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.pillar {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 1px 0 0 var(--border-strong);
  transition: transform 180ms ease, border-color 180ms ease;
}

.pillar:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.pillar__num {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
}

.pillar__title {
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.pillar__body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
}

@media (max-width: 960px) {
  .pillars__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .pillars__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Methodology (MACHINE framework) ---------- */

.method {
  background: var(--bg-elevated);
}

.method__headline {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}

.method__lede {
  margin: 0 0 clamp(36px, 5vw, 56px);
  max-width: 64ch;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--ink-muted);
}

.method__grid {
  list-style: none;
  margin: 0 0 clamp(32px, 4vw, 48px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.method__cell {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2vw, 24px);
  transition: border-color 180ms ease, transform 180ms ease;
}

.method__cell:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
}

/* Staggered reveal — performs the M-A-C-H-I-N-E acronym as cells fade in
 * one after another. Same easing as .reveal so it reads as one system. */
.method .method__cell {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms ease;
}

.method.is-visible .method__cell {
  opacity: 1;
  transform: none;
}

.method.is-visible .method__cell:nth-child(1) { transition-delay: 0ms; }
.method.is-visible .method__cell:nth-child(2) { transition-delay: 100ms; }
.method.is-visible .method__cell:nth-child(3) { transition-delay: 200ms; }
.method.is-visible .method__cell:nth-child(4) { transition-delay: 300ms; }
.method.is-visible .method__cell:nth-child(5) { transition-delay: 400ms; }
.method.is-visible .method__cell:nth-child(6) { transition-delay: 500ms; }
.method.is-visible .method__cell:nth-child(7) { transition-delay: 600ms; }

.method__letter {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.method__title {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.method__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.method__footer {
  margin: 0;
  max-width: 72ch;
  padding: clamp(20px, 2.5vw, 28px) 0 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.6;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .method .method__cell,
  .method.is-visible .method__cell {
    opacity: 1 !important;
    transform: none !important;
    transition: border-color 180ms ease !important;
    transition-delay: 0ms !important;
  }
  .method__cell:hover {
    transform: none;
  }
}

html.reduced-motion .method .method__cell,
html.reduced-motion .method.is-visible .method__cell {
  opacity: 1 !important;
  transform: none !important;
  transition: border-color 180ms ease !important;
  transition-delay: 0ms !important;
}

/* ---------- How we work ---------- */

.how {
  background: var(--bg);
}

.how__headline {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}

.how__body {
  margin: 0;
  max-width: 64ch;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.7;
  color: var(--ink-muted);
}

/* ---------- Proof ---------- */

.proof {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.proof .section__inner {
  padding-top: clamp(86px, 12vw, 144px);
  padding-bottom: clamp(86px, 12vw, 144px);
}

.proof__headline {
  margin: 0 0 clamp(28px, 4vw, 40px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}

.proof__label {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent-deep);
}

.proof__label--list {
  margin-top: clamp(48px, 6vw, 72px);
  color: var(--ink-subtle);
}

.proof__testimonial {
  position: relative;
  margin: 0;
  padding: 0;
  max-width: 64ch;
}

.proof__quote {
  position: relative;
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.proof__quote::before {
  content: "\201C";
  position: absolute;
  top: -0.55em;
  left: -0.35em;
  z-index: 0;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(96px, 12vw, 160px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.16;
  pointer-events: none;
}

.proof__quote p {
  position: relative;
  z-index: 1;
  margin: 0;
}

.proof__attribution {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.proof__attribution-name {
  font-weight: 600;
  color: var(--ink);
}

.proof__attribution-role {
  font-style: normal;
}

.proof__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
}

.proof__item {
  position: relative;
  padding: 24px 0 0;
  border-top: 1px solid var(--border-strong);
}

.proof__item-org {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.proof__item-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
}

@media (max-width: 760px) {
  .proof__list {
    grid-template-columns: 1fr;
  }
}

/* ---------- About ---------- */

.about {
  background: var(--bg);
}

.about__headline {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.about__body {
  max-width: 64ch;
}

.about__body p {
  margin: 0 0 1em;
  font-size: clamp(16px, 1.1vw, 17px);
  line-height: 1.7;
  color: var(--ink);
}

/* ---------- CTA block ---------- */

.cta {
  background: linear-gradient(
    180deg,
    var(--bg-elevated) 0%,
    var(--accent-soft) 100%
  );
}

.cta__inner {
  padding: clamp(96px, 12vw, 160px) clamp(20px, 5vw, 56px);
  text-align: center;
}

.cta__headline {
  margin: 0 auto 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--accent-deep);
  max-width: 22ch;
}

.cta__body {
  margin: 0 auto clamp(28px, 4vw, 40px);
  max-width: 58ch;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  color: var(--ink-muted);
}

.cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 560px) {
  .cta__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--bg);
}

.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.footer__line {
  margin: 0;
  font-size: 13px;
  color: var(--bg);
  opacity: 0.8;
  letter-spacing: 0.01em;
}

.footer__line a {
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer__line a:hover {
  color: var(--bg-elevated);
  border-bottom-color: var(--accent-soft);
}

/* ---------- Reveal on scroll ----------
 *
 * JS adds .reveal to .hero and every section[id] as soon as it runs, then
 * toggles .is-visible either on load (hero) or when the element crosses the
 * IntersectionObserver threshold (sections).
 *
 * Curve matches the anchor-scroll easing: cubic-bezier(0.22, 1, 0.36, 1) is
 * the "expo-out" deceleration curve -- fast arrival, soft settle. Same
 * perceptual family as the JS `1 - (1-t)^5` used for scroll, so the two
 * animations feel like they came from the same system.
 *
 * Duration 700ms is in the Material "medium" band and matches enterprise
 * restraint -- long enough to read as intentional, short enough not to drag.
 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced motion ---------- */

/* html.reduced-motion is set by script.js before any reveal class is applied,
 * so elements never enter the hidden state under reduced-motion preference. */
html.reduced-motion .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero__mascot,
  .hero__mascot-shadow,
  .hero__dot {
    animation: none !important;
    transition: none !important;
  }
  .pillar {
    transition: border-color 180ms ease;
  }
  .pillar:hover {
    transform: none;
  }
  .btn--primary:hover {
    transform: none;
  }
  .btn__arrow,
  .btn--ghost:hover .btn__arrow {
    transition: none;
    transform: none;
  }
  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
