/* Retani v2 — shared styles for the brillo layout */

:root {
    --bg: #F4F3EF;
    --ink: #111;
    --ink2: #3A3935;
    --muted: #6B6A64;
    --line: #DEDCD5;
    --hover: #555;
    --ink-hover: #333;
    --panel: #111;
    --panel-hover: #1C1C1A;
    --tile: #FFFFFF;
    --navbg: rgba(244, 243, 239, .92);
    --accent: #95BF47;
    --on-panel: #F4F3EF;
    --panel-muted: #BDBBB4;
    --panel-line: #2A2A28;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --gutter: clamp(20px, 4vw, 48px);
    --sans: 'Geist', system-ui, sans-serif;
    --mono: 'Geist Mono', ui-monospace, monospace;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #10100F;
    --ink: #F1F0EB;
    --ink2: #C9C7C0;
    --muted: #8E8C85;
    --line: #2C2C29;
    --hover: #BDBBB4;
    --ink-hover: #D5D3CC;
    --panel: #1A1A18;
    --panel-hover: #222220;
    --tile: #181816;
    --navbg: rgba(16, 16, 15, .88);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    transition: background-color .4s, color .4s;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--hover); }
img { max-width: 100%; display: block; }

.mono { font-family: var(--mono); }
.accent { color: var(--accent); }

.r-container {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.r-section { padding-top: clamp(80px, 10vw, 160px); }

.r-label {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
}

.r-h2 {
    margin: 0;
    font-weight: 500;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.r-section-head {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 40px;
    margin-bottom: 48px;
}

.r-link-underline {
    font-family: var(--mono);
    font-size: 14px;
    border-bottom: 1px solid currentColor;
    padding-bottom: 3px;
}

/* Buttons */
.r-btn {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 24px;
    border-radius: 999px;
    border: 1px solid var(--ink);
    transition: background-color .2s, color .2s, border-color .2s;
}
.r-btn--solid { background: var(--ink); color: var(--bg); }
.r-btn--solid:hover { background: var(--ink-hover); border-color: var(--ink-hover); color: var(--bg); }
.r-btn--ghost:hover { background: var(--ink); color: var(--bg); }
.r-btn--sm { font-size: 14px; padding: 10px 18px; }

/* Header */
.r-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--navbg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: transform .5s var(--ease), background-color .4s;
}
.r-header.is-hidden { transform: translateY(-100%); }

.r-nav {
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.r-logo { font-weight: 600; font-size: 22px; letter-spacing: -0.04em; }
.r-logo span { color: var(--accent); }

.r-nav-links {
    display: flex;
    gap: 28px;
    font-family: var(--mono);
    font-size: 13px;
    flex-wrap: wrap;
}
.r-nav-links a.is-active { border-bottom: 1px solid var(--accent); }
.r-nav-sep { color: var(--line); user-select: none; }

.r-nav-actions { display: flex; gap: 10px; align-items: center; }

.r-theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .2s;
}
.r-theme-toggle:hover { border-color: var(--ink); }
.r-theme-toggle__icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.r-theme-toggle__label::after { content: 'dark'; }
:root[data-theme="dark"] .r-theme-toggle__label::after { content: 'light'; }

/* Hero */
.r-hero { padding-top: clamp(56px, 10vw, 140px); padding-bottom: 48px; }
.r-hero .r-label { margin-bottom: 28px; }
.r-hero h1 {
    margin: 0;
    font-weight: 500;
    font-size: clamp(44px, 7.6vw, 120px);
    line-height: .98;
    letter-spacing: -0.045em;
    max-width: 14ch;
    text-wrap: balance;
}
.r-hero__foot {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 40px;
    margin-top: clamp(40px, 6vw, 80px);
    align-items: end;
}
.r-hero__lede {
    margin: 0;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.45;
    color: var(--ink2);
    max-width: 36ch;
    text-wrap: pretty;
}
.r-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* Media tiles (image or placeholder) */
.r-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--tile);
    border: 1px solid var(--line);
    width: 100%;
    height: 100%;
}
.r-media img { width: 100%; height: 100%; object-fit: cover; }
.r-media__ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    background:
        repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 45%, transparent) 14px 15px);
}

.r-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}
.r-gallery > div { aspect-ratio: 4 / 5; }

.r-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 28px;
}
.r-stat { display: flex; gap: 16px; align-items: baseline; }
.r-stat__num { font-size: 56px; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.r-stat__label { font-size: 15px; color: var(--muted); }

/* What we build — tabbed panel */
.r-panel {
    background: var(--panel);
    color: var(--on-panel);
    border-radius: 18px;
    overflow: hidden;
    transition: background-color .4s;
}
.r-panel a { color: var(--on-panel); }
.r-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--panel-line); }
.r-tab {
    font-family: var(--mono);
    font-size: 14px;
    padding: 18px 28px;
    background: transparent;
    color: #7A7972;
    border: none;
    border-right: 1px solid var(--panel-line);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, background-color .2s;
}
.r-tab:hover { color: var(--on-panel); }
.r-tab[aria-selected="true"] {
    background: #1F1F1D;
    color: var(--on-panel);
    border-bottom-color: var(--accent);
}
.r-pane {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 48px;
    padding: clamp(28px, 5vw, 64px);
}
.r-pane[hidden] { display: none; }
.r-pane__num { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 20px; }
.r-pane h3 {
    margin: 0 0 20px;
    font-weight: 500;
    font-size: clamp(30px, 3.4vw, 48px);
    letter-spacing: -0.035em;
    line-height: 1.04;
}
.r-pane p {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--panel-muted);
    max-width: 42ch;
    text-wrap: pretty;
}
.r-pane__list { display: flex; flex-direction: column; justify-content: flex-end; }
.r-pane__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--panel-line);
    font-size: 18px;
}
.r-pane__item span:last-child { font-family: var(--mono); color: var(--muted); }

/* Tools */
.r-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    column-gap: 32px;
}
.r-tool {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}
.r-tool__name { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.r-tool__num { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* Work */
.r-work-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.r-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 16px;
}
.r-work-card { display: flex; flex-direction: column; gap: 16px; }
.r-work-card:hover { color: var(--ink); }
.r-work-card__media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; }
.r-work-card__media > * { transition: transform 1s var(--ease); }
.r-work-card:hover .r-work-card__media > * { transform: scale(1.045); }
.r-work-card__meta { display: flex; justify-content: space-between; gap: 16px; }
.r-work-card__title { font-size: 20px; font-weight: 500; }
.r-work-card__tag { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* Why so narrow */
.r-statement {
    margin: 0 0 64px;
    font-weight: 500;
    font-size: clamp(28px, 3.6vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    max-width: 24ch;
    text-wrap: balance;
}
.r-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 16px;
}
.r-compare__card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(24px, 3vw, 40px);
}
.r-compare__card .r-label { margin-bottom: 40px; }
.r-compare__card p { margin: 0; font-size: 20px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.r-compare__card--accent { background: var(--accent); border-color: var(--accent); color: #111; }
.r-compare__card--accent .r-label { color: #111; }
.r-compare__card--accent p { color: #111; font-weight: 500; }

/* Services */
.r-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 32px;
}
.r-service { border-top: 1px solid var(--ink); padding-top: 20px; }
.r-service h2, .r-service h3 { margin: 0 0 20px; font-size: 18px; font-weight: 500; }
.r-service .r-label { margin-bottom: 8px; }
.r-service p { margin: 0 0 16px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.r-service ul { list-style: none; margin: 0; padding: 0; }
.r-service li { font-size: 16px; line-height: 1.75; color: var(--muted); }

/* CTA block */
.r-cta-section { padding-top: clamp(80px, 10vw, 160px); padding-bottom: clamp(80px, 10vw, 160px); }
.r-cta {
    display: block;
    background: var(--panel);
    color: var(--on-panel);
    border-radius: 18px;
    padding: clamp(32px, 6vw, 88px);
    transition: background-color .3s;
}
.r-cta:hover { background: var(--panel-hover); color: var(--on-panel); }
.r-cta .r-label { color: var(--accent); margin-bottom: 28px; }
.r-cta__row { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.r-cta__title {
    font-weight: 500;
    font-size: clamp(44px, 7vw, 108px);
    line-height: .98;
    letter-spacing: -0.045em;
    max-width: 12ch;
}
.r-cta__arrow { font-size: clamp(40px, 5vw, 72px); line-height: 1; transition: transform .6s var(--ease); }

/* Service detail */
.r-hero--service { padding-top: clamp(56px, 9vw, 128px); padding-bottom: clamp(48px, 6vw, 72px); }
.r-hero--service h1 { font-size: clamp(40px, 6.6vw, 104px); max-width: 15ch; }
.r-hero--service .r-hero__lede { max-width: 40ch; }
.r-hero__tags { display: flex; gap: 16px; flex-wrap: wrap; }

.r-service-banner { aspect-ratio: 21 / 9; min-height: 280px; }
.r-service-banner .r-media { border-radius: 18px; }

.r-caps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    column-gap: 32px;
}
.r-cap {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 28px 0 32px;
    border-top: 1px solid var(--ink);
}
.r-cap__num { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 5px; }
.r-cap h3, .r-step h3 { margin: 0 0 10px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.r-cap p, .r-step p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

.r-stack-row { margin-bottom: 0; border-top: 1px solid var(--line); padding-top: 32px; }
.r-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.r-chip { font-size: 16px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; }

.r-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}
.r-step {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

#faq .r-section-head { margin-bottom: 0; }
.r-faq details { border-top: 1px solid var(--ink); padding: 24px 0; }
.r-faq summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.r-faq summary::-webkit-details-marker { display: none; }
.r-faq__icon { font-family: var(--mono); color: var(--muted); transition: transform .3s var(--ease); }
.r-faq details[open] .r-faq__icon { transform: rotate(45deg); }
.r-faq p { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink2); max-width: 56ch; text-wrap: pretty; }

.r-others {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    column-gap: 32px;
}
.r-other { display: flex; flex-direction: column; gap: 8px; padding: 20px 0; border-top: 1px solid var(--ink); }
.r-other__title { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }

.r-cta__title--sm { font-size: clamp(40px, 6vw, 88px); line-height: 1; max-width: 14ch; }

/* Contact */
.r-hero--contact { padding-top: clamp(56px, 9vw, 128px); padding-bottom: clamp(48px, 6vw, 80px); }
.r-hero--contact h1 { font-size: clamp(40px, 6.4vw, 96px); line-height: 1; max-width: 18ch; }
.r-hero--contact .r-hero__lede { margin-top: 40px; max-width: 44ch; }

.r-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
    border-top: 1px solid var(--ink);
    padding-top: 40px;
}
.r-contact__aside { position: sticky; top: 110px; }

.r-form { display: flex; flex-direction: column; gap: 32px; }
.r-form[hidden] { display: none; }
.r-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 32px;
}
.r-field { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.r-field__label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); padding: 0; }
.r-field--chips .r-field__label { margin-bottom: 14px; }
.r-field input, .r-field select, .r-field textarea { font: inherit; color: var(--ink); outline: none; }
.r-field input, .r-field select {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 8px 0 12px;
    font-size: 18px;
    transition: border-color .2s;
}
.r-field select { cursor: pointer; }
.r-field select option { background: var(--bg); color: var(--ink); }
.r-field textarea {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    font-size: 17px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color .2s;
}
.r-field input:focus, .r-field select:focus { border-bottom-color: var(--ink); }
.r-field textarea:focus { border-color: var(--ink); }
.r-field input::placeholder, .r-field textarea::placeholder { color: var(--muted); opacity: .7; }

.r-chip--toggle { position: relative; cursor: pointer; padding: 0; border: 0; }
.r-chip--toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.r-chip--toggle span {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 15px;
    border: 1px solid var(--line);
    transition: background-color .2s, color .2s, border-color .2s;
}
.r-chip--toggle:hover span { border-color: var(--ink); }
.r-chip--toggle input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.r-chip--toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.r-form__submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.r-form__submit .r-btn { border: none; cursor: pointer; padding: 15px 28px; }
.r-form__submit .r-btn:disabled { opacity: .6; cursor: progress; }
.r-form__error { font-family: var(--mono); font-size: 13px; color: #C2410C; }
.r-form__error:empty { display: none; }
:root[data-theme="dark"] .r-form__error { color: #F97316; }

.r-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.r-sent { border: 1px solid var(--line); border-radius: 18px; padding: clamp(28px, 4vw, 48px); outline: none; }
.r-sent[hidden] { display: none; }
.r-sent h2 { margin: 0 0 16px; font-weight: 500; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; }
.r-sent p { margin: 0 0 28px; font-size: 18px; line-height: 1.5; color: var(--ink2); max-width: 42ch; }
.r-sent p a { border-bottom: 1px solid var(--ink); }

.r-next {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}
.r-next .r-label { padding-top: 4px; }
.r-next h3 { margin: 0 0 8px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.r-next p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

@media (max-width: 960px) { .r-contact__aside { position: static; } }

/* About */
.r-hero--about h1 { font-size: clamp(40px, 6.6vw, 104px); max-width: 15ch; }
.r-hero--about .r-hero__lede { margin-top: clamp(32px, 4vw, 48px); max-width: 44ch; }
.r-story { margin-bottom: 0; }
.r-story .r-h2 { margin-bottom: 32px; }
.r-prose p { margin: 0 0 20px; font-size: 18px; line-height: 1.6; color: var(--ink2); max-width: 60ch; text-wrap: pretty; }
.r-prose p:last-child { margin-bottom: 0; }
.r-stats--about { margin-top: clamp(48px, 6vw, 80px); }
.r-values { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.r-step--accent { background: var(--accent); border-color: var(--accent); color: #111; }
.r-step--accent .r-label, .r-step--accent p { color: #111; }

/* Work listing */
.r-hero--work h1 { max-width: 16ch; font-size: clamp(40px, 6.6vw, 104px); }
.r-hero--work .r-hero__lede p { margin: 0; }
.r-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; padding-top: 32px; border-top: 1px solid var(--ink); }
.r-chip--link { font-size: 15px; transition: background-color .2s, color .2s, border-color .2s; }
.r-chip--link:hover { border-color: var(--ink); color: var(--ink); }
.r-chip--link.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.r-work-grid--listing { row-gap: clamp(40px, 5vw, 72px); }
.r-work-card__excerpt { margin: -6px 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 52ch; text-wrap: pretty; }
.r-empty { border: 1px solid var(--line); border-radius: 18px; padding: clamp(28px, 4vw, 48px); }
.r-empty p { margin: 0 0 16px; font-size: 20px; color: var(--ink2); }
.r-empty p:last-child { margin: 0; }

/* Case study */
.r-hero--case { padding-bottom: clamp(40px, 5vw, 64px); }
.r-hero--case h1 { font-size: clamp(48px, 9vw, 144px); max-width: none; }
.r-hero--case .r-hero__tags a { color: var(--muted); }
.r-hero--case .r-hero__tags a:hover { color: var(--ink); }
.r-case__tagline {
    margin: 20px 0 0;
    font-size: clamp(24px, 3vw, 44px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--muted);
    max-width: 24ch;
}
.r-case__cover { margin: 0; aspect-ratio: 16 / 9; min-height: 280px; }
.r-case__cover .r-media, .r-gallery-row .r-media { border-radius: 18px; }

.r-case__intro {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}
.r-case__overview p { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.45; color: var(--ink); }
.r-case__meta { margin: 0; display: flex; flex-direction: column; gap: 24px; }
.r-case__meta > div { border-top: 1px solid var(--line); padding-top: 14px; }
.r-case__meta dt { margin-bottom: 8px; }
.r-case__meta dd { margin: 0; font-size: 16px; line-height: 1.6; }
.r-case__meta ul { list-style: none; margin: 0; padding: 0; }
.r-case__meta .r-case__live { border-top: 0; padding-top: 4px; }
@media (max-width: 860px) { .r-case__intro { grid-template-columns: 1fr; } }

.r-case__challenges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); column-gap: 32px; }
.r-case__challenges .r-cap h3 { margin: 0; }
.r-case__built { margin-top: clamp(48px, 6vw, 96px); margin-bottom: 0; }
.r-case__built .r-h2 { margin-bottom: 32px; }

.r-case__gallery { display: flex; flex-direction: column; gap: 16px; }
.r-gallery-row { display: grid; gap: 16px; }
.r-gallery-row--pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.r-gallery-row figure { margin: 0; }
.r-gallery-row--full .r-media { aspect-ratio: 16 / 9; }
.r-gallery-row--pair .r-media { aspect-ratio: 1 / 1; }
.r-gallery-row figcaption { margin-top: 12px; }

.r-quote { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; }
.r-quote blockquote { margin: 0 0 28px; max-width: 28ch; }
.r-quote__author { font-family: var(--mono); font-size: 14px; color: var(--muted); }

.r-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; }
.r-fact { border-top: 1px solid var(--ink); padding-top: 20px; }
.r-fact__value { font-size: clamp(48px, 5vw, 80px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; margin-bottom: 12px; }
.r-fact__label { font-size: 16px; color: var(--muted); }

.r-next-project {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 32px;
    align-items: end;
    border-top: 1px solid var(--ink);
    padding-top: 32px;
}
.r-next-project:hover { color: var(--ink); }
.r-next-project__text { display: flex; flex-direction: column; gap: 12px; }
.r-next-project__title { font-size: clamp(40px, 6vw, 88px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.r-next-project__tagline { font-size: 20px; color: var(--muted); }
.r-next-project__media { aspect-ratio: 16 / 10; }
.r-next-project__media .r-media > * { transition: transform 1s var(--ease); }
.r-next-project:hover .r-next-project__media .r-media > * { transform: scale(1.045); }

/* Footer */
.r-footer { border-top: 1px solid var(--line); }
.r-footer__top {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 64px;
    padding-top: 56px;
    padding-bottom: 32px;
}
.r-footer__brand { flex: 2 1 280px; min-width: 0; }
.r-footer__brand .r-logo { display: inline-block; font-size: 28px; margin-bottom: 16px; }
.r-footer__brand p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 34ch; }
.r-footer__col { flex: 1 1 160px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.r-footer__col .r-label { margin-bottom: 6px; }
.r-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    padding-bottom: 32px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}
.r-footer__bottom span { white-space: nowrap; }

/* Motion: hide reveal targets until JS plays them (only when JS + motion enabled) */
.js-motion [data-reveal] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
