/* ==========================================================================
   CristinaMariaIonescu.com: design tokens
   Single source of truth for colour, type, space, grid, rules and motion.
   ========================================================================== */

/* ---------- Fonts (self-hosted, subset, swap) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations"),
       url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext-opsz-normal.woff2") format("woff2-variations"),
       url("../fonts/fraunces-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-opsz-italic.woff2") format("woff2-variations"),
       url("../fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext-opsz-italic.woff2") format("woff2-variations"),
       url("../fonts/fraunces-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ---------- Colour ---------- */
  --c-ivory:        #F4EFE8;  /* page ground (stone/ivory, from the portrait backdrop) */
  --c-sand:         #E9E1D6;  /* deeper sand panel */
  --c-ink:          #1A1816;  /* warm near-black: text, deep panel */
  --c-ink-2:        #5B554E;  /* secondary text on ivory/sand (6.5:1 / 5.8:1) */
  --c-cobalt:       #1F3FA8;  /* the single accent, from her blouse (7.9:1 on ivory) */
  --c-cobalt-deep:  #18318A;  /* button hover/pressed */
  --c-error:        #9B2C1F;  /* form errors, 6.6:1 on ivory */

  /* on the deep (ink) panel */
  --c-on-ink:       #F4EFE8;  /* 16:1 */
  --c-on-ink-2:     #B9B0A4;  /* secondary on ink, 8.1:1 */
  --c-focus-on-ink: #A9B8F2;  /* light cobalt focus ring on ink, 9:1 */

  /* hairlines */
  --c-rule:         rgb(26 24 22 / 0.18);
  --c-rule-strong:  rgb(26 24 22 / 0.42);
  --c-rule-on-ink:  rgb(244 239 232 / 0.22);

  /* semantic aliases */
  --c-bg:           var(--c-ivory);
  --c-text:         var(--c-ink);
  --c-text-2:       var(--c-ink-2);
  --c-accent:       var(--c-cobalt);
  --c-focus:        var(--c-cobalt);

  /* ---------- Typography ---------- */
  --ff-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ff-text:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* three weights only */
  --fw-display: 340;   /* Fraunces roman + italic */
  --fw-text:    400;   /* Inter regular */
  --fw-strong:  600;   /* Inter semibold: lead phrases, button */

  /* fluid scale: 390px → 1440px */
  --fs-name:     clamp(3rem,     1.6rem + 5.9vw,  7.75rem);  /* 48 → 124 */
  --fs-quote:    clamp(1.875rem, 1.2rem + 2.6vw,  3.5rem);   /* 30 → 56  */
  --fs-statement:clamp(1.625rem, 1.15rem + 1.7vw, 2.625rem); /* 26 → 42  */
  --fs-h2:       clamp(1.625rem, 1.25rem + 1.2vw, 2.375rem); /* 26 → 38  */
  --fs-h3:       clamp(1.375rem, 1.2rem + 0.55vw, 1.75rem);  /* 22 → 28  */
  --fs-lead:     clamp(1.25rem,  1.05rem + 0.8vw, 1.875rem); /* 20 → 30  */
  --fs-body:     clamp(1.0625rem, 1rem + 0.22vw,  1.1875rem);/* 17 → 19  */
  --fs-small:    0.9375rem;                                  /* 15       */
  --fs-label:    0.75rem;                                    /* 12       */
  --fs-label-lg: 0.8125rem;                                  /* 13       */

  --lh-tight:    0.98;
  --lh-display:  1.12;
  --lh-body:     1.55;
  --tracking-label: 0.12em;
  --tracking-name: -0.022em;
  --measure:     66ch;     /* 60–72 characters */
  --measure-narrow: 34ch;

  /* ---------- Space (8-pt base, editorial steps) ---------- */
  --s-1: 0.25rem;  /* 4   */
  --s-2: 0.5rem;   /* 8   */
  --s-3: 0.75rem;  /* 12  */
  --s-4: 1rem;     /* 16  */
  --s-5: 1.5rem;   /* 24  */
  --s-6: 2rem;     /* 32  */
  --s-7: 3rem;     /* 48  */
  --s-8: 4rem;     /* 64  */
  --s-9: 6rem;     /* 96  */
  --s-10: 8rem;    /* 128 */

  --section-gap: clamp(6rem, 3rem + 11vw, 13rem);   /* ~96 mobile → ~208 desktop (160–240 brief) */
  --pause-gap:   clamp(8rem, 4rem + 14vw, 15rem);   /* the "empty page" moments */

  /* ---------- Grid ---------- */
  --grid-cols: 12;
  --grid-gutter: clamp(1rem, 0.6rem + 1.1vw, 1.75rem);   /* 16 → 28 */
  --page-margin: 1.25rem;                                /* mobile first: 20px; widens below */
  --page-max: 92rem;                                     /* 1472px content cap */
  --bar-height: 3.5rem;

  /* ---------- Rules & shape ---------- */
  --rule: 1px solid var(--c-rule);
  --rule-strong: 1px solid var(--c-rule-strong);
  --radius-0: 0;
  --radius-button: 2px;
  --focus-ring: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-focus);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.2, 0.65, 0.25, 1);
  --dur-reveal: 720ms;
  --dur-ui: 220ms;
  --reveal-distance: 12px;
  --stagger: 110ms;
}

@media (min-width: 600px) {
  :root { --page-margin: max(1.25rem, 6vw); --bar-height: 4rem; }
}
@media (min-width: 1024px) {
  :root { --page-margin: max(1.25rem, 8vw); }   /* ≥ 8vw on desktop */
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-reveal: 0ms; --dur-ui: 0ms; --reveal-distance: 0px; --stagger: 0ms; }
}
