/* THE 1.2 SITE (remus/site-12, held for Ric, launches with the app's 1.2).
   Sits on css/shop.css and uses its tokens only: MAT ground, BONE type, TIDE, EMBER, FLUSH, LINE, DIM.
   Motion is transform and opacity only, and none of it runs under prefers-reduced-motion. */
:root { --flush: #D6357F; /* brand.json FLUSH: the earned Z, and only the Z */ }

/* -- the header's few words ----------------------------------------- */
.top .nav a { font: 400 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }

/* -- the chapters ----------------------------------------------------- */
.s12 { margin-top: clamp(96px, 16vw, 180px); }
.s12-k { margin: 0 0 14px; font: 700 12px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
.s12-k b { color: var(--flush); font-weight: 700; }
.s12-h { margin: 0; font-size: clamp(30px, 5vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; max-width: 16ch; }
.s12-p { margin: 16px 0 0; max-width: 40ch; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; color: var(--soft); text-wrap: pretty; }
.s12-p b { color: var(--bone); font-weight: 600; }
.s12-act { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.s12-act .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 28px; }
.s12-link { font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bone); border-bottom: 1px solid var(--dim); padding-bottom: 6px; display: inline-block; }
.s12-link:hover { border-color: var(--bone); }

/* the hero's said line */
.say-said { margin: 10px 0 0; font: 400 13px/1.4 var(--mono); letter-spacing: .06em; color: var(--soft); }

/* -- the rolling cloth: the app's own threads, drifting ---------------- */
.cloth-band { position: relative; margin: 32px calc(var(--gutter) * -1) 0; height: clamp(220px, 46vw, 520px); overflow: hidden; background: var(--ground); }
.cloth-band img { position: absolute; left: 0; top: -30%; width: 100%; height: 160%; object-fit: cover; will-change: transform; animation: roll 28s ease-in-out infinite alternate; }
.cloth-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(var(--ground), transparent 22%, transparent 78%, var(--ground)); pointer-events: none; }
@keyframes roll { from { transform: translate3d(0, 0, 0) scale(1.04); } to { transform: translate3d(-2%, 12%, 0) scale(1.1); } }

/* -- the app's three beats --------------------------------------------- */
.beats { display: grid; gap: clamp(64px, 10vw, 120px); margin-top: clamp(56px, 9vw, 110px); }
.beat { display: grid; gap: 28px; align-items: center; }
.beat-copy .s12-h { font-size: clamp(24px, 3.4vw, 40px); max-width: 18ch; }
.beat-copy .s12-p { font-size: 16px; }
.screens { display: flex; gap: clamp(10px, 2vw, 24px); justify-content: center; }
.screen { width: min(42vw, 230px); aspect-ratio: 600 / 1304; border-radius: clamp(18px, 3.4vw, 34px); overflow: hidden; border: 1px solid var(--line); background: var(--ground); flex: none; }
.screen img { width: 100%; height: 100%; object-fit: cover; }
.screen + .screen { margin-top: clamp(28px, 6vw, 64px); }
@media (min-width: 860px) {
    .beat { grid-template-columns: 1fr 1fr; gap: 64px; }
    .beat:nth-child(even) .beat-copy { order: 2; }
}

/* the store line */
.store-row { margin-top: clamp(64px, 10vw, 110px); padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 20px; }
.refusals { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
@media (min-width: 860px) { .store-row { grid-template-columns: 1fr auto; align-items: center; } }

/* -- a slot Ric fills (film, new rugby): marked, never mistaken for a product -- */
.slot { position: relative; display: grid; place-items: center; text-align: center; padding: 20px; border: 1px dashed var(--faint, #3A3936); color: var(--dim);
        font: 400 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; background: var(--panel); }
.slot b { display: block; color: var(--soft); font-weight: 700; margin-bottom: 4px; }
.film-slot { margin-top: clamp(40px, 6vw, 72px); aspect-ratio: 16 / 9; }

/* -- the rashguard teaser ----------------------------------------------- */
.drop-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-top: 20px; }
.drop-cap .tag { font: 400 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }

/* -- full bleed: the rashguard runs edge to edge --------------------------- */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.bleed .drop-cap { padding: 0 var(--gutter); max-width: var(--rail); margin-inline: auto; }

/* -- the thread from the app to the shirt ---------------------------------- */
.thread12 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 24px); margin-top: 32px; align-items: end; }
.thread12 figure { margin: 0; display: grid; gap: 10px; }
.thread12 .pic { aspect-ratio: 3 / 4; overflow: hidden; background: var(--ground); border: 1px solid var(--line); }
.thread12 .pic img { width: 100%; height: 100%; object-fit: cover; }
.thread12 .pic.app img { object-position: 50% 42%; }
.thread12 figcaption { font: 400 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }

/* -- reveal on arrival (transform and opacity only) ------------------------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ================= THE TRAILER (/rz-001) ================= */
.trailer { position: relative; }
.trailer.live { height: 520vh; }
.trailer .stage12 { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ground); }
.trailer .layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; will-change: opacity, transform; }
.trailer .layer img { width: 100%; height: 100%; object-fit: contain; }
.trailer .layer.cover img { object-fit: cover; }
.trailer .l-cloth { opacity: calc(1 - var(--b1, 0)); transform: scale(calc(1.15 - var(--b0, 0) * .15)); }
.trailer .l-back { opacity: calc(var(--b1, 0) - var(--b2, 0)); }
.trailer .l-back .rise { position: absolute; inset: 0; background: linear-gradient(to top, transparent, var(--ground) 18%); transform: translate3d(0, calc(var(--rise, 0) * -100%), 0); }
.trailer .l-final { opacity: calc(var(--b2, 0) - var(--b3, 0)); transform: scale(calc(1.06 - var(--b2, 0) * .06)); }
.trailer .l-chest { opacity: var(--b3, 0); }
.trailer .title { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 6px; pointer-events: none; }
.trailer .t-line { margin: 0; font: 700 12px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--bone); opacity: 0; transition: opacity .6s ease; }
.trailer .t-line.on { opacity: 1; }
.trailer .t-line .z { color: var(--flush); }
.trailer .hint { position: absolute; top: calc(var(--head) + 16px); left: 0; right: 0; text-align: center; font: 400 11px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--dim); opacity: calc(1 - var(--b0, 0) * 4); }
.trailer-end { max-width: var(--rail); margin: 0 auto; padding: clamp(56px, 10vw, 120px) var(--gutter) 72px; display: grid; gap: 40px; }
.trailer-end .stills { display: grid; gap: 8px; }
.trailer-end .stills img { width: 100%; height: auto; background: var(--ground); }
.trailer-end .facts { max-width: 560px; }
@media (min-width: 860px) {
    .trailer-end { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

/* WITHOUT MOTION (reduced motion, or no script) the trailer is a plain sequence of stills; js/site12.js adds .live */
.trailer:not(.live) .stage12 { position: static; height: auto; display: grid; gap: 8px; }
.trailer:not(.live) .layer { position: relative; inset: auto; opacity: 1; transform: none; }
.trailer:not(.live) .layer.cover img { height: 70vh; }
.trailer:not(.live) .rise, .trailer:not(.live) .hint { display: none; }
.trailer:not(.live) .title { position: static; padding: 20px var(--gutter) 0; }
.trailer:not(.live) .t-line { opacity: 1; }

/* -- the archived pages (polo, tees) ---------------------------------- */
.rest { max-width: 640px; margin: 0 auto; padding: clamp(80px, 18vw, 200px) var(--gutter) 120px; display: grid; gap: 18px; }
.rest h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: -.02em; }
.rest p { margin: 0; color: var(--soft); font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
    .cloth-band img { animation: none; }
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
/* the trailer on a phone: the back and the chest fill the frame, so the Z is the picture */
@media (max-width: 859px) {
    .trailer.live .l-back img { object-fit: cover; object-position: 50% 45%; }
    .trailer.live .l-final img, .trailer.live .l-chest img { padding-bottom: 96px; }
}
body { overflow-x: clip; }

/* -- Winter 27, in the works: two look-only trailers (Ric 2026-11-23) ------- */
.works { margin-top: clamp(72px, 12vw, 140px); }
.works-head { max-width: var(--rail); margin: 0 auto 20px; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.works-head .s12-k { margin: 0; }

.trailer.live.short { height: 400vh; }
.trailer .t-tag { margin: 0 0 6px; font: 400 11px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
.trailer-wrap { position: relative; }
.state12 { font: 400 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
/* the live trailer's lines share one place, so the words change without the block jumping */
.trailer.live .title { display: grid; }
.trailer.live .title .t-tag { grid-row: 1; grid-column: 1; }
.trailer.live .title .t-line { grid-row: 2; grid-column: 1; align-self: end; }
/* the rugby on a phone: every study fills the frame (the line art sits in the middle of each render) */
@media (max-width: 859px) {
    .trailer.live.rug .layer img { object-fit: cover; object-position: 50% 50%; }
    .trailer.live.rug .l-cloth img { object-position: 62% 50%; transform: scale(1.5); transform-origin: 62% 45%; }
}
.bleed > .s12-k { max-width: var(--rail); margin: 0 auto 20px; padding: 0 var(--gutter); }
.work .drop-cap { margin-top: 20px; }

/* ================= THE HOME (Ric 2026-11-23, after the live crit: real frames only, one app shot, the garments) ================= */
.s12-home .top { position: fixed; left: 0; right: 0; }
.home12 { overflow-x: clip; }
/* 1 · RRRz: the app's own knit frame on MAT (the 13-inch iPad's 1.2 picture, the largest the app has drawn it: 1375 px
   of mark, crisp at 3x up to a 458 px mark). Its ground is MAT exactly (10, 10, 12, sampled at every corner), so the
   only edge is the mask, which fades the cut rings before the mark: the mark spans 8.85% to 91.1% across and 11.5% to
   86.3% down, and its left edge sits on the gutter, under the logo and over the words. */
.hero12 { position: relative; padding: calc(var(--head) + clamp(8px, 4vw, 40px)) var(--gutter) clamp(72px, 16vw, 160px); }
.hero12-in { --kw: min(calc((100vw - 2 * var(--gutter)) / .8224), 836px); max-width: none; margin: 0; display: grid; justify-items: start; }
.hero12-mark { margin: 0; line-height: 0; }
.knit-frame { display: block; width: var(--kw); max-width: none; height: auto; margin-left: calc(var(--kw) * -.08852);
              -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9.5%, #000 89%, transparent 100%);
              -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9.5%, #000 89%, transparent 100%);
              mask-composite: intersect; transform: translate3d(0, var(--drift, 0px), 0); will-change: transform; }
.say12 { margin: clamp(-48px, -6vw, -24px) 0 0; position: relative; }   /* the frame's own MAT below the mark is air already */
.say12 .say-ipa { font: 400 clamp(17px, 2vw, 22px)/1 var(--mono); color: var(--bone); letter-spacing: .02em; }
.hero12-line { margin: 14px 0 0; font: 400 12px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
/* 2 · the application, a full-screen moment: Ric's strum screenshot edge to edge at the screen's height, held while it
   scrolls past. The lit threads run across the middle of the frame, so the crop keeps the centre. */
.app12 { padding: 0 0 clamp(96px, 18vw, 180px); display: grid; justify-items: center; gap: clamp(36px, 8vw, 56px); }
.app-moment { position: relative; width: 100%; height: 150vh; height: 150svh; }
.app-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ground); }
.app-stage img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }
.app-stage::after { content: ''; position: absolute; inset: auto 0 0; height: 22%; background: linear-gradient(transparent, var(--ground)); pointer-events: none; }
.app12-act .btn { display: inline-flex; align-items: center; padding: 0 36px; }
@media (min-width: 860px) { .app-stage img { object-fit: contain; } }
/* 3, 4 · the garments */
.s12-home .work12 + .work12 { margin-top: clamp(24px, 6vw, 64px); }
.turn { position: relative; width: min(100vw, 1180px); margin: clamp(24px, 5vw, 56px) auto 0; aspect-ratio: 1400 / 1060; perspective: 1800px; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; outline-offset: -2px; }
.turn.dragging { cursor: grabbing; }
.turn-card { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--ry, 0deg)); transition: transform .7s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.turn.dragging .turn-card { transition: none; }
.turn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-user-drag: none; pointer-events: none; }
.turn .tb { transform: rotateY(180deg); }
.turn::after { content: '\2194'; position: absolute; right: var(--gutter); bottom: 6px; font: 400 18px/1 var(--mono); color: var(--dim); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .turn-card { transition: none; } .knit-frame { transform: none; } .app-moment { height: auto; } .app-stage { position: relative; } }

/* ===== THE SHORT TRAILER (Ric 2026-11-23: "No slop, no waste"): three beats in under two screens of scroll ===== */
.work12 { position: relative; }
.trailer.live.three { height: 275vh; }            /* 1.75 screens of scroll while the stage is held */
.trailer.three .layer { pointer-events: none; }
.trailer.three .l-cloth { opacity: calc(1 - var(--b1, 0)); transform: scale(calc(1.12 - var(--b0, 0) * .12)); }
.trailer.three .l-back { opacity: calc(var(--b1, 0) - var(--b2, 0)); }
.trailer.three .l-final { opacity: var(--b2, 0); transform: none; }
.trailer.three .l-final.on, .trailer.three:not(.live) .l-final { pointer-events: auto; }
.trailer.three .turn { position: absolute; inset: 0; width: auto; margin: 0; aspect-ratio: auto; }
.trailer.three:not(.live) .l-final .turn { position: relative; inset: auto; width: 100%; aspect-ratio: 1400 / 1060; }
.trailer.three .title { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.trailer.three .t-tag { margin: 0; font: 700 12px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--bone); }
.trailer.three .turn::after { bottom: 64px; }
.facts-wrap { max-width: var(--rail); margin: 0 auto; padding: 8px var(--gutter) 56px; }
.facts12 { max-width: 560px; }
@media (max-width: 859px) {
    .trailer.live.three .l-back img { object-fit: cover; object-position: 50% 45%; }
}
.trailer.three .turn img { object-fit: contain !important; transform-origin: 50% 50%; }
.trailer.three .turn .tf { transform: none !important; }
.trailer.three .turn .tb { transform: rotateY(180deg) !important; }
.trailer.three.rug .l-cloth img { transform: none; }
.trailer.three:not(.live) .layer { opacity: 1; transform: none; }
/* the rugby opens on its front, which a drag turns to the Z Z Z back (Ric 2026-11-25, one SKU) */
.trailer.three.turn-first .l-cloth { transform: none; }
.trailer.three .l-cloth.on, .trailer.three:not(.live) .l-cloth { pointer-events: auto; }
.trailer.three:not(.live) .layer .turn { position: relative; inset: auto; width: 100%; aspect-ratio: 1400 / 1002; }
/* the knit RRRz, the home's headline mark (Ric 2026-11-23: "Replace with the knit RRRz") */
.hero12-mark { margin: 0; }
.knit12 { display: block; width: min(78vw, 560px); height: auto; color: var(--bone); cursor: pointer; overflow: visible; -webkit-tap-highlight-color: transparent; }
.knit12 path { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .6s ease; transition-delay: calc(var(--k, 0) * 22ms); }
.knit12.loose path { transition: none; }
.say12 { margin: 0; }
@media (prefers-reduced-motion: reduce) { .knit12 path { transition: none; } }

/* the hero's two options (Ric 2026-11-23). H2: the woven RRRz alone, large: the mark spans the screen on a phone
   (capped at 557 px of frame, 1672 px of source, so it stays crisp at 3x), centred. H1: the mark on the gutter as
   before, with the one lit thread running the full width under it. */
.hero-thread { display: none; }
.hero12[data-hero="h2"] .hero12-in { --kw: min(calc(100vw / .8224), 557px); }
.hero12[data-hero="h2"] .knit-frame { margin-left: calc((100vw - var(--kw) * .8224) / 2 - var(--kw) * .08852 - var(--gutter)); }
@media (min-width: 860px) { .hero12[data-hero="h2"] .hero12-in { --kw: 836px; } }
.hero12[data-hero="h1"] .hero-thread { display: block; width: 100vw; max-width: none; height: auto; margin: calc(var(--kw) * -.14) 0 0 calc(var(--gutter) * -1); position: relative; }
.hero12[data-hero="h1"] .say12 { margin-top: 8px; }

/* ===== THE SIMPLE BRAND (Ric 2026-11-23, registry/BRAND-SIMPLE.md): the knit RRRz the hero, the solid RRRz the small logo (2026-11-24), one line, five inks, two faces ===== */
:root { --accent: var(--blue); --cta: var(--bone); }   /* no hour's accent: the button is BONE on MAT, focus is TIDE */
/* the small logo is the solid RRRz in the brand alphabet, RRR in BONE and the z in FLUSH (Ric 2026-11-24): a 36 x 7 cell
   grid drawn at whole pixels a cell, so it is crisp at 1x, 2x and 3x. Small, because it is clear ("Solid in the nav,
   but not big"): 2 px a cell on a phone, its native 3 on a desk. The knit stays the hero. */
.mark .mk-solid { display: block; width: 72px; height: 14px; }
@media (min-width: 900px) { .mark .mk-solid { width: 108px; height: 21px; } }
.foot > .mark { padding: 0; justify-self: start; }
.foot .mark .mk-solid { width: 72px; height: 14px; opacity: 1; }
@media (min-width: 900px) { .foot .mark .mk-solid { width: 108px; height: 21px; } }
.btn { background: var(--bone); border-color: var(--bone); color: var(--ground); }
.btn:hover:not(:disabled) { background: var(--ground); border-color: var(--bone); color: var(--bone); }
.btn.ghost { background: none; color: var(--bone); border-color: var(--bone); }
.btn.ghost:hover:not(:disabled) { background: var(--bone); color: var(--ground); }
.foot { border-top: 1px solid var(--line); }

/* -- the product pages' trailers (/rz-001, /rugby; remus/site-13-pages, 2026-11-23) ---------------------------------
   The back used to fade in fully covered by its rise, so for about a third of a screen of scroll the cloth (or the
   front) had gone and the back had not come: a held stage with almost nothing on it. Here the rise starts a third of
   the way up, so the incoming back always shows its lower threads while the outgoing layer fades. The home keeps its
   own timing. */
.rz-trailer .trailer.three .l-back .rise { transform: translate3d(0, calc((.35 + var(--rise, 0) * .65) * -100%), 0); }
