/* ══════════════════════════════════════════════════════════════════════
 * ON THEIR PHONE: a normal section (it never pins the page). When the
 * phone scrolls into view it spins twice by itself, settles facing the
 * visitor, and shows a real site we built (Cade's Green Touch) live in
 * its screen, playing like a video, while three short lines tell the
 * customer's side of the story. Motion lives in /phone.js.
 * ══════════════════════════════════════════════════════════════════════ */
.ph { position: relative; }
.ph__pin {
  position: relative;
  padding: 96px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ph__grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

/* ── copy ── */
.ph__copy .h2 { max-width: 13ch; }
.ph__steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 6px; }
.ph__step {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  font: 700 clamp(19px, 1.8vw, 24px)/1.25 var(--display);
  letter-spacing: -0.02em;
  color: #b3bccb;
  transition: color .35s ease, transform .35s ease;
}
.ph__step::before {
  content: attr(data-n);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font: 700 12px/1 var(--display);
  letter-spacing: 0;
  color: #9aa4b6;
  box-shadow: inset 0 0 0 1.5px #d3d9e4;
  transform: translateY(-4px);
  transition: background .35s ease, color .35s ease, box-shadow .35s ease;
}
.ph__step.is-on { color: var(--ink); transform: translateX(4px); }
.ph__step.is-on::before {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(216, 250, 112, .18), 0 6px 16px -6px rgba(160, 210, 30, .45);
}
.ph__caption {
  margin-top: 28px;
  font-size: 14.5px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.ph__caption a { color: var(--blue); font-weight: 600; text-underline-offset: 4px; white-space: nowrap; }
.ph.is-settled .ph__caption { opacity: 1; transform: none; }

/* ── stage + glow ── */
.ph__stage { position: relative; display: grid; place-items: center; min-width: 0; }
.ph__glow {
  position: absolute;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 75, 255, .16), rgba(40, 75, 255, .05) 55%, rgba(40, 75, 255, 0));
  filter: blur(10px);
  opacity: .6;
  transition: opacity .6s ease;
  pointer-events: none;
}
.ph.is-settled .ph__glow { opacity: 1; }

/* ── the phone ──
 * A premium phone, 71.5 × 149.6 × 7.95 mm. Built from layers that each
 * carry their own full transform (set by /phone.js): a front glass face,
 * a back face, and the metal frame between them built as real side walls,
 * so the edges and corners read as one solid frame from any angle. No layer depends
 * on a shared 3D scene (transform-style: preserve-3d), which Safari can
 * flatten; paint order is set from each layer's depth. */
.ph__phone {
  --w: clamp(190px, min(23vw, calc((100svh - 200px) * .478)), 310px);
  /* the phone is drawn at --ss times its size and shrunk back in its
   * transform (phone.js), so the browser paints it with extra pixels and it
   * stays crisp while it turns, scales and settles */
  --u: calc(var(--w) * var(--ss, 2));
  --r: calc(var(--u) * .18);           /* corner radius (same in 2D and 3D, so switching never moves the screen) */
  position: relative;
  isolation: isolate;
  width: var(--w);
  aspect-ratio: 71.5 / 149.6;
}
.ph__layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--u);
  height: calc(var(--u) * 2.092308);   /* 149.6 / 71.5 */
  margin: calc(var(--u) * -1.046154) 0 0 calc(var(--u) * -.5);
  border-radius: var(--r);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* the metal frame: side walls placed by /phone.js (four straight sides and
 * ten facets round each corner). --c0 → --c1 is each wall's lit colour
 * from one end to the other, so corners shade smoothly; the
 * darker bands top and bottom read as the frame rounding into the glass. */
.ph__wall {
  position: absolute;
  left: 50%;
  top: 50%;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, .06) 50%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, .5)),
    linear-gradient(to right, var(--c0, #3a3c42), var(--c1, #3a3c42));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}
/* the camera plateau's walls: glass, no polished chamfer bands */
.ph__wall--cam {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 45%, rgba(255, 255, 255, .08)),
    linear-gradient(to right, var(--c0, #2a2c31), var(--c1, #2a2c31));
}
.ph__btn, .ph__ctrl {
  position: absolute;
  top: 26%;
  height: 48%;
  border-radius: 99px;
}
.ph__btn {
  background: linear-gradient(to bottom, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04) 55%, rgba(0, 0, 0, .25));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.ph__ctrl {
  background: linear-gradient(to bottom, rgba(12, 14, 18, .55), rgba(12, 14, 18, .8));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .08);
}

/* front: thin metal lip, black bezel, screen, glass glare */
.ph__front {
  background: linear-gradient(140deg, #5a5d63, #26282c 22%, #3a3c41 50%, #1d1e21 78%, #4a4c52);
  padding: calc(var(--u) * .012);
}
/* lip + bezel = .046 of the width, the same inset the 3D phone uses */
.ph__bezel {
  position: relative;
  height: 100%;
  border-radius: calc(var(--r) - var(--u) * .012);
  background: #030303;
  padding: calc(var(--u) * .034);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.ph__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--r) - var(--u) * .046);
  background: #070a08;
  isolation: isolate;
  /* Safari ignores border-radius clipping over the scaled iframe;
   * clip-path and a mask make the screen corners clip it everywhere */
  clip-path: inset(0 round calc(var(--r) - var(--u) * .046));
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.ph__glare {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .16) 45%, rgba(255, 255, 255, 0) 60%);
  background-size: 260% 100%;
  background-position: var(--sheen, 100%) 0;
  opacity: var(--glare, 0);
}
.ph__status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 6.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9% 0 11%;
  background: #070a08;
  color: #fff;
  font: 600 calc(var(--u) * .046)/1 -apple-system, "SF Pro Text", var(--body);
  letter-spacing: -.01em;
  pointer-events: none;
}
.ph__time { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ph__icons { display: inline-flex; gap: calc(var(--u) * .014); align-items: center; justify-content: flex-end; width: 27%; }
.ph__icons svg { display: block; height: calc(var(--u) * .03); width: auto; overflow: visible; }
.ph__icons svg.ph__batt { height: calc(var(--u) * .032); }
.ph__island {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 1.35%;
  width: 30%;
  height: 3.3%;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #000;
}
.ph__site {
  position: absolute;
  inset: 6.2% 0 0;
  overflow: hidden;
  border-radius: 0 0 calc(var(--r) - var(--u) * .046) calc(var(--r) - var(--u) * .046);
  background: #070a08;
}
.ph__site iframe {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  transform-origin: 0 0;
  background: #070a08;
  pointer-events: none;
}
/* the site plays by itself (phone.js), so the phone never takes the
 * wheel or a swipe; only with reduced motion can it be scrolled directly */
.ph.is-live .ph__site iframe { pointer-events: auto; }
/* until the site arrives: the brand's dark and green */
.ph__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #00e600;
  font: 700 calc(var(--u) * .07)/1 var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: opacity .4s ease;
}
.ph.is-loaded .ph__loading { opacity: 0; pointer-events: none; }
.ph__home {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.1%;
  width: 34%;
  height: .55%;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(255, 255, 255, .85);
  pointer-events: none;
}

/* back: frosted graphite glass with a fine grain, inside a polished metal
 * rim. Sizes are in shares of the phone's width so it stays sharp at any size. */
.ph__back {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(85% 50% at 28% 6%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 70%),
    radial-gradient(70% 45% at 80% 96%, rgba(120, 130, 150, .10), rgba(120, 130, 150, 0) 70%),
    linear-gradient(165deg, #3b3e45, #24262c 42%, #17181c 78%, #212328);
  box-shadow:
    inset 0 0 0 calc(var(--u) * .008) #62656c,
    inset 0 0 0 calc(var(--u) * .011) #2a2c31,
    inset 0 0 0 calc(var(--u) * .013) #111215,
    inset 0 0 calc(var(--u) * .05) rgba(0, 0, 0, .35);
}
.ph__back::after { /* the same moving glare as the front */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .12) 45%, rgba(255, 255, 255, 0) 60%);
  background-size: 260% 100%;
  background-position: var(--sheen, 100%) 0;
}
/* the camera plateau's top face: a layer lifted off the back by /phone.js,
 * with its side walls (.ph__wall--cam) standing between it and the glass */
.ph__camtop { background: none; pointer-events: none; }
.ph__cams {
  position: absolute;
  left: 7%;
  top: 3.4%;
  width: 34%;
  height: 17%;
  border-radius: calc(var(--u) * .085);
  background:
    radial-gradient(90% 70% at 25% 10%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 65%),
    linear-gradient(150deg, #42454c, #2a2c31 52%, #1d1e22);
  box-shadow:
    inset 0 0 0 calc(var(--u) * .004) rgba(255, 255, 255, .16),
    inset 0 calc(var(--u) * .006) calc(var(--u) * .012) rgba(255, 255, 255, .06),
    inset 0 calc(var(--u) * -.01) calc(var(--u) * .02) rgba(0, 0, 0, .4);
}
/* a lens: brushed metal ring, dark sapphire glass, glass elements inside,
 * and a couple of coloured reflections */
.ph__lens {
  position: absolute;
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 20deg, #9a9da5, #3c3e44 18%, #b3b6bd 33%, #2d2f34 52%, #8f929a 70%, #35373c 86%, #9a9da5);
  box-shadow:
    0 0 0 calc(var(--u) * .003) #0b0c0e,
    0 calc(var(--u) * .004) calc(var(--u) * .01) rgba(0, 0, 0, .6);
}
.ph__lens::before,
.ph__lens::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
}
.ph__lens::before {
  background: radial-gradient(circle, #0b0e15 0 20%, #232a3d 21% 27%, #07080b 28% 48%, #1a1d25 49% 54%, #060709 55% 86%, #1b1d22 87%);
  box-shadow: inset 0 0 calc(var(--u) * .01) rgba(0, 0, 0, .9);
}
.ph__lens::after {
  background:
    radial-gradient(circle at 35% 30%, rgba(200, 212, 255, .8) 0 4%, rgba(200, 212, 255, 0) 11%),
    radial-gradient(circle at 63% 67%, rgba(140, 100, 220, .35) 0 5%, rgba(140, 100, 220, 0) 15%),
    conic-gradient(from 210deg, rgba(80, 130, 255, 0) 0 28%, rgba(80, 130, 255, .2) 36%, rgba(80, 130, 255, 0) 44%);
}
.ph__lens:nth-child(1) { left: 9%; top: 10%; }
.ph__lens:nth-child(2) { left: 9%; bottom: 10%; }
.ph__flash {
  position: absolute;
  right: 13%;
  top: 15%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(150, 130, 80, 0) 0 9%, rgba(150, 130, 80, .28) 10% 12%),
    radial-gradient(circle, #fffaf0, #eadfc3 55%, #bcae8e 80%, #716856);
  box-shadow: 0 0 0 calc(var(--u) * .003) #1d1e21, 0 0 0 calc(var(--u) * .005) #6d7077;
}
.ph__mic {
  position: absolute;
  right: 19%;
  bottom: 24%;
  width: 6%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #000 0 45%, #1a1b1e 60%, #3a3c41);
}

/* ── 3D mode (phone3d.js): a WebGL model draws the frame, glass, back and
 * camera; the CSS front layer only carries the screen, which phone.js keeps
 * aligned with the model's glass. The screen has exactly the same size and
 * corners in both modes, so the switch never moves anything on it; the 3D
 * phone fades in over the CSS one, then the CSS frame is dropped. */
.ph__gl { position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.ph.is-3d-in .ph__gl { opacity: 1; }
.ph.is-3d .ph__back, .ph.is-3d .ph__camtop, .ph.is-3d .ph__wall { display: none; }
.ph.is-3d .ph__front { background: none; }
.ph.is-3d .ph__bezel { background: none; box-shadow: none; }

/* soft floor shadow that narrows as the phone turns edge-on */
.ph__shadow {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * -0.2);
  width: calc(var(--w) * 1.1);
  height: calc(var(--w) * .12);
  transform: translateX(-50%) scaleX(var(--shadow-x, 1));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(15, 24, 48, .28), rgba(15, 24, 48, 0));
  pointer-events: none;
}

/* the old "scroll the phone" hint: the site plays by itself now */
.ph__hint { display: none; }
/* phones: a one-line credit under the phone instead of the caption */
.ph__tag { display: none; }

@media (max-width: 900px) {
  .ph__pin { padding: 72px 0 104px; }
  .ph__grid { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .ph__copy .h2 { max-width: none; font-size: clamp(28px, 7.6vw, 40px); }
  .ph__copy .eyebrow { margin-bottom: 12px; }
  /* room for a two-line step, so switching lines never nudges the phone */
  .ph__steps { margin-top: 14px; gap: 0; justify-items: center; align-content: center; min-height: 58px; }
  /* phones: one line at a time, the active one */
  .ph__step { display: none; padding: 4px 0; font-size: 18px; justify-content: center; }
  .ph__step.is-on { display: flex; transform: none; animation: phIn .35s ease; }
  .ph__caption { display: none; }
  .ph__tag {
    display: block;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 94vw;
    white-space: nowrap;
    font-size: min(12.5px, 3.4vw);   /* one line, even on the narrowest phones */
    color: var(--muted);
    opacity: 0;
    transition: opacity .5s ease;
  }
  .ph__tag a { color: var(--blue); font-weight: 600; }
  .ph.is-settled .ph__tag { opacity: 1; }
  .ph__stage { order: 2; }
  .ph__phone { --w: min(54vw, calc((100svh - 350px) * .478), 240px); }
}
@keyframes phIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ph__step { color: var(--ink); }
  .ph__step::before { background: var(--lime); color: var(--ink); box-shadow: none; }
  .ph__step, .ph__step.is-on { display: flex; }
  .ph__caption, .ph__tag { opacity: 1; transform: none; }
}
