/* Reputation chapter (approved Concept A, "C3"): one pinned stage, one device.
   Reviews -> Public Reputation -> Overview -> Privacy Center, hand-off into Safety on the same phone.
   --p (0..1) is written by rep.js from scroll position only (native scroll, reverse scroll identical); everything else is CSS.
   Motion uses opacity, transform/translate and one mask per screen. Layout 1: desktop. Layout 2: portrait / narrow. Layout 3: short landscape. */
.rep { background: var(--ink-950); color: #f8f3fb; position: relative; z-index: 1; font-family: var(--font-body); }
.rep-ch { --p: 0; --e: 1; --hh: max(4rem, var(--header-height, 4rem)); --ph: min(84svh, 52rem); --pw: calc(var(--ph) * 0.4603); --cx: 66; --ex: 26; --run: 200svh; --gut: var(--page-gutter);
  position: relative; height: calc(100svh + var(--run));
  --colw: min(44rem, calc(var(--cx) * 1cqw - var(--pw) / 2 - var(--gut) - 3.5rem));
  --ta: clamp(0, (var(--p) - 0) / 0.07, 1); --ea: calc(var(--ta) * var(--ta) * (3 - 2 * var(--ta)));
  /* the headline starts as soon as the Experience device has left (--e, entry value from rep.js), so the hand-off is never an empty stage */
  --th0: clamp(0, var(--e) * 2.5, 1); --eh: max(var(--ea), calc(var(--th0) * var(--th0) * (3 - 2 * var(--th0))));
  --tb: clamp(0, (var(--p) - 0.22) / 0.05, 1); --eb: calc(var(--tb) * var(--tb) * (3 - 2 * var(--tb)));
  --tc: clamp(0, (var(--p) - 0.28) / 0.07, 1); --ec: calc(var(--tc) * var(--tc) * (3 - 2 * var(--tc)));
  --td: clamp(0, (var(--p) - 0.55) / 0.05, 1); --ed: calc(var(--td) * var(--td) * (3 - 2 * var(--td)));
  --te: clamp(0, (var(--p) - 0.61) / 0.07, 1); --ee: calc(var(--te) * var(--te) * (3 - 2 * var(--te)));
  --tf: clamp(0, (var(--p) - 0.8) / 0.04, 1); --ef: calc(var(--tf) * var(--tf) * (3 - 2 * var(--tf)));
  --tg: clamp(0, (var(--p) - 0.86) / 0.08, 1); --eg: calc(var(--tg) * var(--tg) * (3 - 2 * var(--tg)));
  --th: clamp(0, (var(--p) - 0.92) / 0.07, 1);
  --tx1: clamp(0, (var(--p) - 0.2) / 0.09, 1); --ex1: calc(var(--tx1) * var(--tx1) * (3 - 2 * var(--tx1)));
  --tx2: clamp(0, (var(--p) - 0.56) / 0.09, 1); --ex2: calc(var(--tx2) * var(--tx2) * (3 - 2 * var(--tx2)));
  --tx3: clamp(0, (var(--p) - 0.81) / 0.09, 1); --ex3: calc(var(--tx3) * var(--tx3) * (3 - 2 * var(--tx3))); }
.rep-st { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; container-type: size; }
/* #safety / Safety nav link lands on the final, fully revealed state of the chapter (the last viewport of the pin) */
.rep-safety-anchor { position: absolute; left: 0; right: 0; bottom: 0; height: 100svh; pointer-events: none; visibility: hidden; }
#safety.rep-safety-anchor { scroll-margin-top: calc(-1 * (var(--header-height) + 1rem)); } /* beats polish.css #safety margin: land on the fully revealed Safety state */
.rep-glow { position: absolute; z-index: -2; top: 6%; height: 88%; width: 64cqw; left: calc(var(--cx) * 1cqw - 32cqw); translate: calc((var(--ex) - var(--cx)) * var(--eg) * 1cqw) 0; opacity: calc(var(--e) * var(--e) * (3 - 2 * var(--e))); background: radial-gradient(closest-side, #8e7cff33, transparent 100%); pointer-events: none; }
.rep-glow2 { position: absolute; inset: 0; z-index: -3; background: radial-gradient(40% 46% at 10% 96%, #ff8fb11f, transparent 72%); pointer-events: none; }
/* the one device: constant size and vertical position (identical geometry to the Experience chapter's phone); on desktop only x moves, once */
.rep-ph { position: absolute; z-index: 2; left: calc(var(--cx) * 1cqw - var(--pw) / 2); top: calc(50% - var(--ph) / 2 + 1svh); width: var(--pw); height: var(--ph); border-radius: calc(var(--pw) * 0.15); overflow: hidden; background: #0c0b12; translate: calc((var(--ex) - var(--cx)) * var(--eg) * 1cqw) 0; opacity: calc(var(--e) * var(--e) * (3 - 2 * var(--e)));
  box-shadow: 0 0 0 calc(var(--pw) * 0.022) #17151f, 0 0 0 calc(var(--pw) * 0.026) #3a3748, 0 calc(var(--pw) * 0.1) calc(var(--pw) * 0.28) #000000a6, 0 0 calc(var(--pw) * 0.5) #8e7cff40; }
.rep-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rep-ph::after { content: ""; position: absolute; top: 1.6%; left: 50%; width: 27%; height: 2.6%; translate: -50% 0; border-radius: 99px; background: #000; }
.rep-s1, .rep-s2, .rep-s3 { --m: 0; -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--m) * 118% - 18%), transparent calc(var(--m) * 118%)); mask-image: linear-gradient(180deg, #000 calc(var(--m) * 118% - 18%), transparent calc(var(--m) * 118%)); }
.rep-s1 { --m: var(--ex1); } .rep-s2 { --m: var(--ex2); } .rep-s3 { --m: var(--ex3); }
.rep .rep-k { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #b9a7ff; margin: 0 0 1rem; font-weight: 700; }
.rep .rep-h2, .rep .rep-h3 { margin: 0; font-family: var(--font-display); font-weight: 330; letter-spacing: -0.058em; line-height: 0.98; text-shadow: 0 2px 28px #07070bcc; color: #f8f3fb; max-width: none; }
.rep .rep-h2 { font-size: clamp(2.6rem, 5.1vw, 5.6rem); }
.rep .rep-h3 { font-size: clamp(1.8rem, 2.9vw, 3rem); letter-spacing: -0.045em; line-height: 1.04; text-wrap: balance; }
.rep-l { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; } .rep-l > i { display: block; font-style: normal; }
.rep .rep-sub { margin: 1.4rem 0 0; max-width: 27rem; font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.5; color: #e4dded; }
.rep-note { position: absolute; z-index: 5; left: var(--gut); bottom: max(1rem, 2.2svh); margin: 0; font-size: 0.6875rem; color: #c4bcd0; }
.rep-col { position: absolute; z-index: 3; left: var(--gut); width: var(--colw); top: 0; bottom: 0; display: grid; align-content: center; padding-top: 3rem; }
.rep-col > * { grid-area: 1 / 1; align-self: center; }
.rep-c1 { opacity: calc(var(--eh) * (1 - var(--eb) * 1.6)); pointer-events: none; }
.rep-c1 .rep-l > i { translate: 0 calc((1 - clamp(0, var(--eh) * 1.9 - var(--k) * 0.3, 1)) * 105% - var(--eb) * 112%); }
.rep-c2 { display: grid; gap: 1.4rem; opacity: calc(var(--ec) * (1 - var(--ed) * 1.6)); translate: 0 calc((1 - var(--ec)) * 1.6rem - var(--ed) * 1rem); }
.rep-c3 { display: grid; gap: 1.4rem; opacity: calc(var(--ee) * (1 - var(--ef) * 1.6)); translate: 0 calc((1 - var(--ee)) * 1.6rem - var(--ef) * 1rem); }
.rep-card { margin: 0; border-radius: 1.1rem; border: 1px solid #d2baff30; background: #0a0a10; overflow: hidden; box-shadow: 0 2rem 4rem #000000b8, 0 0 3rem #8e7cff40; width: 100%; }
.rep-card img { display: block; width: 100%; height: auto; }
.rep .rep-cap { font-size: 0.82rem; color: #b5acbf; margin: 0; }
/* Safety: the existing copy, revealed in a staggered way once the phone has settled */
.rep-rcol { position: absolute; z-index: 3; left: calc(50cqw + 2.2rem); right: var(--gut); top: 0; bottom: 0; display: grid; align-content: center; padding-top: 3.2rem; }
.rep-rcol > * { --o: clamp(0, calc(var(--th) * 2.4 - var(--d)), 1); opacity: var(--o); translate: 0 calc((1 - var(--o)) * 1.2rem); }
.rep .rep-rcol .rep-h2 { font-size: clamp(2.3rem, 4.1vw, 4.3rem); max-width: 12ch; }
.rep .rep-copy { margin: 1.3rem 0 0; max-width: 33rem; font-size: clamp(0.95rem, 1.15vw, 1.12rem); line-height: 1.55; color: #d9d1e3; }
.rep .rep-principles { list-style: none; margin: 1.4rem 0 0; padding: 0; max-width: 36rem; }
.rep .rep-principles li { padding: 0.8rem 0; border-top: 1px solid #ffffff1f; }
.rep .rep-principles strong { display: block; font-weight: 600; font-size: 0.98rem; color: #f8f3fb; }
.rep .rep-principles span { display: block; margin-top: 0.2rem; color: #bdb4c9; font-size: 0.9rem; }
.rep-tail { display: none; }
/* ---------- layout 2: portrait / narrow. Phone first, one copy band under it ---------- */
@media (orientation: portrait), (max-width: 50rem) {
  .rep-ch { --ph: min(52svh, 40rem, 150vw); --cx: 50; --ex: 50; --run: 180svh; --gut: 1.25rem; --bandtop: calc(var(--hh) + 0.4rem + var(--ph) + 1.1rem); --bb: 2.8rem; }
  .rep-ph { top: calc(var(--hh) + 0.4rem); }
  .rep-glow { top: 2%; height: 56%; width: 120cqw; left: -10cqw; translate: none; }
  .rep-col, .rep-rcol { left: 0; right: 0; width: auto; top: var(--bandtop); bottom: var(--bb); padding: 0 var(--gut); align-content: start; }
  .rep-rcol { align-content: end; padding-top: 0; bottom: calc(var(--bb) + 0.6rem); }
  .rep-col > * { align-self: start; }
  .rep .rep-h2, .rep .rep-rcol .rep-h2 { font-size: clamp(1.9rem, 8.6vw, 3.4rem); max-width: none; }
  .rep .rep-h3 { font-size: clamp(1.1rem, 5vw, 1.7rem); }
  .rep .rep-sub { font-size: 0.92rem; margin-top: 0.8rem; max-width: 30rem; }
  .rep-c1 .rep-l > i { translate: 0 calc((1 - clamp(0, var(--eh) * 1.9 - var(--k) * 0.3, 1)) * 105%); }
  .rep-c2 { translate: 0 calc((1 - var(--ec)) * 0.6rem - var(--ed) * 0.6rem); } .rep-c3 { translate: 0 calc((1 - var(--ee)) * 0.6rem - var(--ef) * 0.6rem); } .rep-rcol > * { translate: 0 calc((1 - var(--o)) * 0.5rem); }
  .rep-c2, .rep-c3 { gap: 0.55rem; } .rep-c2 .rep-k, .rep-c3 .rep-k, .rep .rep-cap { display: none; }
  .rep-c2 .rep-card, .rep-c3 .rep-card { width: min(100%, calc((100svh - var(--bandtop) - var(--bb) - 3.3rem) * 1.697)); margin-inline: auto; }
  .rep-note { left: 0; right: 0; text-align: center; bottom: 0.5rem; font-size: 0.6875rem; line-height: 1.3; padding-inline: var(--gut); }
  .rep-rcol .rep-copy, .rep-rcol .rep-principles { display: none; }
  .rep-tail { display: block; position: relative; padding: 0.4rem var(--gut) 3.5rem; max-width: 44rem; margin-inline: auto; background: var(--ink-950); }
  .rep-tail .rep-copy { margin-top: 0; }
}
@media (orientation: portrait) and (max-height: 700px), (max-width: 50rem) and (max-height: 700px) {
  .rep-ch { --ph: min(50svh, 40rem, 150vw); } .rep-c1 .rep-sub, .rep-c1 .rep-k { display: none; }
  .rep-c2 .rep-card, .rep-c3 .rep-card { width: min(100%, calc((100svh - var(--bandtop) - var(--bb) - 2.7rem) * 1.697)); }
}
@media (orientation: portrait) and (max-height: 600px) {
  .rep-c2 .rep-h3, .rep-c3 .rep-h3 { display: none; }
  .rep-c2 .rep-card, .rep-c3 .rep-card { width: min(100%, calc((100svh - var(--bandtop) - var(--bb)) * 1.697)); }
}
/* ---------- layout 3: short landscape (phones on their side, short windows) ---------- */
@media (orientation: landscape) and (max-height: 700px) {
  .rep-ch { --hh: 3rem; --ph: calc(100svh - var(--hh) - 1.6rem); --cx: 70; --ex: 26; --run: 180svh; --gut: clamp(1.25rem, 4vw, 3rem); }
  .rep-ph { top: calc(var(--hh) + 0.5rem); }
  .rep-glow { top: 6%; height: 88%; width: 64cqw; left: calc(var(--cx) * 1cqw - 32cqw); translate: calc((var(--ex) - var(--cx)) * var(--eg) * 1cqw) 0; }
  .rep-col { left: var(--gut); width: var(--colw); top: var(--hh); bottom: 0; padding: 0 0 1.4rem; align-content: center; }
  .rep-rcol { left: calc(50cqw + 1.4rem); right: var(--gut); top: var(--hh); bottom: 0; padding: 0 0 1.4rem; align-content: center; }
  .rep-col > * { align-self: center; }
  .rep .rep-h2, .rep .rep-rcol .rep-h2 { font-size: clamp(1.7rem, 4.3vw, 3.2rem); max-width: 12ch; } .rep .rep-c1 .rep-h2 { max-width: none; }
  .rep .rep-h3 { font-size: clamp(1.15rem, 2.6vw, 1.9rem); } .rep .rep-sub { font-size: 0.9rem; margin-top: 0.8rem; }
  .rep-c2, .rep-c3 { gap: 0.7rem; } .rep-c2 .rep-k, .rep-c3 .rep-k, .rep .rep-cap { display: none; } .rep-c1 .rep-k { margin-bottom: 0.6rem; }
  .rep-c2 .rep-card, .rep-c3 .rep-card { width: min(100%, calc((100svh - var(--hh) - 5.2rem) * 1.697)); }
  .rep-note { left: var(--gut); right: auto; text-align: left; bottom: 0.45rem; }
  .rep-rcol .rep-copy, .rep-rcol .rep-principles { display: none; }
  .rep-c1 .rep-l > i { translate: 0 calc((1 - clamp(0, var(--eh) * 1.9 - var(--k) * 0.3, 1)) * 105% - var(--eb) * 112%); }
  .rep-tail { display: block; position: relative; background: var(--ink-950); max-width: none; margin-left: calc(50% + 1.4rem); margin-right: var(--gut); padding: 0.4rem 0 3rem; } .rep-tail .rep-copy { margin-top: 0; }
}
@media (orientation: landscape) and (max-height: 700px) and (max-width: 46rem) { .rep-c1 .rep-sub, .rep-c1 .rep-k { display: none; } }
/* ---------- reduced motion: a still, readable composition; no pinning, no wipes ---------- */
@media (prefers-reduced-motion: reduce) {
  .rep-ch { height: auto; } .rep-st { position: relative; height: auto; overflow: visible; container-type: normal; display: grid; gap: 3.5rem; padding: 6.5rem var(--gut) 4rem; justify-items: start; }
  .rep-glow, .rep-glow2, .rep-safety-anchor { display: none; }
  .rep-ph, .rep-col, .rep-rcol, .rep-note { position: static; translate: none; width: auto; height: auto; left: auto; right: auto; padding: 0; display: grid; }
  .rep-ph { display: block; position: relative; top: auto; width: var(--pw); height: var(--ph); margin-inline: auto; }
  .rep-col { gap: 3.5rem; width: min(44rem, 100%); } .rep-col > * { grid-area: auto; } .rep-rcol { width: min(44rem, 100%); }
  .rep-c1, .rep-c2, .rep-c3, .rep-rcol > * { opacity: 1 !important; translate: none !important; } .rep-c1 .rep-l > i { translate: none !important; }
  .rep-c2 .rep-k, .rep-c3 .rep-k, .rep .rep-cap { display: block; }
  .rep-s1, .rep-s2, .rep-s3 { -webkit-mask-image: none; mask-image: none; opacity: 0; } .rep-s0 { opacity: 0; } .rep-s1 { opacity: 1; }
  .rep-c2 .rep-card, .rep-c3 .rep-card { width: 100%; }
  .rep .rep-rcol .rep-copy, .rep .rep-rcol .rep-principles { display: block; } .rep-tail { display: none; }
  .rep .rep-h2 { max-width: none; }
}
