/* ============================================================
   French Pills — Design Tokens
   colors_and_type.css
   ============================================================ */

/* Webfonts : self-hostées dans assets/fonts/, déclarées dans assets/css/fonts.css
   (enqueue en parallèle dans functions.php pour ne pas bloquer ce CSS). */

:root {
  /* ============================================================
     COLOR — extracted from packaging photos & label artwork
     ============================================================ */

  /* — Surfaces (paper, kraft, glass, ink) — */
  --paper:        #F4EFE6;   /* off-white label background, hero base */
  --paper-warm:   #EFE7D7;   /* warmer cream, premiers émois label */
  --kraft:        #C7B79A;   /* kraft paper label */
  --kraft-deep:   #A89473;   /* aged kraft, darker areas */
  --linen:        #E8E0CF;   /* linen pouch ground */
  --amber:        #8A4A1E;   /* amber glass body */
  --amber-deep:   #5A2F12;   /* amber glass shadow */
  --aluminium:    #D7D5D0;   /* aluminium screw cap */
  --brass:        #B58A3E;   /* gold cap (premiers émois) */

  /* — Ink (replaces "black"; never #000) — */
  --ink:          #1F1A17;   /* primary text, near-black warm */
  --ink-2:        #3A332E;   /* secondary text */
  --ink-3:        #6B6259;   /* tertiary text, captions */
  --ink-4:        #9B9388;   /* hairlines, disabled */
  --rule:         #D9D1C0;   /* dividing rules on paper */
  --rule-strong:  #B7AC97;

  /* — Univers (5 collections, drawn from label color blocks) — */
  --u-emotions:        #C8344B;   /* coral-red — gratitude, courage, premiers émois */
  --u-emotions-soft:   #F0D6D9;   /* tinted background */
  --u-relations:       #1F4E78;   /* deep blue — couple, amitié, famille */
  --u-relations-soft:  #D4DEE6;
  --u-rituels:         #6E9B7E;   /* sage green — night rituals, morning boost */
  --u-rituels-soft:    #DBE4DB;
  --u-quotidien:       #C68A2E;   /* mustard ochre — haïkus urbains, traces secrètes */
  --u-quotidien-soft:  #EDE0C7;
  --u-evasion:         #2D7A86;   /* petrol teal — escales, cultures insolites */
  --u-evasion-soft:    #CFE0E2;

  /* — Accent (single, used sparingly: signature, sale flag, hover) — */
  --accent:       #C8344B;        /* same as u-emotions, the brand's signature red */
  --accent-deep:  #9C2638;

  /* — Semantic surfaces — */
  --bg:           var(--paper);
  --bg-2:         #FAF6EC;        /* slightly lighter, for cards on paper */
  --bg-deep:      #2A201A;        /* deep amber-brown — used as full-bleed dark mode for hero only */
  --fg:           var(--ink);
  --fg-2:         var(--ink-2);
  --fg-3:         var(--ink-3);
  --on-dark:      #F4EFE6;
  --on-dark-2:    #C7B79A;

  /* ============================================================
     TYPOGRAPHY
     ============================================================ */

  /* Families
     - --font-serif  : product name + display. Lora (humanist serif, friendly,
                       close to the lowercase serif on labels).
     - --font-mono   : taglines, meta labels, ALL-CAPS. Special Elite
                       (typewriter — strong apothecary signal).
     - --font-script : "french pills" wordmark. Caveat (italic handwritten
                       substitute; replace with the original .ttf when available).
  */
  --font-serif:  'Lora', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono:   'Special Elite', 'Courier Prime', 'Courier New', ui-monospace, monospace;
  --font-script: 'Caveat', 'Lora', cursive;

  /* Type scale — modular, ratio ~1.25 */
  --fs-xs:    12px;   /* tag, micro-label */
  --fs-sm:    14px;   /* meta */
  --fs-body:  16px;   /* body baseline */
  --fs-md:    18px;
  --fs-lg:    22px;
  --fs-xl:    28px;
  --fs-2xl:   36px;
  --fs-3xl:   48px;
  --fs-4xl:   64px;
  --fs-5xl:   88px;   /* editorial display */

  /* Line heights */
  --lh-tight:   1.10;
  --lh-snug:    1.25;
  --lh-normal:  1.50;
  --lh-relaxed: 1.65;

  /* Letter spacing — tracked monospace caps are a signature */
  --tr-tight:    -0.01em;
  --tr-normal:    0;
  --tr-loose:     0.08em;
  --tr-caps:      0.18em;   /* "LES FIOLES DE L'APOTHICAIRE" tracking */

  /* ============================================================
     SPACING — 4px base
     ============================================================ */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   24px;
  --sp-6:   32px;
  --sp-7:   48px;
  --sp-8:   64px;
  --sp-9:   96px;
  --sp-10: 128px;

  /* ============================================================
     RADII — restrained. Labels are rectangular. No big rounding.
     ============================================================ */
  --r-0:   0px;
  --r-1:   2px;    /* labels, color blocks */
  --r-2:   4px;    /* inputs, small chips */
  --r-3:   8px;    /* cards */
  --r-pill: 999px; /* used only for capsule-shaped tags */

  /* ============================================================
     SHADOWS — soft, paper-like; never harsh
     ============================================================ */
  --sh-paper:  0 1px 0 rgba(31,26,23,.04), 0 8px 22px -14px rgba(31,26,23,.18);
  --sh-card:   0 1px 0 rgba(31,26,23,.04), 0 18px 40px -22px rgba(31,26,23,.22);
  --sh-lift:   0 2px 0 rgba(31,26,23,.05), 0 30px 60px -28px rgba(31,26,23,.30);
  --sh-inset:  inset 0 0 0 1px rgba(31,26,23,.06);

  /* ============================================================
     BORDERS
     ============================================================ */
  --bd-hair:   1px solid var(--rule);
  --bd-thin:   1px solid var(--rule-strong);
  --bd-ink:    1px solid var(--ink);

  /* ============================================================
     MOTION — restrained, narrative, never decorative
     ============================================================ */
  --ease-out:    cubic-bezier(.22,.61,.36,1);
  --ease-in:     cubic-bezier(.55,.06,.68,.19);
  --ease-paper:  cubic-bezier(.2,.7,.2,1);   /* signature curve — slow settle */
  --dur-fast:    160ms;
  --dur-base:    320ms;
  --dur-slow:    640ms;
  --dur-reveal:  900ms;   /* scroll reveals */

  /* ============================================================
     CONTAINER WIDTHS
     ============================================================ */
  --cw-narrow:  680px;     /* article width */
  --cw-base:    1080px;    /* default */
  --cw-wide:    1280px;
  --cw-bleed:   100%;
}

/* ============================================================
   BASE STYLES
   ============================================================ */
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Semantic type roles — apply via class */

/* Display title — editorial, lowercase, serif. Echo of product names. */
.fp-display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw + 1rem, var(--fs-5xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  text-transform: lowercase;
  text-wrap: balance;
}

/* Headline — for sections */
.fp-h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  text-transform: lowercase;
  text-wrap: balance;
}
.fp-h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  text-transform: lowercase;
  text-wrap: balance;
}
.fp-h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  text-transform: lowercase;
}

/* Eyebrow / kicker — typewriter all-caps, the apothecary signal */
.fp-eyebrow {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-xs);
  line-height: 1;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Tagline blocks — same family as eyebrow, larger */
.fp-tagline {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  letter-spacing: var(--tr-loose);
  text-transform: uppercase;
  color: var(--fg-2);
  line-height: var(--lh-snug);
}

/* Body paragraph */
.fp-body {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.fp-body--lg {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
}

/* Meta / caption — small typewriter, used as label info ("EMOTIONS") */
.fp-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Wordmark */
.fp-wordmark {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-xl);
  letter-spacing: 0;
  color: var(--ink);
}

/* "Color block" — the signature label treatment.
   Lowercase serif on a colored block — used for product names, hero callouts. */
.fp-block {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-2xl);
  text-transform: lowercase;
  line-height: 1;
  display: inline-block;
  padding: .12em .35em .22em;
  background: var(--accent);
  color: var(--paper);
  border-radius: var(--r-1);
}

/* Selection — use accent at low opacity */
::selection { background: rgba(200, 52, 75, .18); color: var(--ink); }

/* Hairline divider in apothecary style — typewriter dot pattern */
.fp-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  width: 100%;
}
.fp-rule--dotted {
  border: 0;
  height: 1px;
  background-image: radial-gradient(circle, var(--rule-strong) 1px, transparent 1.2px);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}

/* Reduced motion — disable scroll reveals */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
