/* ============================================================
   Thread Nest — v3 "collage"
   One continuous linen ground. Overlapping print spreads.
   Serif display + mono spec labels. No cards, no handwriting.
   ============================================================ */

:root {
    /* Linen surfaces — unchanged app palette */
    --bg:        #F5F0E6;
    --bg-2:      #EFE7D6;
    --bg-3:      #E9DEC6;
    --paper:     #FCF9F2;

    --teal:      #2A7F7F;
    --teal-lt:   #3AAFAF;
    --teal-dk:   #005252;
    --teal-pale: #E6F5F5;

    --gold:      #C9962C;
    --gold-lt:   #F2C97E;
    --gold-dk:   #7A5800;
    --gold-pale: #FDF6E3;

    --plum:      #6B3A6B;
    --plum-lt:   #9B5C9B;

    --ink:       #1A1A2E;
    --slate:     #4A5568;
    --dim:       #9A8F7C;

    --line:      rgba(26, 26, 46, 0.16);
    --line-soft: rgba(26, 26, 46, 0.08);
    --shadow:    rgba(90, 66, 30, 0.18);

    --display: 'Lora', Georgia, 'Times New Roman', serif;
    --body:    'Nunito Sans', system-ui, -apple-system, sans-serif;
    --mono:    'Courier Prime', 'Courier New', ui-monospace, monospace;

    --gutter:  clamp(1.15rem, 4vw, 3rem);
    --col-max: 6.2rem;
    --gap:     clamp(0.7rem, 1.4vw, 1.4rem);
    --col:     minmax(0, var(--col-max));
    /* full width of .spread when its columns sit at max — nav + footer match it
       so their contents line up with the grid's shell edge at every width */
    --shell-max: calc(12 * var(--col-max) + 13 * var(--gap) + 2 * var(--gutter));
    --shell-pad: calc(var(--gutter) + var(--gap));
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.02rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--teal); color: #fff; }

/* ---------- shared type ---------- */

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.022em;
    text-wrap: balance;
}

.mono, .kicker, .spec, .slot-name, .slot-need, .plan-name, .plan-flag {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.kicker {
    font-size: 0.7rem;
    color: var(--gold-dk);
    margin-bottom: 1.1rem;
}
.kicker::before {
    content: "";
    display: inline-block;
    width: 1.9rem; height: 1px;
    background: var(--gold);
    vertical-align: 0.28em;
    margin-right: 0.7rem;
}

.lede {
    font-size: clamp(1.02rem, 1.35vw, 1.18rem);
    color: var(--slate);
    max-width: 34ch;
    margin-top: 1.4rem;
}
.lede strong { color: var(--ink); font-weight: 700; }

.spec {
    font-size: 0.68rem;
    color: var(--teal-dk);
    margin-top: 1.7rem;
    line-height: 2.1;
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
    max-width: 40ch;
}
.spec i { color: var(--dim); font-style: normal; padding: 0 0.35rem; }
.spec b { color: var(--gold-dk); font-weight: 400; }

/* docked minor features — annotated notes, not cards */
.docked {
    list-style: none;
    margin-top: 1.6rem;
    max-width: 38ch;
}
.docked li {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 0.85rem;
    font-size: 0.93rem;
    line-height: 1.5;
    color: var(--slate);
}
.docked b {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--ink);
    display: block;
}

/* ============================================================
   PAGE GRID — named lines let elements break the shell edge
   ============================================================ */

.spread { scroll-margin-top: 4.6rem; }

.spread {
    display: grid;
    grid-template-columns:
        [full-start] var(--gutter)
        [shell-start] repeat(12, var(--col))
        [shell-end] var(--gutter)
        [full-end];
    justify-content: center;
    column-gap: var(--gap);
    position: relative;
    padding-block: clamp(4.5rem, 9vw, 9rem);
}

/* ---------- nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(245, 240, 230, 0.86);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 0.62rem var(--shell-pad);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem clamp(0.8rem, 2vw, 2rem);
}

/* section rail — every spread, in page order */
.nav-links {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: clamp(0.7rem, 1.5vw, 1.35rem);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    position: relative;
    flex: none;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.62rem;
    color: var(--slate);
    text-decoration: none;
    padding: 0.5rem 0 0.42rem;
    white-space: nowrap;
    transition: color 0.18s;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.is-current { color: var(--teal-dk); }
.nav-links a.is-current::after { transform: scaleX(1); background: var(--teal-dk); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand-name {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.52rem;
    letter-spacing: -0.01em;
}
.brand-name span { color: var(--teal-dk); }

/* Stitched patch — solid ground with a running-stitch line sewn just inside. */
.btn {
    position: relative;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.6rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.46rem 0.86rem;
    background: var(--teal-dk);
    color: #fff;
    border: 1px solid var(--teal-dk);
    transition: transform 0.15s ease, background 0.2s;
}
.btn::after {
    content: "";
    position: absolute;
    inset: 2.5px;
    border: 1.2px dashed var(--paper);
    opacity: 0.7;
    pointer-events: none;
    transition: border-color 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(1px); }
.btn:hover::after,
.btn:focus-visible::after { border-color: var(--gold-lt); opacity: 1; }

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

.hero { padding-top: clamp(3rem, 6vw, 5.5rem); padding-bottom: clamp(4rem, 8vw, 8rem); }

.hero-type { grid-column: shell-start / span 7; grid-row: 1; z-index: 3; }

.hero h1 {
    font-size: clamp(3rem, 8.4vw, 6.6rem);
    line-height: 0.94;
}
.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--teal-dk);
    display: block;
    margin-left: 0.06em;
}
.hero-sub {
    font-size: clamp(1.05rem, 1.5vw, 1.28rem);
    color: var(--slate);
    max-width: 40ch;
    margin-top: 1.8rem;
}
.hero-sub strong { color: var(--ink); font-weight: 700; }

.hero-art {
    grid-column: 7 / shell-end;   /* crosses the type column, stays inside the shell */
    grid-row: 1 / span 3;
    align-self: start;
    z-index: 1;
    margin-top: clamp(-1rem, -1vw, 0rem);
}
.hero-art img { width: 100%; max-width: min(100%, 36rem); margin-inline: auto; }

.store-row {
    grid-column: shell-start / span 7;
    grid-row: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2.4rem;
    z-index: 3;
}
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 1.1rem;
    border: 1px solid var(--ink);
    text-decoration: none;
    color: var(--ink);
    background: transparent;
    transition: background 0.2s, color 0.2s;
}
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; }
.sb-top { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
.sb-big { font-family: var(--display); font-weight: 600; font-size: 1.02rem; }
.store-badge:hover { background: var(--ink); color: var(--paper); }
.store-badge:hover .sb-top { color: rgba(252, 249, 242, 0.75); }
.store-badge:hover svg path[fill="currentColor"] { fill: var(--paper); }

/* ---- Prelaunch (body.prelaunch) — remove the class at launch to restore. ---- */
body:not(.prelaunch) .soon { display: none; }
.prelaunch .live { display: none; }
.prelaunch .soon { display: inline; }
.prelaunch #price,
.prelaunch a[href$="#price"] { display: none; }

/* Badge becomes an unfinished patch: gold running stitch on pale gold ground. */
.prelaunch .store-badge {
    border: 1.2px dashed var(--gold-dk);
    background: var(--gold-pale);
    cursor: default;
}
.prelaunch .store-badge svg { opacity: 0.55; filter: grayscale(0.35); }
.prelaunch .store-badge .sb-top { color: var(--gold-dk); }
.prelaunch .store-badge:hover { background: var(--gold-pale); color: var(--ink); }
.prelaunch .store-badge:hover .sb-top { color: var(--gold-dk); }
.prelaunch .store-badge:hover svg path[fill="currentColor"] { fill: currentColor; }

/* ============================================================
   PHONES — one frame, size and tilt vary per spread
   ============================================================ */

.device {
    --w: 15rem;
    width: var(--w);
    aspect-ratio: 9 / 19.3;
    border-radius: calc(var(--w) * 0.135);
    padding: calc(var(--w) * 0.028);
    background: linear-gradient(150deg, #2b2b3a, #14141f 60%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 24px 50px -18px var(--shadow),
        0 4px 14px -6px rgba(26, 26, 46, 0.28);
    transform: rotate(var(--tilt, 0deg));
    position: relative;
}
.device::after {           /* speaker slot */
    content: "";
    position: absolute;
    top: calc(var(--w) * 0.045);
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--w) * 0.20);
    height: calc(var(--w) * 0.022);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
    z-index: 2;
}
.screen {
    width: 100%; height: 100%;
    border-radius: calc(var(--w) * 0.108);
    overflow: hidden;
    background: var(--paper);
    position: relative;
}
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }

/* replay strip — injected under each video phone by the replay script, tilts with it */
.replay {
    position: absolute;
    left: calc(var(--w) * 0.06);
    right: calc(var(--w) * 0.06);
    top: calc(100% + 0.6rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.replay button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: none;
    padding: 0.9rem 0.3rem;          /* 44px tap target without growing the strip */
    margin: -0.9rem -0.3rem;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.66rem;
    color: var(--teal-dk);
}
.replay button svg { width: 1rem; height: 1rem; }
.replay button:hover { color: var(--gold-dk); }
.replay button:focus-visible { color: var(--gold-dk); outline: 1px dashed var(--gold); outline-offset: -0.55rem; }

/* seek bar — tall invisible hit zone, 2px line drawn through its middle */
.replay-track {
    position: relative;
    flex: 1;
    height: 1.75rem;
    cursor: pointer;
    touch-action: pan-y;             /* vertical swipes still scroll the page */
}
.replay-track::before,
.replay-fill {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    transition: height 0.15s, margin-top 0.15s;
}
.replay-track::before { background: var(--line); }
.replay-fill {
    background: var(--teal);
    transform-origin: left;
    transform: scaleX(0);
}
.replay-track:hover::before, .replay-track:hover .replay-fill,
.replay-track:focus-visible::before, .replay-track:focus-visible .replay-fill,
.replay-track.is-scrubbing::before, .replay-track.is-scrubbing .replay-fill { height: 4px; margin-top: -2px; }
.replay-track:focus-visible { outline: 1px dashed var(--gold); outline-offset: 2px; }

/* Color Match — static mock of the app's Identify Thread results screen.
   1em ≈ 14sp at app scale; dp values below are converted at 1dp = 0.0714em. */
.vcm {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: calc(var(--w) * 0.037);
    line-height: 1.3;
    color: var(--ink);
    background: #F5F0E6;                  /* app CreamLinen */
}
.vcm i { display: block; flex: none; border-radius: 50%; }
.vcm-status { padding: 0.5em 1.6em 0.2em; font-size: 0.8em; font-weight: 700; }
.vcm-bar {
    display: flex;
    align-items: center;
    gap: 1.6em;
    height: 4em;
    padding: 0 1.14em;
    font-family: var(--display);
    font-size: 1.1em;
}
.vcm-bar svg { width: 1.5em; height: 1.5em; flex: none; }
.vcm-bar span { font-size: 1.3em; }
.vcm-head {
    display: flex;
    align-items: center;
    padding: 1.6em 2.4em 1.9em;
}
.vcm-probe {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.29em;
    font-size: 0.786em;
    color: #4A5568;                       /* app Slate */
}
.vcm-probe i { width: 5em; height: 5em; box-shadow: inset 0 0 0 1px rgba(26,26,46,0.14); }   /* edge keeps the white probe visible on cream */
.vcm-arrow { flex: 1; text-align: center; font-size: 2em; color: #4A5568; }
/* rows are roomier than the app's 8dp padding so five results fill the screen instead of leaving half of it blank */
.vcm-list { flex: 1; display: flex; flex-direction: column; gap: 0.55em; }
.vcm-row {
    display: flex;
    align-items: center;
    gap: 0.57em;
    margin: 0.14em 1.14em;
    padding: 1.1em 0.86em;
    border-radius: 0.86em;
    background: #E6E0E9;                  /* M3 default card surface, as in the app */
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    white-space: nowrap;
}
.vcm-row i { width: 1.71em; height: 1.71em; }
.vcm-row b { width: 6.43em; font-weight: 700; overflow: hidden; }
.vcm-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.857em; color: #4A5568; }
.vcm-row em { font-style: normal; font-size: 0.857em; font-weight: 600; color: #C9962C; }
.vcm-row u {
    margin-left: 0.29em;
    padding: 0 0.73em;
    line-height: 2.9em;
    border-radius: 99px;
    text-decoration: none;
    font-size: 0.786em;
    color: #fff;
    background: #C9962C;                  /* app secondary = Gold */
}
.vcm-retake {
    margin: 0.57em 1.14em 1.4em;
    padding: 0.64em 0;
    border: 1px solid #79747E;            /* M3 default outline */
    border-radius: 99px;
    text-align: center;
    color: #2A7F7F;                       /* app primary = Teal */
}

.dev-xl { --w: clamp(13rem, 25vw, 20.5rem); }
.dev-lg { --w: clamp(11.5rem, 20vw, 17rem); }
.dev-md { --w: clamp(10.5rem, 16vw, 14rem); }
.dev-sm { --w: clamp(9rem, 13vw, 11.5rem); }

/* media not captured yet — designed slot, not a broken box */
.slot {
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(-45deg, transparent 0 11px, rgba(26,26,46,0.028) 11px 22px),
        var(--bg-2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    padding: 1.4rem 1.1rem;
    text-align: left;
}
.slot svg { width: 26px; height: 26px; color: var(--teal-dk); opacity: 0.75; }
.slot-name { font-size: 0.66rem; color: var(--ink); margin-top: 0.4rem; }
.slot-need {
    font-size: 0.58rem;
    color: var(--dim);
    letter-spacing: 0.1em;
    line-height: 1.8;
    text-transform: uppercase;
    border-top: 1px solid var(--line-soft);
    padding-top: 0.5rem;
    margin-top: 0.2rem;
}

/* ============================================================
   FEATURE SPREADS — every one composed differently
   ============================================================ */

.sp-type { z-index: 3; }
.sp-media { z-index: 2; }

.spread h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }

/* -- 1 · My Nest — type left, XL phone right breaking the edge */
#nest .sp-type   { grid-column: shell-start / span 6; grid-row: 1; }
#nest .sp-media  { grid-column: 8 / full-end; grid-row: 1; justify-self: start; margin-top: 2.5rem; }

/* -- 2 · Import — phone left, type right, run bleeding off the left edge */
#import .sp-media { grid-column: full-start / span 5; grid-row: 1; justify-self: end; z-index: 2; }
#import .sp-type  { grid-column: 6 / shell-end; grid-row: 1; padding-top: 3.4rem; }

/* -- 3 · Quick Add — type centred-left over a wide run, small phone tucked right */
#add .sp-type   { grid-column: shell-start / span 6; grid-row: 1; padding-top: 1.6rem; }
#add .sp-media  { grid-column: 8 / span 4; grid-row: 1; justify-self: center; align-self: center; }

/* -- 4 · Projects — type right, phone left, deep overlap */
#projects .sp-media { grid-column: shell-start / span 5; grid-row: 1; }
#projects .sp-type  { grid-column: 5 / shell-end; grid-row: 1; padding-top: 4.5rem; }

/* -- 5 · Photo to Pattern — the tall one, phone centred right */
#photo .sp-type  { grid-column: shell-start / span 6; grid-row: 1; padding-top: 2.2rem; }
#photo .sp-media { grid-column: 7 / shell-end; grid-row: 1; justify-self: center; }

/* -- 6 · Trace — type band top-left, small phone hangs centred below the headline */
#trace .sp-type  { grid-column: shell-start / span 7; grid-row: 1; }
#trace .sp-media { grid-column: 6 / span 4; grid-row: 1; justify-self: center; margin-top: 11rem; }

/* -- 7 · Color Match — phone left of centre, type right */
#match .sp-media { grid-column: full-start / span 5; grid-row: 1; justify-self: center; align-self: center; }
#match .sp-type  { grid-column: 6 / shell-end; grid-row: 1; }

/* -- 8 · The app around it */
#app .sp-type   { grid-column: shell-start / span 6; grid-row: 1; }

/* perched robins — ride along with each phone, watching the screen.
   upright art is ~1.33× as wide as tall, head-down art ~0.6×, so offsets scale off --h */
.sp-media { position: relative; width: max-content; height: max-content; }
.perch { --h: clamp(4.6rem, 7.5vw, 7rem); position: absolute; z-index: 4; pointer-events: none; }
.perch img { height: var(--h); width: auto; }
.p-nest     { left:  calc(var(--h) * -1.18); bottom: 10%; }
.p-add      { left:  calc(var(--h) * -1.4);  bottom: 6%; }
.p-projects { left:  calc(var(--h) * 0.15);  top: calc(var(--h) * -0.9); }
.p-trace    { right: calc(var(--h) * 0.1);   top: calc(var(--h) * -0.9); }
.p-import   { right: calc(var(--h) * 0.05);  top: calc(var(--h) * -0.9); }
.p-photo    { left:  calc(var(--h) * -1.3);  bottom: 5%; }
.p-match    { right: calc(var(--h) * 0.1);   top: calc(var(--h) * -0.9); }

/* robin — download section */
.robin { pointer-events: none; }
.robin img { width: clamp(5.5rem, 11vw, 9.5rem); }

/* ============================================================
   PRICING — an eighth spread, same language
   ============================================================ */

#price .sp-type { grid-column: shell-start / span 5; grid-row: 1; }
#price .plans   { grid-column: 8 / full-end; grid-row: 1; z-index: 3; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: clamp(1.8rem, 3.5vw, 2.8rem) clamp(2rem, 6vw, 5rem); align-content: start; }
.plan { position: relative; }
.plan-price {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
}
.plan.best .plan-price { color: var(--teal-dk); }
/* tier header — kicker voice, gold rule underneath like a label on a bobbin card */
.plan-name {
    font-size: 0.72rem;
    color: var(--ink);
    padding-bottom: 0.6rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid var(--gold);
    white-space: nowrap;
}
.plan.best .plan-name { color: var(--teal-dk); border-bottom-color: var(--teal); }
.plan-flag {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
    color: var(--gold-dk);
    margin-left: 0.5rem;
}
.price-foot {
    grid-column: shell-start / shell-end;
    grid-row: 2;
    margin-top: clamp(2.2rem, 5vw, 3.6rem);
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.86rem;
    color: var(--slate);
    max-width: 62ch;
}

/* ============================================================
   CLOSING CTA + FOOTER
   ============================================================ */

.cta { padding-block: clamp(5rem, 10vw, 10rem); }
.cta-type { grid-column: shell-start / span 7; grid-row: 1; z-index: 3; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.cta .store-row { grid-column: shell-start / span 8; grid-row: 2; margin-top: 2.2rem; }
.cta .robin { grid-column: 6 / span 3; grid-row: 1 / span 2; align-self: center; justify-self: start; z-index: 2; }

/* ============================================================
   MEET OUR ARTIST — type only, name left, her words right
   ============================================================ */

.artist { padding-block: clamp(4rem, 8vw, 8rem); }

.artist-name { grid-column: shell-start / span 4; grid-row: 1; }
.artist-name h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }

.artist-body { grid-column: 6 / shell-end; grid-row: 1; }

/* Allie Barnett's words, verbatim — only the URL is anchored */
.bio {
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.72;
    color: var(--slate);
    max-width: 60ch;
}
.bio a {
    color: var(--teal-dk);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
    word-break: break-word;
}
.bio a:hover { background: var(--teal-pale); }

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: clamp(1.8rem, 3vw, 2.6rem);
}
.social {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.05rem;
    border: 1px solid var(--ink);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.2s, color 0.2s;
}
.social svg { width: 21px; height: 21px; flex: none; }
.social .etsy-mark { height: 19px; width: auto; flex: none; }
.social span { display: flex; flex-direction: column; line-height: 1.15; }
.so-top {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.58rem;
    color: var(--slate);
}
.so-big { font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.social:hover { background: var(--ink); color: var(--paper); }
.social:hover .so-top { color: rgba(252, 249, 242, 0.75); }

footer {
    border-top: 1px solid var(--line);
    padding: 3rem var(--shell-pad) 3.5rem;
}
.foot-inner { max-width: var(--shell-max); margin: 0 auto; }
.foot-top { display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot-links a {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.64rem;
    color: var(--slate);
    text-decoration: none;
}
.foot-links a:hover { color: var(--teal-dk); }
.foot-copy {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line-soft);
    font-size: 0.74rem;
    color: var(--dim);
}

/* ============================================================
   LEGAL PAGES — privacy.html / terms.html share this chrome
   ============================================================ */

.legal-wrap {
    max-width: 48rem;
    margin: 0 auto;
    padding: clamp(2.6rem, 5vw, 4.2rem) var(--shell-pad) clamp(4rem, 8vw, 6.5rem);
}
.legal-back {
    display: inline-block;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.62rem;
    color: var(--slate);
    text-decoration: none;
    margin-bottom: 2.2rem;
}
.legal-back:hover { color: var(--teal-dk); }

.legal-wrap h1 { font-size: clamp(2.2rem, 5.2vw, 3.4rem); }
.legal-date {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.64rem;
    color: var(--gold-dk);
    margin-top: 1rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--line);
}
.legal-wrap h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    margin-top: 2.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
}
.legal-wrap h3 {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--teal-dk);
    margin-top: 1.9rem;
}
.legal-wrap p, .legal-wrap li { color: var(--slate); }
.legal-wrap p { margin-top: 1rem; max-width: 68ch; }
.legal-wrap ul { margin: 1rem 0 0 0; padding: 0; list-style: none; max-width: 68ch; }
.legal-wrap li { position: relative; padding-left: 1.4rem; margin-top: 0.7rem; }
.legal-wrap li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.72em;
    width: 0.6rem; height: 1px;
    background: var(--gold);
}
.legal-wrap strong { color: var(--ink); font-weight: 700; }
.legal-wrap a {
    color: var(--teal-dk);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
    word-break: break-word;
}
.legal-wrap a:hover { background: var(--teal-pale); }

/* ============================================================
   RESPONSIVE — single column, overlap survives at reduced depth
   ============================================================ */

@media (max-width: 1080px) {
    :root { --col: minmax(0, 1fr); --gap: 0.7rem; }
}

@media (max-width: 860px) {
    .nav-inner { padding-inline: var(--gutter); padding-bottom: 0; row-gap: 0; }
    footer { padding-inline: var(--gutter); }
    .legal-wrap { padding-inline: var(--gutter); }
    .nav-links {
        order: 3;
        flex: 1 0 100%;
        gap: 1.1rem;
        border-top: 1px solid var(--line-soft);
        margin: 0 calc(var(--gutter) * -1);
        padding: 0 var(--gutter);
    }
    .brand { margin-right: auto; }
    .spread { scroll-margin-top: 6.4rem; }

    .spread {
        grid-template-columns: [full-start] 0 [shell-start] repeat(12, minmax(0, 1fr)) [shell-end] 0 [full-end];
        padding-inline: var(--gutter);
        padding-block: clamp(3.4rem, 11vw, 5rem);
        row-gap: 0;
    }

    /* everything stacks, but pieces still cross each other */
    .spread > * { grid-column: shell-start / shell-end !important; grid-row: auto !important; }

    .hero-art { margin-top: -1.5rem; margin-right: calc(var(--gutter) * -1); width: calc(100% + var(--gutter)); }
    .hero-art img { margin-left: auto; width: 82%; }

    .sp-type { padding-top: 0 !important; order: -1; }   /* text first, video always below */
    .sp-media {
        justify-self: end !important;
        margin: 1.8rem 0 0 !important;
        margin-right: calc(var(--gutter) * -0.6) !important;   /* still breaks the margin */
    }
    #import .sp-media, #match .sp-media, #projects .sp-media {
        justify-self: start !important;
        margin-left: calc(var(--gutter) * -0.6) !important;
        margin-right: 0 !important;
    }



    .plans { margin-top: 2rem; gap: 1.8rem 2.6rem; }
    .cta .robin { justify-self: end !important; margin-top: 1.2rem !important; }
    .perch { --h: 4.2rem; }
    #import .sp-media, #projects .sp-media, #match .sp-media, #trace .sp-media { margin-top: 4.2rem !important; }   /* room for the bird on top */
    .artist-body { margin-top: 1.6rem; }
    .bio { max-width: none; }

    .device { --w: clamp(11rem, 46vw, 15rem) !important; }
    .dev-xl { --w: clamp(13rem, 56vw, 17rem) !important; }
    .dev-sm { --w: clamp(9rem, 38vw, 12rem) !important; }

    .lede, .docked, .spec { max-width: 46ch; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
    .foot-top { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-drift] { transform: none !important; }
}
