/* Pond product page. One pinned stage: the phone rises out of the hero, settles in the centre,
   and each feature's words fade in on either side of it. --k (hero 0→1) and data-step are set by app.js. */

.stage {
  --ph: min(76vh, 760px);                 /* phone height */
  --pw: calc(var(--ph) * .4782);          /* iPhone Air proportions, 74.7 × 156.2 mm */
  --safe-b: env(safe-area-inset-bottom, 0px);
  position: relative;
  height: 740vh;
}
.stage-pin {
  position: sticky; top: 0; height: var(--app-h, 100dvh); overflow: hidden;
  display: grid; place-items: center;
  perspective: 1600px;
}

/* Intro: name and download, above the rising phone */
.intro {
  position: absolute; top: clamp(96px, 15vh, 150px); left: 0; right: 0;
  display: grid; justify-items: center; gap: 18px; text-align: center; padding-inline: var(--gutter);
  opacity: clamp(0, calc(1 - var(--k, 0) * 2.4), 1);
  transform: translateY(calc(var(--k, 0) * -48px));
  z-index: 3;
}
.intro .kicker { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--ink-3); }
.intro h1 { font-size: clamp(3.6rem, 11vw, 9.4rem); font-weight: 400; line-height: .9; letter-spacing: -.045em; font-variation-settings: "SOFT" 100, "opsz" 144; }
.intro .cta-row { justify-content: center; margin-top: 10px; }
.stage[data-step]:not([data-step="-1"]) .intro { pointer-events: none; }

/* The live 3D phone fills the stage behind the words; the drawn phone is the fallback. */
.gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; touch-action: pan-y; }
.stage.is-3d .phone-wrap { display: none; }
.stage.is-3d .captions { z-index: 2; }
.stage.is-3d .intro { z-index: 3; }

/* The phone */
.phone-wrap {
  position: relative; z-index: 2;
  transform-origin: 50% 0;
  transform:
    translateY(calc((1 - var(--k, 0)) * 60vh))
    rotateX(calc((1 - var(--k, 0)) * 26deg))
    scale(calc(.92 + var(--k, 0) * .08));
  will-change: transform;
}
.phone {
  position: relative;
  height: var(--ph); width: var(--pw);
  border-radius: calc(var(--pw) * .205);
  padding: calc(var(--pw) * .016);
  /* Drawn Sky Blue frame, used until Apple's official bezel image is added */
  background:
    linear-gradient(100deg, rgba(255,255,255,.55), rgba(255,255,255,0) 14%, rgba(255,255,255,0) 86%, rgba(255,255,255,.4)),
    linear-gradient(180deg, #DCE8F1, #C3D6E5 45%, #D3E2EE);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.8),
    inset 0 0 0 2px rgba(140,168,192,.45),
    0 1px 2px rgba(30,45,60,.12),
    0 40px 80px -30px rgba(40,50,60,.45),
    0 90px 120px -60px rgba(40,50,60,.35);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #B4CADB; }
.phone::before { right: -2px; top: 26%; height: 11%; }
.phone::after  { left: -2px;  top: 18%; height: 5%; box-shadow: 0 calc(var(--ph) * .08) 0 #B4CADB, 0 calc(var(--ph) * .155) 0 #B4CADB; }
.screen {
  position: relative; height: 100%; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--pw) * .19);
  border: calc(var(--pw) * .02) solid #060606;
  background: #F4ECE3;
}
.screen::before { /* Dynamic Island */
  content: ""; position: absolute; z-index: 9; top: calc(var(--pw) * .03); left: 50%; translate: -50% 0;
  width: 32%; height: calc(var(--pw) * .088); border-radius: 99px; background: #000;
}
.bezel { display: none; }

/* Apple's official bezel, when /pond/images/iphone-air-sky-blue.png is present */
.phone.has-bezel { background: none; box-shadow: none; padding: 0; border-radius: 0; width: auto; aspect-ratio: var(--bezel-ratio); filter: drop-shadow(0 40px 50px rgba(40,50,60,.3)); }
.phone.has-bezel::before, .phone.has-bezel::after { display: none; }
.phone.has-bezel .screen { position: absolute; left: var(--ix); right: var(--ix); top: var(--iy); bottom: var(--iy); height: auto; border: 0; border-radius: var(--sr); }
.phone.has-bezel .screen::before { display: none; }
.phone.has-bezel .bezel { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* Screens */
.layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.layer.on { opacity: 1; pointer-events: auto; z-index: 1; }
.layer img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blank { position: absolute; inset: 0; display: none; place-items: center; color: #3D2F24; background: #F4ECE3; font: 500 calc(var(--pw) * .085)/1 var(--display); font-variation-settings: "SOFT" 100; }
.layer.missing img { display: none; }
.layer.missing .blank { display: grid; }

/* Calculator: the disguise, working */
.calc { position: absolute; inset: 0; background: #000; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 7% 10%; font-family: var(--body); transition: transform .7s cubic-bezier(.7,0,.2,1); }
.phone.unlocked .calc { transform: translateY(-100%); }
.calc-out { text-align: right; font-weight: 300; font-size: calc(var(--pw) * .2); line-height: 1.1; padding: 0 4% 6%; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--pw) * .032); }
.calc-keys button { aspect-ratio: 1; border: 0; border-radius: 50%; background: #333; color: #fff; font: 400 calc(var(--pw) * .072)/1 var(--body); cursor: pointer; touch-action: manipulation; padding: 0; }
.calc-keys button:active { filter: brightness(1.6); }
.calc-keys .fn { background: #A5A5A5; color: #000; font-size: calc(var(--pw) * .058); }
.calc-keys .op { background: #FF9F0A; font-size: calc(var(--pw) * .085); }
.calc-keys .op.armed { background: #fff; color: #FF9F0A; }
.calc-keys .zero { grid-column: span 2; aspect-ratio: auto; border-radius: 99px; text-align: left; padding-left: 14%; }
.calc-keys button:focus-visible { outline: 2px solid #FF9F0A; outline-offset: 2px; }

/* Captions: heading to the left of the phone, sentence to the right */
.captions { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.cap {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--pw) minmax(0, 1fr);
  align-items: center; column-gap: clamp(36px, 6vw, 96px);
  padding-inline: var(--gutter);
  padding-top: var(--head, 0px);
  opacity: 0; transition: opacity .6s ease;
}
.cap h2 { grid-column: 1; justify-self: end; text-align: right; max-width: 11ch; font-size: clamp(2rem, 3.4vw, 3.2rem); transform: translateX(-16px); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.cap p  { grid-column: 3; justify-self: start; max-width: 26ch; color: var(--ink-2); font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.55; transform: translateX(16px); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.cap p b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.stage[data-step="0"] .cap[data-i="0"],
.stage[data-step="1"] .cap[data-i="1"],
.stage[data-step="2"] .cap[data-i="2"],
.stage[data-step="3"] .cap[data-i="3"],
.stage[data-step="4"] .cap[data-i="4"],
.stage[data-step="5"] .cap[data-i="5"] { opacity: 1; }
.stage[data-step="0"] .cap[data-i="0"] :is(h2, p),
.stage[data-step="1"] .cap[data-i="1"] :is(h2, p),
.stage[data-step="2"] .cap[data-i="2"] :is(h2, p),
.stage[data-step="3"] .cap[data-i="3"] :is(h2, p),
.stage[data-step="4"] .cap[data-i="4"] :is(h2, p),
.stage[data-step="5"] .cap[data-i="5"] :is(h2, p) { transform: none; }

/* Progress dots */
.stage-pin::after {
  content: ""; position: absolute; bottom: 28px; left: 50%; translate: -50% 0;
  width: 64px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--clay) calc(var(--q, 0) * 100%), var(--rule) 0);
  /* Fades out as the tour ends, so it never trails into the next section. */
  opacity: calc(var(--k, 0) * min(1, (1 - var(--q, 0)) * 10));
}

/* Portrait phones and tablets (set by the 3D script as .stacked): phone and words centred as one group */
.stage.stacked .cap { display: block; inset: auto 0 auto 0; top: var(--cap-top, auto); bottom: auto; padding: 0 var(--gutter); text-align: center; transition: opacity .6s ease, top .45s cubic-bezier(.2,.7,.2,1); }
.stage.stacked .cap h2 { max-width: 20ch; margin-inline: auto; text-align: center; font-size: clamp(1.6rem, 6.4vw, 2.4rem); transform: translateY(10px); }
.stage.stacked .cap p { max-width: 34ch; margin: 10px auto 0; font-size: clamp(1rem, 3.6vw, 1.15rem); transform: translateY(10px); }
.stage.stacked .stage-pin::after { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

/* Fallback without 3D on narrow screens */
@media (max-width: 900px) and (max-aspect-ratio: 11/10) {
  .stage { --ph: min(56vh, 560px); height: 700vh; }
  .stage:not(.is-3d) .stage-pin { place-items: start center; padding-top: 76px; }
  .stage:not(.is-3d) .phone-wrap { transform: translateY(calc((1 - var(--k, 0)) * 52vh)) rotateX(calc((1 - var(--k, 0)) * 26deg)) scale(calc(.92 + var(--k, 0) * .08)); }
  .stage:not(.is-3d) .cap { display: block; inset: auto 0 0 0; padding: 0 var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); text-align: center; }
  .stage:not(.is-3d) .cap h2 { max-width: none; text-align: center; font-size: clamp(1.6rem, 6.4vw, 2.1rem); }
  .stage:not(.is-3d) .cap p { max-width: 34ch; margin: 10px auto 0; font-size: 1rem; }
  .intro { top: 92px; }
}

/* Short screens (landscape phones): smaller intro so the rising phone never covers it */
@media (max-height: 560px) {
  .intro { top: 76px; gap: 10px; }
  .intro .kicker { display: none; }
  .intro h1 { font-size: min(11vw, 17vh); }
  .intro .cta-row { margin-top: 0; }
  .cap h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
}

/* After the stage */
/* The privacy promise: one dark panel set into the page, not a band across it. */
.vow { padding-block: clamp(32px, 6vw, 72px) clamp(8px, 2vw, 24px); }
.vow .wrap { width: min(1200px, calc(100% - 2 * var(--gutter))); padding: clamp(56px, 8vw, 104px) clamp(24px, 5vw, 72px);
  border-radius: clamp(28px, 4vw, 44px); color: #EFE5DA;
  background: radial-gradient(120% 90% at 50% 0%, #3B2A20 0%, #1D1611 58%, #16110D 100%);
  box-shadow: 0 40px 80px -48px rgba(40, 26, 18, .7);
  display: grid; gap: 28px; justify-items: center; text-align: center; }
.vow-kicker { color: #E8A085; font-weight: 600; font-size: .95rem; }
.vow h2 { color: #EFE5DA; font-size: clamp(2.4rem, 5.4vw, 4.6rem); max-width: 14ch; font-weight: 400; }
.vow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); width: 100%; max-width: 980px; margin-top: clamp(16px, 3vw, 32px); text-align: left; }
.vow-grid div { display: grid; gap: 10px; align-content: start; justify-items: start; min-width: 0; padding: 22px; border-radius: 22px; background: rgba(255, 255, 255, .045); }
.vow-ic { width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: rgba(232, 160, 133, .14); color: #E8A085; margin-bottom: 4px; }
.vow-grid b { font: 500 1.3rem/1.25 var(--display); font-variation-settings: "SOFT" 100; color: #EFE5DA; }
.vow-grid span { color: #A89E94; }
.vow-link a { color: #E8A085; }
@media (max-width: 760px) { .vow-grid { grid-template-columns: 1fr; } }
.band { padding-block: clamp(80px, 11vw, 136px); }
.band-title { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.narrow { max-width: 860px; }
.write { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; margin-top: 56px; padding: clamp(26px, 4vw, 40px); border-radius: 26px; background: var(--paper); }
.write h3 { font-size: 1.6rem; font-weight: 400; }
.write p { color: var(--ink-2); margin-top: 6px; }
@media (max-width: 640px) { .write { grid-template-columns: 1fr; } .write .btn { justify-self: start; } }

/* Without motion: a plain, complete layout */
@media (prefers-reduced-motion: reduce) {
  .stage { height: auto; }
  .stage-pin { position: static; height: auto; overflow: visible; display: grid; gap: 48px; padding-block: 120px 40px; }
  .intro { position: static; opacity: 1; transform: none; }
  .phone-wrap { transform: none; }
  .captions { position: static; display: grid; gap: 32px; }
  .cap { position: static; opacity: 1; display: block; text-align: center; }
  .cap h2, .cap p { transform: none; margin-inline: auto; text-align: center; max-width: 30ch; }
  .stage-pin::after { display: none; }
}

/* One quiet privacy line */
.oneline { padding-block: clamp(56px, 8vw, 96px); text-align: center; }
.oneline p { font: 400 clamp(1.2rem, 2vw, 1.5rem)/1.4 var(--display); font-variation-settings: "SOFT" 100; color: var(--ink-2); }
.oneline a { font-family: var(--body); font-size: .95rem; margin-left: 10px; }
.oneline + .band { padding-top: clamp(24px, 4vw, 48px); }

/* Common questions: answers visible at a glance */

/* Right to left: the heading sits right of the phone, the sentence left of it */
[dir="rtl"] .cap h2 { text-align: left; transform: translateX(16px); }
[dir="rtl"] .cap p { transform: translateX(-16px); }
[dir="rtl"] .oneline a { margin-left: 0; margin-right: 10px; }
.calc { direction: ltr; }

/* What's inside: the list of everything, under the tour */
.inside .keep dt { display: flex; align-items: center; gap: 10px; }
.inside .keep dt::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); flex: none; }
.inside .more { margin-top: clamp(28px, 4vw, 44px); color: var(--ink-3); font-size: .98rem; }

/* Everything in Pond: one card per feature, each with its icon */
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
/* Sixteen features: four by four, or two by eight, so no row is ever left with one */
@media (min-width: 560px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .feats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feat { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 22px; background: var(--paper); min-width: 0; }
.feat b { display: block; font: 500 1.12rem/1.3 var(--display); font-variation-settings: "SOFT" 100; color: var(--ink); }
.feat span { display: block; margin-top: 4px; color: var(--ink-3); font-size: .95rem; line-height: 1.5; }

/* How Pond compares: Pond's column stands up like a card; the others stay quiet */
#compare .band-head { margin-inline: auto; text-align: center; justify-items: center; }
#compare .band-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.cmp-wrap { position: relative; max-width: 1040px; margin-inline: auto; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; }
.cmp th, .cmp td { padding: 20px 22px; text-align: start; vertical-align: middle; font-size: 1rem; line-height: 1.45; }
.cmp thead th { padding-block: 26px 18px; font-size: .92rem; font-weight: 600; color: var(--ink-3); }
.cmp tbody th { font-weight: 600; color: var(--ink); width: 24%; }
.cmp td { color: var(--ink-3); font-size: .95rem; }
.cmp td:not(.cmp-pond) { opacity: .8; }
/* Pond's column: one card drawn behind the table, so no seams between rows */
.cmp { position: relative; z-index: 1; table-layout: fixed; }
.cmp tbody th { width: 24%; }
.cmp thead td { width: 24%; }
.cmp .cmp-pond { width: 32%; color: var(--ink); font-weight: 600; font-size: 1.04rem; }
.cmp-wrap::before { content: ""; position: absolute; z-index: 0; inset-block: 0; inset-inline-start: 24%; width: 32%; border-radius: 30px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--clay) 22%, var(--surface)) 0, var(--surface) 120px, var(--surface) calc(100% - 60px), color-mix(in srgb, var(--clay) 6%, var(--surface)) 100%);
  box-shadow: 0 34px 70px -34px rgba(159, 88, 60, .5), 0 10px 24px -18px rgba(61, 47, 36, .25); }
.cmp thead .cmp-pond { padding-top: 34px; }
.cmp tbody tr:last-child td, .cmp tbody tr:last-child th { padding-bottom: 30px; }
.cmp-brand { display: inline-flex; align-items: center; gap: 10px; font: 500 1.5rem/1 var(--display); font-variation-settings: "SOFT" 100; color: var(--ink); }
.cmp-brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 6px 14px -8px rgba(61, 47, 36, .6); }
.cmp .ic { width: 22px; height: 22px; }
.cmp .yes.cmp-pond .ic { width: 26px; height: 26px; color: var(--clay); }
.cmp .yes .ic { color: var(--sage-deep); }
.cmp .no .ic { width: 18px; height: 18px; color: var(--ink-3); opacity: .4; }
.cmp-seal { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; font: 500 clamp(1.05rem, 1.8vw, 1.25rem)/1.4 var(--display);
  font-variation-settings: "SOFT" 100; color: var(--ink); text-align: center; }
.cmp-seal .ic { width: 28px; height: 28px; color: var(--clay); flex: none; }
/* Phones: one card per row, Pond's answer first */
@media (max-width: 720px) {
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
  .cmp thead { display: none; }
  .cmp tbody { display: grid; gap: 10px; }
  .cmp tr { padding: 18px 18px 12px; border-radius: 24px; background: var(--paper); }
  .cmp-wrap::before { display: none; }
  .cmp { table-layout: auto; }
  .cmp tbody th { width: auto; padding: 0 0 10px; font: 500 1.15rem/1.3 var(--display); font-variation-settings: "SOFT" 100; }
  .cmp td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: .95rem; }
  .cmp td::before { content: attr(data-label); flex: none; max-width: 48%; color: var(--ink-3); font-size: .85rem; font-weight: 500; text-align: start; }
  .cmp td.cmp-pond { width: auto; margin: 0 -8px 6px; padding: 12px 14px; border-radius: 16px !important; font-size: 1rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--clay) 14%, var(--surface)), var(--surface) 70%);
    box-shadow: 0 10px 22px -16px rgba(159, 88, 60, .55); }
  .cmp td.cmp-pond::before { color: var(--clay-text); font-weight: 700; font-size: .9rem; }
  .cmp .yes.cmp-pond .ic { width: 24px; height: 24px; }
  .cmp td { text-align: end; }
  .cmp .ic { width: 20px; height: 20px; }
  .cmp .no .ic { width: 16px; height: 16px; }
}

/* Guides on the Pond page */
.guide-index a { display: flex; gap: 14px; align-items: flex-start; }
.guide-index a > div { display: grid; gap: 4px; }
.gi-ic { width: 42px; height: 42px; padding: 9px; border-radius: 13px; background: var(--clay-faint); color: var(--clay-text); }
