/* ============================================================
   Pothipath Studio — Design tokens, reset & base typography
   Ink-on-parchment. Saffron is a spice, never a base.
   ============================================================ */

:root {
  /* --- Color roles --- */
  --ink:        #141A2E;   /* primary text, dark surfaces */
  --ink-soft:   #3A415A;   /* secondary text, captions   */
  --parchment:  #F6F1E7;   /* page ground                */
  --paper:      #FCFAF5;   /* cards, insets              */
  --saffron:    #C8791B;   /* the single accent / CTA    */
  --ochre:      #9A5A12;   /* small accent text (AA)     */
  --sepia:      #E3D9C6;   /* hairlines, rules           */

  /* Derived, low-contrast tints of ink for reversed surfaces */
  --parchment-dim: #CFC8B9;      /* muted parchment on ink   */
  --ink-line:      rgba(20, 26, 46, 0.10);   /* faint ink rule on parchment */
  --paper-line:    rgba(246, 241, 231, 0.14);/* faint rule on ink surfaces  */

  /* --- Type families --- */
  --font-display: "Fraunces", "Spectral", Georgia, "Times New Roman", serif;
  --font-text:    "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  /* --- Fluid type scale (clamp) --- */
  --fs-micro:   0.75rem;                                   /* 12px eyebrows      */
  --fs-small:   clamp(0.82rem, 0.80rem + 0.10vw, 0.9rem);  /* meta, captions     */
  --fs-body:    clamp(1.0625rem, 1.00rem + 0.32vw, 1.1875rem); /* 17–19px body   */
  --fs-lead:    clamp(1.2rem, 1.10rem + 0.55vw, 1.45rem);  /* sub-heads, hooks   */
  --fs-h3:      clamp(1.45rem, 1.20rem + 1.15vw, 2rem);
  --fs-h2:      clamp(1.95rem, 1.45rem + 2.4vw, 3.1rem);
  --fs-h1:      clamp(2.7rem, 1.55rem + 5.2vw, 5.35rem);
  --fs-hero:    clamp(3rem, 1.4rem + 7vw, 6.5rem);

  /* --- Spacing scale --- */
  --space-3xs: 0.35rem;
  --space-2xs: 0.55rem;
  --space-xs:  0.85rem;
  --space-sm:  1.15rem;
  --space-md:  1.75rem;
  --space-lg:  2.75rem;
  --space-xl:  clamp(3rem, 2rem + 3.5vw, 5rem);
  --space-2xl: clamp(4rem, 2.5rem + 6vw, 8rem);

  /* --- Structure --- */
  --measure: 66ch;
  --shell-max: 1200px;
  --gutter: clamp(1.25rem, 1rem + 4vw, 5rem);
  --radius: 4px;
  --radius-lg: 10px;
  --hairline: 1px;

  /* --- Motion --- */
  --ease-page: cubic-bezier(0.22, 1, 0.36, 1);   /* power3-out feel */
  --dur-fast: 220ms;
  --dur-mid: 420ms;

  --header-h: 4.5rem;
}

/* ----------------------------------------------------------------
   Reset (light-touch)
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;               /* guard; real fix is no wide children */
}

img, svg, video { display: block; max-width: 100%; }
svg { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
:where(h1, h2, h3, h4) { font-weight: 400; }

/* Focus — visible, on-brand, never removed */
:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   Base typographic roles
   ---------------------------------------------------------------- */
.font-display { font-family: var(--font-display); }

.eyebrow {
  font-family: var(--font-text);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
}

.display-1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "wght" 380, "SOFT" 0, "WONK" 0;
}

.display-hero {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  line-height: 0.94;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "wght" 360, "SOFT" 0, "WONK" 0;
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 90, "wght" 400, "SOFT" 0, "WONK" 0;
}

.h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.14;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 48, "wght" 460, "SOFT" 0, "WONK" 0;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
}

.measure   { max-width: var(--measure); }
.measure-narrow { max-width: 54ch; }
.measure-wide   { max-width: 78ch; }

.muted { color: var(--ink-soft); }

.meta {
  font-family: var(--font-text);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ----------------------------------------------------------------
   Layout helpers
   ---------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }

/* manuscript ruling — a hairline rule */
.rule {
  border: 0;
  border-top: var(--hairline) solid var(--sepia);
  width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--parchment);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------------
   Reduced motion — hard stop on decorative motion
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto !important; }
}
