/* brand.css — RRRz, the brand surface (rrjjbb.com).
   One design system with ricrios.com: every size, space, weight and
   tracking value here is a PLATFORM token (css/platform/), and the type
   ROLES are the platform's own — the serif divergence was retired
   (2026-08-24) because two faces made two platforms, and the whole
   point is one. If a value in this file is a literal, it is a defect. */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 340;
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--text-inverse); }

a { color: var(--text); text-decoration: none; transition: var(--transition-color); }
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding-inline: var(--safe-inline);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: var(--layer-raised);
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hidden-field { display: none; }

/* ── The label voice ──────────────────────────
   One treatment for every small caption on both domains: mono, xs,
   tracked wide, uppercase. This is the platform's label language. */
.masthead-loc, .eyebrow, .creed-item h2, .spec dt,
.footer-line, .footer-links a, .registry {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

/* ── Masthead ─────────────────────────────── */
/* Floats over the full-viewport field rather than pushing it down. */

.masthead {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    z-index: var(--layer-sticky);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-block: var(--space-lg);
}

.masthead .monogram {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    letter-spacing: 0.04em;
}

.masthead-loc { color: var(--text-muted); }

.eyebrow { color: var(--accent); margin: 0 0 var(--space-lg); }

/* ── Hero ─────────────────────────────────── */

.hero { padding-block: 0 var(--band); }

/* Cinematic: the carapace owns the first full viewport on every channel —
   edge to edge, out of the column, painting with the platform surface so
   light and dark stay seamless. svh first so mobile URL bars can't
   shrink the moment. */
.hero rr-hero {
    display: block;
    inline-size: 100vw;
    margin-inline: calc(50% - 50vw);
    block-size: 100svh;
    block-size: 100dvh;
}

/* The registry — silent until the mark is first touched. */
.registry {
    color: var(--text-muted);
    text-align: center;
    margin: var(--space-lg) 0 0;
    min-height: 1.2em;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.registry b { color: var(--accent); font-weight: var(--weight-bold); }

.thesis {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: var(--display-2);
    line-height: 1.02;
    letter-spacing: -0.01em;   /* the serif needs less than the grotesk */
    margin: var(--band) 0 var(--space-lg);
    max-width: 18ch;
    text-wrap: balance;
}

.lede {
    font-size: var(--text-lg);
    color: var(--text-muted);
    max-width: var(--measure-narrow);
    margin: 0;
}

/* ── Manifesto ────────────────────────────── */

.creed { padding-block: var(--band); }

.creed-item {
    display: grid;
    grid-template-columns: var(--space-3xl) minmax(0, 1fr);
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--space-md) var(--space-xl);
    padding-block: var(--space-xl);
    border-top: 1px solid var(--line);
}
@media (max-width: 640px) {
    .creed-item { grid-template-columns: 1fr; gap: var(--space-xs); }
}

.creed-item h2 {
    color: var(--text-muted);
    margin: 0;
    padding-top: 0.35em;
}

.creed-item p {
    margin: 0;
    font-size: var(--text-lg);
    max-width: var(--measure-narrow);
}

/* ── Drop 001 ─────────────────────────────── */

.drop {
    padding-block: var(--band);
    border-top: 1px solid var(--line);
}

.drop-title {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-2xl);
}
.drop-title em { font-style: italic; color: var(--text-muted); }

/* Deadpan spec plate — care-label voice, written straight. */
.spec {
    margin: 0;
    max-width: 34rem;
    border: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}

.spec > div {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
}
.spec > div + div { border-top: 1px solid var(--line); }

.spec dt { color: var(--text-muted); padding-top: 0.25em; }

.spec dd {
    margin: 0;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .spec > div { grid-template-columns: 1fr; gap: 0; }
}

/* ── The list ─────────────────────────────── */

.list {
    padding-block: var(--band);
    border-top: 1px solid var(--line);
}

.eyes {
    width: var(--space-3xl);
    color: var(--text);
    margin-bottom: var(--space-lg);
    display: block;
}

.list-title {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-xs);
}

.list-sub {
    color: var(--text-muted);
    max-width: var(--measure-narrow);
    margin: 0 0 var(--space-xl);
}

.field-row {
    display: flex;
    max-width: 26rem;
    border-bottom: 1px solid var(--text-muted);
    transition: var(--transition-color);
}
.field-row:focus-within { border-bottom-color: var(--accent); }

.field-row input[type="email"] {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: var(--text-lg);
    font-weight: 340;
    padding: var(--space-sm) 0;
}
.field-row input[type="email"]::placeholder { color: var(--text-muted); opacity: 0.7; }
.field-row input[type="email"]:focus { outline: none; }

.field-row button {
    background: transparent;
    border: 0;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    padding: var(--space-sm) 0 var(--space-sm) var(--space-lg);
    cursor: pointer;
    transition: var(--transition-color);
}
.field-row button:hover { color: var(--accent); }

/* ── Footer ───────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--line);
    padding-block: var(--space-2xl) var(--space-3xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-2xl);
    justify-content: space-between;
    align-items: baseline;
}

.footer-line { margin: 0; color: var(--text-muted); font-weight: var(--weight-regular); }
.footer-links { margin: 0; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ── Sense toggle ─────────────────────────── */

.sense-toggle {
    position: fixed;
    inset-block-end: var(--space-md);
    inset-inline-end: var(--space-md);
    z-index: var(--layer-sticky);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    transition: var(--transition-color);
}
.sense-toggle:hover { color: var(--accent); border-color: currentColor; }
.sense-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.sense-toggle[aria-pressed="true"] { color: var(--accent); }

/* ── Motion ───────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
    .rise {
        opacity: 0;
        transform: translateY(1.1em);
        animation: rise var(--dur-reveal) var(--ease-entrance) forwards;
    }
    .rise.d2 { animation-delay: 0.18s; }
    .rise.d3 { animation-delay: 0.36s; }

    @keyframes rise {
        to { opacity: 1; transform: none; }
    }
}

/* ── The mock — a garment that sheds ───────
   The exterior is plain because that is the argument; the interaction
   is the brand's concealment principle made touchable. Press, and the
   shell lifts away exactly like the hero's molt — the inside is where
   the identity lives. Reduced motion swaps clean. */
.mock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    padding-block: var(--band);
}

.mock-figure {
    position: relative;
    inline-size: min(72vw, 380px);
    aspect-ratio: 200 / 240;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.mock-figure:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 6px;
    border-radius: var(--radius-base);
}

.mock-skin { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }

.mock-body {
    fill: var(--surface-raised);
    stroke: var(--line-strong);
    stroke-width: 1.6;
    stroke-linejoin: round;
}
.mock-body--in { fill: var(--surface-sunken); stroke: var(--line); }

.mock-collar { fill: none; stroke: var(--line-strong); stroke-width: 3; }
.mock-seam {
    fill: none;
    stroke: var(--line);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}
.mock-seam--in { stroke: var(--text-muted); }

.mock-tape-ground { fill: none; stroke: var(--accent); stroke-width: 1; }
.mock-tape-mark rect { fill: var(--accent); }
.mock-tab rect { fill: none; stroke: var(--accent-secondary); stroke-width: 1.2; }

/* The shed: the exterior lifts up and away — the molt's own gesture. */
.mock-skin--in { opacity: 0; }
.mock-skin--out,
.mock-skin--in {
    transition: opacity 380ms ease, transform 380ms ease;
}
.mock-figure.shed .mock-skin--out {
    opacity: 0;
    transform: translateY(-9%);
    pointer-events: none;
}
.mock-figure.shed .mock-skin--in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .mock-skin--out, .mock-skin--in { transition: none; }
    .mock-figure.shed .mock-skin--out { transform: none; }
}

.mock-caption {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}
.mock-caption-in { display: none; }
.mock-caption-out { display: inline; }
.mock-caption.shed .mock-caption-out { display: none; }
.mock-caption.shed .mock-caption-in { display: inline; }

.drop-cta {
    margin-top: var(--space-lg);
}
.drop-cta a {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
}
.drop-cta a:hover { text-decoration: underline; text-underline-offset: 4px; }


/* The masthead mid-reveal: the wordmark speaks in the label voice and
   the hour's accent, then returns to RRRz. Width is free to change —
   the masthead row is flex with space-between, nothing reflows. */
.monogram.is-expanded {
    color: var(--accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.8em;
}
