/* ============================================================
   KLIRR TECH — Nordic fintech design system
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Base palette */
  --navy-900: #070B16;
  --navy-850: #0A1020;
  --navy-800: #0D1426;
  --navy-700: #121B33;
  --navy-600: #1A2542;
  --line-dark: rgba(255, 255, 255, 0.08);
  --line-dark-strong: rgba(255, 255, 255, 0.14);

  /* Light surfaces */
  --paper: #F6F8FC;
  --paper-2: #EEF2F9;
  --white: #FFFFFF;
  --line: #E2E8F2;
  --line-strong: #CBD5E6;

  /* Accents */
  --blue: #3B82F6;
  --blue-bright: #4F9DFF;
  --cyan: #22D3EE;
  --violet: #8B5CF6;
  --mint: #34E0A1;

  /* Text */
  --ink-900: #0B1220;
  --ink-700: #33405A;
  --ink-500: #5A6a86;
  --ink-300: #8A97AE;

  /* On-dark text */
  --dm-100: #EAF0FB;
  --dm-300: #AEBBD4;
  --dm-500: #7C8AA6;

  /* Effects */
  --grad-brand: linear-gradient(120deg, var(--blue) 0%, var(--cyan) 55%, var(--mint) 100%);
  --grad-brand-soft: linear-gradient(120deg, #3B82F6 0%, #22D3EE 100%);
  --grad-violet: linear-gradient(130deg, var(--violet), var(--blue));
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-md: 0 8px 30px rgba(16, 27, 51, 0.08), 0 2px 8px rgba(16, 27, 51, 0.05);
  --shadow-lg: 0 24px 60px rgba(16, 27, 51, 0.14), 0 6px 18px rgba(16, 27, 51, 0.08);
  --shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 20px 50px rgba(34, 211, 238, 0.14);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);

  --font: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  width: 100%; max-width: 100%; overflow-x: hidden;
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  overscroll-behavior-x: none;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  width: 100%; max-width: 100%;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); min-width: 0; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue);
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad-brand-soft);
}
.eyebrow.on-dark { color: var(--cyan); }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 68px); }
h2 { font-size: clamp(30px, 3.8vw, 48px); }
h3 { font-size: clamp(19px, 2vw, 22px); letter-spacing: -0.02em; }
p { text-wrap: pretty; }

.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-700); line-height: 1.7; }

.grad-text {
  background: var(--grad-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--ink-900); color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-accent {
  background: var(--grad-brand-soft); color: #fff;
  box-shadow: 0 8px 24px rgba(34, 130, 246, 0.28);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(34, 130, 246, 0.38); }
.btn-ghost {
  background: var(--white); color: var(--ink-900); border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-ghost.on-dark {
  background: rgba(255,255,255,0.04); color: var(--dm-100); border-color: var(--line-dark-strong);
}
.btn-ghost.on-dark:hover { background: rgba(255,255,255,0.09); border-color: var(--cyan); color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  width: 100%; max-width: 100%; overflow-x: hidden;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(246, 248, 252, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(16, 27, 51, 0.05);
}
.nav {
  width: 100%; max-width: var(--maxw); min-width: 0; margin: 0 auto; padding: 0 var(--pad);
  height: 74px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-name {
  font-weight: 800; font-size: 17px; letter-spacing: 0.02em; color: var(--ink-900);
}
.brand-name span { font-weight: 500; color: var(--ink-500); }

.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 15px; font-weight: 600; color: var(--ink-700);
  padding: 9px 15px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--ink-900); background: rgba(16,27,51,0.05); }
.nav-link.active { color: var(--blue); background: rgba(59,130,246,0.10); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

/* Language dropdown */
.lang-menu { position: relative; }
.lang-current {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(16,27,51,0.05); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 10px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.lang-current:hover { border-color: var(--blue); }
.lang-current .chev { width: 12px; height: 12px; color: var(--ink-500); transition: transform 0.25s var(--ease); }
.lang-menu.open .lang-current .chev { transform: rotate(180deg); }
.lang-menu .flag-svg { width: 22px; height: 16px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.lang-menu[data-current="no"] .lang-current .flag-en { display: none; }
.lang-menu[data-current="en"] .lang-current .flag-no { display: none; }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 148px; padding: 6px; border-radius: 14px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  display: none; flex-direction: column; gap: 2px;
}
.lang-menu.open .lang-list { display: flex; animation: fadeUp 0.22s var(--ease); }
.lang-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font-size: 13.5px; font-weight: 600; color: var(--ink-700); text-align: left;
  padding: 8px 10px; border-radius: 9px; border: none; background: transparent;
  transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { background: rgba(59,130,246,0.08); color: var(--ink-900); }
.lang-btn.active { color: var(--ink-900); background: rgba(59,130,246,0.10); font-weight: 700; }
.lang-btn .check { width: 14px; height: 14px; margin-left: auto; color: var(--blue); opacity: 0; }
.lang-btn.active .check { opacity: 1; }

/* Hamburger */
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--ink-900); transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; padding-top: 150px; padding-bottom: clamp(60px, 8vw, 110px);
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(34, 211, 238, 0.10), transparent 55%),
    radial-gradient(900px 560px at 12% 8%, rgba(139, 92, 246, 0.08), transparent 55%),
    var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { margin: 20px 0 22px; }
.hero-lead { max-width: 520px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.trust {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm); max-width: 500px;
}
.trust-badge {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  background: var(--grad-brand-soft); display: flex; align-items: center; justify-content: center;
}
.trust-badge svg { width: 22px; height: 22px; }
.trust p { font-size: 13.5px; color: var(--ink-700); line-height: 1.5; }
.trust strong { color: var(--ink-900); }

.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }

/* Floating particles */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.particles span {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); opacity: 0.5; animation: float 9s ease-in-out infinite;
}

/* ============================================================
   TAM SECTION
   ============================================================ */
.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 60px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin: 16px 0 16px; }

.card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.feature-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--grad-brand); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card:hover::after { transform: scaleX(1); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(34,211,238,0.12));
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { font-size: 14.5px; color: var(--ink-500); line-height: 1.6; }

.section-cta { margin-top: 48px; display: flex; justify-content: center; }

/* ============================================================
   WHY SECTION (dark)
   ============================================================ */
.why {
  background: var(--navy-850); color: var(--dm-100); position: relative; overflow: hidden;
}
.why::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 85% 15%, rgba(59,130,246,0.16), transparent 60%),
    radial-gradient(700px 460px at 10% 90%, rgba(139,92,246,0.14), transparent 60%);
  pointer-events: none;
}
.why-lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; pointer-events: none; }
.why .wrap { position: relative; z-index: 1; }
.why h2 { color: #fff; }
.why .section-head p { color: var(--dm-300); }
.why-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  padding: 32px 28px; border-radius: var(--r-lg);
  background: rgba(255,255,255,0.035); border: 1px solid var(--line-dark);
  backdrop-filter: blur(6px);
  transition: transform 0.35s var(--ease), background 0.35s, border-color 0.35s;
}
.why-card:hover { transform: translateY(-6px); background: rgba(255,255,255,0.06); border-color: var(--line-dark-strong); }
.why-num {
  font-size: 15px; font-weight: 800; letter-spacing: 0.05em;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 16px;
}
.why-card h3 { color: #fff; margin-bottom: 10px; }
.why-card p { font-size: 14.5px; color: var(--dm-300); line-height: 1.65; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--paper-2); }
.contact-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
.contact-info h2 { margin: 16px 0 18px; }
.contact-info .lead { margin-bottom: 32px; max-width: 460px; }
.contact-details { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.contact-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact-item .ci-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(52,224,161,0.12));
  color: var(--blue); display: flex; align-items: center; justify-content: center;
}
.contact-item .ci-icon svg { width: 19px; height: 19px; }
.contact-item .ci-label { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.contact-item .ci-value { font-size: 15px; color: var(--ink-900); font-weight: 700; }

/* Form */
.contact-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 40px); box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-700); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink-900);
  padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); background: var(--white);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}
.field textarea { resize: vertical; min-height: 118px; }
.field.error input, .field.error textarea { border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229,72,77,0.1); }
.field-error {
  font-size: 12.5px; color: #D93036; margin-top: 6px; font-weight: 600;
  display: none;
}
.field.error .field-error { display: block; }
.form-submit { width: 100%; margin-top: 6px; }

.form-success {
  display: none; text-align: center; padding: 40px 20px;
}
.form-success.show { display: block; animation: fadeUp 0.5s var(--ease); }
.form-success .check {
  width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--grad-brand-soft); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(34,211,238,0.35);
}
.form-success .check svg { width: 30px; height: 30px; color: #fff; }
.form-success h3 { margin-bottom: 10px; }
.form-success p { color: var(--ink-500); font-size: 15px; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  position: relative; padding-top: 160px; padding-bottom: clamp(70px, 9vw, 120px);
  background: var(--navy-850); color: var(--dm-100); overflow: hidden;
}
.about-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.about-hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(900px 560px at 70% 20%, rgba(34,211,238,0.14), transparent 60%),
              radial-gradient(760px 520px at 15% 90%, rgba(139,92,246,0.14), transparent 60%);
  pointer-events: none;
}
.about-hero .wrap { position: relative; z-index: 2; max-width: 820px; }
.about-hero h1 { color: #fff; margin: 20px 0 22px; }
.about-hero .lead { color: var(--dm-300); max-width: 620px; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.story-copy p { margin-bottom: 18px; color: var(--ink-700); font-size: 16px; line-height: 1.75; }
.story-copy p:last-child { margin-bottom: 0; }
.story-visual svg { width: 100%; height: auto; overflow: visible; }

/* Beliefs */
.beliefs { background: var(--paper-2); }
.beliefs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.belief-card {
  display: flex; gap: 18px; padding: 28px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.belief-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.belief-icon {
  width: 50px; height: 50px; flex-shrink: 0; border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(34,211,238,0.12));
  color: var(--blue); display: flex; align-items: center; justify-content: center;
}
.belief-icon svg { width: 25px; height: 25px; }
.belief-card h3 { margin-bottom: 8px; }
.belief-card p { font-size: 14.5px; color: var(--ink-500); line-height: 1.6; }

/* Expertise */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.exp-item {
  padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--white); box-shadow: var(--shadow-sm); position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.exp-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue); }
.exp-item .exp-idx {
  font-size: 13px; font-weight: 800; color: var(--blue); letter-spacing: 0.05em; margin-bottom: 12px;
  display: block;
}
.exp-item h3 { font-size: 17px; }

.quote-band {
  margin-top: 56px; padding: clamp(36px, 5vw, 56px); border-radius: var(--r-xl);
  background: var(--navy-850); color: #fff; position: relative; overflow: hidden;
  text-align: center;
}
.quote-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(34,211,238,0.18), transparent 60%);
}
.quote-band .qmark {
  font-size: 60px; line-height: 0.5; font-weight: 800; margin-bottom: 20px;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative;
}
.quote-band blockquote {
  position: relative; font-size: clamp(22px, 2.8vw, 32px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.3; max-width: 820px; margin: 0 auto; text-wrap: balance;
}

/* Final CTA */
.final-cta { background: var(--paper); text-align: center; }
.final-cta .cta-inner {
  background: var(--grad-violet); border-radius: var(--r-xl); padding: clamp(44px, 6vw, 76px) var(--pad);
  color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.final-cta .cta-inner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(500px 300px at 80% 10%, rgba(52,224,161,0.35), transparent 60%);
}
.final-cta .cta-inner > * { position: relative; }
.final-cta h2 { color: #fff; margin-bottom: 16px; }
.final-cta p { color: rgba(255,255,255,0.85); font-size: 18px; max-width: 560px; margin: 0 auto 32px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--navy-900); color: var(--dm-300); padding: 64px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line-dark); }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name span { color: var(--dm-500); }
.footer-tag { font-size: 15px; color: var(--dm-300); max-width: 320px; line-height: 1.6; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dm-500); margin-bottom: 18px; font-weight: 700; }
.footer-col a { display: block; font-size: 15px; color: var(--dm-100); padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 13.5px; color: var(--dm-500); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-22px) translateX(10px); }
}
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes pulseNode { 0%,100% { opacity: 0.4; r: 4; } 50% { opacity: 1; } }
@keyframes flowDot { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* Animated SVG paths */
.draw-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: dash 2.6s var(--ease) forwards; }
.node-pulse { animation: pulseNode 3.2s ease-in-out infinite; }
.float-slow { animation: drift 6s ease-in-out infinite; }
.hub-ring { transform-origin: center; animation: spinSlow 26s linear infinite; }
.flow-dot { animation: flowDot 4s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .draw-path { animation: none; stroke-dashoffset: 0; }
  .node-pulse, .float-slow, .hub-ring, .flow-dot, .particles span { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .exp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .nav-menu, .nav-actions .btn { display: none; }
  .nav-actions > .theme-toggle, .nav-actions > .lang-menu { display: none; }
  .nav-toggle { display: flex; }
  .nav-actions { gap: 10px; }

  .mobile-menu {
    position: fixed; inset: 74px 0 auto 0; z-index: 99;
    background: rgba(246,248,252,0.98); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    width: 100%; max-width: 100%; max-height: calc(100dvh - 74px); overflow-x: hidden; overflow-y: auto;
    padding: 20px var(--pad) 28px; display: none; flex-direction: column; gap: 6px;
  }
  .mobile-menu.open { display: flex; animation: fadeUp 0.3s var(--ease); }
  .mobile-menu a { font-size: 17px; font-weight: 700; color: var(--ink-900); padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 14px; width: 100%; }
  .mobile-menu .mobile-menu-preferences {
    display: flex; align-items: center; justify-content: flex-end; gap: 12px;
    padding: 14px 4px 8px; border-top: 1px solid var(--line);
  }
  .mobile-menu-preferences-label { margin-right: auto; font-size: 14px; font-weight: 700; color: var(--ink-700); }
  .mobile-menu-preferences .lang-list { top: auto; bottom: calc(100% + 8px); }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; margin: 0 auto; }
  .why-cols { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .story-visual { max-width: 460px; margin: 0 auto; }
  .beliefs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .brand { min-width: 0; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-grid { grid-template-columns: 1fr; }
  .exp-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .field input, .field textarea { font-size: 16px; }
}

.mobile-menu, .mobile-menu-preferences { display: none; }

/* ============================================================
   THEME · DARK MODE
   Overriding the raw palette flips the whole site. Spots that
   must stay white-on-dark were pinned to #fff earlier.
   ============================================================ */
html { color-scheme: light; }
body,
.feature-card, .why-card, .belief-card, .exp-item, .contact-item,
.contact-form, .trust, .field input, .field textarea, .site-header,
.lang-current, .lang-list, .theme-toggle, .nav-toggle {
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease),
              color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

[data-theme="dark"] {
  color-scheme: dark;
  /* page + surfaces */
  --paper:      #0B111E;
  --paper-2:    #080D18;
  --white:      #141C2E;   /* card surface */
  --line:       rgba(255, 255, 255, 0.09);
  --line-strong:rgba(255, 255, 255, 0.17);
  /* text */
  --ink-900:    #EDF2FB;
  --ink-700:    #B7C3D9;
  --ink-500:    #8794AE;
  --ink-300:    #66738C;
  /* deep bands sit a touch darker than the page */
  --navy-900:   #05080F;
  --navy-850:   #070C17;
  /* shadows read as depth on dark */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:  0 10px 34px rgba(0,0,0,0.5);
  --shadow-lg:  0 26px 64px rgba(0,0,0,0.62);
}
[data-theme="dark"] html { color-scheme: dark; }

/* literal-color spots that need a dark counterpart */
[data-theme="dark"] .site-header.scrolled {
  background: rgba(11, 17, 30, 0.82);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-theme="dark"] .mobile-menu { background: rgba(11, 17, 30, 0.97); }
[data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,0.07); }
[data-theme="dark"] .lang-current { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .feature-icon,
[data-theme="dark"] .belief-icon,
[data-theme="dark"] .contact-item .ci-icon {
  background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(34,211,238,0.20));
  color: var(--cyan);
}
[data-theme="dark"] .hero { background:
  radial-gradient(1100px 600px at 78% -8%, rgba(34,211,238,0.14), transparent 55%),
  radial-gradient(900px 560px at 12% 8%, rgba(139,92,246,0.14), transparent 55%),
  var(--paper); }

/* ============================================================
   THEME TOGGLE control
   ============================================================ */
.theme-toggle {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.2s, color 0.2s, background 0.3s;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; position: absolute; transition: opacity 0.35s var(--ease), transform 0.45s var(--ease); }
.theme-toggle .icon-sun  { opacity: 0; transform: rotate(-70deg) scale(0.5); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(70deg) scale(0.5); }

/* ============================================================
   THEME-AWARE SVG (hero + story illustrations)
   ============================================================ */
.svg-chip     { fill: var(--white); stroke: var(--line); transition: fill 0.45s var(--ease), stroke 0.45s var(--ease); }
.svg-bar      { fill: var(--line-strong); transition: fill 0.45s var(--ease); }
.svg-bar-soft { fill: var(--line); transition: fill 0.45s var(--ease); }

/* hero orbital hub motion */
.tam-orbit { width: 100%; height: auto; overflow: visible; }
.svg-label { fill: var(--ink-900); font-family: var(--font); font-weight: 700; font-size: 11px; letter-spacing: 0.01em; transition: fill 0.45s var(--ease); }
.beam-line { stroke: url(#hg1); opacity: 0.75; }
.hub-ring-rev { animation: spinSlow 40s linear infinite reverse; }
.beam-line { stroke: url(#hg1); opacity: 0.55; stroke-dasharray: 220; stroke-dashoffset: 220; animation: dash 1.8s var(--ease) forwards; }
.core-glow { transform-box: fill-box; transform-origin: center; animation: glowPulse 4.5s ease-in-out infinite; }
.core-group { transform-box: fill-box; transform-origin: center; animation: coreFloat 6s ease-in-out infinite; }
@keyframes glowPulse { 0%,100% { opacity: .45; transform: scale(.94); } 50% { opacity: .8; transform: scale(1.06); } }
@keyframes coreFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) {
  body, .feature-card, .why-card, .belief-card, .exp-item, .contact-item,
  .contact-form, .trust, .field input, .field textarea, .site-header,
  .lang-current, .lang-list, .theme-toggle, .nav-toggle, .svg-chip, .svg-bar, .svg-bar-soft { transition: none; }
  .hub-ring-rev, .beam-line, .core-glow, .core-group { animation: none; stroke-dashoffset: 0; }
}

/* ============================================================
   PRICING PAGE (/prices)
   Package boxes above, capability comparison grid below —
   the same two-part reading order as TAM Manager's packages page.
   ============================================================ */
.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;
}

.pricing-hero {
  position: relative; padding-top: 150px; padding-bottom: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(1000px 560px at 80% -10%, rgba(34, 211, 238, 0.10), transparent 55%),
    radial-gradient(860px 520px at 10% 10%, rgba(139, 92, 246, 0.08), transparent 55%),
    var(--paper);
  overflow: hidden;
}
.pricing-hero h1 { margin: 18px 0 18px; }
.pricing-hero .lead { margin: 0 auto; max-width: 660px; }

/* Billing cycle switch */
.cycle-toggle {
  display: flex; justify-content: center; gap: 4px; margin: 34px auto 0;
  padding: 5px; width: fit-content; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.cycle-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; color: var(--ink-500);
  padding: 10px 22px; border-radius: 999px; border: none; background: transparent;
  transition: color 0.2s, background 0.25s var(--ease);
}
.cycle-btn:hover { color: var(--ink-900); }
.cycle-btn.active { color: #fff; background: var(--grad-brand-soft); box-shadow: 0 6px 18px rgba(34,130,246,0.28); }
.cycle-save {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(52, 224, 161, 0.16); color: #0F9B6C;
}
.cycle-btn.active .cycle-save { background: rgba(255,255,255,0.22); color: #fff; }
[data-theme="dark"] .cycle-save { background: rgba(52, 224, 161, 0.2); color: var(--mint); }

/* Loading / error states */
.pricing-packages { padding-top: clamp(28px, 4vw, 44px); }
.pricing-state {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 44px 20px; font-size: 15px; font-weight: 600; color: var(--ink-500);
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
}
.pricing-state--error { border-style: solid; border-color: rgba(229,72,77,0.35); color: #D93036; }
.pricing-spinner {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line-strong); border-top-color: var(--blue);
  animation: spinSlow 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .pricing-spinner { animation: none; } }

/* ---------- Package boxes ---------- */
.package-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px;
  align-items: stretch;
}
.package-card {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 26px 26px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.package-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.package-card--featured { border-color: transparent; box-shadow: var(--shadow-glow), var(--shadow-md); }
.package-card--featured::after {
  content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--grad-brand);
}
.package-badge {
  position: absolute; top: -11px; left: 26px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; padding: 5px 12px; border-radius: 999px;
  background: var(--grad-brand-soft); box-shadow: 0 6px 16px rgba(34,130,246,0.32);
}
.package-name { font-size: 21px; margin-bottom: 8px; }
.package-desc {
  font-size: 14px; color: var(--ink-500); line-height: 1.55;
  min-height: 2.4em; margin-bottom: 18px;
}
.package-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.package-amount {
  font-size: clamp(30px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink-900); line-height: 1.1;
}
.package-period { font-size: 13.5px; font-weight: 600; color: var(--ink-500); }
.package-vat { font-size: 12.5px; color: var(--ink-300); margin-top: 4px; }
.package-secondary { font-size: 13px; color: var(--ink-500); margin-top: 10px; font-weight: 600; }
.package-meta {
  list-style: none; margin: 20px 0 24px; padding: 18px 0 0;
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px;
}
.package-meta li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-700); font-weight: 600;
}
.package-meta svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--mint); }
.package-cta { margin-top: auto; width: 100%; }

/* ---------- Comparison grid ---------- */
.pricing-compare-section { background: var(--paper-2); }
.compare-shell {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--white); box-shadow: var(--shadow-sm);
  overflow: auto; max-height: min(76vh, 900px); overscroll-behavior: contain;
}
.compare-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.compare-table th, .compare-table td {
  padding: 12px 14px; text-align: center; vertical-align: middle;
  border-bottom: 1px solid var(--line); background: var(--white);
}

/* Sticky header row + sticky first column, so plan and feature stay readable
   while the visitor scrolls a long catalogue in either direction. */
.compare-table thead th {
  position: sticky; top: 0; z-index: 3;
  padding: 18px 14px; background: var(--paper-2); border-bottom: 1px solid var(--line-strong);
}
.compare-feature-col, .compare-feature {
  position: sticky; left: 0; z-index: 2; text-align: start;
  min-width: 17rem; max-width: 24rem; background: var(--white);
  box-shadow: 1px 0 0 var(--line);
}
.compare-table thead .compare-feature-col {
  z-index: 4; background: var(--paper-2);
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-500);
}
.compare-plan-col { min-width: 11rem; }
.compare-plan-name { display: block; font-size: 15.5px; font-weight: 800; color: var(--ink-900); }
.compare-plan-price { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--blue); }
.compare-plan-period { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-300); }
.compare-plan-cta { margin-top: 12px; padding: 9px 18px; font-size: 13px; }

.compare-module-row th, .compare-module-row td {
  background: color-mix(in srgb, var(--blue) 7%, var(--white));
}
[data-theme="dark"] .compare-module-row th,
[data-theme="dark"] .compare-module-row td {
  background: color-mix(in srgb, var(--blue) 14%, var(--white));
}
.compare-module-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 0; border: 0; background: transparent; color: var(--ink-900);
  font: inherit; font-size: 15px; font-weight: 700; text-align: start;
}
.compare-chevron {
  width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-500);
  transform: rotate(90deg); transition: transform 0.25s var(--ease);
}
.compare-module-row.is-collapsed .compare-chevron { transform: rotate(0deg); }
.compare-module-desc { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-500); font-weight: 500; }
.compare-module-count { font-size: 13px; font-weight: 700; color: var(--ink-500); }

.compare-feature--capability { padding-inline-start: 38px; }
.compare-capability-name { display: block; font-size: 14px; font-weight: 600; color: var(--ink-700); }
.compare-capability-desc { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-300); line-height: 1.45; }
.compare-capability-row:hover th, .compare-capability-row:hover td {
  background: color-mix(in srgb, var(--blue) 4%, var(--white));
}

.compare-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
}
.compare-mark svg { width: 15px; height: 15px; }
.compare-mark--on { background: rgba(52, 224, 161, 0.16); color: #0F9B6C; }
.compare-mark--off { background: rgba(138, 151, 174, 0.14); color: var(--ink-300); }
[data-theme="dark"] .compare-mark--on { background: rgba(52, 224, 161, 0.18); color: var(--mint); }
[data-theme="dark"] .compare-mark--off { background: rgba(255, 255, 255, 0.07); }

@media (max-width: 880px) {
  .pricing-hero { padding-top: 120px; }
  .compare-feature-col, .compare-feature { min-width: 13rem; }
  .compare-plan-col { min-width: 9rem; }
  .compare-table th, .compare-table td { padding: 10px 10px; }
}
@media (max-width: 560px) {
  .cycle-toggle { width: 100%; }
  .cycle-btn { flex: 1 1 auto; justify-content: center; padding: 10px 12px; }
  .package-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Contact form — CAPTCHA
   --------------------------------------------------------------- */
.captcha-field .captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.captcha-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  min-width: 150px;
  padding: 4px 10px;
  background: #f2f5fb;
  border: 1px solid var(--border, #d9e0ee);
  border-radius: 10px;
  overflow: hidden;
  user-select: none;
}
.captcha-image svg { height: 42px; width: auto; display: block; }
.captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--border, #d9e0ee);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted, #5b6577);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.captcha-refresh:hover { color: var(--accent, #34e0a1); border-color: var(--accent, #34e0a1); }
.captcha-refresh:active { transform: rotate(-45deg); }
.captcha-refresh svg { width: 20px; height: 20px; }
[data-theme="dark"] .captcha-image { background: rgba(255,255,255,.06); }
.form-submit.is-loading { opacity: .7; pointer-events: none; }
