/* Opervium — Design Tokens
   Swiss minimalism, forest/teal palette, refined type
*/

:root {
  /* === Color === */
  --bg: #FAFAF7;            /* warm off-white */
  --bg-elev: #F2F1EA;       /* card / inset */
  --bg-deep: #0E1A17;       /* near-black, teal undertone */
  --bg-deep-2: #14241F;

  --fg: #0E1A17;
  --fg-muted: #5C6B66;
  --fg-subtle: #8A968F;
  --fg-inverse: #F4F2EA;

  --accent: #0F4F46;        /* deep forest teal */
  --accent-2: #1A6E63;      /* lighter teal, hover */
  --accent-deep: #093530;
  --accent-tint: #E4ECEA;   /* subtle bg tint */

  --warm: #C9612C;          /* sparing warm secondary */
  --warm-tint: #F4E6DB;

  --line: #E3E1D9;          /* hairline */
  --line-strong: #C9C6BA;
  --line-dark: #243832;     /* on dark sections */

  --ok: #2E7D5A;
  --warn: #B7791F;

  /* === Type === */
  --font-sans: "Inter", "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", "Cormorant Garamond", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* === Scale === */
  --step--2: 0.75rem;    /* 12px — eyebrow/mono */
  --step--1: 0.8125rem;  /* 13px — small */
  --step-0:  0.9375rem;  /* 15px — body */
  --step-1:  1.0625rem;  /* 17px — body-lg */
  --step-2:  1.375rem;   /* 22px — h4 */
  --step-3:  1.75rem;    /* 28px — h3 */
  --step-4:  2.5rem;     /* 40px — h2 */
  --step-5:  3.75rem;    /* 60px — display sm */
  --step-6:  5.25rem;    /* 84px — display */
  --step-7:  7rem;       /* 112px — hero display */

  /* === Layout === */
  --container: 1280px;
  --container-sm: 960px;
  --gutter: 32px;
  --gutter-lg: 64px;

  /* === Radii (sparingly) === */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  /* === Motion === */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark theme variant — applied only to specific dark sections */
.theme-dark {
  --bg: #0E1A17;
  --bg-elev: #14241F;
  --fg: #F4F2EA;
  --fg-muted: #9DAAA4;
  --fg-subtle: #6B7A74;
  --line: #243832;
  --line-strong: #2F4942;
  --accent-tint: #122A26;
}

/* === Reset (selective) === */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* === Utilities === */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.015em; }
.mono  { font-family: var(--font-mono); }

.h-display {
  font-family: var(--font-sans);
  font-size: clamp(2.75rem, 6vw, var(--step-6));
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
}
.h-display .serif-it {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.h-1 { font-size: clamp(2rem, 4vw, var(--step-4)); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; margin: 0; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--fg-muted); max-width: 60ch; }
.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 200ms var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--fg-inverse);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--fg); background: var(--bg-elev); }
.btn .arr { transition: transform 200ms var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* Hairline rules / dividers */
.rule { border-top: 1px solid var(--line); }

/* Sections */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
section.airy { padding: 144px 0; }
@media (max-width: 720px) {
  section { padding: 64px 0; }
  section.airy { padding: 88px 0; }
}

/* Tag chips (categorical) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: transparent;
}
.tag-solid { background: var(--accent); color: var(--fg-inverse); border-color: var(--accent); }

/* Focus visibility — global keyboard focus ring on the accent colour */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: none;} }
.fade-up { animation: fadeUp 700ms var(--ease-out) both; }

/* Reduced motion: disable decorative pulse/fade/transition animation */
@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;
  }
}

/* Scrollbar (minimal, light) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* Number tabular */
.tnum { font-variant-numeric: tabular-nums; }

/* Bilingual toggle */
html:not([lang="pl"]) [data-i18n="pl"] { display: none; }
html[lang="pl"] [data-i18n="en"] { display: none; }
