/* =============================================================
   INVERSA — Design Tokens
   Extracted verbatim from inversa.com (Nuxt 3 SPA snapshot).
   Source of truth: index.html `:root`, line 104.

   FONT SCALE NOTE: Inversa uses a *fluid* font scale where
   `1rem` is NOT 16px. It is `calc((100vw / --size) * 10)`,
   with --size = 1600 on desktop (601px+) and 375 on mobile.
   This means typography scales linearly with viewport width.
   Set `--font-s` on :root then use rem normally inside the
   stylesheet, OR override --inv-rem to a static value.
   ============================================================= */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Light.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "NB International Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/NBInternationalPro-Regular.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  /* ---- Color (verbatim from inversa.com `:root`) ---- */
  --color-white:   #ffffff;
  --color-creme:   #f4f3e8;  /* primary text on dark; surface for [data-light] */
  --color-grey:    #595a51;  /* loader borders, reserves */
  --color-grey-2:  #404040;  /* container borders, footer dividers */
  --color-black:   #13140e;  /* page background, text on light */
  --color-black-2: #181813;
  --color-black-3: #171717;
  --color-black-4: #181815;
  --color-yellow:  #ebfc72;  /* PRIMARY ACCENT — logo, CTAs, links */
  --color-yellow-2:#bacd31;  /* secondary accent, gradient terminal */
  --color-red:     #f1664d;  /* hotspots, alerts (reserve) */
  --color-green:   #00d399;  /* (reserve, not observed in home) */
  --color-purple:  #c084fc;  /* (reserve, not observed in home) */

  /* ---- Semantic surfaces ---- */
  --bg-page:        var(--color-black);
  --bg-elevated:    var(--color-black-2);
  --bg-light:       var(--color-creme);   /* `<section data-light>` */
  --fg-on-dark:     var(--color-creme);
  --fg-on-light:    var(--color-black);
  --fg-muted:       color-mix(in srgb, var(--color-creme) 50%, transparent);
  --fg-faint:       color-mix(in srgb, var(--color-creme) 30%, transparent);
  --border-soft:    color-mix(in srgb, var(--color-creme) 20%, transparent);
  --border-faint:   color-mix(in srgb, currentcolor 10%, transparent);
  --accent:         var(--color-yellow);
  --accent-fg:      var(--color-black);
  --alert:          var(--color-red);

  /* ---- Easings ---- */
  --ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);
  --ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);
  --ease-in-out-quad:  cubic-bezier(.455, .03, .515, .955);
  --ease-out-quart:    cubic-bezier(.165, .84, .44, 1);
  --ease-out-cubic:    cubic-bezier(.215, .61, .355, 1);
  --ease-out-quad:     cubic-bezier(.25, .46, .45, .94);
  --ease-none:         cubic-bezier(.25, .25, .75, .75);

  /* ---- Typography ---- */
  --font-f-primary:   "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, monospace;
  --font-f-secondary: "NB International Pro", "Helvetica Neue", Inter, sans-serif;

  /* Fluid scale (Inversa-native). Use `rem` as proportional unit. */
  --size: 1600;
  --font-s: calc((100vw / var(--size)) * 10);

  /* ---- Spacing (rem in the fluid system) ---- */
  --space-0:   0;
  --space-1:   0.4rem;   /* 4   */
  --space-2:   0.8rem;   /* 8   */
  --space-3:   1.2rem;   /* 12  — mobile gutters */
  --space-4:   1.6rem;   /* 16  — desktop gutters */
  --space-5:   2.0rem;   /* 20  */
  --space-6:   2.4rem;   /* 24  */
  --space-8:   3.2rem;
  --space-10:  4.0rem;
  --space-15:  6.0rem;
  --space-20:  8.0rem;
  --space-32: 12.8rem;

  /* ---- Radii ---- */
  --radius-1:   0.2rem;  /* labels (tags) */
  --radius-2:   0.4rem;  /* base-button */
  --radius-pill: 9999px;
  /* Note: most cards/containers use 1px border + dotted gradient,
     not radius. Sharp corners are part of the visual language. */

  /* ---- Borders ---- */
  --hairline: 1px solid var(--color-grey-2);
  --hairline-soft: 1px solid var(--border-soft);

  /* ---- Motion durations ---- */
  --t-fast:    .2s;
  --t-base:   .25s;
  --t-slow:    .5s;
  --t-long:   1s;

  /* ---- Z-index ladder ---- */
  --z-content: 1;
  --z-overlay: 2;
  --z-cursor:  99;
}

@media (max-width: 600px) {
  :root { --size: 375; }
}
@media (min-width: 601px) {
  :root { --size: 1600; }
}

/* =============================================================
   Base resets aligned with inversa.com
   ============================================================= */

html {
  font-size: var(--font-s);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-page);
  color: var(--fg-on-dark);
  font-family: var(--font-f-primary);
  font-size: 1.6rem;
  margin: 0;
  text-wrap: balance;
}

/* =============================================================
   Semantic typography classes — use these in your markup.
   ============================================================= */

/* Display heading (hero) — sans, tight tracking, near-1 line height */
.inv-display {
  font-family: var(--font-f-secondary);
  font-size: 8rem;            /* 4.6rem on mobile */
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.9;
  margin: 0 0 1.6rem 0;
  text-wrap: auto;
}
@media (max-width: 600px) {
  .inv-display {
    font-size: 4.6rem;
    letter-spacing: -0.0217391304em;
    line-height: 1;
    margin-bottom: 1.2rem;
  }
}

/* Section heading — sans, slightly less aggressive */
.inv-h1 {
  font-family: var(--font-f-secondary);
  font-size: 6.4rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
  text-wrap: auto;
}
@media (max-width: 600px) {
  .inv-h1 { font-size: 4rem; letter-spacing: -0.02em; line-height: 1.05; }
}

/* Eyebrow / kicker — mono, uppercase, with optional blinker dot */
.inv-eyebrow {
  align-items: center;
  color: var(--color-yellow);
  display: flex;
  font-family: var(--font-f-primary);
  font-size: 2rem;            /* 1.6rem on mobile */
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 2rem 0;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .inv-eyebrow { font-size: 1.6rem; }
}
.inv-eyebrow.is-blinker::before {
  animation: flash 1s step-start 0s infinite;
  background: currentcolor;
  content: "";
  display: block;
  height: 0.4rem;
  margin-right: 1.2rem;
  width: 0.4rem;
}

/* Body copy — sans */
.inv-text {
  font-family: var(--font-f-secondary);
  font-kerning: none;
  font-size: 2rem;            /* 1.6rem on mobile */
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
  text-wrap: auto;
}
@media (max-width: 600px) {
  .inv-text { font-size: 1.6rem; line-height: 1.62; }
}

/* Mono label — UI chrome, numbers, badges */
.inv-label {
  font-family: var(--font-f-primary);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Footer-style link */
.inv-link {
  font-family: var(--font-f-secondary);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.62;
  position: relative;
}
.inv-link::after {
  content: "";
  background: currentcolor;
  height: 1px;
  inset: auto auto 0 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .3s ease-out;
  width: 100%;
}
.inv-link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* =============================================================
   Keyframes (verbatim from inversa.com)
   ============================================================= */
@keyframes blink   { 0% { opacity: .2 } 50% { opacity: 1 } to { opacity: .2 } }
@keyframes flash   { 0% { opacity: 0 }  50% { opacity: 1 } to { opacity: 0 }  }
@keyframes flicker { 0%{opacity:0} 80%{opacity:1} 82%{opacity:0}
                     84%{opacity:1} 86%{opacity:0} 88%{opacity:1} }
@keyframes spin    { to { transform: rotate(1turn); } }
