/* ============================================================
   FAN EMBALAGENS — Colors & Type tokens
   ------------------------------------------------------------
   Derived from fanembalagens.com: a Brazilian wooden-
   industrial-packaging manufacturer. Palette is grounded in
   natural pine, kraft paper, stencil-ink black, and an
   industrial-safety yellow used sparingly for CTAs + accents.
   ============================================================ */

/* Google Fonts — hosted via CDN. See fonts/README.md for self-hosting. */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&family=Source+Sans+3:ital,wght@0,300..700;1,400&family=Stardos+Stencil:wght@400;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---------- Brand palette ---------- */
  /* Wood / kraft tones — the spine of the brand */
  --pine-50:   #FBF6ED;  /* raw paper */
  --pine-100:  #F1E6CE;  /* sun-bleached pine */
  --pine-200:  #E3CC9F;  /* planed pine */
  --pine-300:  #CBA868;  /* sanded cedar */
  --pine-400:  #A9823F;  /* stained oak */
  --pine-500:  #7E5C26;  /* aged walnut */
  --pine-600:  #5A4019;  /* dark crate */
  --pine-700:  #3C2A10;  /* ink on wood */

  /* Industrial blacks & greys — crate stencil, steel, ink */
  --ink-900:   #121212;
  --ink-800:   #1E1E1E;
  --ink-700:   #2A2A2A;
  --steel-500: #6B6B68;
  --steel-300: #B6B3AC;
  --steel-100: #E8E5DD;
  --paper:     #FAF7F0;
  --white:     #FFFFFF;

  /* FAN flame ramp — extracted from the official logo wordmark
     (yellow → orange → red gradient on dark). Primary brand accent. */
  --flame-50:  #FFE27A;
  --flame-100: #F5C518;   /* = safety-yellow */
  --flame-300: #F09A1F;
  --flame-400: #E8812A;
  --flame-500: #D8561F;
  --flame-600: #C3342B;   /* = safety-red */
  --flame-700: #8C1E1B;

  /* Safety accents — aliased to the flame ramp for backward compat */
  --safety-yellow: var(--flame-100);
  --safety-yellow-deep: #D9A800;
  --safety-red:    var(--flame-600);
  --forest:        #2F5D3A;   /* HT certified, eco cue */

  /* Canonical brand gradient — use as background or text-clip on headings */
  --gradient-flame: linear-gradient(180deg, var(--flame-100) 0%, var(--flame-400) 55%, var(--flame-600) 100%);

  /* ---------- Semantic surfaces ---------- */
  --bg:          var(--paper);
  --bg-alt:      var(--pine-50);
  --bg-inverse:  var(--ink-900);
  --surface:     var(--white);
  --surface-sunken: var(--pine-50);

  --fg-1:        var(--ink-900);     /* headings */
  --fg-2:        var(--pine-700);    /* body */
  --fg-3:        var(--steel-500);   /* meta */
  --fg-inverse:  var(--paper);
  --fg-accent:   var(--pine-500);

  --border:      #E0D6BE;            /* kraft-hairline */
  --border-strong: var(--pine-400);
  --divider:     #EAE2CD;

  --link:        var(--pine-500);
  --link-hover:  var(--pine-700);

  /* ---------- Type scale ---------- */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;       /* tall condensed — stencil cousin */
  --font-sans:    'Source Sans 3', system-ui, sans-serif;     /* body, legible, workmanlike */
  --font-stencil: 'Stardos Stencil', 'Oswald', sans-serif;    /* crate-stencil accent */
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  36px;
  --fs-3xl:  48px;
  --fs-4xl:  64px;
  --fs-5xl:  88px;

  --lh-tight: 1.05;
  --lh-snug:  1.2;
  --lh-body:  1.55;
  --lh-loose: 1.75;

  --tracking-tight:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-stencil: 0.14em;   /* "CAIXAS TRATADAS PARA EXPORTAÇÃO" */

  /* ---------- Spacing (4pt base) ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* ---------- Radii — tight, industrial ---------- */
  --r-none: 0;
  --r-sm:   2px;
  --r-md:   4px;
  --r-lg:   8px;
  --r-pill: 999px;

  /* ---------- Elevation — boxy, like real crates ---------- */
  --shadow-crate-sm: 0 1px 0 rgba(60,42,16,0.12), 0 1px 2px rgba(60,42,16,0.08);
  --shadow-crate-md: 0 2px 0 rgba(60,42,16,0.14), 0 6px 14px -4px rgba(60,42,16,0.18);
  --shadow-crate-lg: 0 3px 0 rgba(60,42,16,0.16), 0 16px 32px -10px rgba(60,42,16,0.25);
  --shadow-inset:    inset 0 0 0 1px rgba(60,42,16,0.08);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
}

/* ============================================================
   Semantic element styles
   ============================================================ */

html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--fg-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--fg-1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  margin: 0 0 var(--s-4);
}
h1 { font-size: var(--fs-4xl); letter-spacing: -0.02em; text-transform: uppercase; }
h2 { font-size: var(--fs-3xl); text-transform: uppercase; }
h3 { font-size: var(--fs-2xl); text-transform: uppercase; }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }

.eyebrow, .stencil {
  font-family: var(--font-stencil);
  text-transform: uppercase;
  letter-spacing: var(--tracking-stencil);
  font-size: var(--fs-sm);
  color: var(--pine-700);
}

p { margin: 0 0 var(--s-4); max-width: 64ch; }
strong, b { color: var(--fg-1); font-weight: 600; }

a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast); }
a:hover { color: var(--link-hover); border-bottom-color: currentColor; }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; background: var(--pine-50); padding: 0.1em 0.3em; border-radius: var(--r-sm); }

hr { border: 0; border-top: 1px dashed var(--border-strong); margin: var(--s-6) 0; }

ul, ol { padding-left: 1.4em; margin: 0 0 var(--s-4); }
li { margin-bottom: var(--s-2); }

/* Crate-plank divider — an optional flourish */
.plank-divider {
  height: 6px;
  background:
    repeating-linear-gradient(90deg,
      var(--pine-300) 0 32px,
      var(--pine-400) 32px 34px,
      var(--pine-300) 34px 66px,
      var(--pine-500) 66px 68px);
  border-top: 1px solid var(--pine-500);
  border-bottom: 1px solid var(--pine-500);
}
