/* ============================================================
   SajtBox — design tokens & base styles
   ============================================================ */

:root {
  /* --- Brand core --- */
  --navy: #003456;
  --navy-deep: #001d30;
  --navy-soft: #0a4a70;
  --navy-mist: #0f5a84;
  --cyan: #5ce1e6;
  --cyan-soft: #a8f0f2;
  --cyan-deep: #2fb9c2;
  --white: #ffffff;
  --paper: #f4fbfc;

  /* --- Semantic surfaces --- */
  --bg-page: var(--navy-deep);
  --bg-alt: var(--navy);
  --bg-card: #ffffff;
  --bg-card-tint: #eef9fa;
  --ink: #04151f;
  --ink-soft: #4a6070;
  --ink-on-dark: #eaf7f8;
  --ink-on-dark-soft: #9dc4d2;

  /* --- Type --- */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* --- Shape --- */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* --- Motion --- */
  --ease: cubic-bezier(.22,.68,0,1);
  --speed: .5s;

  /* --- Layout --- */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink-on-dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--white);
  margin: 0 0 .5em;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: 62ch; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section {
  position: relative;
  padding: clamp(64px, 10vw, 128px) 0;
}

.section--navy { background: var(--navy-deep); }
.section--navy-mid { background: var(--navy); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--paper h2, .section--paper h3, .section--paper h4 { color: var(--ink); }
.section--paper p { color: var(--ink-soft); }

.eyebrow-word {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 14px;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-on-dark-soft);
}
.section--paper .lede { color: var(--ink-soft); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cyan);
  color: var(--navy-deep);
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* --- Site preloader (brief intro shown once per browser session) --- */
.site-preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse 90% 70% at 50% 30%, var(--navy-soft) 0%, var(--navy-deep) 65%);
  transition: opacity .45s ease, visibility .45s ease;
}
.site-preloader.is-hiding { opacity: 0; visibility: hidden; pointer-events: none; }

.site-preloader__mark { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.site-preloader__cube { width: 52px; height: 52px; animation: sp-pop .8s cubic-bezier(.22,.68,0,1) both; filter: drop-shadow(0 10px 24px rgba(92,225,230,.35)); }
.site-preloader__word {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff;
  letter-spacing: .01em; opacity: 0; animation: sp-fade .5s ease .35s forwards;
}
.site-preloader__bar { width: 132px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.site-preloader__bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan-deep), var(--cyan)); border-radius: 2px; animation: sp-fill 1.05s cubic-bezier(.4,0,.2,1) .05s forwards; }

@keyframes sp-pop {
  0% { transform: scale(.55) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes sp-fade { to { opacity: 1; } }
@keyframes sp-fill { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .site-preloader__cube, .site-preloader__word, .site-preloader__bar-fill { animation: none !important; opacity: 1 !important; width: 100% !important; }
}
