/* =====================================================
   KAJTO Consulting — style.css  (post-review revision)
   Fixes: F-13 F-14 F-15 F-16 F-23 F-24 F-25 F-26 F-30
===================================================== */

/* ── TOKENS ── */
:root {
  --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.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);

  --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;

  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;

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

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Switzer', 'Inter', sans-serif;
}

/* ── LIGHT MODE ── */
:root, [data-theme="light"] {
  --color-bg:             #f5f6f8;
  --color-surface:        #ffffff;
  --color-surface-2:      #f0f2f5;
  --color-surface-offset: #e8eaee;
  --color-border:         #d0d4db;
  --color-divider:        #dde0e7;

  --color-text:         #0f1520;
  --color-text-muted:   #5a6478;
  /* DMR2-O-24: was #a0a8b8 (~2.3:1) — raised to meet WCAG AA 4.5:1 */
  --color-text-faint:   #7a8aaa;
  --color-text-inverse: #f5f6f8;

  --color-primary:       #1a3a6b;
  --color-primary-hover: #112854;
  --color-primary-light: #d8e3f4;

  --color-gold:        #b8860b;
  --color-gold-light:  #f5e6b0;
  --color-gold-bright: #d4a017;

  /* F-15/F-16: plain hex fallbacks — no oklch() or color-mix() in core palette */
  --color-header-bg-light: rgba(245, 246, 248, 0.88);

  --shadow-sm: 0 1px 3px rgba(15, 21, 32, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 21, 32, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 21, 32, 0.12);
  --shadow-xl: 0 24px 64px rgba(15, 21, 32, 0.16);
}

/* ── DARK MODE — single block (F-26: no duplication) ── */
[data-theme="dark"] {
  --color-bg:             #0a0d14;
  --color-surface:        #0f1520;
  --color-surface-2:      #141b28;
  --color-surface-offset: #1a2235;
  --color-border:         #1e2940;
  --color-divider:        #162030;

  --color-text:         #dde3f0;
  --color-text-muted:   #7a8aaa;
  /* DMR2-O-24: was #3d4d6a — raised for dark mode contrast */
  --color-text-faint:   #7a8aaa;
  --color-text-inverse: #0a0d14;

  --color-primary:       #4a7fc1;
  --color-primary-hover: #5e92d4;
  --color-primary-light: #162040;

  --color-gold:        #c8980d;
  --color-gold-light:  #2a2010;
  --color-gold-bright: #e8b020;

  --color-header-bg-light: rgba(10, 13, 20, 0.88);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.50);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.60);
}

/* System preference — mirrors dark block without duplication */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a0d14; --color-surface: #0f1520; --color-surface-2: #141b28;
    --color-surface-offset: #1a2235; --color-border: #1e2940; --color-divider: #162030;
    --color-text: #dde3f0; --color-text-muted: #7a8aaa; --color-text-faint: #7a8aaa; /* DMR2-O-24 */
    --color-text-inverse: #0a0d14; --color-primary: #4a7fc1;
    --color-primary-hover: #5e92d4; --color-primary-light: #162040;
    --color-gold: #c8980d; --color-gold-light: #2a2010; --color-gold-bright: #e8b020;
    --color-header-bg-light: rgba(10, 13, 20, 0.88);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.30); --shadow-md: 0 4px 16px rgba(0,0,0,.40);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.50); --shadow-xl: 0 24px 64px rgba(0,0,0,.60);
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* F-14: suppress smooth scrolling when user prefers reduced motion */
  scroll-behavior: smooth;
  /* DMR2-O-09/10: matches actual header height (68px desktop) */
  scroll-padding-top: 68px;
}

body {
  /* F-25: 100vh fallback before 100dvh */
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

img, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }

::selection { background: rgba(212, 160, 23, 0.30); }
:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a, button, [role="button"], input, textarea, select {
  transition: color var(--transition), background var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              opacity var(--transition);
}

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

/* F-14 + F-11 skip-link + reduced motion */
@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;
  }
  .hero__eyebrow, .hero__heading, .hero__sub, .hero__actions, .hero__scroll-hint {
    opacity: 1 !important;
    animation: none !important;
  }
  .fade-in { opacity: 1 !important; }
  .fade-in-stagger > * { opacity: 1 !important; transition-delay: 0ms !important; }
}

/* F-11: Skip-navigation link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: 0.6rem 1.2rem;
  background: var(--color-gold-bright);
  color: #0a0d14;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: var(--space-4); }

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-6), 5vw, var(--space-16));
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn--primary {
  background: var(--color-gold-bright);
  color: #0a0d14;
  border-color: var(--color-gold-bright);
  /* Subtle attention pulse — runs once on page load after hero sequence */
  animation: goldPulse 2.4s 1.8s ease-in-out 2;
}
.btn--primary:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 150, 13, 0.4);
  animation: none; /* stop pulse on hover */
}
.btn--primary:active { transform: translateY(0); box-shadow: none; }
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-text-muted); background: var(--color-surface); }
.btn--full { width: 100%; justify-content: center; }

/* ── SECTION TYPOGRAPHY ── */
.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-5);
  font-weight: 400;
}
.section-title em { font-style: italic; color: var(--color-primary); }
[data-theme="dark"] .section-title em { color: var(--color-primary-hover); }
.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
}
.section-header { margin-bottom: var(--space-12); }

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0; z-index: 100;
  /* R-06/F-16: solid fallback background before backdrop-filter is applied */
  background: var(--color-header-bg-light);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
/* R-06: Fully-opaque fallback for browsers without backdrop-filter support
   (Firefox < 103, older Android WebViews, high-contrast / accessibility mode) */
@supports not (backdrop-filter: blur(1px)) {
  .header,
  .mobile-nav {
    background: var(--color-surface) !important;
  }
}
.header--scrolled { box-shadow: var(--shadow-md); }
.header--hidden   { transform: translateY(-100%); }

.header__inner {
  display: flex; align-items: center;
  gap: var(--space-4);
  height: 68px;
}

.logo { color: var(--color-text); flex-shrink: 0; text-decoration: none; }
.logo:hover { color: var(--color-gold-bright); }

.nav {
  display: flex; align-items: center;
  gap: var(--space-6); margin-left: auto;
}
.nav__link {
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  transition: color var(--transition);
}
/* Underline sweep on hover */
.nav__link:not(.nav__link--cta)::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--color-gold-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.nav__link:not(.nav__link--cta):hover::after { transform: scaleX(1); }
.nav__link:hover { color: var(--color-text); }
.nav__link--cta {
  padding: 0.5rem 1.25rem;
  background: var(--color-gold-bright);
  color: #0a0d14;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.nav__link--cta:hover { background: var(--color-gold); color: #0a0d14; }

.theme-toggle {
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface); }

.nav__toggle {
  display: none;
  color: var(--color-text);
  padding: var(--space-2);
}

/* F-13: Mobile nav animation — use visibility+opacity+translateY instead of display:none+max-height */
.mobile-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-divider);
  padding: var(--space-4) 0;
  /* Hidden state */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    visibility 0s linear 0.25s;
  pointer-events: none;
  position: absolute;
  top: 68px; left: 0; right: 0;
  background: var(--color-header-bg-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99;
}
.mobile-nav.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    visibility 0s linear 0s;
  pointer-events: auto;
}

.mobile-nav__link {
  padding: var(--space-3) clamp(var(--space-6), 5vw, var(--space-16));
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-muted); text-decoration: none;
}
.mobile-nav__link:hover { color: var(--color-text); }
.mobile-nav__link--cta { color: var(--color-gold-bright); font-weight: 600; margin-top: var(--space-2); }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92dvh; /* DMR2-O-22: dvh = viewport minus browser chrome */
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(5, 8, 18, 0.88) 0%,
    rgba(10, 16, 30, 0.72) 50%,
    rgba(8, 14, 28, 0.55) 100%);
}
[data-theme="light"] .hero__overlay {
  background: linear-gradient(135deg,
    rgba(5, 8, 18, 0.82) 0%,
    rgba(10, 16, 30, 0.65) 50%,
    rgba(8, 14, 28, 0.45) 100%);
}
.hero__content {
  position: relative; z-index: 1;
  padding-block: clamp(var(--space-16), 12vw, var(--space-32));
  max-width: 780px;
}
.hero__eyebrow {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: var(--space-5);
  opacity: 0;
  animation: heroReveal 0.9s 0.15s var(--ease-out) forwards;
}
.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 2rem + 3vw, 5.5rem);
  font-weight: 400; color: #f0f4ff;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: heroReveal 1s 0.32s var(--ease-out) forwards;
}
.hero__heading em { font-style: italic; color: var(--color-gold-bright); }
.hero__sub {
  font-size: var(--text-lg);
  color: rgba(200, 215, 240, 0.82);
  line-height: 1.6;
  margin-bottom: var(--space-10);
  max-width: 52ch;
  opacity: 0;
  animation: heroReveal 1s 0.52s var(--ease-out) forwards;
}
.hero__actions {
  display: flex; gap: var(--space-4); flex-wrap: wrap;
  opacity: 0;
  animation: heroReveal 1s 0.68s var(--ease-out) forwards;
}
.hero__actions .btn--ghost {
  color: rgba(210, 225, 250, 0.85);
  border-color: rgba(210, 225, 250, 0.3);
}
.hero__actions .btn--ghost:hover {
  color: #f0f4ff;
  border-color: rgba(210, 225, 250, 0.7);
  background: rgba(255, 255, 255, 0.06);
}
.hero__scroll-hint {
  position: absolute; bottom: var(--space-8); left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  color: rgba(200, 215, 240, 0.45);
  font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  animation: fadeUp 1s 1.1s var(--ease-out) both;
}
/* F-30: will-change for continuously-animating elements */
.scroll-dot { animation: scrollBounce 2s 2s ease-in-out infinite; will-change: transform; }

/* ── STATS ── */
.stats {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.stat {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding-left: var(--space-6);
  border-left: 2px solid var(--color-gold-bright);
  transition: border-color 280ms var(--ease-out);
}
.stat:hover {
  border-color: var(--color-gold);
}
.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  font-weight: 400; line-height: 1.1;
  /* count-up: number chars animate in */
  transition: color 280ms var(--ease-out);
}
.stat:hover .stat__number {
  color: var(--color-gold-bright);
}
/* F-23: .stat__plus removed (was unused) */
.stat__label {
  font-size: var(--text-xs); color: var(--color-text-muted);
  line-height: 1.4; max-width: 20ch;
}

/* ── SERVICES ── */
.services { padding-block: clamp(var(--space-16), 10vw, var(--space-32)); }

/* ── DIFFERENTIATOR ── */
.differentiator {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}
.differentiator__inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: clamp(var(--space-12), 8vw, var(--space-24));
  align-items: center;
}
.diff-list {
  list-style: none; display: flex; flex-direction: column;
  gap: var(--space-5); margin-bottom: var(--space-8);
}
.diff-item {
  display: flex; gap: var(--space-4); align-items: flex-start;
  font-size: var(--text-base); color: var(--color-text-muted);
  line-height: 1.6; max-width: none;
}
.diff-item strong { color: var(--color-text); }
.diff-item__marker { color: var(--color-gold-bright); font-weight: 700; flex-shrink: 0; margin-top: 0.1em; }
.pull-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-lg); color: var(--color-text-muted);
  border-left: 3px solid var(--color-gold-bright);
  padding-left: var(--space-5); line-height: 1.5; max-width: none;
}
.differentiator__visual { display: flex; align-items: center; justify-content: center; }
.compass { width: 100%; max-width: 280px; }
.compass__svg { width: 100%; height: auto; }
/* F-30: full needle group rotates as one unit around centre */
.compass__needle {
  animation: compassSpin 9s ease-in-out infinite alternate;
  transform-origin: 100px 100px;
  will-change: transform;
}

/* ── ABOUT ── */
.about { padding-block: clamp(var(--space-16), 10vw, var(--space-32)); }
.about__inner {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: clamp(var(--space-12), 8vw, var(--space-24));
  align-items: center;
}
.about__card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden; min-height: 380px;
}
.about__card-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-offset) 100%);
}
[data-theme="dark"] .about__card-bg {
  background: linear-gradient(135deg, #0f1a2e 0%, #07101d 100%);
}
.about__card-content {
  position: relative; z-index: 1;
  padding: var(--space-8);
  height: 100%;
  display: flex; flex-direction: column; gap: var(--space-8); justify-content: center;
}
.about__pilot-badge {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-gold-light);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(200, 150, 13, 0.3);
}
[data-theme="light"] .about__pilot-badge { background: #fef9ea; }
.about__pilot-badge span {
  font-size: var(--text-sm); font-weight: 600; color: var(--color-gold-bright);
}
.about__timeline { display: flex; flex-direction: column; gap: var(--space-5); }
.about__tl-item { display: flex; align-items: flex-start; gap: var(--space-4); }
.about__tl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-border); flex-shrink: 0; margin-top: 5px;
}
.about__tl-dot--active {
  background: var(--color-gold-bright);
  box-shadow: 0 0 0 3px rgba(200, 150, 13, 0.25);
}
.about__tl-item strong {
  display: block; font-size: var(--text-sm); font-weight: 600;
  color: var(--color-text); max-width: none;
}
.about__tl-item span {
  font-size: var(--text-xs); color: var(--color-text-muted); max-width: none;
}
.about__body {
  font-size: var(--text-base); color: var(--color-text-muted);
  line-height: 1.75; margin-bottom: var(--space-4);
}
.about__body strong { color: var(--color-text); }
.about__body--small {
  font-size: var(--text-sm); color: var(--color-text-faint);
  font-style: italic; letter-spacing: 0.02em; margin-top: var(--space-4);
}
/* LinkedIn link in About */
.about__linkedin {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.04em;
  color: var(--color-text-faint);
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
}
.about__linkedin::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--color-gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.about__linkedin:hover::after,
.about__linkedin:focus-visible::after { transform: scaleX(1); }
.about__linkedin:hover,
.about__linkedin:focus-visible { color: var(--color-text); outline: none; }
.about__linkedin svg { flex-shrink: 0; opacity: 0.7; transition: opacity var(--transition); }
.about__linkedin:hover svg { opacity: 1; }

/* ── CONTACT ── */
.contact {
  background: var(--color-surface);
  padding: var(--space-24) 0;
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.contact__text .section-title { margin-bottom: 0; }
.contact__desc {
  margin-top: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 38ch;
  line-height: 1.65;
}

/* Right column: CTA + privacy note + locations */
.contact__action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

/* Email button — primary CTA */
.contact__email-btn {
  font-size: var(--text-base);
  letter-spacing: 0.04em;
  padding: var(--space-4) var(--space-8);
  min-width: 220px;
  text-align: center;
}

/* Privacy note */
.contact__privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.55;
  max-width: 38ch;
}
.contact__privacy svg {
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.6;
}

/* Locations */
.contact__locations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}
.contact__sep { margin: 0 var(--space-1); opacity: 0.4; }

/* ── CONTACT MOBILE ── */
@media (max-width: 900px) {
  .contact__inner { grid-template-columns: 1fr; gap: var(--space-10); }
  .contact__desc  { max-width: none; }
  .contact__privacy { max-width: none; }
}

/* ── FOOTER ── */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-10);
}
.footer__inner {
  display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap;
}
.footer__brand { display: flex; flex-direction: column; gap: var(--space-1); color: var(--color-text-muted); }
.footer__tagline { font-size: var(--text-xs); color: var(--color-text-faint); max-width: none; }
/* Footer right column: nav + legal stacked, all right-aligned */
.footer__right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: var(--space-3); margin-left: auto;
}
.footer__nav {
  display: flex; gap: var(--space-6); flex-wrap: wrap; justify-content: flex-end;
}
.footer__nav a {
  font-size: var(--text-xs); color: var(--color-text-faint);
  text-decoration: none; letter-spacing: 0.03em;
  position: relative; transition: color var(--transition);
}
/* Gold underline sweep — same as header nav */
.footer__nav a::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--color-gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.footer__nav a:hover::after { transform: scaleX(1); }
.footer__nav a:hover { color: var(--color-text); }
.footer__copy {
  width: 100%; font-size: var(--text-xs); color: var(--color-text-faint);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-divider); max-width: none;
}

/* ── LANGUAGE SWITCHER ── */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-trigger {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer; white-space: nowrap;
}
.lang-trigger:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 160px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0; z-index: 200;
  list-style: none;
}
.lang-menu[hidden] { display: none; }
.lang-option {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0.6rem var(--space-4);
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: none; border: none;
  cursor: pointer; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.lang-option:hover { background: var(--color-surface-2); color: var(--color-text); }
.lang-option--active { color: var(--color-gold-bright); font-weight: 600; }
.lang-flag { font-size: 1rem; line-height: 1; }

/* Mobile lang */
.mobile-lang {
  display: flex; gap: var(--space-2);
  padding: var(--space-4) clamp(var(--space-6), 5vw, var(--space-16));
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-2); flex-wrap: wrap;
}
.mobile-lang__btn {
  padding: 0.35rem 0.8rem;
  font-family: var(--font-body);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.mobile-lang__btn:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.mobile-lang__btn[aria-checked="true"] {
  color: var(--color-gold-bright);
  border-color: var(--color-gold-bright);
  background: var(--color-gold-light);
}

/* ── ANIMATIONS ── */
/* Hero reveal — opacity + subtle blur (no translateY → no layout shift) */
@keyframes heroReveal {
  from { opacity: 0; filter: blur(4px); }
  to   { opacity: 1; filter: blur(0); }
}
/* F-3: Scroll fade-in classes */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* DMR3-H03: form removed — dead rule deleted */

/* F-4: CSS class for modal-open body scroll lock (replaces inline style) */
body.modal-open {
  overflow: hidden;
}



/* Legacy fadeUp kept for scroll-hint only */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}
@keyframes compassSpin {
  from { transform: rotate(-12deg); }
  to   { transform: rotate(12deg); }
}
/* Gold border pulse for CTA button */
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 176, 32, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(232, 176, 32, 0.12); }
}
/* R-15: @keyframes statReveal removed — dead code, never referenced by any selector */

/* ── RESPONSIVE ── */
/* ── TABLET (max 900px) ── */
@media (max-width: 900px) {
  .stats__grid           { grid-template-columns: repeat(2, 1fr); }
  .differentiator__inner { grid-template-columns: 1fr; }
  .differentiator__visual { display: none; }
  .about__inner          { grid-template-columns: 1fr; }
  .about__image-col      { order: 2; }
  .about__text-col       { order: 1; }
  .contact__inner        { grid-template-columns: 1fr; }
  /* About card: full width on tablet */
  .about__card           { min-height: 280px; }
}

/* ── MOBILE (max 640px) ── */
@media (max-width: 640px) {
  /* Header */
  .header__inner         { height: 58px; }
  /* DMR2-O-10: mobile header is 58px */
  html { scroll-padding-top: 58px; }
  .nav                   { display: none; }
  .nav__toggle           { display: flex; min-width: 44px; min-height: 44px; }
  .lang-switcher         { margin-left: auto; }

  /* Hero */
  .hero__content         { padding-block: clamp(var(--space-12), 18vw, var(--space-24)); }
  .hero__heading         { font-size: clamp(2rem, 9vw, 3rem); }
  .hero__sub             { font-size: var(--text-base); }
  .hero__actions         { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .hero__actions .btn    { width: 100%; justify-content: center; }
  .hero__scroll-hint     { display: none; } /* too cramped on small screens */

  /* Stats: 2-column, tighter */
  .stats__grid           { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .stat                  { padding-left: var(--space-4); }
  .stat__number          { font-size: var(--text-lg); }
  .stat__label           { font-size: 0.7rem; }

  /* Differentiator */
  .diff-list             { gap: var(--space-4); }

  /* About */
  .about__card           { min-height: auto; }
  .about__card-content   { padding: var(--space-6); gap: var(--space-6); }
  .about__pilot-badge    { padding: var(--space-3) var(--space-4); }

  /* Contact: email wraps cleanly */
  .contact__email-btn    { font-size: var(--text-base); word-break: break-all; }
  .contact__locations    { flex-wrap: wrap; gap: var(--space-2); }

  /* Footer: centered stack */
  .footer__inner         { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .footer__right         { margin-left: 0; align-items: flex-start; }
  .footer__nav           { gap: var(--space-4); justify-content: flex-start; }
  .footer__legal         { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .footer__legal-sep     { display: none; }
}

/* F-24: Print stylesheet */
@media print {
  .header, .hero__scroll-hint, .nav__toggle, .lang-switcher,
  .theme-toggle, .mobile-nav, .compass, .footer__nav { display: none !important; }
  body  { font-size: 11pt; color: #000; background: #fff; }
  .hero {
    min-height: auto; color: #000;
    background: #fff !important; padding-block: 2rem;
  }
  .hero__bg, .hero__overlay { display: none; }
  .hero__heading { color: #000; font-size: 24pt; }
  .hero__sub, .hero__eyebrow { color: #333; }
  .btn { border: 1pt solid #000; color: #000; background: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  a[href^="#"]::after, a[href^="mailto"]::after { content: ""; }
  .section-title { color: #000; }
  .contact__email-btn::after { content: " (info@kajto.aero)"; }
}

/* ── FOOTER LEGAL LINKS ── */
.footer__legal {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer__legal-sep {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}
.footer__legal-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  transition: color var(--transition);
  text-decoration: none;
  position: relative;
  letter-spacing: 0.03em;
}
/* Gold underline sweep — same as header nav */
.footer__legal-btn::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--color-gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.footer__legal-btn:hover::after,
.footer__legal-btn:focus-visible::after { transform: scaleX(1); }
.footer__legal-btn:hover,
.footer__legal-btn:focus-visible {
  color: var(--color-text);
  outline: none;
}

/* Footer social icons */
.footer__social {
  display: flex; align-items: center; gap: var(--space-3);
  margin-top: var(--space-1);
}
.footer__social-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--color-text-faint);
  text-decoration: none; letter-spacing: 0.04em;
  position: relative; transition: color var(--transition);
}
.footer__social-link::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--color-gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.footer__social-link:hover::after,
.footer__social-link:focus-visible::after { transform: scaleX(1); }
.footer__social-link:hover,
.footer__social-link:focus-visible { color: var(--color-text); outline: none; }
.footer__social-link svg { flex-shrink: 0; opacity: 0.7; transition: opacity var(--transition); }
.footer__social-link:hover svg { opacity: 1; }
.footer__social-label { line-height: 1; }

/* ── MODAL OVERLAY ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 13, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}
.modal-overlay:not([hidden]) {
  opacity: 1;
}
.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  /* Enter: scale up from 96% + fade */
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  transition:
    opacity 300ms var(--ease-out),
    transform 300ms var(--ease-out);
}
.modal-overlay:not([hidden]) .modal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-divider);
  flex-shrink: 0;
}
.modal__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  margin: 0;
}
.modal__close {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: color var(--transition), background var(--transition);
}
.modal__close:hover,
.modal__close:focus-visible {
  color: var(--color-text);
  background: var(--color-surface-2);
  outline: none;
}

.modal__body {
  overflow-y: auto;
  padding: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.75;
  -webkit-overflow-scrolling: touch;
}
.modal__body h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  margin: var(--space-6) 0 var(--space-2);
}
.modal__body h3:first-child { margin-top: 0; }
.modal__body p  { margin: 0 0 var(--space-3); }
.modal__body ul { padding-left: var(--space-5); margin: 0 0 var(--space-3); }
.modal__body li { margin-bottom: var(--space-1); }
.modal__body a  {
  color: var(--color-gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.modal__body a:hover { opacity: 0.8; }
.modal__body strong { color: var(--color-text); font-weight: 600; }

@media (max-width: 640px) {
  .modal-overlay { padding: var(--space-4); align-items: flex-end; }
  .modal { max-height: 90vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal__header { padding: var(--space-5) var(--space-5); }
  .modal__body   { padding: var(--space-5); }
}

/* ═══════════════════════════════════════════════════
   COOKIE NOTICE BANNER
   Always visible on page load (no entrance animation
   that could hide it). Dismisses with fade-out.
═══════════════════════════════════════════════════ */
#kajto-cookie {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 2rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  background: #0d1222;
  border-top: 1px solid rgba(232, 176, 32, 0.22);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.5);
  /* opacity/transform/transition are controlled by cookie.js at runtime */
}

#kajto-cookie-text {
  flex: 1;
  margin: 0;
  font-family: 'Switzer', system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #9aaac8;
  max-width: 100%;
}

#kajto-cookie-btn {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: #e8b020;
  border: 1px solid #e8b020;
  border-radius: 999px;
  font-family: 'Switzer', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 200ms ease, color 200ms ease;
}

#kajto-cookie-btn:hover,
#kajto-cookie-btn:focus-visible {
  background: #e8b020;
  color: #0a0d14;
  outline: none;
}

@media (max-width: 640px) {
  #kajto-cookie {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  #kajto-cookie-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
  }
}

/* ════════════════════════════════════════════════════════
   OPTION D — Kinetic Text Services
   Large typographic list. Each title is wrapped in a
   clip container: on scroll-in, the text is revealed
   by a curtain sliding left-to-right.
   Hover: gold colour sweeps in from left via a
   background-clip gradient trick.
════════════════════════════════════════════════════════ */

/* Kinetic list */
.svc-kinetic {
  list-style: none;
  margin: 0;
  padding: 0;
}

.svc-kinetic__item {
  border-bottom: 1px solid var(--color-divider);
  position: relative;
}
.svc-kinetic__item:first-child { border-top: 1px solid var(--color-divider); }

/* Inner row — handles padding so the overflow:hidden clip works on the title */
.svc-kinetic__row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.25rem, 3vw, 2rem);
  cursor: default;
}

/* Thematic icon */
.svc-kinetic__icon {
  display: block;
  flex-shrink: 0;
  width:  calc(clamp(1.6rem, 4.5vw, 3.5rem) * 1.1);
  height: calc(clamp(1.6rem, 4.5vw, 3.5rem) * 1.1);
  min-width: calc(clamp(1.6rem, 4.5vw, 3.5rem) * 1.1);
  /* Explicit color + stroke — avoids Chrome inheriting transparent from
     background-clip:text on sibling .svc-kinetic__title */
  color: var(--color-gold);
  stroke: var(--color-gold);
  fill: none;
  opacity: 0.45;
  overflow: visible;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
  margin-top: 0;
  align-self: center;
}
/* Force all SVG children to use gold — prevents Chrome from inheriting
   transparent from the background-clip:text sibling context */
.svc-kinetic__icon * {
  stroke: inherit;
}
.svc-kinetic__icon [fill="currentColor"] {
  fill: var(--color-gold);
}
.svc-kinetic__item:hover .svc-kinetic__icon {
  opacity: 1;
  transform: scale(1.1);
}
/* Sub-text indent matches icon width */

/* Title clip container */
.svc-kinetic__clip {
  overflow: hidden;
  flex: 1;
}

/* The title itself slides up from below on scroll-in */
.svc-kinetic__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 3.5rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.1;
  color: var(--color-text);
  /* Hover: gold sweep via background-clip */
  background-image: linear-gradient(
    90deg,
    var(--color-gold-bright) 0%,
    var(--color-gold-bright) 50%,
    var(--color-text) 50%,
    var(--color-text) 100%
  );
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* DMR2-O-14 progressive enhancement: no transform without JS (see html.js class) */
  transition:
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    background-position 0.5s ease;
}
/* DMR2-O-14: only push down if JS class is present */
html.js .svc-kinetic__title { transform: translateY(105%); }
.svc-kinetic__item.is-visible .svc-kinetic__title {
  transform: translateY(0);
}
.svc-kinetic__item:hover .svc-kinetic__title {
  background-position: 0% 0;
}

/* Stagger delays */
/* Each item triggers individually via IntersectionObserver —
   delay here is the pause between IS-VISIBLE trigger and animation start */
.svc-kinetic__item:nth-child(1) .svc-kinetic__title { transition-delay: 80ms,  0ms; }
.svc-kinetic__item:nth-child(2) .svc-kinetic__title { transition-delay: 100ms, 0ms; }
.svc-kinetic__item:nth-child(3) .svc-kinetic__title { transition-delay: 100ms, 0ms; }
.svc-kinetic__item:nth-child(4) .svc-kinetic__title { transition-delay: 100ms, 0ms; }
.svc-kinetic__item:nth-child(5) .svc-kinetic__title { transition-delay: 100ms, 0ms; }

/* Sub-text — fades in slightly after title */
.svc-kinetic__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 52ch;
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  padding-left: calc(36px + clamp(1rem, 3vw, 2.5rem));
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.6s ease 0.7s,
    transform 0.6s ease 0.7s;
}
.svc-kinetic__item.is-visible .svc-kinetic__text {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 640px) {
  .svc-kinetic__title { font-size: clamp(1.3rem, 8vw, 2rem); }
  .svc-kinetic__text  { padding-left: 0; }
  .svc-kinetic__icon  { width: calc(clamp(1.3rem, 8vw, 2rem) * 1.1); height: calc(clamp(1.3rem, 8vw, 2rem) * 1.1); min-width: calc(clamp(1.3rem, 8vw, 2rem) * 1.1); }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .svc-kinetic__title { transform: none; transition: background-position 0.3s ease; }
  .svc-kinetic__text  { opacity: 1; transform: none; transition: none; }
  /* DMR3-L03: release compositor layers when motion is disabled */
  .compass__needle, .scroll-dot { will-change: auto; }
}
