/* ==========================================================================
   Instalon24 — tokeny i baza
   ========================================================================== */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.3vw, 3.25rem);
  --text-3xl: clamp(2.4rem, 1.2rem + 3.6vw, 4.25rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Content widths */
  --content-narrow: 660px;
  --content-default: 1020px;
  --content-wide: 1280px;

  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Light theme (default) ---------- */
:root,
[data-theme='light'] {
  --color-bg: #f4f7f9;
  --color-surface: #ffffff;
  --color-surface-2: #fafcfd;
  --color-surface-offset: #e9eef2;
  --color-surface-offset-2: #dee6ec;
  --color-divider: #dbe3e9;
  --color-border: #cfd9e1;

  --color-text: #0b1c30;
  --color-text-muted: #556575;
  --color-text-faint: #8593a1;
  --color-text-inverse: #f4f7f9;

  --color-primary: #0a7f85;
  --color-primary-hover: #086a70;
  --color-primary-soft: #e2f4f5;
  --color-brand: #02a6a8;
  --color-navy: #05254b;

  --color-ink: #05254b; /* granat z logo */
  --color-ink-2: #0a3160;
  --color-ink-text: #e2eaf3;
  --color-ink-muted: #9db0c6;
  --color-ink-border: #17416f;
  --color-ink-primary: #43cdce;

  --shadow-sm: 0 1px 2px rgba(18, 23, 27, 0.06);
  --shadow-md: 0 6px 18px rgba(18, 23, 27, 0.08);
  --shadow-lg: 0 18px 44px rgba(18, 23, 27, 0.12);
}

/* ---------- Dark theme ---------- */
[data-theme='dark'] {
  --color-bg: #0a1119;
  --color-surface: #101a26;
  --color-surface-2: #14202e;
  --color-surface-offset: #13202e;
  --color-surface-offset-2: #1a2938;
  --color-divider: #1d2b3a;
  --color-border: #27374a;

  --color-text: #dde6ef;
  --color-text-muted: #8ea0b3;
  --color-text-faint: #62748a;
  --color-text-inverse: #0a1119;

  --color-primary: #3ec9cc;
  --color-primary-hover: #5ad8da;
  --color-primary-soft: #102c2e;
  --color-brand: #3ec9cc;
  --color-navy: #05254b;

  --color-ink: #061a30;
  --color-ink-2: #0a2648;
  --color-ink-text: #dde6ef;
  --color-ink-muted: #8ea0b3;
  --color-ink-border: #12365e;
  --color-ink-primary: #43cdce;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a1119;
    --color-surface: #101a26;
    --color-surface-2: #14202e;
    --color-surface-offset: #13202e;
    --color-surface-offset-2: #1a2938;
    --color-divider: #1d2b3a;
    --color-border: #27374a;
    --color-text: #dde6ef;
    --color-text-muted: #8ea0b3;
    --color-text-faint: #62748a;
    --color-text-inverse: #0a1119;
    --color-primary: #3ec9cc;
    --color-primary-hover: #5ad8da;
    --color-primary-soft: #102c2e;
    --color-ink: #061a30;
    --color-ink-2: #0a2648;
    --color-ink-text: #dde6ef;
    --color-ink-muted: #8ea0b3;
    --color-ink-border: #12365e;
    --color-ink-primary: #43cdce;
  }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 200;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: top var(--transition);
}
.skip-link:focus {
  top: var(--space-4);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
