/* ============================================================
   H-Lab Informatikai Kft. — Base Design System
   Global tokens, reset, layout, typography, buttons, animations
   ============================================================ */

/* ---------- FONTS ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/inter-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-500.woff2') format('woff2');
}

/* ---------- TOKENS ---------- */
:root {
  /* Base surfaces — true dark, not pure black */
  --clr-bg:            #080810;
  --clr-surface:       #0e0e18;
  --clr-surface-2:     #14141f;
  --clr-surface-3:     #1a1a28;

  /* Borders */
  --clr-border:        rgba(255,255,255,0.07);
  --clr-border-hover:  rgba(255,255,255,0.14);
  --clr-border-accent: rgba(99,102,241,0.3);

  /* Single accent: indigo-blue — less "generic blue AI", more premium */
  --clr-accent:        #6366f1;
  --clr-accent-light:  #818cf8;
  --clr-accent-dim:    rgba(99,102,241,0.1);
  --clr-accent-glow:   rgba(99,102,241,0.35);
  --clr-accent-hover:  #4f46e5;

  /* Secondary: a warm teal that complements indigo */
  --clr-teal:          #2dd4bf;
  --clr-teal-dim:      rgba(45,212,191,0.1);

  /* Text */
  --clr-text-1:        #f1f0ff;
  --clr-text-2:        #a5a3c2;
  --clr-text-3:        #6b6994;

  /* Typography */
  --font-sans:         'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --font-display:      'Outfit', 'Space Grotesk', system-ui, sans-serif;

  /* Radii */
  --radius-sm:         6px;
  --radius-md:         12px;
  --radius-lg:         18px;
  --radius-xl:         26px;
  --radius-2xl:        36px;

  /* Shadows — tinted to match the deep indigo background */
  --shadow-card:       0 2px 4px rgba(4,4,12,0.5), 0 8px 32px rgba(4,4,12,0.4);
  --shadow-glow:       0 0 48px rgba(99,102,241,0.18);
  --shadow-glow-teal:  0 0 40px rgba(45,212,191,0.15);

  /* Easings */
  --ease-out-expo:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quad:  cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index scale */
  --z-base:    1;
  --z-raised:  10;
  --z-overlay: 50;
  --z-nav:     100;
  --z-modal:   200;

  /* RGB channels — used in rgba(var(--clr-X-rgb), alpha) in module CSS */
  --clr-accent-rgb:   99, 102, 241;
  --clr-teal-rgb:     45, 212, 191;
  --clr-bg-rgb:       8, 8, 16;
  --clr-surface-rgb:  14, 14, 24;

  /* Overlay tint — rgba(var(--clr-overlay-rgb), x): white on dark themes, black on light */
  --clr-overlay-rgb:  255, 255, 255;

  /* Text on solid accent-color backgrounds (buttons, badges) */
  --clr-on-accent:    #ffffff;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text-1);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* Grain overlay — subtle noise texture on top of everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: var(--z-modal);
  opacity: 0.45;
  mix-blend-mode: overlay;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container { padding: 0 48px; }
}

/* ---------- ACCESSIBILITY ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--clr-accent);
  color: var(--clr-on-accent);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  z-index: calc(var(--z-modal) + 1);
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

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

/* ---------- TYPOGRAPHY TOKENS ---------- */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-accent-light);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--clr-text-1);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-sub {
  font-size: 17px;
  color: var(--clr-text-2);
  max-width: 560px;
  margin-top: 18px;
  line-height: 1.7;
  font-weight: 400;
  text-wrap: pretty;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.22s var(--ease-out-expo);
  white-space: nowrap;
  position: relative;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--clr-accent-light);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--clr-accent);
  color: var(--clr-on-accent);
  box-shadow: 0 0 0 1px rgba(var(--clr-accent-rgb),0.4), 0 4px 20px rgba(var(--clr-accent-rgb),0.28);
}
.btn--primary:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(var(--clr-accent-rgb),0.5), 0 8px 28px rgba(var(--clr-accent-rgb),0.4);
}
.btn--primary:active {
  transform: translateY(0) scale(0.98);
}

.btn--ghost {
  background: transparent;
  color: var(--clr-text-2);
  border: 1px solid var(--clr-border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  border-color: var(--clr-border-hover);
  color: var(--clr-text-1);
  background: rgba(var(--clr-overlay-rgb),0.04);
  transform: translateY(-2px);
}
.btn--ghost:active {
  transform: translateY(0) scale(0.98);
}

.btn--full { width: 100%; justify-content: center; }

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out-expo), transform 0.75s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- LANG SWITCHER ---------- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 8px;
}

.lang-sep {
  width: 1px;
  height: 13px;
  background: var(--clr-border);
  margin: 0 2px;
}

.lang-btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 100px;
  color: var(--clr-text-3);
  transition: color 0.15s, background 0.15s;
}

.lang-btn:focus-visible {
  outline: 2px solid var(--clr-accent-light);
  outline-offset: 2px;
}

.lang-btn--active {
  background: rgba(var(--clr-accent-rgb),0.14);
  color: var(--clr-accent-light);
  border: 1px solid rgba(var(--clr-accent-rgb),0.25);
}

.lang-btn:hover:not(.lang-btn--active) {
  color: var(--clr-text-2);
  background: rgba(var(--clr-overlay-rgb),0.05);
}

.mobile-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px 4px;
  border-top: 1px solid var(--clr-border);
  margin-top: 8px;
}

/* ---------- LEGAL PAGES ---------- */
.legal-page {
  padding: 120px 0 80px;
  min-height: 100vh;
}

.legal-page__header { margin-bottom: 48px; }

.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--clr-text-2);
  font-weight: 500;
  margin-bottom: 32px;
  transition: all 0.2s ease;
}

.legal-page__back:hover {
  color: var(--clr-text-1);
  border-color: var(--clr-border-hover);
  transform: translateX(-3px);
}

.legal-page__back svg { width: 16px; height: 16px; flex-shrink: 0; }

.legal-page__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--clr-text-1);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.legal-page__updated {
  font-size: 14px;
  color: var(--clr-text-3);
  font-style: italic;
}

.legal-page__content { max-width: 800px; }

.legal-section { margin-bottom: 48px; }

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--clr-text-1);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.legal-section h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--clr-text-1);
  margin-bottom: 12px;
  margin-top: 24px;
}

.legal-section p {
  font-size: 15px;
  color: var(--clr-text-2);
  line-height: 1.72;
  margin-bottom: 16px;
}

.legal-section ul, .legal-section ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-section li {
  font-size: 15px;
  color: var(--clr-text-2);
  line-height: 1.7;
  margin-bottom: 8px;
  list-style: disc;
}

.legal-section ol li { list-style: decimal; }

.legal-info-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.legal-info-box dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }

.legal-info-box dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 1px;
}

.legal-info-box dd {
  font-size: 15px;
  color: var(--clr-text-1);
}
