/* Becky Spector Interiors: design tokens.
   Every color, type style, space and motion value the site uses lives here. Pages and
   components only reference these; see DESIGN.md before adding one. */

/* ---------- Fonts (self-hosted; only the faces in use are downloaded) ---------- */
@font-face { font-family: "Jost"; src: url("../fonts/jost-variable-latin.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }

/* Serif: Gambetta (Fontshare, free under its FFL). Luke 10/22 picked it, Regular, over Boska,
   Sentient, Spectral, Libre Caslon Display and Gilda Display; those files are kept in
   ../References/Fonts (back pocket)/ in case we ever switch (DESIGN.md has the one-line swap). */
@font-face { font-family: "Gambetta"; src: url("../fonts/gambetta-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gambetta"; src: url("../fonts/gambetta-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Gambetta"; src: url("../fonts/gambetta-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }

:root {
  /* ---------- Color ----------
     Warm, muted, no pure white or black. The photography carries the color. */
  --paper: oklch(0.982 0.006 85);          /* page ground, the name strip */
  --plaster: oklch(0.932 0.016 78);        /* the second ground: the statement band, Work with us's text cell, the Contact form's cell (Las Colinas' Venetian plaster) */
  --ink: oklch(0.26 0.016 55);             /* every text on paper or plaster (Luke 10/26: one dark text color, as Karia's, no gray body) */
  --ink-soft: oklch(0.47 0.016 60);        /* hover states only, never resting text */
  --ink-faint: oklch(0.62 0.012 65);       /* nothing uses it since the form went (10/30): under 4.5:1, never for text that has to be read */
  --walnut: oklch(0.32 0.028 50);          /* the dark ground: the footer, the phone menu, behind the hero while it loads */
  --on-walnut: oklch(0.93 0.012 80);       /* text on walnut */
  --on-walnut-soft: oklch(0.76 0.014 75);  /* the footer's fine print */
  --stroke: 1.5px;                         /* every line: the grid's dividers, the strip's and footer's rules, button and field outlines (Luke 10/26, on the dials; 1px read too fine) */
  /* Lines: one color, the ink, at one strength, everywhere on paper: the grid, the strip's
     line, the button and field outlines (Luke 10/26: at 0.6 they read as many colors beside the
     solid button outline and the ink logo). Strengths set by Luke on the dials 10/26. */
  --line-alpha: 0.66;
  --line: color-mix(in oklch, var(--ink) calc(var(--line-alpha) * 100%), transparent);
  --line-on-walnut-alpha: 0.8;             /* the footer's line, in the footer's text color */
  --line-on-walnut: color-mix(in oklch, var(--on-walnut) calc(var(--line-on-walnut-alpha) * 100%), transparent);
  --photo-backdrop: oklch(0.9 0.012 75);   /* behind photos while they load */
  --photo-veil: color-mix(in oklch, var(--paper) 16%, transparent); /* paper laid over a project card's photo on hover (Erin Sander's) */
  /* Text over a photo (the home hero): near-paper, with a soft dark scrim under it that fades
     out by the bottom of the strip's zone. Eased stops so it never bands. */
  --on-photo: oklch(0.985 0.004 85);
  --on-photo-soft: color-mix(in oklch, var(--on-photo) 72%, transparent);
  --hero-scrim: linear-gradient(to bottom,
    oklch(0.2 0.02 50 / 0.5) 0%, oklch(0.2 0.02 50 / 0.38) 22%, oklch(0.2 0.02 50 / 0.22) 48%,
    oklch(0.2 0.02 50 / 0.09) 74%, oklch(0.2 0.02 50 / 0) 100%);
  --hero-scrim-h: clamp(9rem, 7rem + 6vw, 14rem);
  /* Her name mid-photo on phones: an even veil over the photo, deeper behind the name, and a soft halo */
  --hero-veil: radial-gradient(ellipse 85% 22% at 50% 50%, oklch(0.2 0.02 50 / 0.3), oklch(0.2 0.02 50 / 0) 100%),
    oklch(0.2 0.02 50 / 0.16);
  --hero-name-shadow: 0 0 1.25rem oklch(0.2 0.02 50 / 0.5), 0 0 0.25rem oklch(0.2 0.02 50 / 0.3);

  /* ---------- Type ---------- */
  --font-serif: "Gambetta", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif-weight: 400;                     /* Regular (Luke 10/22); the only serif weight in use */
  --font-sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  /* Jost's three weights. Every sans text is one of them, through its role below. */
  --weight-regular: 400;                   /* body, small text */
  --weight-book: 450;                      /* the strip's links; caps on walnut (light text on a dark ground reads heavier) */
  --weight-medium: 500;                    /* caps on paper: labels, buttons */
  --label-weight: var(--weight-medium);    /* Medium, the original eyebrow (Luke 10/26: Regular at 12px read thin) */
  --button-weight: var(--weight-medium);   /* buttons stay Medium (Luke 10/26) */
  --nav-weight: var(--weight-book);
  --footer-weight: var(--weight-book);     /* the footer's caps: the label, a touch lighter on walnut */

  /* The scale (Luke 10/26, measured against Karia: their sizes are 12 / 15 / 34 / 52 / 80, one
     weight, one color). Big steps between few sizes; values are at 1440 wide. The wordmark
     outranks every title from 747px up (phones: 26 to the title's 28, Luke 10/27), so the name in the strip is the top of the
     page; the display is the one size above it, and it never sits right under the strip. */
  --text-display: clamp(1.75rem, 1.2rem + 2.6vw, 3.5rem);     /* 28 to 56px: the statement (30 on an iPhone: at 32 it broke into short, ragged lines) */
  --text-wordmark: clamp(1.625rem, 1.3rem + 1.333vw, 2.5rem); /* 26 to 40px: her name, in the strip and the footer, the same lockup (Luke 10/26: 45 was too large); above the title from 747px up */
  /* Her name in the middle of the home hero on phones (Luke 10/28): one line, gutter to gutter.
     Gambetta sets the name 9.76em wide (measured) */
  --text-hero-name: calc((100vw - 2 * var(--gutter)) / 9.76);
  --text-title: clamp(1.75rem, 1.05rem + 1.5vw, 2.5rem);      /* 28 to 38px: every page's h1 and every cell's heading. Phones were 24 (Luke 10/27: too close to the eyebrow and the copy); measured on a 402px iPhone, the references' section titles are 24 to 26 and their page titles 30 to 31. Unchanged from 747px up */
  --text-menu: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);          /* 36 to 56px: the phone menu's links */
  --text-body: 1rem;                                          /* 16px, fixed (Luke 10/26: a point smaller, in ink) */
  --text-nav: 0.9375rem;                                      /* 15px: the strip's links; sentence case */
  --text-small: 0.875rem;                                     /* 14px: a caption's place, a credit's name, form errors and status */
  --text-label: 0.78rem;                                      /* 12.5px caps: eyebrows, captions' names, credentials, form labels, the footer (Luke 10/26: back to the original; 12px read small) */
  --text-button: 0.78rem;                                     /* every .btn, caps: the label's size, kept separate on purpose (Luke treats buttons as their own thing) */
  --text-fine: 0.6875rem;                                     /* 11px: the footer's bottom line */

  --leading-display: 1.18;                 /* the statement */
  --leading-title: 1.1;                    /* titles, the menu's links */
  --leading-tight: 1;                      /* one-line type set in a box: the wordmark, buttons */
  --leading-label: 1.4;                    /* caps labels and small text */
  --leading-quote: 1.2;                    /* a client's words (Client reviews): the title's size, set looser for several lines (Karia's quote: 34px at 1.2) */
  --leading-body: 1.6;                     /* running text, form fields */
  --leading-footer: 1.8;                   /* the footer's caps, so its three lines left and right match the about's */
  /* Tracking tightens as the size grows (Luke 10/22: the big serif read spaced out; Karia's
     sits close) and loosens as it shrinks; caps labels keep a little air. Luke 10/26: the
     titles and body still read loose, so every step came in a notch (was -0.028 / -0.022 /
     -0.012 / 0 / 0.01). */
  --tracking-display: -0.034em;            /* statement, menu: 32 to 56px */
  --tracking-title: -0.03em;               /* every h1 and cell title ("Who we are"): 24 to 38px */
  --tracking-wordmark: -0.018em;           /* her name, strip and footer: 26 to 40px */
  --tracking-body: -0.01em;                /* running sans text: body copy, the strip's links, form fields: 15 to 16px */
  --tracking-small: 0em;                   /* small text: 14px */
  --tracking-label: 0.04em;                /* Luke 10/22 (dials): caps, barely tracked; back 10/26 (0.08em read wide) */
  --tracking-button: 0.04em;               /* and at Luke's 10/22 dial setting */

  /* ---------- Space ----------
     Two families. Stack steps are fixed and sit inside a group: a name over its place, a title
     over its copy. Layout steps grow with the screen and sit between groups. Nothing between
     them: a gap is one of these or it's a new decision for this list. Values at 1440 wide. */
  --stack-2xs: 0.25rem;                    /* 4: lines of one group: a caption's name and place, stacked contact lines, the rail's two arrows */
  --stack-xs: 0.5rem;                      /* 8: a title and its byline, a field's label and box */
  --stack-sm: 0.75rem;                     /* 12: between the credit rows */
  --stack-md: 1.5rem;                      /* 24: title to copy, copy to the next block of a cell, form rows; the footer's line from what's above and below it */
  --stack-lg: 2.5rem;                      /* 40: the footer's columns; Recent work's eyebrow row to the rail, and the rail to its button */
  --gap-x: 2rem;                           /* 32: side by side groups: the strip's and the footer's three parts, the fine print */
  --nav-gap: clamp(1.25rem, 2.4vw, 2.5rem); /* between page links: the strip and the footer, 35 at 1440 */
  --photo-gap: clamp(0.75rem, 0.35rem + 1vw, 1.25rem);       /* 20: between photos side by side and down a gallery, and from a photo to its caption. Erin Sander's, tight (Luke 10/26: 36px read clunky) */
  --gutter: clamp(1.25rem, 1.016rem + 1.927vw, 3rem);        /* 44: page side margin: the strip's edges, and every content edge on every page (Luke 10/26). 24 on an iPhone, 32 on an iPad (the mobile pass: Erin Sander's 24; 17 read cramped) */
  /* Inner pages' vertical rhythm, measured on the references at 1440 (Luke 10/26: ours read
     loose). Strip to first content: Erin Sander 47px, Lauren Nelson 47px. Text block to photos,
     photos to the next section: Erin Sander ~64px (Lauren Nelson 101px). */
  --page-top: clamp(1.75rem, 1rem + 2vw, 2.75rem);           /* 44: the strip's line to an inner page's first content */
  --block-gap: clamp(2.5rem, 1.5rem + 2.8vw, 4rem);          /* 64: text block to photos, photos to the next section, a portfolio row to the next, between a cell's eyebrow, body and button */
  --cell-pad: clamp(3rem, 0.9rem + 3.4vw, 4.5rem);           /* 63: a grid cell's (and a full-width band's) top and bottom padding; sides are --gutter. 48 on phones and tablets (the mobile pass: Recent work and the footer read cramped at 28) */
  --section: clamp(4rem, 2rem + 6vw, 7.5rem);                /* 118: the big open bands: the statement's top and bottom, the footer between its top lines and her name */
  --measure: 30rem;                                          /* body copy line length: about 64 characters at 16px */
  --measure-display: 32ch;                                   /* the statement's line length */
  --measure-quote: 22em;                                     /* a centered quote's line length, of its own size: 836px at 38 (Karia's: 845) */

  /* ---------- Shapes and sizes ---------- */
  --ratio-card: 3 / 4;                     /* a project card's photo: the portfolio's tiles, the rail's tall cards */
  --ratio-tall: 4 / 5;                     /* a project's tall photos, two to a row */
  --ratio-row: 1 / 1;                      /* a grid row's photo on phones (Luke 10/28: 4:5 took too much of the screen, 4:3 cropped too much) */
  --ratio-wide: 3 / 2;                     /* wide photos: a project's full-width ones, the rail's wide cards */
  --card-w-tall: clamp(15rem, 25vw, 24rem);   /* the rail's cards: a tall one */
  --card-w-wide: clamp(19rem, 37vw, 35rem);   /* and a wide one */
  --cell-min-h: clamp(31rem, 42vw, 42rem); /* a grid row's least height, 605 at 1440 (Luke 10/26: between 46vw, too tall, and 38vw, too short) */
  --bar-h: clamp(6rem, 4rem + 3.5vw, 8rem); /* a project's bottom bar */
  --button-h: 2.5rem;                      /* Buttons (Luke 10/22): outlined, square, compact */
  --button-h-small: 2.25rem;               /* the strip's Contact */
  --button-pad: 1.15rem;
  /* A full-screen band (the home hero). On iPhones Safari shows page content under its
     bottom bar, 58pt below 100lvh, so the next section would peek there; there the band runs
     to the screen's bottom edge (ios26-liquid-glass-bars playbook, measured on 16e to 17 Pro Max). */
  --band-h: 100lvh;
  --band-min-h: 24rem;                     /* the hero on a short, wide window */
  --strip-h: round(clamp(4rem, 3.5rem + 1.4vw, 5rem), 1px);  /* name strip: 64 to 80px, 76 at 1440 (Luke 10/26: a touch taller, the bigger name read crammed; was 60 to 72, 69 at 1440); whole pixels so its line stays crisp */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);                /* ease-out-quint */
  --ease-soft: cubic-bezier(0.45, 0, 0.55, 1);               /* ease-in-out: a slow wash, no snap at the start (hover fades on photos, Luke 10/26) */
  --dur-fast: 240ms;
  --dur: 600ms;
  --dur-fade: 400ms;                                         /* hover fades on photos: the portfolio's veil + caption (Luke 10/26: 600 was too slow) */
  --dur-arrow: 420ms;                                        /* the arrow's head and tail on hover */
  /* Hero crossfade: Erin Sander's (Squarespace fade, 3.5s a slide, ~2s fade, easing out),
     plus a second a slide (Luke 10/22). */
  --hero-hold: 4500ms;
  --hero-fade: 2000ms;
  /* Appear (js/reveal.js, Luke 10/26): Erin Sander's Squarespace "Fade", measured on her site:
     opacity only, 0.9s on CSS's plain `ease`, once, as soon as any of it is in view. */
  --reveal-dur: 900ms;
  --reveal-ease: ease;                                       /* cubic-bezier(0.25, 0.1, 0.25, 1): a soft start, a long settle */
  --reveal-stagger: 120ms;                                   /* photos or cards coming in together, left to right, top to bottom */
  --reveal-word-stagger: 60ms;                               /* the statement, word by word (Luke 10/26: words, not lines) */
  /* A review, line by line, then the name (Luke 10/27: quicker than the statement) */
  --reveal-line-dur: 700ms;
  --reveal-line-stagger: 110ms;
  /* The home hero's intro: the photo fades in on the reveal's curve while it settles from a
     slight zoom, a little longer than the fade so it is still easing once it's clear (Luke
     10/26: started too zoomed in and ran long; was 1.05 over 1.8s, now about 40% shorter). */
  --intro-zoom: 1.03;
  --intro-zoom-dur: 1080ms;
  /* The phone menu (Luke 10/27): the icon's two moves, Apple's (apple.com's menu: 0.24s, the lines
     meet easing in, then turn easing out), and its links coming in one after another, each rising
     a little as it fades in over --dur */
  --burger-step: 120ms;
  --burger-in: cubic-bezier(0.42, 0, 1, 1);
  --burger-out: cubic-bezier(0, 0, 0.58, 1);
  --menu-stagger: 55ms;
  --menu-swap: 80ms;                       /* the menu's fade is halfway (--dur on --ease-out): the strip's text turns light */
  --menu-rise: 0.75rem;

  /* A cover (the menu, the photo viewer) runs this far past the top and bottom of the screen, under
     Safari's bars, on iPhones and iPads (below); elsewhere it ends at the window's edges */
  --cover-bleed: 0px;
  /* The photo viewer's margin either side of the photo: room for the arrows; none on phones */
  --viewer-side: calc(var(--gutter) + 2.25rem);
}
/* Touch screens: every button and arrow gets a 44px target (Apple's least), the same look */
@media (pointer: coarse) { :root { --button-h: 2.75rem; } }
/* Phones: the rail's cards take most of the screen; the viewer's photos run edge to edge */
@media (max-width: 45.99em) { :root { --card-w-tall: 62vw; --card-w-wide: 80vw; --viewer-side: 0px; } }
/* The smallest phones (320px): the name has to fit beside Menu */
@media (max-width: 22.49em) { :root { --text-wordmark: 1.375rem; --gutter: 1.125rem; } }
@supports (-webkit-touch-callout: none) {
  :root { --cover-bleed: 160px; }
  @media (max-width: 30rem) and (orientation: portrait) { :root { --band-h: calc(100lvh + 3.625rem); } }
}
