/**
 * Restroa — front-facing studio site.
 * Dark technical "manual" aesthetic after creativewebmanual.com:
 * near-black page, hairline rules, mono uppercase labels, edge-to-edge
 * grotesque display type, inset cream panels, barcode + spec tables.
 */

/* ========================================
   FONTS
   ======================================== */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   TOKENS
   ======================================== */

:root {
    --black: #0A0A0A;
    --white: #E8E5DF;
    --cream: #F8F2E5;
    --ink: #0A0A0A;
    --accent: #C2644F;

    --hairline: rgba(232, 229, 223, 0.18);
    --hairline-strong: rgba(232, 229, 223, 0.3);
    --ink-hairline: rgba(10, 10, 10, 0.25);
    --dim: rgba(232, 229, 223, 0.45);
    --body-dim: rgba(232, 229, 223, 0.62);

    --font-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
    --font-pixel: 'Times New Roman', Times, serif;

    --frame: 12px;
    --pad-x: calc(var(--frame) + clamp(14px, 2vw, 30px));
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   BASE
   ======================================== */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

html.lenis,
html.lenis body {
    height: auto;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--white);
    background-color: var(--black);
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

::selection {
    background-color: var(--white);
    color: var(--black);
}

:focus-visible {
    outline: 1px solid var(--white);
    outline-offset: 3px;
}

/* Mono label utility — the connective tissue of the whole page. */
.mono {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.7;
}

.mono em,
.dim {
    font-style: normal;
    opacity: 0.45;
}

.label {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--white);
    flex: none;
}

/* Split-word plumbing */
.w {
    display: inline-block;
    overflow: clip;
    vertical-align: top;
}

.w-in {
    display: inline-block;
    will-change: transform;
}

.rw {
    display: inline-block;
    border-radius: 3px;
    padding: 0 0.05em;
}

/* ========================================
   FIXED CHROME
   ======================================== */

.frame {
    position: fixed;
    inset: var(--frame);
    border: 1px solid rgba(255, 255, 255, 0.28);
    z-index: 100;
    pointer-events: none;
    mix-blend-mode: difference;
}

.menu-btn {
    position: fixed;
    top: calc(var(--frame) + 10px);
    right: calc(var(--frame) + 18px);
    z-index: 70;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    mix-blend-mode: difference;
}

.menu-btn:hover {
    opacity: 0.6;
}

/* ========================================
   MENU OVERLAY
   ======================================== */

.menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    background-color: var(--black);
    color: var(--white);
    padding: calc(var(--frame) + 16px) var(--pad-x) calc(var(--frame) + 16px);
    transform: translateY(-100%);
    visibility: hidden;
}

.menu__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu__close {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.menu__close:hover {
    opacity: 0.6;
}

.menu__list {
    margin: auto 0;
}

.menu__list li {
    border-top: 1px solid var(--hairline);
}

.menu__list li:last-child {
    border-bottom: 1px solid var(--hairline);
}

.menu__list a {
    display: grid;
    grid-template-columns: clamp(60px, 8vw, 110px) 1fr;
    align-items: baseline;
    padding: clamp(0.9rem, 2vh, 1.5rem) 0.5rem;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease), padding-left 0.35s var(--ease);
}

.menu__label {
    font-size: clamp(1.9rem, 5.6vw, 4.4rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
}

.menu__list a:hover {
    background-color: var(--cream);
    color: var(--ink);
    padding-left: 1.2rem;
}

.menu__foot {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.menu__mail:hover {
    opacity: 0.6;
}

/* ========================================
   HERO
   ======================================== */

.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: calc(var(--frame) + 10px) var(--pad-x) calc(var(--frame) + 20px);
}

.hero__title {
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.04;
    font-size: 15vw; /* JS refines via data-fit */
    white-space: nowrap;
}

.hero__line {
    display: block;
    width: fit-content;
}

/* Small raised ® after the wordmark, sized against the giant fit type. */
.reg {
    display: inline-block;
    font-size: 0.26em;
    line-height: 1;
    position: relative;
    top: -1.55em;
    margin-left: 0.15em;
    letter-spacing: 0;
}

.hero__mid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin: auto 0;
    padding: 6vh 0.5rem 6vh 0;
}

.hero__coords {
    display: flex;
    flex-direction: column;
    gap: 0.1em;
}

.hero__tagline {
    font-size: clamp(1.15rem, 1.9vw, 1.7rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.corners {
    position: relative;
}

.corners::before,
.corners::after {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
}

.corners::before {
    top: -14px;
    left: -18px;
    border-top: 1px solid var(--hairline-strong);
    border-left: 1px solid var(--hairline-strong);
}

.corners::after {
    bottom: -14px;
    right: -18px;
    border-bottom: 1px solid var(--hairline-strong);
    border-right: 1px solid var(--hairline-strong);
}

.hero__tables {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 4rem;
}

.hero__project {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.barcode {
    width: clamp(160px, 16vw, 240px);
    height: 56px;
    color: var(--white);
}

.spec {
    width: min(48%, 500px);
}

.spec__row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    border-bottom: 1px solid var(--hairline);
    padding: 0.4em 0;
}

.spec__row:first-child {
    border-top: 1px solid var(--hairline);
}

/* ========================================
   STATEMENT
   ======================================== */

.statement {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh var(--pad-x);
}

.statement__text {
    max-width: 21ch;
    text-align: center;
    font-size: clamp(1.9rem, 4.6vw, 4.1rem);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.025em;
}

/* ========================================
   CHAPTER 1 CARD (cream inset panel)
   ======================================== */

.card {
    margin: 0 var(--frame);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--cream);
    color: var(--ink);
    padding: calc(var(--frame) + 14px) clamp(16px, 2vw, 30px) 20px;
}

.card ::selection {
    background-color: var(--ink);
    color: var(--cream);
}

.card__head,
.card__foot {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.card__stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 4vh 0;
}

.card__big {
    align-self: flex-start;
    font-size: clamp(3rem, 9.5vw, 9rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.card__x {
    align-self: center;
    position: relative;
    width: clamp(44px, 4.5vw, 64px);
    height: clamp(44px, 4.5vw, 64px);
    border-radius: 50%;
    background-color: var(--ink);
}

.card__x::before,
.card__x::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    height: 1.5px;
    background-color: var(--cream);
}

.card__x::before { transform: translate(-50%, -50%) rotate(45deg); }
.card__x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.card__pixel {
    align-self: flex-end;
    font-family: var(--font-pixel);
    font-size: clamp(2rem, 6.5vw, 6rem);
    line-height: 1;
    letter-spacing: 0.02em;
}

.card__pixel canvas {
    display: block;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

/* ========================================
   ABOUT
   ======================================== */

.about {
    padding: 20vh var(--pad-x);
}

.about__text {
    margin-top: 4vh;
    font-size: clamp(1.7rem, 3.8vw, 3.5rem);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: -0.02em;
    text-indent: 16%;
}

/* ========================================
   CHAPTER 2 (cream, full bleed)
   ======================================== */

.chapter {
    background-color: var(--cream);
    color: var(--ink);
    padding: 12vh var(--pad-x) 14vh;
}

.chapter ::selection {
    background-color: var(--ink);
    color: var(--cream);
}

.chapter__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.chapter__title {
    font-size: clamp(3rem, 8.6vw, 8.2rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.chapter__numblock {
    width: clamp(200px, 32%, 460px);
    border-top: 1px solid var(--ink);
    padding-top: 0.6rem;
    display: flex;
    flex-direction: column;
}

.chapter__numlabel {
    opacity: 0.55;
}

.chapter__num {
    align-self: flex-end;
    font-size: clamp(6rem, 16vw, 15rem);
    font-weight: 400;
    line-height: 0.82;
    letter-spacing: -0.05em;
}

.chapter__sub {
    margin-top: 14vh;
    font-size: clamp(1.3rem, 2.3vw, 2.1rem);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.steps {
    margin-top: 5vh;
}

.steps__row {
    display: grid;
    grid-template-columns: clamp(60px, 7vw, 100px) minmax(0, 1fr) minmax(0, 1.3fr);
    gap: clamp(1.2rem, 2.5vw, 3rem);
    align-items: start;
    border-top: 1px solid var(--ink-hairline);
    padding: clamp(1.5rem, 3vh, 2.4rem) 0;
}

.steps__row:last-child {
    border-bottom: 1px solid var(--ink-hairline);
}

.steps__name {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.steps__text {
    max-width: 48ch;
    line-height: 1.55;
    color: rgba(10, 10, 10, 0.8);
}

.steps__code {
    font-size: 0.8em;
    text-transform: none;
    background-color: rgba(10, 10, 10, 0.08);
    border-radius: 3px;
    padding: 0.1em 0.4em;
    white-space: nowrap;
}

/* ========================================
   CHAPTER 3 (dark, column grid texture)
   ======================================== */

.included {
    padding: 16vh var(--pad-x);
    background-image: linear-gradient(to right, rgba(232, 229, 223, 0.045) 1px, transparent 1px);
    background-size: calc(100% / 12) 100%;
}

.ship {
    margin-top: 6vh;
}

.ship__row {
    display: grid;
    grid-template-columns: clamp(60px, 7vw, 100px) minmax(0, 1fr) minmax(0, 1.4fr);
    gap: clamp(1.2rem, 2.5vw, 3rem);
    align-items: baseline;
    border-top: 1px solid var(--hairline);
    padding: clamp(1.3rem, 2.6vh, 2rem) 0;
}

.ship__row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.ship__name {
    font-size: clamp(1.25rem, 2.1vw, 1.9rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.ship__desc {
    max-width: 52ch;
    color: var(--body-dim);
    line-height: 1.55;
}

.specbox {
    margin-top: 10vh;
    max-width: 520px;
    border: 1px solid var(--hairline);
    padding: 1.1rem 1.3rem;
    background-color: var(--black);
}

.specbox .spec__row:first-child {
    border-top: none;
}

.specbox .spec__row:last-child {
    border-bottom: none;
}

/* ========================================
   SPEED STATEMENT (outlined bars)
   ======================================== */

.speed {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh var(--pad-x);
    overflow: clip;
}

.speed__bars {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(8px, 1vw, 16px);
    padding: 0 var(--pad-x);
}

.speed__bars span {
    flex: 1;
    border: 1px solid rgba(232, 229, 223, 0.14);
    border-bottom: none;
    transform-origin: bottom;
}

.speed__bars span:nth-child(1) { height: 34vh; }
.speed__bars span:nth-child(2) { height: 56vh; }
.speed__bars span:nth-child(3) { height: 22vh; }
.speed__bars span:nth-child(4) { height: 66vh; }
.speed__bars span:nth-child(5) { height: 44vh; }
.speed__bars span:nth-child(6) { height: 72vh; }
.speed__bars span:nth-child(7) { height: 28vh; }
.speed__bars span:nth-child(8) { height: 50vh; }

.speed__text {
    position: relative;
    z-index: 1;
    max-width: 22ch;
    text-align: center;
    font-size: clamp(1.8rem, 4.2vw, 3.8rem);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.025em;
}

/* ========================================
   CHAPTER 4 / HELLO
   ======================================== */

.hello {
    padding: 16vh var(--pad-x) 14vh;
}

.hello__big {
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
    font-size: 14vw; /* JS refines via data-fit */
    white-space: nowrap;
    width: fit-content;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 2vh;
}

.hello__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    margin-top: 8vh;
    align-items: start;
}

.hello__text {
    font-size: clamp(1.3rem, 2.3vw, 2.1rem);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.015em;
    max-width: 34ch;
}

.rows {
    margin-top: 10vh;
}

.rows__item {
    display: grid;
    grid-template-columns: clamp(110px, 14vw, 200px) 1fr auto;
    gap: 2rem;
    align-items: center;
    border-top: 1px solid var(--hairline);
    padding: 1.05rem 0.5rem;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.rows__item:last-child {
    border-bottom: 1px solid var(--hairline);
}

a.rows__item:hover {
    background-color: var(--cream);
    color: var(--ink);
}

a.rows__item:hover .dim {
    opacity: 0.6;
}

.rows__arrow {
    transition: transform 0.3s var(--ease);
}

a.rows__item:hover .rows__arrow {
    transform: translate(3px, -3px);
}

/* ========================================
   FOOTER (hero reprise)
   ======================================== */

.footer {
    padding: 14vh var(--pad-x) calc(var(--frame) + 16px);
}

.footer__title {
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.04;
    font-size: 15vw; /* JS refines via data-fit */
    white-space: nowrap;
}

.footer__base {
    display: flex;
    justify-content: space-between;
    gap: 1rem 2.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--hairline);
    margin-top: 7vh;
    padding-top: 1.1rem;
}

.footer__mail:hover {
    opacity: 0.6;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media screen and (max-width: 767px) {
    .hero__mid {
        flex-direction: column;
        gap: 3.5rem;
        padding-right: 0;
    }

    .hero__tagline {
        align-self: flex-end;
        text-align: right;
    }

    .hero__tables {
        flex-direction: column;
        align-items: stretch;
        gap: 2.5rem;
    }

    .spec {
        width: 100%;
    }

    .steps__row,
    .ship__row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .chapter__top {
        flex-direction: column;
    }

    .chapter__numblock {
        width: 100%;
    }

    .hello__grid {
        grid-template-columns: 1fr;
    }

    .rows__item {
        grid-template-columns: 90px 1fr auto;
        gap: 1rem;
    }

    .about__text {
        text-indent: 12%;
    }
}

/* ========================================
   MOTION SAFETY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
