/* THE ROOM — design tokens. :root custom properties only (hard rule 2).
   Values: prompts/00-scaffold.md "The approved design (exact values)"; where the prompt is silent the
   approved canvas source fills in (marked "canvas"). Anything marked "not in the design" is ours.
   Phone breakpoint: max-width 900px. CSS can't use custom properties inside @media, so the 900px literal
   appears in the @media rules here and in site.css. */

:root {
  /* ── Color ─────────────────────────────────────────────── */
  --color-ink: #111;
  --color-paper: #fff;
  --color-ink-soft: #444;            /* tile titles, the stage's piece title */
  --color-ink-serif: #222;           /* editorial serif line */
  --color-ink-muted: #767676;        /* status line + every input placeholder (owner, 2026-11-28: was #777;
                                        #767676 is 4.54:1 on white, AA, and looks the same) */
  --color-ink-faint: #888;           /* "PHOTO / 3D" on the stand-in */
  --color-banner: #121212;
  --color-banner-ink: #eee;
  --color-standin: #ffffffee;        /* the stand-in object */
  --color-field: #f4f4f2;            /* text inputs */
  --shadow-standin: 0 24px 40px rgba(0, 0, 0, .12);

  /* Tile wash palette. tile.js reads these to build wash(n) and appends an alpha to each, so keep them
     6-digit hex. Their count sets the recipe's "%8" and "%3"; the recipe numbers live in config.js. */
  --wash-1: #d94f2b;
  --wash-2: #2b3bff;
  --wash-3: #c8f03c;
  --wash-4: #0f6b66;
  --wash-5: #f2a5c0;
  --wash-6: #6b0f1a;
  --wash-7: #e8c9a0;
  --wash-8: #9aa0ff;
  --wash-bg-1: #f1f0ee;
  --wash-bg-2: #ecebe8;
  --wash-bg-3: #f5f4f2;

  /* 3D stage */
  --stage-bg:
    radial-gradient(70% 60% at 22% 18%, #d94f2bcc 0%, #d94f2b00 70%),
    radial-gradient(70% 70% at 88% 92%, #2b3bffcc 0%, #2b3bff00 72%),
    radial-gradient(40% 40% at 72% 20%, #f4c7a1 0%, #f4c7a100 75%),
    #f1f0ee;
  --face-front: linear-gradient(180deg, #fdfcf9, #e6e1d8);   /* translateZ */
  --face-back: linear-gradient(180deg, #d8d3ca, #bdb7ac);    /* rotateY(180deg) */
  --face-right: linear-gradient(180deg, #efebe3, #cfc9be);   /* rotateY(90deg) */
  --face-left: linear-gradient(180deg, #c9c3b8, #aaa498);    /* rotateY(-90deg) */

  /* ── Type ──────────────────────────────────────────────── */
  --font-sans: 'Archivo', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --fs-body: 11px;
  --fs-input: 11px;                  /* every input, select, textarea; 16px at ≤900px (below) */
  --fs-wordmark: 22px;
  --fs-banner: clamp(40px, 7vw, 76px);
  --fs-door: clamp(34px, 4.4vw, 56px);
  --fs-editorial: clamp(34px, 4vw, 52px);
  --fs-serif: clamp(28px, 3vw, 40px);
  --fs-badge: 10px;
  --fs-standin: 9px;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  --ls-body: .02em;
  --ls-wordmark: .14em;              /* with a matching negative right margin */
  --ls-display: -.04em;              /* banner, doors */
  --ls-editorial: -.035em;
  --ls-serif: -.01em;                /* canvas */
  --ls-standin: .14em;               /* canvas */

  --lh-banner: .95;
  --lh-door: 1;                      /* canvas */
  --lh-editorial: 1.02;
  --lh-serif: 1.05;                  /* canvas */

  /* ── Space and size ────────────────────────────────────── */
  --tap: 44px;                       /* minimum tap target */
  --tap-reach: 0px;                  /* extra hit area each side of short text links; 13px at ≤900px (below) */
  --rule: 1px;                       /* hairlines: borders, underlines */
  --underline-offset: 3px;           /* not in the design */
  --focus-width: 2px;                /* not in the design */
  --focus-offset: 2px;               /* not in the design */
  --z-header: 20;                    /* canvas */

  /* Header */
  --header-min-h: 56px;
  --header-h: var(--header-min-h);   /* app.js replaces it with the header's live height (it wraps on phones) */
  --header-pad-x: 24px;
  --header-gap: 24px;                /* between the three groups (canvas) */
  --header-group-basis: 320px;       /* both side groups: the wordmark stays centered */
  --nav-gap: 20px;                   /* left group (prompt), right group (canvas) */

  /* Home */
  --home-pad: 16px 40px 0;
  --banner-min-h: 420px;
  --banner-pad: 40px 24px;           /* canvas */
  --banner-max-w: 760px;
  --doors-min: 320px;
  --doors-pad: 8px 0 40px;           /* canvas */
  --door-pad: 20px 0;
  --col-gap: 24px;                   /* column gap: doors, editorial, grids, shop columns */
  --editorial-gap: 40px 24px;
  --editorial-pad-bottom: 64px;
  --editorial-copy-basis: 420px;
  --editorial-copy-gap: 20px;        /* canvas */
  --button-pad-x: 18px;
  --radius-button: 6px;
  --stage-basis: 560px;
  --stage-min-h: 680px;              /* 520px at ≤900px (below) */
  --stage-box-scale: 1;              /* .8 at ≤900px (below) */
  --stage-box-w: calc(220px * var(--stage-box-scale));
  --stage-box-h: calc(420px * var(--stage-box-scale));
  --stage-depth: calc(var(--stage-box-w) / 2);   /* faces sit 110px out */
  --stage-perspective: 1200px;
  --stage-inset: 16px;               /* canvas */
  --stage-caption-gap: 3px;          /* canvas */
  --section-head-pad: 16px 0 20px;
  --section-head-gap: 16px;          /* canvas */

  /* Tiles and grids */
  --tile-ratio: 3 / 4;               /* the tile's image box */
  --tile-min-home: 300px;
  --tile-min-shop: 220px;
  --tile-meta-pad: 10px 0 28px;
  --tile-meta-gap: 2px;
  --badge-inset: 10px;
  --obj-clothing-w: 52%;
  --obj-clothing-h: 66%;
  --obj-clothing-r: 2px;
  --obj-art-w: 64%;
  --obj-art-h: 52%;
  --obj-art-r: 1px;
  --obj-objects-w: 44%;
  --obj-objects-h: 44%;
  --obj-objects-r: 50%;
  --obj-jewelry-w: 26%;
  --obj-jewelry-h: 26%;
  --obj-jewelry-r: 50%;
  --status-pad: 40px 0 72px;         /* canvas */

  /* Shop */
  --shop-pad: 24px 24px 0;
  --shop-gap: 24px;
  --side-left-w: 180px;
  --side-right-w: 140px;
  --side-sticky-top: 72px;
  --side-stack-gap: 28px;            /* canvas */
  --side-pad-top: 4px;               /* canvas */
  --side-title-gap: 6px;             /* canvas */
  --side-list-gap: 2px;              /* canvas */
  --side-row-gap: 20px;              /* ≤900px wrapping rows; not in the design (matches --nav-gap) */
  --side-link-min-h: 24px;           /* categories, makers (canvas) */
  --sort-link-min-h: 22px;           /* sort, colors (canvas) */
  --check-min-h: 32px;               /* canvas */
  --check-gap: 10px;                 /* canvas */
  --check-size: 14px;                /* canvas */
  --field-min-h: 40px;               /* 44px at ≤900px (below) */
  --field-gap: 12px;                 /* canvas */
  --field-pad-x: 10px;               /* canvas */

  /* Stub page: not in the design */
  --stub-pad: 120px 24px;
  --stub-gap: 20px;

  /* ── Motion ────────────────────────────────────────────── */
  --hover-opacity: .5;
  --rise-distance: 14px;
  --rise-duration: .5s;
  --rise-ease: ease-out;             /* not in the design */
}

/* Phone (≤900px): the same tokens, phone values. */
@media (max-width: 900px) {
  :root {
    --fs-input: 16px;                /* owner, 2026-11-27: site-wide, so iPhone Safari never zooms on focus */
    --field-min-h: 44px;             /* owner, 2026-11-27: hard rule 6 wins at phone width */
    --tap-reach: 13px;               /* "ALL" is 19.95px wide in Archivo 11px: 19.95 + 2 × 13 ≥ 44 */
    --home-pad: 12px 16px;
    --stage-min-h: 520px;
    --stage-box-scale: .8;           /* owner, 2026-11-28: the stand-in never overlaps the caption (≥16px clear
                                        at every angle in a 520px stage); it is a placeholder until <model-viewer> */
  }
}
