:root {
  --ink: #000;
  --blue: #3b78b1;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Cormorant", Georgia, serif;
  --content: 1200px;
  --gutter: clamp(16px, 2.9vw, 60px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  /* Show the WHOLE campaign image on entry: size it as large as possible while
     staying inside the viewport on BOTH axes, minus an equal gutter all round.
     - On normal screens it's width-limited → equal gutter margin on all sides.
     - On short/wide screens it becomes height-limited → the image stays fully
       visible (never runs past the fold) and is centred, gutter top & bottom.
     `100dvh` tracks the real visible height (mobile browser chrome included). */
  aspect-ratio: 1628 / 930;
  width: min(
    calc(100% - 2 * var(--gutter)),
    calc((100dvh - 2 * var(--gutter)) * 1628 / 930)
  );
  margin: var(--gutter) auto;
  border-radius: 4px;
  overflow: hidden;
}
/* Box matches the image aspect, so cover shows the whole image with no crop. */
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; }
.hero__logo {
  position: absolute;
  top: 19.5%;
  left: 50%;
  transform: translateX(-50%);
  height: 7.6%;
  width: auto;
}
.hero__headline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(74%, 1200px);
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 3.35vw, 54px);
  line-height: 1.28;
  color: var(--blue);
}
.hero__headline .b { font-weight: 700; }
.appstore { display: inline-block; line-height: 0; }
.appstore img { height: 40px; width: auto; }
.hero .appstore {
  position: absolute;
  top: 74.5%;
  left: 50%;
  transform: translateX(-50%);
}
.hero .appstore img { height: clamp(30px, 2.5vw, 40px); }

/* ── Content wrap ────────────────────────────────────────── */
.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

/* ── Intro ───────────────────────────────────────────────── */
.intro {
  /* No top margin — the campaign's own equal gutter below it provides the gap,
     so the hero reads with matching margins on all four sides. */
  margin: 0;
  font-weight: 300;
  font-size: clamp(17px, 1.7vw, 24px);
  line-height: 1.8;
  color: var(--ink);
}

/* ── App-mode showcase ───────────────────────────────────── */
.modes {
  margin: clamp(64px, 9vw, 128px) 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 3vw, 48px);
}
.mode { margin: 0; }
.mode img { width: 100%; height: auto; }
.mode figcaption {
  margin-top: 18px;
  text-align: center;
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
}

/* ── Features: 3 × 2 ─────────────────────────────────────── */
.features {
  margin: clamp(72px, 10vw, 140px) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(44px, 5vw, 76px) clamp(28px, 3vw, 48px);
}
.feature h3 {
  margin: 0 0 14px;
  font-weight: 500;
  font-size: clamp(21px, 1.9vw, 26px);
  line-height: 1.15;
}
.feature p {
  margin: 0;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  margin: clamp(72px, 11vw, 152px) 0 clamp(48px, 6vw, 80px);
  padding-top: 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__mail {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.footer__mail:hover { text-decoration: underline; }

/* ── Scroll-reveal: subtle slide-up + fade as each block enters the viewport
      (both desktop and mobile). JS adds .in via IntersectionObserver. Items in
      a row stagger so the phones / feature cards cascade in. Motion is opt-in
      to prefers-reduced-motion: if the user prefers less motion, everything is
      simply visible from the start. ─────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }
  [data-reveal].in {
    opacity: 1;
    transform: none;
  }
  .modes .mode:nth-child(2) { transition-delay: 0.08s; }
  .modes .mode:nth-child(3) { transition-delay: 0.16s; }
  .modes .mode:nth-child(4) { transition-delay: 0.24s; }
  .features .feature:nth-child(3n + 2) { transition-delay: 0.08s; }
  .features .feature:nth-child(3n + 3) { transition-delay: 0.16s; }
}

/* ── Tablet ──────────────────────────────────────────────── */
@media (max-width: 1000px) and (min-width: 701px) {
  .modes { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .features { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile (Figma "Mobile" frame 402×3454) ──────────────── */
@media (max-width: 700px) {
  :root { --gutter: 20px; }

  /* Hero: tall portrait that fills the phone screen but never past the fold.
     Width-driven (full width minus gutter); capped to the visible height so the
     whole first screen is the hero on entry. */
  .hero {
    aspect-ratio: 362 / 834;
    width: calc(100% - 2 * var(--gutter));
    max-height: calc(100dvh - 2 * var(--gutter));
    margin: var(--gutter) auto;
  }
  .hero__img { object-position: center; }
  .hero__logo { top: 24.7%; height: 6.7%; }
  .hero__headline {
    width: 90%;
    font-size: 26px;
    line-height: 1.45;
  }
  .hero .appstore { top: 85.6%; }
  .hero .appstore img { height: 40px; }

  .wrap { padding: 0 20px; }
  .intro { font-size: 16px; line-height: 1.875; }

  /* Phone carousel — horizontal scroll of the device-framed phones, shown
     clean (no card wrapper) to match the Figma "Mobile" frame; one phone sits
     centred at a time with its neighbours peeking in. */
  .modes {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 18px;
    margin: 64px calc(-1 * var(--gutter)) 0;
    padding: 4px var(--gutter) 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .modes::-webkit-scrollbar { display: none; }
  .mode {
    flex: 0 0 76vw;
    max-width: 300px;
    scroll-snap-align: center;
  }
  .mode img { width: 100%; height: auto; }
  .mode figcaption { display: none; }

  /* Features: single column */
  .features {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: clamp(56px, 11vw, 80px);
  }
}
