/* Divine Design Painting & Tub. Split stage.
   Tokens ported from the Apple system (photography first, white and parchment
   canvases against one near-black tile, 17px body, weight-600 display with negative
   tracking, a single pill CTA, exactly one shadow and it belongs to photographs).
   Brand hexes replaced: the accent is the painter's tape in the listing photographs. */

:root {
  --sc-canvas:      #ffffff;
  --sc-surface:     #f5f5f7;
  --sc-ink:         #1d1d1f;
  --sc-ink-soft:    #6e6e73;
  --sc-accent:      #1e4185;   /* painter's tape, sampled and deepened for text */
  --sc-accent-ink:  #ffffff;
  --sc-font-display: "Outfit", system-ui, -apple-system, sans-serif;
  --sc-font-text:    "Instrument Sans", system-ui, -apple-system, sans-serif;
  --sc-font-mono:    "Instrument Sans", system-ui, sans-serif;
  --sc-shadow-color: 220 10% 10%;
  --sc-track-normal: -0.006em;
  --sc-leading-body: 1.47;
  --sc-r-sm: 6px; --sc-r-md: 11px; --sc-r-lg: 18px;

  --white: #ffffff; --parch: #f5f5f7; --ink: #1d1d1f; --ink-2: #48484c; --ink-3: #6e6e73;
  --tile: #26272a; --tile-2: #2d2e31; --on-dark: #ffffff; --on-dark-2: #c9c9cc;
  --tape: #3b7ddd; --tape-deep: #1e4185; --tape-on-dark: #8fb6ff;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --split: 0.5;
  --photo-shadow: rgba(0,0,0,0.22) 3px 5px 30px;
}

html { scroll-behavior: auto; }
body { background: var(--white); color: var(--ink); font-size: 1.0625rem; }
::selection { background: var(--tape); color: #fff; }

/* -------------------------------------------------------------- type ramp -- */
.d { font-family: var(--sc-font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.022em; text-wrap: balance; margin: 0; }
.d--hero { font-size: clamp(2rem, 1.2rem + 3.6vw, 4.4rem); }
.d--act  { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3rem); }
.d--close { font-size: clamp(2.2rem, 1.4rem + 4vw, 5rem); letter-spacing: -0.028em; }
.lede { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem); line-height: 1.35; margin: 0; text-wrap: pretty; letter-spacing: -0.008em; }
.body { font-size: 1.0625rem; line-height: 1.47; margin: 0; text-wrap: pretty; max-width: 34rem; }
.cap { font-size: 0.875rem; line-height: 1.43; letter-spacing: -0.005em; margin: 0; }
.label { font-family: var(--sc-font-text); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------------------------------------------------------------- stages -- */
.act { position: relative; }
/* no position rule on the pinned stage: the engine makes it sticky and an author
   position silently un-pins it. Only the flow stages are positioned. */
.split { height: 100svh; overflow: clip; }
.split--flow { position: relative; min-height: 100svh; height: auto; }
.side { position: absolute; inset: 0; }
.side--l { background: var(--tile); color: var(--on-dark); --sc-ink: #ffffff; --sc-ink-soft: #c9c9cc; }
.side--r { background: var(--white); color: var(--ink); clip-path: inset(0 0 0 calc(var(--split) * 100%)); }
.split--flow .side { position: absolute; }
.split--flow { display: grid; }
.split--flow > .side { position: absolute; inset: 0; }
.split--flow > .sizer { position: relative; visibility: hidden; pointer-events: none; }

/* copy blocks: the left side keeps to the strip the divider never crosses, the
   right side is anchored to the right edge so it is never under the left layer */
.copy { position: absolute; display: grid; gap: 0.9rem; }
.copy--l { left: var(--gutter); width: min(30vw, 26rem); }
.copy--r { right: var(--gutter); width: min(42vw, 34rem); }
.copy--top { top: clamp(4.5rem, 10svh, 8rem); }
.copy--bottom { bottom: clamp(2rem, 8svh, 6rem); }
.copy--mid { top: 50%; transform: translateY(-50%); }
.copy--swap > [data-sc-cue] { grid-area: 1 / 1; align-self: end; }
.copy--swap blockquote { margin: 0; display: grid; gap: 0.4rem; }
.side--l .body, .side--l .cap { color: var(--on-dark-2); }
.side--r .body, .side--r .cap { color: var(--ink-2); }

/* plates: photographs resting on the surface, the one shadow in the system */
.plate { position: absolute; margin: 0; }
.plate img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--sc-r-md); box-shadow: var(--photo-shadow); background: var(--parch); }
.plate--l { left: var(--gutter); width: min(30vw, 26rem); }
.plate--r { right: var(--gutter); width: min(42vw, 36rem); }
.plate--tall { top: clamp(4.5rem, 10svh, 8rem); bottom: clamp(9rem, 26svh, 15rem); }
.plate--low { top: clamp(9rem, 26svh, 15rem); bottom: clamp(4.5rem, 10svh, 8rem); }
.plate figcaption { position: absolute; left: 0.8rem; bottom: 0.7rem; right: 0.8rem; font-size: 0.78rem; letter-spacing: 0; padding: 0.35rem 0.6rem; border-radius: 6px; background: rgba(255,255,255,0.86); color: var(--ink-2); width: max-content; max-width: calc(100% - 1.6rem); }
.side--l .plate figcaption { background: rgba(38,39,42,0.86); color: var(--on-dark-2); }
.plate--small { width: min(14vw, 12rem) !important; height: min(19vw, 16rem); bottom: clamp(2rem, 8svh, 6rem); top: auto; }
.plate--small.plate--l { left: calc(var(--gutter) + min(30vw, 26rem) - min(14vw, 12rem)); }
.plate--small.plate--r { right: calc(var(--gutter) + min(42vw, 36rem) - min(14vw, 12rem)); }

/* the hero: both headlines readable at once, 50/50, nothing bleeds */
.hero .plate--l { top: clamp(9rem, 22svh, 14rem); bottom: clamp(2rem, 8svh, 6rem); width: min(24vw, 20rem); }
.hero .plate--r { top: clamp(9rem, 22svh, 14rem); bottom: clamp(2rem, 8svh, 6rem); width: min(30vw, 26rem); }
.hero .copy--l { top: clamp(4.5rem, 9svh, 7rem); width: min(38vw, 30rem); }
.hero .copy--r { top: clamp(4.5rem, 9svh, 7rem); width: min(42vw, 34rem); }
.hero .mast { position: absolute; top: 1.2rem; font-size: 0.8rem; color: var(--ink-3); }
.hero .mast--l { left: var(--gutter); color: var(--on-dark-2); }
.hero .mast--r { right: var(--gutter); text-align: right; }
.hero .mast strong { display: block; font-family: var(--sc-font-display); font-weight: 600; font-size: 1rem; color: inherit; letter-spacing: -0.01em; }

/* the process act: a list on the light side, the real numbers on the dark side */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.6rem; align-items: baseline; padding: 0.55rem 0; border-top: 1px solid rgba(29,29,31,0.12); font-size: 1rem; line-height: 1.4; }
.steps li::before { counter-increment: step; content: counter(step); font-family: var(--sc-font-display); font-weight: 600; color: var(--tape-deep); font-size: 1.15rem; }
.steps li strong { font-weight: 600; color: var(--ink); }
.steps li span { color: var(--ink-2); font-size: 0.95rem; }
.counts { display: grid; gap: 1rem; }
.count { font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(3rem, 2rem + 4vw, 5.8rem); line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.count small { display: block; font-family: var(--sc-font-text); font-weight: 400; font-size: 0.85rem; letter-spacing: 0; color: var(--on-dark-2); margin-top: 0.4rem; }

/* the quotes act: the same reviewer on both sides of the line */
.rows { position: absolute; left: 0; right: 0; top: clamp(4.5rem, 10svh, 8rem); display: grid; gap: clamp(1.2rem, 3svh, 2.4rem); }
.row { display: grid; grid-template-columns: 1fr; min-height: clamp(6.5rem, 15svh, 9.5rem); }
.row blockquote { margin: 0; display: grid; gap: 0.45rem; align-content: start; }
.row p { margin: 0; font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1rem, 0.85rem + 0.7vw, 1.45rem); line-height: 1.25; letter-spacing: -0.015em; text-wrap: pretty; }
.row cite { font-style: normal; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-3); }
.side--l .row cite { color: var(--on-dark-2); }
.side--l .row blockquote { margin-left: var(--gutter); width: min(30vw, 26rem); }
.side--r .row blockquote { margin-left: auto; margin-right: var(--gutter); width: min(42vw, 34rem); }
.rows__head { position: absolute; left: var(--gutter); right: var(--gutter); top: clamp(1.4rem, 3.5svh, 2.6rem); display: flex; justify-content: space-between; }
.side--l .rows__head { color: var(--on-dark-2); }

/* the collapse */
.close .plate--r { left: var(--gutter); right: var(--gutter); width: auto; top: clamp(4rem, 9svh, 7rem); bottom: clamp(10rem, 30svh, 18rem); }
.close .copy--r { bottom: clamp(1.5rem, 5svh, 4rem); width: min(60vw, 46rem); right: var(--gutter); }
.close .copy--l { bottom: clamp(2rem, 8svh, 6rem); }
.close .plate--l { top: clamp(4rem, 9svh, 7rem); bottom: clamp(10rem, 30svh, 18rem); }
.cta { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--tape-deep); color: #fff; text-decoration: none; font-weight: 600; font-size: 1.0625rem; padding: 0.8rem 1.4rem; border-radius: 999px; transition: transform 120ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out); width: max-content; }
.cta:hover { background: #17356d; }
.cta:active { transform: scale(0.95); }
.cta:focus-visible { outline: 2px solid var(--tape-deep); outline-offset: 3px; }
.cta__num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.close__foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; font-size: 0.75rem; line-height: 1.45; color: var(--ink-3); border-top: 1px solid rgba(29,29,31,0.12); padding-top: 0.8rem; margin-top: 0.4rem; }
.close__foot p { margin: 0; }

/* -------------------------------------------------- the divider is the chrome -- */
.tape {
  position: fixed; top: 0; bottom: 0; left: 0; width: 14px; margin-left: -7px; z-index: 50;
  transform: translate3d(calc(var(--split) * 100vw), 0, 0);
  will-change: transform;
}
.tape__strip {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.10) 0 2px, rgba(255,255,255,0) 2px 5px),
    var(--tape);
  clip-path: polygon(0 0, 100% 0, 100% 0.6%, 65% 0.9%, 100% 1.3%, 100% 98.7%, 40% 99.1%, 100% 99.4%, 100% 100%, 0 100%, 0 99.5%, 55% 99.2%, 0 98.8%, 0 1.2%, 30% 0.8%, 0 0.5%);
  box-shadow: 2px 0 8px rgba(0,0,0,0.18), -1px 0 4px rgba(0,0,0,0.12);
}
.tape__prog { position: absolute; left: 3px; right: 3px; top: 0; bottom: 0; background: rgba(20,45,100,0.55); transform-origin: 50% 0; transform: scaleY(var(--prog, 0)); }
.tape__grip {
  position: absolute; left: 50%; top: 50%; width: 2.75rem; height: 4.25rem; transform: translate(-50%, -50%);
  border: 0; border-radius: 999px; background: var(--white); color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.22), 0 10px 26px -8px rgba(0,0,0,0.35), inset 0 0 0 2px var(--tape);
  cursor: ew-resize; touch-action: none; display: grid; place-items: center; padding: 0;
  transition: transform 140ms var(--sc-ease-out);
}
.tape__grip::before { content: ""; width: 0.9rem; height: 1.3rem; background: radial-gradient(circle, var(--ink) 1.3px, transparent 1.6px) 0 0 / 0.45rem 0.45rem; opacity: 0.8; }
.tape__grip:active, .tape--held .tape__grip { transform: translate(-50%, -50%) scale(1.06); }
.tape__grip:focus-visible { outline: 2px solid var(--tape-deep); outline-offset: 3px; }
.tape__label { position: absolute; top: 1.2rem; white-space: nowrap; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tape__label--l { right: 1.4rem; color: var(--on-dark-2); }
.tape__label--r { left: 1.4rem; color: var(--ink-3); }

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 760px) {
  :root { --gutter: 0.9rem; }
  body { font-size: 0.95rem; }
  .copy--l { width: calc(50vw - 1.6rem); }
  .copy--r { width: calc(50vw - 1.6rem); }
  .copy--top { top: 3.4rem; }
  .copy--bottom { bottom: 1.4rem; }
  .plate--l, .plate--r { width: calc(50vw - 1.8rem); }
  .plate--tall, .plate--low { top: 12svh; bottom: 42svh; }
  .plate--small { display: none; }
  .hero .plate--l, .hero .plate--r { width: calc(50vw - 1.8rem); top: 36svh; bottom: 14svh; }
  .hero .copy--l, .hero .copy--r { top: 3.6rem; width: calc(50vw - 1.6rem); }
  .hero .mast { display: none; }
  .d--hero { font-size: 1.55rem; }
  .d--act { font-size: 1.25rem; }
  .lede { font-size: 0.95rem; }
  .body { font-size: 0.9rem; }
  .copy { gap: 0.6rem; }
  .steps li { grid-template-columns: 1.4rem 1fr; padding: 0.4rem 0; font-size: 0.85rem; }
  .steps li span { display: none; }
  .count { font-size: 2.4rem; }
  .side--l .row blockquote { width: calc(50vw - 1.6rem); }
  .side--r .row blockquote { width: calc(50vw - 1.6rem); }
  .row p { font-size: 0.9rem; }
  .row { min-height: 8.5rem; }
  .rows { top: 3.6rem; gap: 0.9rem; }
  .close .plate--r { bottom: 46svh; }
  .close .copy--r { width: calc(100vw - 2 * var(--gutter)); bottom: 1.2rem; }
  .close__foot { grid-template-columns: 1fr; gap: 0.4rem; font-size: 0.68rem; }
  .close .plate--l { bottom: 46svh; }
  .close .copy--l { bottom: 1.4rem; }
  .d--close { font-size: 1.9rem; }
  .tape__label { display: none; }
  .tape__grip { width: 2.4rem; height: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tape__grip, .cta { transition: none; }
}

/* the losing column's last line fades as the divider reaches it, so it never sits
   under the winning layer at full strength */
.close__left { opacity: clamp(0, calc((var(--split) - 0.16) * 5), 1); }

/* hero: copy above plate in normal flow, so neither can sit on the other */
.hero .side { display: flex; flex-direction: column; gap: 1.1rem; padding: clamp(3.8rem, 9svh, 6.5rem) var(--gutter) clamp(2rem, 7svh, 5rem); }
.hero .copy { position: static; }
.hero .plate { position: relative; flex: 1 1 auto; min-height: 0; inset: auto; }
.hero .side--l > .copy, .hero .side--l > .plate { width: min(38vw, 30rem); }
.hero .side--r > .copy, .hero .side--r > .plate { width: min(42vw, 34rem); margin-left: auto; }
.hero .side--l > .plate { width: min(26vw, 22rem); }
.hero .side--r > .plate { width: min(32vw, 28rem); }
.hero .plate img { height: 100%; }
/* small plates: overlap the big plate's edge rather than the copy */
.plate--small-a { bottom: clamp(2rem, 8svh, 6rem) !important; }
.plate--small-b { bottom: calc(clamp(9rem, 26svh, 15rem) - 1.4rem) !important; }
.plate--small-c { bottom: calc(clamp(4.5rem, 10svh, 8rem) - 1.6rem) !important; }
.plate--small img { box-shadow: var(--photo-shadow), 0 0 0 3px var(--white); }
.side--l .plate--small img { box-shadow: var(--photo-shadow), 0 0 0 3px var(--tile); }
@media (max-width: 760px) {
  .hero .side { padding: 3.4rem 0.9rem 1.2rem; gap: 0.7rem; }
  .hero .side--l > .copy, .hero .side--l > .plate, .hero .side--r > .copy, .hero .side--r > .plate { width: calc(50vw - 1.8rem); }
}

/* the closing plate stops above the CTA block; the block sits on solid white */
.close .plate--r { bottom: clamp(13rem, 38svh, 23rem); }
.close .copy--r { background: var(--white); padding-top: 0.6rem; }
@media (max-width: 760px) {
  .plate--low { top: 44svh; bottom: 6svh; }
  .close .plate--r { bottom: 52svh; }
}

/* the grip answers the pointer before it is pressed, so the drag is discoverable */
@media (hover: hover) and (pointer: fine) {
  .tape__grip:hover { transform: translate(-50%, -50%) scale(1.04); }
}

/* step rows: counter, name, description in three columns, not two */
.steps li { grid-template-columns: 2rem 6.5rem 1fr; }
@media (max-width: 760px) { .steps li { grid-template-columns: 1.4rem 1fr; } }
