/* ==========================================================================
   Technofrigo by Clauger — Design tokens
   Source: Brandbook ENG V 1.0 (April 2026)
   ========================================================================== */

/* ── Webfonts ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Black.ttf") format("truetype");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  /* ── Brand color palette (from brandbook §III) ─────────────────────── */
  --tf-cream:        #fffae2;  /* soft warm white, hero/light backgrounds */
  --tf-off-white:    #fcfdfa;  /* near-white surface, body backgrounds   */
  --tf-pale-green:   #c8e2c2;  /* subtle accents, hover surfaces         */
  --tf-sage:         #9bcc9e;  /* SIGNATURE accent — buttons, hi-lights  */
  --tf-forest:       #3f5443;  /* secondary dark, structure              */
  --tf-darkgreen:    #0e1410;  /* primary dark, near-black with green DNA*/

  /* Tinted overlays used in patterns (brandbook §V.c) */
  --tf-darkgreen-50: rgba(14, 20, 16, 0.50);
  --tf-sage-25:      rgba(155, 204, 158, 0.25);
  --tf-forest-25:    rgba(63, 84, 67, 0.25);

  /* ── Semantic surface + text tokens ────────────────────────────────── */
  --bg:              var(--tf-off-white);
  --bg-soft:         var(--tf-cream);
  --bg-inverse:      var(--tf-darkgreen);
  --bg-inverse-soft: var(--tf-forest);

  --surface:         #ffffff;
  --surface-muted:   #f4f6f1;          /* tinted off-white */
  --surface-inverse: var(--tf-forest);

  --border:          #e1e6dd;
  --border-strong:   #cdd5c6;
  --border-inverse:  rgba(255,255,255,0.12);

  --fg:              var(--tf-darkgreen);   /* primary text on light  */
  --fg-2:            #2c3a2f;                /* secondary text          */
  --fg-3:            #5e6e60;                /* tertiary, captions      */
  --fg-mute:         #8a978c;                /* muted/placeholder       */
  --fg-inverse:      var(--tf-off-white);    /* primary text on dark   */
  --fg-inverse-2:    #c8d2c9;
  --fg-inverse-3:    #8d9b8f;

  --accent:          var(--tf-sage);         /* primary brand accent   */
  --accent-strong:   var(--tf-forest);
  --accent-soft:     var(--tf-pale-green);
  --on-accent:       var(--tf-darkgreen);    /* text ON sage           */

  --link:            var(--tf-forest);
  --link-hover:      var(--tf-darkgreen);
  --focus-ring:      var(--tf-sage);

  /* States — apply by darkening or lightening, never by hue shift */
  --state-hover-overlay:  rgba(14, 20, 16, 0.06);
  --state-press-overlay:  rgba(14, 20, 16, 0.12);
  --state-hover-on-dark:  rgba(255, 255, 255, 0.08);
  --state-press-on-dark:  rgba(255, 255, 255, 0.16);

  /* ── Type families ─────────────────────────────────────────────────── */
  --font-display: "DM Sans", "Arial", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "Arial", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* ── Type scale ────────────────────────────────────────────────────── */
  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 15px;   /* brandbook body 15pt */
  --text-md:   17px;
  --text-lg:   22.5px; /* brandbook H2 22.5pt */
  --text-xl:   32px;
  --text-2xl:  48px;
  --text-3xl:  72px;
  --text-4xl:  96px;

  --leading-tight: 1.1;
  --leading-snug:  1.25;
  --leading-body:  1.55;
  --leading-loose: 1.7;

  --tracking-tight: -0.02em;   /* brandbook calls for 0 to -40pts on big */
  --tracking-flat:  0;
  --tracking-wide:  0.06em;
  --tracking-caps:  0.12em;

  /* ── Spacing scale (4px base) ─────────────────────────────────────── */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  56px;
  --space-10: 80px;
  --space-11: 120px;

  /* ── Radii — restrained; brand reads precise & technical ─────────── */
  --radius-xs:    4px;
  --radius-sm:    6px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    20px;
  --radius-pill:  999px;

  /* ── Shadows — soft, cool, never colorful ─────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(14,20,16,0.06);
  --shadow-sm: 0 2px 6px rgba(14,20,16,0.08);
  --shadow-md: 0 6px 18px rgba(14,20,16,0.10);
  --shadow-lg: 0 16px 40px rgba(14,20,16,0.16);
  --shadow-xl: 0 28px 64px rgba(14,20,16,0.22);

  /* ── Motion ───────────────────────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);
  --dur-fast:    140ms;
  --dur-base:    220ms;
  --dur-slow:    420ms;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); letter-spacing: -0.03em; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--text-lg); letter-spacing: 0;  line-height: var(--leading-snug); }
h5 { font-size: var(--text-md); letter-spacing: 0; }
h6 {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 700;
}

p, li {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--fg-2);
  text-wrap: pretty;
}

small { font-size: var(--text-xs); color: var(--fg-3); }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent);
  text-underline-offset: 2px;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.1em 0.35em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-7) 0;
}

::selection { background: var(--tf-sage); color: var(--tf-darkgreen); }

/* ── Eyebrow / overline label — common throughout brand ──────────── */
.eyebrow,
.tf-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ── Display utilities — the giant DM Sans Bold marquee ─────────── */
.tf-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
