/*
 * Polea homepage styles. Mobile-first.
 * Philosophy: warm editorial minimalism (see .design/marketing-homepage/DESIGN_BRIEF.md)
 *
 * 1. Tokens: colors, type, spacing, motion (change the look here)
 * 2. Base
 * 3. Components and sections
 * 4. Motion
 */

/* =========================================================================
   1. Tokens
   ========================================================================= */
:root {
  /* ---------- Brand primitives ---------- */
  --gold-500: #d3af37; /* brand gold */
  --gold-400: #ddbf5c; /* hover on dark */
  --gold-600: #b8952a; /* pressed */
  --gold-700: #7f650f; /* gold text on light backgrounds (AA 4.6:1) */

  --black: #0a0a0a;
  --ink-900: #141310;
  --ink-800: #1c1a17;
  --ink-700: #2a2722;
  --gray-500: #6b6760;
  --gray-300: #a8a39a;
  --cream-50: #faf8f3;
  --cream-100: #f3efe6;
  --cream-200: #e8e2d4;
  --cream-300: #d9d1bf;
  --white: #ffffff;

  /* WhatsApp brand green, used only on WhatsApp buttons */
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #1ebe5b;
  --whatsapp-ink: #0b3b22; /* dark green text on the green (7:1) */
}

/* ---------- Semantic color (light): default, and the cream panels ---------- */
:root,
[data-theme="light"] {
  --color-bg-primary: var(--cream-50);
  --color-bg-secondary: var(--white);
  --color-bg-tertiary: var(--cream-100);

  --color-text-primary: var(--black);
  --color-text-secondary: var(--gray-500);
  --color-text-tertiary: #8f8a80;
  --color-text-accent: var(--gold-700);

  --color-border-primary: var(--cream-200);
  --color-border-strong: var(--cream-300);
  --color-border-focus: var(--gold-700);

  --color-accent-primary: var(--gold-500);
  --color-accent-primary-hover: var(--gold-400);
  --color-accent-primary-active: var(--gold-600);
  --color-accent-on-primary: var(--black); /* text on gold buttons (8.3:1) */

  --color-status-success: #2f7a4b;
  --color-status-error: #b3261e;
}

:root {
  /* ---------- Spacing (8px base, generous) ---------- */
  --space-2: 0.25rem;
  --space-3: 0.375rem;
  --space-4: 0.5rem;
  --space-5: 0.75rem;
  --space-6: 1rem;
  --space-7: 1.5rem;
  --space-8: 2rem;
  --space-9: 3rem;
  --space-10: 4rem;
  --space-11: 6rem;
  --space-12: 8rem;

  --section-padding-y: clamp(var(--space-10), 9vw, var(--space-12));
  --gutter: clamp(var(--space-6), 5vw, var(--space-9));

  /* Cream panels: black frame around them, and their corner radius */
  --panel-inset: clamp(0.5rem, 1.5vw, 1.25rem);
  --panel-radius: clamp(1rem, 2.5vw, 2rem);

  /* ---------- Typography ---------- */
  --font-family-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-family-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.375rem;
  --font-size-xl: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --font-size-2xl: clamp(1.875rem, 1.4rem + 1.8vw, 2.5rem);
  --font-size-3xl: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --font-size-4xl: clamp(1.95rem, 1.17rem + 3.25vw, 3.75rem);

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --line-height-tight: 1.12;
  --line-height-snug: 1.3;
  --line-height-normal: 1.55;
  --line-height-relaxed: 1.75;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-wide: 0.14em;

  /* ---------- Layout ---------- */
  --max-width-content: 38rem;
  --max-width-wide: 72rem;

  --border-radius-sm: 4px;
  --border-radius-md: 10px;
  --border-radius-lg: 18px;

  --nav-height: 4.5rem;

  /* Pulley: distance of the rope from the right edge, and wheel size */
  --rope-right: clamp(1.25rem, 2.6vw, 2.75rem);
  --wheel-size: clamp(11rem, 15vw, 16rem);

  /* ---------- Motion ---------- */
  --duration-fast: 150ms;
  --duration-normal: 250ms;

  --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-float: cubic-bezier(0.16, 1, 0.3, 1); /* long, soft settle */
}

/* Dark palette: the page itself and the header */
[data-theme="dark"] {
  --color-bg-primary: var(--black);
  --color-bg-secondary: var(--ink-900);
  --color-bg-tertiary: var(--ink-800);

  --color-text-primary: #f2eee6; /* softened, not pure white */
  --color-text-secondary: var(--gray-300);
  --color-text-tertiary: #7d786f;
  --color-text-accent: var(--gold-500); /* 8.3:1 on black */

  --color-border-primary: var(--ink-700);
  --color-border-strong: #3a362f;
  --color-border-focus: var(--gold-500);
}

/* =========================================================================
   2. Base
   ========================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Spanish visitors: hidden for a moment until the Spanish text is in (see assets/js/lang-early.js) */
.i18n-pending body {
  visibility: hidden;
}

/* Contact form spam trap: off-screen, never seen by people */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Icon definitions used elsewhere on the page; takes up no space */
.sprite {
  position: absolute;
}

body {
  position: relative; /* anchors the pulley */
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme] {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

h1,
h2,
h3,
p,
ul,
ol,
blockquote {
  margin: 0;
}

ul[role="list"],
ol {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 3px;
  border-radius: var(--border-radius-sm);
}

.skip-link {
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  z-index: 100;
  padding: var(--space-6) var(--space-7);
  background: var(--gold-500);
  color: var(--black);
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* =========================================================================
   3. Components and sections
   ========================================================================= */

/* ---------- Type helpers ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-accent);
  margin-bottom: var(--space-7);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  max-width: 20ch;
  text-wrap: balance;
}

.section-intro {
  margin-top: var(--space-7);
  max-width: var(--max-width-content);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.section {
  position: relative;
  padding-block: var(--section-padding-y);
  scroll-margin-top: var(--nav-height);
}

/* Light sections sit on the black page as rounded cream panels */
.panel {
  margin-inline: var(--panel-inset);
  border-radius: var(--panel-radius);
}

/* ---------- Background pulleys: large, faint, turning slowly with the scroll ---------- */
.hero,
.services,
.about {
  overflow: clip;
}

.hero > .container,
.services > .container,
.about > .container {
  position: relative;
  z-index: 1;
}

.ghost {
  position: absolute;
  z-index: 0;
  color: var(--gold-500);
  opacity: 0.16;
  pointer-events: none;
}

.ghost svg {
  width: 100%;
  height: 100%;
}

/* Each wheel hangs from a line and lets a rope down its left side */
.ghost::before,
.ghost::after {
  content: "";
  position: absolute;
  width: 1px;
  background: currentColor;
}

.ghost::before {
  left: 50%;
  bottom: 50%;
  height: 200vh;
}

.ghost::after {
  left: 1.5%;
  top: 50%;
  height: 140%;
  background: linear-gradient(currentColor, transparent);
}

/* On narrow screens the hanging lines would run through the text */
@media (max-width: 1023px) {
  .ghost::before,
  .ghost::after {
    display: none;
  }
}

.ghost--hero {
  width: clamp(26rem, 55vw, 46rem);
  aspect-ratio: 1;
  left: -12%;
  bottom: -30%;
}

.ghost--services-a {
  width: clamp(18rem, 34vw, 30rem);
  aspect-ratio: 1;
  left: -8%;
  top: 18%;
  opacity: 0.13;
}

.ghost--services-b {
  width: clamp(8rem, 13vw, 12rem);
  aspect-ratio: 1;
  right: 12%;
  top: 6%;
  opacity: 0.22;
}

.ghost--about-b {
  width: clamp(5rem, 8vw, 7.5rem);
  aspect-ratio: 1;
  right: 12%;
  top: 5%;
  opacity: 0.18;
}

.ghost--about {
  width: clamp(20rem, 40vw, 36rem);
  aspect-ratio: 1;
  left: -20%;
  bottom: -25%;
  opacity: 0.13;
}

.section-head {
  margin-bottom: var(--space-10);
}

/* ---------- Buttons ---------- */
/* Hover only changes color and border: no movement, no effects */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 3rem;
  padding: var(--space-5) var(--space-8);
  border: 1px solid transparent;
  border-radius: var(--border-radius-md);
  background: transparent;
  font: inherit;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--easing-default),
    border-color var(--duration-fast) var(--easing-default),
    color var(--duration-fast) var(--easing-default);
}

.btn--primary {
  background: var(--color-accent-primary);
  color: var(--color-accent-on-primary);
}

.btn--primary:hover {
  background: var(--color-accent-primary-hover);
}

.btn--primary:active {
  background: var(--color-accent-primary-active);
}

.btn--ghost {
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.btn--ghost:hover {
  border-color: var(--color-text-primary);
}

/* WhatsApp's own green, so it reads as WhatsApp at a glance */
.btn--whatsapp {
  background: var(--whatsapp-green);
  color: var(--whatsapp-ink);
}

.btn__icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.btn--whatsapp .btn__icon {
  width: 1.375rem;
  height: 1.375rem;
}

.btn--whatsapp:hover {
  background: var(--whatsapp-green-hover);
}

.btn--sm {
  min-height: 2.75rem;
  padding: var(--space-4) var(--space-7);
  font-size: var(--font-size-sm);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.link-arrow {
  display: inline-flex;
  gap: var(--space-4);
  align-items: center;
  min-height: 2.75rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-accent);
  text-decoration: none;
}

.link-arrow span[aria-hidden] {
  transition: transform var(--duration-normal) var(--easing-float);
}

.link-arrow:hover span[aria-hidden] {
  transform: translateX(4px);
}

/* ---------- Wordmark (logo mark + name) ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 2.75rem;
  text-decoration: none;
  color: var(--color-text-primary);
  white-space: nowrap;
}

/* The mark's rope hangs below the wheel, so nudge it down to sit the wheel on the text */
.wordmark__mark {
  width: 1.46rem;
  height: 2rem;
  flex-shrink: 0;
  translate: 0 0.32rem;
}

.wordmark__text {
  font-family: var(--font-family-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.01em;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border-primary);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--nav-height);
}

.site-header__tools {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Mobile: nav is a dropdown panel under the header */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--space-6) var(--gutter) var(--space-8);
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-primary);
  display: none;
}

.site-nav.is-open {
  display: block;
}

.site-nav__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-7);
}

.site-nav__list a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: var(--font-size-md);
  text-decoration: none;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-primary);
}

.site-nav__cta {
  width: 100%;
}

.menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 var(--space-4);
  background: none;
  border: 0;
  color: var(--color-text-primary);
  cursor: pointer;
}

.menu-button__bar {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--duration-normal) var(--easing-default);
}

.menu-button[aria-expanded="true"] .menu-button__bar:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-button__bar:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

@media (min-width: 960px) {
  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--space-9);
    padding: 0;
    background: none;
    border: 0;
    margin-left: auto;
  }

  .site-nav__list {
    display: flex;
    gap: var(--space-8);
    margin: 0;
  }

  .site-nav__list a {
    min-height: 2.75rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    border: 0;
    transition: color var(--duration-fast) var(--easing-default);
  }

  .site-nav__list a:hover {
    color: var(--color-text-primary);
  }

  .site-nav__cta {
    width: auto;
  }

  .menu-button {
    display: none;
  }

  .site-header__tools {
    order: 3;
  }
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  height: 2.75rem;
  padding: 3px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--border-radius-md);
}

.lang-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  padding: 0 0 0 0.06em; /* balances the letter-spacing so the text sits centered */
  font: inherit;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  background: none;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--color-accent-primary);
  color: var(--color-accent-on-primary);
}

/* ---------- Pulley ----------
   Phones and tablets: a small wheel at the top right of the hero, hanging from a line,
   with a short rope. It turns as you scroll.
   Desktop: a large wheel, with a rope and weight that run down the whole page. */
.pulley {
  position: absolute;
  z-index: 2;
  top: calc(var(--nav-height) + var(--space-6));
  right: var(--gutter);
  width: 4rem;
  height: 4rem;
  pointer-events: none;
}

/* Mount: from the top of the page down to the axle */
.pulley::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 1.5px;
  margin-left: -0.75px;
  height: 40rem;
  background: var(--gold-500);
}

/* Free end of the rope on the left side, fading out */
.pulley::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.5px;
  height: 4rem;
  background: linear-gradient(var(--gold-500), transparent);
}

.pulley__wheel {
  position: relative;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 5;
}

.pulley__faint {
  opacity: 0.6;
}

.pulley__hub {
  fill: var(--gold-500);
  stroke: none;
}

.pulley__mask,
.rope {
  display: none;
}

@media (min-width: 1024px) {
  /* Wider black frame so the rope and its weight run beside the panels, not over them */
  :root {
    --panel-inset: calc(var(--rope-right) + 2.25rem);
  }

  .pulley {
    top: calc(var(--nav-height) + clamp(3rem, 9vh, 6rem));
    right: var(--rope-right);
    width: var(--wheel-size);
    height: var(--wheel-size);
  }

  .pulley::before {
    width: 2px;
    margin-left: -1px;
  }

  .pulley::after {
    left: 0.5px;
    width: 2px;
    height: 26rem;
  }

  .pulley__wheel {
    stroke-width: 3.5;
  }

  /* Hides the fixed rope between the top of the page and the wheel's axle.
     It scrolls with the wheel, so the rope appears to leave the wheel's right edge. */
  .pulley__mask {
    display: block;
    position: absolute;
    right: -4px;
    bottom: 50%;
    width: 10px;
    height: 200vh;
    background: var(--black);
  }

  /* Rope and weight: fixed to the screen, so they never lag behind the scroll */
  .rope {
    display: block;
    position: fixed;
    z-index: 1;
    top: 0;
    right: var(--rope-right);
    width: 2px;
    height: 60vh;
    background: var(--gold-500);
    pointer-events: none;
  }

  .rope__load {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 2.25rem;
    height: 2.75rem;
    margin-left: -1.125rem;
    border-radius: 4px;
    background: var(--gold-500);
    box-shadow: inset 0 0 0 4px var(--gold-600);
  }
}

/* ---------- Hero (placeholder) ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--nav-height));
  padding-block: var(--space-11);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 62rem;
}

.hero__title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-light);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero__title span,
.hero__title em {
  display: block;
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  color: var(--color-text-accent);
}

.hero__lead {
  margin-top: var(--space-9);
  max-width: 34rem;
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-10);
}

@media (min-width: 1024px) {
  /* Keep the hero text clear of the pulley wheel */
  .hero__content {
    max-width: min(62rem, calc(100% - var(--wheel-size)));
  }

  .hero__inner {
    min-height: min(56rem, calc(100svh - var(--nav-height)));
  }
}

/* Phones: the hero is only as tall as its text, so the next section peeks in */
@media (max-width: 639px) {
  .hero__inner {
    min-height: 0;
    padding-block: var(--space-11) var(--space-10);
  }

  /* Eyebrow wraps to two even lines, clear of the small pulley on the right */
  .hero .eyebrow {
    max-width: calc(100% - 4.5rem);
    letter-spacing: 0.08em;
    line-height: 1.6;
    text-wrap: balance;
  }

  .hero .eyebrow::before {
    display: none;
  }

  .hero__lead {
    margin-top: var(--space-7);
  }

  .hero__actions {
    margin-top: var(--space-8);
  }

  .ghost--hero {
    width: 20rem;
    left: -30%;
    bottom: -20%;
  }
}

/* ---------- Problems ---------- */
.problem-grid {
  display: grid;
  gap: var(--space-6);
}

.problem-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius-lg);
}

.problem-card .icon {
  color: var(--color-text-accent);
}

.problem-card p {
  font-family: var(--font-family-display);
  font-size: var(--font-size-lg);
  font-style: italic;
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-snug);
}

.problems__close {
  margin-top: var(--space-10);
  font-family: var(--font-family-display);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-snug);
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  gap: var(--space-6);
}

/* Hover only changes color (no movement), so it can't fight the reveal animation */
.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius-lg);
  transition: border-color 400ms var(--easing-default);
}

.service-card:hover {
  border-color: var(--gold-500);
}

.service-card .icon {
  color: var(--color-text-accent);
  margin-bottom: var(--space-4);
}

.service-card h3 {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-snug);
}

.service-card p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.tag {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.service-card--cta {
  background: transparent;
  border-color: var(--gold-500);
  justify-content: center;
}

.service-card--cta .link-arrow {
  margin-top: var(--space-4);
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Steps ---------- */
.step-list {
  display: grid;
  gap: var(--space-6);
}

.step {
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius-lg);
}

.step__num {
  display: block;
  font-family: var(--font-family-display);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-light);
  color: var(--color-text-accent);
  margin-bottom: var(--space-6);
}

.step h3 {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  margin-bottom: var(--space-4);
}

.step p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  text-wrap: pretty;
}

.step p strong {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

@media (min-width: 768px) {
  .step-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Phones: same content, tighter cards so the page scrolls less ---------- */
@media (max-width: 639px) {
  :root {
    --section-padding-y: var(--space-9);
  }

  .section-head {
    margin-bottom: var(--space-8);
  }

  /* Problems: icon beside the quote instead of above it */
  .problem-grid,
  .service-grid,
  .step-list {
    gap: var(--space-5);
  }

  .problem-card {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-6);
    padding: var(--space-7);
  }

  .problem-card .icon {
    flex-shrink: 0;
    margin-top: 0.2em;
  }

  .problem-card p {
    font-size: var(--font-size-md);
  }

  .problems__close {
    margin-top: var(--space-8);
    font-size: var(--font-size-xl);
  }

  /* Services: icon and tag share one row */
  .service-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--space-4) var(--space-5);
    padding: var(--space-7);
  }

  .service-card > :not(.icon, .tag) {
    grid-column: 1 / -1;
  }

  .service-card .icon {
    margin-bottom: 0;
  }

  .service-card h3 {
    margin-top: var(--space-4);
  }

  /* Steps: number beside the title */
  .step {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: var(--space-6);
    padding: var(--space-7);
  }

  .step__num {
    margin-bottom: 0;
    font-size: var(--font-size-xl);
  }

  .step p {
    grid-column: 1 / -1;
  }
}

/* ---------- About us: intro and the two partners ---------- */
.about__inner {
  display: grid;
  gap: var(--space-10);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

/* Photos are 640×800 WebP, cropped so both faces sit at the same size */
.partner__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--border-radius-lg);
  background: var(--color-bg-secondary);
}

.partner__name {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.partner__name strong {
  font-weight: var(--font-weight-medium);
}

.partner__name span {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Wharton logo: small and quiet, under the intro text */
.about__wharton {
  display: block;
  width: 8.5rem;
  height: auto;
  margin-top: var(--space-9);
  opacity: 0.85;
}

@media (min-width: 960px) {
  .about__inner {
    grid-template-columns: 6fr 5fr;
    gap: var(--space-12);
    align-items: center;
  }
}

/* ---------- Contact ---------- */
.contact__inner {
  display: grid;
  gap: var(--space-11);
}

.contact__direct {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-9);
}

/* Form card: white on the cream panel, underlined fields inside */
.contact-form {
  display: grid;
  gap: var(--space-8);
  align-content: start;
  padding: clamp(var(--space-7), 4vw, var(--space-10));
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius-lg);
}

.field {
  display: grid;
  gap: var(--space-3);
}

.field label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.field__optional {
  font-weight: var(--font-weight-normal);
  text-transform: none;
  letter-spacing: 0;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: var(--space-4) 0;
  font: inherit;
  font-size: var(--font-size-md); /* 16px+ keeps iOS from zooming */
  color: var(--color-text-primary);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border-strong);
  border-radius: 0;
  transition: border-color var(--duration-normal) var(--easing-default);
}

.field textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: var(--line-height-normal);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-tertiary);
}

.field input:hover,
.field textarea:hover {
  border-bottom-color: var(--color-text-secondary);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom: 2px solid var(--color-border-focus);
  margin-bottom: -1px;
}

.field [aria-invalid="true"] {
  border-bottom-color: var(--color-status-error);
}

.field__error {
  font-size: var(--font-size-sm);
  color: var(--color-status-error);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6) var(--space-8);
}

.contact-form__status:empty {
  display: none;
}

.contact-form__status {
  font-weight: var(--font-weight-medium);
}

.contact-form__status.is-success {
  color: var(--color-status-success);
}

.contact-form__status.is-error {
  color: var(--color-status-error);
}

@media (min-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .contact__inner {
    grid-template-columns: 5fr 6fr;
    gap: var(--space-12);
    align-items: start;
  }
}

/* ---------- Footer: a single line under a single rule ---------- */
.site-footer {
  margin-top: var(--space-9);
  border-top: 1px solid var(--color-border-strong);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  padding-block: var(--space-7);
}

.site-footer .wordmark__text {
  font-size: var(--font-size-md);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-8);
  font-size: var(--font-size-sm);
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  color: var(--color-text-secondary);
}

.site-footer__links a:hover {
  color: var(--color-text-accent);
}

.site-footer__legal {
  color: var(--color-text-secondary);
}

/* ---------- Floating WhatsApp (mobile) ---------- */
.whatsapp-float {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: var(--white);
  box-shadow: 0 8px 24px -6px rgb(0 0 0 / 0.35);
}

.whatsapp-float svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Phones: leave room under the footer so the floating button never covers it */
@media (max-width: 959px) {
  .site-footer {
    padding-bottom: 5.5rem;
  }
}

@media (min-width: 960px) {
  .whatsapp-float {
    display: none;
  }
}

/* =========================================================================
   4. Motion (progressive enhancement for offscreen content only)
   ========================================================================= */
/* Only opacity and transform: both are cheap for the browser, so it stays smooth */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* JS hides only content below the viewport once its observer is ready. */
  .reveal.is-pending {
    opacity: 0;
  }

  .reveal.is-visible {
    animation: rise 280ms var(--easing-float) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  main,
  .site-nav__list,
  .site-nav__cta {
    transition: none;
  }
}
/* Local Latin subsets include English and Spanish; variable weights share one file. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
}

