@view-transition { navigation: auto; }

:root { --is-sf: -apple-system, "SF Pro Display", "SF Pro", system-ui, sans-serif; }

body { margin: 0; font-family: "Host Grotesk", sans-serif; color: #000; -webkit-font-smoothing: antialiased; }

body:not(.is-overlay-mode) .is-page { background: #ffffff; min-height: 100vh; }

.is-page { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 10px 120px; min-height: 100vh; box-sizing: border-box; overflow-x: clip; }

/* the close button stays put as the page scrolls: the header row sticks where it sits at the top,
   and only the button itself takes clicks */
.is-header { position: sticky; top: 10px; z-index: 50; pointer-events: none; max-width: 1280px; width: 100%; height: 100px; display: flex; justify-content: flex-end; align-items: center; padding-right: 30px; box-sizing: border-box; }
.is-header > * { pointer-events: auto; }
.is-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #ffffff; border: 1.838px solid rgba(0,0,0,0.1); border-radius: 16px; box-shadow: 0 14.703px 58.811px -4px rgba(0,0,0,0.1); overflow: hidden; text-decoration: none; flex-shrink: 0; transition: opacity 0.15s ease; }
.is-close:hover { opacity: 0.7; }

.is-content { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 90px; }

/* ── type ramp ───────────────────────────────────────────────────────── */
.is-title { font-size: 70px; font-weight: 500; line-height: 1.0; text-align: center; margin: 0; }
.is-lead { font-size: 30px; font-weight: 300; line-height: 1.4; margin: 0; }
.is-lead--bold { font-weight: 700; }
.is-sec-h { font-size: 35px; font-weight: 700; line-height: 1.2; margin: 0; }
.is-body { font-size: 22px; font-weight: 300; line-height: 1.4; margin: 0; }
.is-callout { font-size: 35px; font-weight: 400; line-height: 1.4; text-align: center; margin: 0; max-width: 760px; align-self: center; }
.is-callout--light { font-size: 30px; font-weight: 300; }
.is-b { font-weight: 700; }

.is-sec { display: flex; flex-direction: column; gap: 40px; align-items: stretch; }
.is-sec--title { gap: 48px; }

/* ── intro (roomy, matches sibling pages) ────────────────────────────── */
.is-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.is-intro > :first-child { flex: 0 1 468px; }
.is-lead-stack { display: flex; flex-direction: column; gap: 20px; }
.is-meta { flex: 0 0 220px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.is-meta__group p { font-size: 22px; font-weight: 300; line-height: 1.4; margin: 0 0 6px; }
.is-meta__group p:last-child { margin-bottom: 0; }

/* ── Impact pill (matches /portfolio .pill, cursor-gradient + press) ──── */
.pill { display: inline-block; background: #f38d3a; color: #000; text-decoration: none; font-weight: 700; font-size: 22px; line-height: 1.4; padding: 5px 20px; border-radius: 999px; position: relative; isolation: isolate; -webkit-tap-highlight-color: transparent; user-select: none; }
.pill::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at var(--px,50%) var(--py,50%), #ebeeed 0%, #f38d3a 80%); opacity: 0; transition: opacity .18s ease; pointer-events: none; z-index: -1; }
@media (hover: hover) { .pill:hover::after { opacity: 1; } }
@keyframes pill-spring { 0% { transform: scale(.94); } 55% { transform: scale(1.04); } 100% { transform: scale(1); } }
.pill--pressed { transform: scale(.94); transition: transform .08s ease-out; }
.pill--releasing { animation: pill-spring .3s cubic-bezier(.34,1.56,.64,1) forwards; }
.is-impact-pill { display: inline-flex; align-items: center; gap: 8px; }
.is-arrow { display: block; }

/* ── #EBEEED cards ───────────────────────────────────────────────────── */
/* device fills the card vertically and touches the top/bottom edges (matches the
   Instants card). horizontal padding only; overflow:clip trims any device bleed */
.is-card { background: #ebeeed; border-radius: 30px; padding: 0 52px; overflow: hidden; align-self: center; box-sizing: border-box; }
/* align-self:center (inherited from .is-card) reliably centres this wider card.
   Do NOT add left:50%/translateX here too — it double-applies on top of the
   already-centred flex item and shoves the card ~60px off-centre. */
.is-card--wide { align-self: center; width: min(920px, calc(100vw - 32px)); padding: 0 48px; overflow: hidden; }
.is-card__img { display: block; width: 100%; height: auto; }

/* Section A: install-screen phone with rotating tagline overlay */
/* container-type lets the tagline below scale with the phone width (cqw) */
.is-phone-a { display: block; margin: 0 auto; position: relative; width: 520px; max-width: 100%; container-type: inline-size; }
.is-phone-a > img { display: block; width: 100%; height: auto; }
/* left:51.5% aligns the tagline to the phone SCREEN centre — the PNG's screen
   sits ~1.5% right of the image centre (asymmetric bezel padding in the export) */
.is-msgbox { position: absolute; top: 53%; left: 51.5%; transform: translateX(-50%); width: 80%; text-align: center; }
/* font-size scales with the phone width (5cqw = 26px at the 520px desktop phone);
   26px is the fallback for browsers without container query units */
.is-msg { display: inline-block; font-family: var(--is-sf); font-weight: 600; font-size: 26px; font-size: 5cqw; line-height: 1.25; color: #000; text-align: center; transition: transform .4s ease, opacity .4s ease, filter .4s ease; will-change: transform, filter; }
.is-msg--out { transform: translateX(-46px); opacity: 0; filter: blur(7px); }       /* swipe out left + motion blur */
.is-msg--in  { transition: none; transform: translateX(46px); opacity: 0; filter: blur(7px); } /* jump to right before swiping in */

/* ── splits (C text/phone, D phone/text) ─────────────────────────────── */
.is-split { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.is-split__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 18px; }
.is-split__phone { margin: 0; flex: 0 0 auto; }
.is-phone-img { display: block; width: 300px; height: auto; }

/* Section C topic overlay */
.is-topic-phone { position: relative; }
.is-topic { position: absolute; top: 54.5%; left: 50%; transform: translateX(-50%); width: 190px; height: auto; }

/* ── My Impact (closing) ─────────────────────────────────────────────── */
.is-impact-sec { align-items: center; gap: 24px; padding: 10px 0; }
.is-impact-h { font-size: 35px; font-weight: 700; line-height: 1.2; text-align: center; margin: 0; }
.is-impact-body { font-size: 35px; font-weight: 400; line-height: 1.4; text-align: center; margin: 0; max-width: 760px; }

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .is-page { padding: 0 0 64px; gap: 0; }
  .is-header { top: 0; height: 64px; padding-right: 16px; }
  .is-content { gap: 64px; padding: 0 16px; box-sizing: border-box; }

  .is-title { font-size: 40px; }
  .is-lead { font-size: 24px; }
  .is-sec-h { font-size: 26px; }
  .is-callout { font-size: 24px; }
  .is-callout--light { font-size: 22px; }
  .is-impact-h { font-size: 26px; }
  .is-impact-body { font-size: 24px; }

  .is-sec { gap: 28px; }
  .is-sec--title { gap: 32px; }

  .is-intro { flex-direction: column; gap: 24px; }
  .is-intro > :first-child { flex: 1 1 auto; }
  .is-meta { flex: 1 1 auto; }

  .is-card { padding: 0 24px; }
  .is-card--wide { width: 100%; padding: 0 24px; }
  /* cap the hero phone so it doesn't blow up to 520px (vw avoids the parent
     shrink-wrap circular sizing); the tagline scales with it via 5cqw */
  .is-phone-a { width: min(360px, calc(100vw - 64px)); }

  /* image above text on mobile */
  .is-split { flex-direction: column; align-items: center; gap: 24px; }
  .is-split--reverse { flex-direction: column-reverse; }
  .is-split__text { text-align: center; }
  .is-phone-img { width: 260px; }
  .is-topic { width: 165px; }
}

@media (prefers-reduced-motion: reduce) {
  .is-msg { transition: none; }
}
