/* ==========================================================================
   Makerwell — site.css
   Tokens → fonts → base → header → hero → proof → sections → footer → motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    --bg: #070605;         /* warm true black — flat, no texture, no glow */

    --display-weight: 380; /* one weight for all serif display type; sits nearer the wordmark than 300 did */

    --ink: #FDFFF2;        /* cream — headlines, emphasis (matches the wordmark) */
    --ink-2: #B6B6AE;      /* body copy */
    --ink-3: #85857E;      /* deks, labels, secondary */
    --ink-4: #5B5B56;      /* decorative only */

    --plate: #FDFFF2;      /* the one cream section */
    --plate-ink: #0A0908;  /* black type on the plate */

    --accent: #AA3BFF;     /* purple. The only color: the email, selection/focus. Nothing else. */
    --accent-soft: rgba(170, 59, 255, 0.4);

    --rule: rgba(253, 255, 242, 0.12);
    --rule-2: rgba(253, 255, 242, 0.07);

    --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --sans: "Geist", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

    --max: 76rem;
    --gutter: clamp(1.5rem, 5vw, 3.5rem);
    --col-gap: clamp(1rem, 2.5vw, 2.5rem);

    --header-h: 4.5rem;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Wordmark (live text, set in Fraunces). Tune these in the inspector; header and footer follow. */
    --wordmark-size: 1.8rem;
    --wordmark-weight: 380;
    --wordmark-opsz: 28;
    --wordmark-tracking: -0.005em;
}

/* --------------------------------------------------------------------------
   2. Fonts (self-hosted, latin subsets)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Geist";
    src: url("../fonts/geist.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

h1, h2, .serif {
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-optical-sizing: auto;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

main { position: relative; z-index: 1; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
}

.label {
    display: block;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.skip {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    padding: 0.5rem 0.75rem;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 2px;
}
.skip:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 40;
    border-bottom: 1px solid transparent;
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.site-header.is-scrolled {
    background: var(--bg);
    border-bottom-color: var(--rule-2);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; color: var(--ink); }

/* A signature, not a headline: the wordmark must not compete with the display serif */
.wordmark {
    font-family: var(--serif);
    font-size: var(--wordmark-size);
    font-weight: var(--wordmark-weight);
    font-variation-settings: "opsz" var(--wordmark-opsz);  /* overrides auto optical sizing */
    letter-spacing: var(--wordmark-tracking);
    line-height: 1;
    color: var(--ink);
    white-space: nowrap;
}

.nav { display: flex; gap: 2.25rem; }

.nav a {
    font-size: 0.875rem;
    color: var(--ink-3);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.menu-btn {
    display: none;
    appearance: none;
    background: none;
    border: 0;
    padding: 0.5rem 0;
    margin: 0;
    font: inherit;
    font-size: 0.875rem;
    color: var(--ink-3);
    cursor: pointer;
}
.menu-btn:hover { color: var(--ink); }

.menu {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--header-h) + 3rem) var(--gutter) 3rem;
    background: var(--bg);
    animation: fade 0.3s ease both;
}
.menu[hidden] { display: none; }

.menu nav { display: flex; flex-direction: column; gap: 1.25rem; }

.menu nav a {
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-size: 2.5rem;
    line-height: 1.1;
    color: var(--ink);
    text-decoration: none;
}

.menu-foot {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ink-3);
}
.menu-foot a { text-decoration: none; color: var(--ink-2); }

html.menu-open, html.menu-open body { overflow: hidden; }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
    padding-top: clamp(9rem, 20vh, 13rem);
    padding-bottom: clamp(5rem, 12vh, 8rem);
}

.hero .grid { align-items: center; }

.hero-copy { grid-column: 1 / span 7; }

h1 {
    font-size: clamp(2.75rem, 6.2vw, 5.25rem);
    line-height: 1.02;
    letter-spacing: -0.018em;
}

.lede {
    margin-top: 2rem;
    max-width: 34rem;
    font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
    line-height: 1.55;
    color: var(--ink-2);
}

.hero-art {
    grid-column: 9 / span 4;
    display: flex;
    justify-content: flex-end;
}

/* The cube: a line drawing, drawn in on load */
.cube {
    width: min(100%, 300px);
    height: auto;
    color: var(--ink);
    overflow: visible;
}
.cube .e { opacity: 0.85; }
.cube .h { opacity: 0.28; }

.cube line {
    stroke-dasharray: var(--l);
    stroke-dashoffset: var(--l);
    animation: draw 1.1s var(--ease) forwards;
    animation-delay: calc(0.35s + var(--i) * 0.065s);
}
/* Once drawn, js/cube.js turns the cube; edges change length, so the dash pattern has to go */
.cube.is-drawn line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }

/* --------------------------------------------------------------------------
   6. Proof strip
   -------------------------------------------------------------------------- */
.proof {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.proof .wrap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;    /* gutter to gutter, not the 76rem column (Aaron, 2026-08-21) */
}

.proof-item {
    padding: 2.25rem 1.5rem 2.25rem 0;
    container-type: inline-size;    /* lets the numeral size to its own column (cqi below) */
}
.proof-item + .proof-item {
    padding-left: 1.5rem;
    border-left: 1px solid var(--rule-2);
}

.proof-num {
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-size: clamp(2rem, 2.9vw, 3.125rem);    /* fallback for browsers without container units */
    font-size: clamp(2rem, 15cqi, 3.125rem);    /* "3.9M followers" (the widest, ~6.4em) holds one line from ~1200px; full 50px from ~1680px */
    line-height: 1;
    letter-spacing: -0.012em;
    font-variant-numeric: lining-nums;
    color: var(--ink);
}

.proof-label {
    display: block;
    margin-top: 0.85rem;
    line-height: 1.45;
    color: var(--ink-3);
    text-wrap: balance;
}

/* --------------------------------------------------------------------------
   7. Sections
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(5rem, 11vw, 9.5rem); }

.section + .section > .wrap { border-top: 1px solid var(--rule-2); padding-top: clamp(5rem, 11vw, 9.5rem); }
.section + .section { padding-top: 0; }
/* First section after the hero gets the same hairline */
.hero + .section { padding-top: 0; }
.hero + .section > .wrap { border-top: 1px solid var(--rule-2); padding-top: clamp(5rem, 11vw, 9.5rem); }

h2 {
    font-size: clamp(2rem, 3.8vw, 3.25rem);
    line-height: 1.08;
}

.section p { color: var(--ink-2); }
.section p + p { margin-top: 1.25em; }

/* Layout A — headline left, body right */
.split-head { grid-column: 1 / span 5; }
.split-body { grid-column: 7 / span 6; }

/* The plate: the brand section ("You've seen our work. Not our name."), the one cream page in a black book.
   Full-bleed, black serif on cream, no hairlines needed around it. */
.plate {
    background: var(--plate);
    color: var(--plate-ink);
    padding-block: clamp(6rem, 13vw, 11rem);
}
.plate h2 { color: var(--plate-ink); }
.plate .split-body p {
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-optical-sizing: auto;
    font-size: clamp(1.25rem, 1.9vw, 1.625rem);
    line-height: 1.42;
    letter-spacing: -0.005em;
    color: var(--plate-ink);
    max-width: 34rem;
}
.plate .split-body p + p { margin-top: 1.35em; }
.plate ::selection { background: var(--accent-soft); color: var(--plate-ink); }
.plate + .section > .wrap { border-top: 0; }
.plate + .proof { border-top: 0; }  /* the plate's edge is the divider */

/* Mirror and Deal: split, each ending on a serif kicker under a hairline */
.mirror .split-body, .deal .split-body { max-width: 36rem; }
.kicker {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--rule);
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-size: clamp(1.25rem, 1.7vw, 1.5rem);
    line-height: 1.38;
    color: var(--ink);
}

/* Partners — the door */
.partners .split-body { max-width: 34rem; }

.email {
    display: inline-block;
    margin-top: 2.5rem;
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-size: clamp(1.5rem, 2.4vw, 2.125rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-soft);
    padding-bottom: 0.12em;
    transition: border-color 0.3s ease;
}
.email:hover { border-bottom-color: var(--accent); }

/* Notes — the index */
.notes-head { grid-column: 1 / span 4; }
.note-list { grid-column: 5 / span 8; border-top: 1px solid var(--rule); }

.note-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
}

.note-title {
    display: block;
    font-family: var(--serif);
    font-weight: var(--display-weight);
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-wrap: balance;
}

.note-dek {
    display: block;
    margin-top: 0.6rem;
    max-width: 36rem;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--ink-3);
}

.note-arrow {
    margin-top: 0.55em;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--ink-4);
    transition: transform 0.35s var(--ease), color 0.2s ease;
}
.note-item:hover .note-arrow { transform: translateX(4px); color: var(--ink); }

/* Founder note */
.founder-inner { grid-column: 6 / span 6; }
.founder-inner .label { margin-bottom: 1.5rem; }
.founder-inner p { max-width: 32rem; }

.signature {
    display: block;
    margin-top: 1.75rem;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--rule);
    padding: 2.75rem 0 3.25rem;
}

.site-footer .wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.foot-brand { display: flex; align-items: baseline; gap: 0.9rem; }
.foot-brand .wordmark { font-size: calc(var(--wordmark-size) * 0.85); }

.foot-copy { font-size: 0.8125rem; color: var(--ink-4); }

.foot-place { font-size: 0.875rem; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   9. Inner pages (careers, notes index, 404)
   -------------------------------------------------------------------------- */
.page {
    padding-top: clamp(8.5rem, 18vh, 12rem);
    padding-bottom: clamp(4rem, 8vw, 6rem);
}

.page h1 { font-size: clamp(2.5rem, 5vw, 4rem); }

.page-intro {
    margin-top: 1.75rem;
    max-width: 34rem;
    font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
    line-height: 1.55;
    color: var(--ink-2);
}

.role {
    margin-top: clamp(3.5rem, 7vw, 5.5rem);
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    border-top: 1px solid var(--rule);
}
.role .label { margin-bottom: 1.25rem; }
.role h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.role-body p { color: var(--ink-2); max-width: 34rem; }
.role-body p + p { margin-top: 1.25em; }
.role-body h3 {
    margin: 2.5rem 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.role-body a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); transition: border-color 0.25s ease; }
.role-body a:hover { border-bottom-color: var(--ink); }

.how { margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); }
.how-list { grid-column: 7 / span 6; border-top: 1px solid var(--rule-2); }
.how-item { padding: 1.5rem 0; border-bottom: 1px solid var(--rule-2); }
.how-item h3 { font-size: 1.125rem; font-weight: 500; color: var(--ink); }
.how-item p { margin-top: 0.35rem; color: var(--ink-3); font-size: 0.9375rem; max-width: 30rem; }

.page-foot { margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.page-foot p { color: var(--ink-2); max-width: 34rem; }
.page-foot .email { margin-top: 1.5rem; }

.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.notfound h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.notfound p { margin-top: 1.25rem; color: var(--ink-2); }
.notfound a { display: inline-block; margin-top: 2rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.notfound a:hover { border-bottom-color: var(--ink); }

/* --------------------------------------------------------------------------
   10. Motion
   -------------------------------------------------------------------------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.rise {
    opacity: 0;
    animation: rise 1s var(--ease) forwards;
}
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.24s; }

/* Scroll reveals — only when JS is present, so content never stays hidden */
html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rise, html.js .reveal { opacity: 1; transform: none; animation: none; transition: none; }
    .cube line { stroke-dashoffset: 0; animation: none; }
    .menu { animation: none; }
}

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .grid > * { grid-column: 1 / -1 !important; }

    .hero-art { display: none; }

    .split-body, .note-list, .how-list { margin-top: 2.25rem; }
    .founder-inner { grid-column: 1 / -1; }

    .proof .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .proof-item { padding: 1.75rem 1rem 1.75rem 0; }
    .proof-item + .proof-item { padding-left: 1rem; }
    .proof-item:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-2); }
    .proof-item:nth-child(4) { border-top: 1px solid var(--rule-2); }
    .proof-item:nth-child(-n+2) { padding-top: 2rem; }
}

@media (max-width: 760px) {
    .nav { display: none; }
    .menu-btn { display: inline-flex; }
    .site-header .wordmark { font-size: calc(var(--wordmark-size) * 0.95); }

    .hero { padding-top: clamp(7.5rem, 18vh, 9rem); }

    .note-item { padding: 1.5rem 0; column-gap: 1rem; }

    .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
