/* ============================================================
   Axel Jerabek — Digital Sovereignty
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --white:       #FAFAFA;
  --off-white:   #F2F4F8;
  --slate-900:   #0C1524;
  --slate-700:   #1A2744;
  --slate-400:   #5D6E8A;
  --slate-200:   #C8D3E6;

  --indigo:      #3730A3;
  --indigo-mid:  #4F46E5;
  --indigo-light:#6366F1;
  --indigo-soft: #EEF2FF;

  --gold:        #B8860B;
  --gold-vivid:  #D4A017;
  --gold-soft:   #FEFCE8;
  --gold-border: rgba(212, 160, 23, 0.28);

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-pill: 999px;
  --radius-card: 20px;

  --section-pad: clamp(80px, 10vw, 140px);

  --glass-bg:     rgba(250, 250, 250, 0.75);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(12, 21, 36, 0.10);

  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-900);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--indigo-mid); color: #fff; }

/* ─── Ambient Layer — Orbs + Noise Grain ─────────────────── */
/*
   From Nebula Oracle: mix-blend-mode: screen gives orbs their
   luminous quality. Noise texture adds tactile depth.
*/
.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Grain overlay — borrowed from Nebula Oracle technique */
.ambient-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.06;
  pointer-events: none;
  z-index: 2;
}

.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  mix-blend-mode: multiply; /* on light bg: multiply darkens, giving depth */
  animation: orbFloat var(--duration, 20s) ease-in-out infinite;
}

/* Indigo — top left */
.orb-1 {
  width: 750px; height: 750px;
  background: radial-gradient(circle, #a5b4fc 0%, #6366f1 40%, transparent 72%);
  top: -220px; left: -180px;
  opacity: 0.35;
  filter: blur(70px);
  --duration: 22s;
}

/* Gold — bottom right */
.orb-2 {
  width: 540px; height: 540px;
  background: radial-gradient(circle, #fde68a 0%, #f59e0b 42%, transparent 70%);
  bottom: 3%; right: -90px;
  opacity: 0.28;
  filter: blur(75px);
  --duration: 28s;
  animation-delay: -10s;
}

/* Violet — mid, subtle */
.orb-3 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #ddd6fe 0%, #818cf8 48%, transparent 75%);
  top: 42%; left: 48%;
  transform: translate(-50%, -50%);
  opacity: 0.18;
  filter: blur(90px);
  --duration: 16s;
  animation-delay: -5s;
}

/* Nebula Oracle-inspired: opacity pulse + translate */
@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1);            opacity: var(--op-lo, 0.28); }
  25%  { transform: translate(40px, -30px) scale(1.05);  opacity: var(--op-hi, 0.40); }
  50%  { transform: translate(20px, 20px) scale(0.97);   opacity: var(--op-lo, 0.28); }
  75%  { transform: translate(-20px, -15px) scale(1.03); opacity: var(--op-hi, 0.40); }
  100% { transform: translate(0, 0) scale(1);            opacity: var(--op-lo, 0.28); }
}

.orb-1 { --op-lo: 0.30; --op-hi: 0.45; }
.orb-2 { --op-lo: 0.22; --op-hi: 0.35; }
.orb-3 { --op-lo: 0.14; --op-hi: 0.24; }

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
}

/* ─── Nav ────────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(1.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(55, 48, 163, 0.07);
  transition: var(--transition);
}

#main-nav.scrolled .nav-inner {
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(55, 48, 163, 0.15),
              0 20px 60px rgba(12, 21, 36, 0.13);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--slate-900);
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 6px 14px 6px 8px;
  margin-right: 4px;
  border-right: 1px solid var(--slate-200);
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--indigo-mid); }

/* Live dot — from Nebula Oracle's time-dot */
.nav-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--indigo-mid);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 8px var(--indigo-mid);
  animation: navPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes navPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.7); }
}

.nav-links { display: flex; list-style: none; gap: 2px; }

.nav-links a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-400);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--indigo);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  color: var(--slate-900);
  font-size: 20px;
}

@media (max-width: 680px) {
  #main-nav { top: 12px; left: 12px; right: 12px; transform: none; }
  .nav-inner { border-radius: 16px; flex-wrap: wrap; }
  .nav-logo { border-right: none; margin-right: 0; flex: 1; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; gap: 2px;
    padding-top: 8px; border-top: 1px solid var(--slate-200); margin-top: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
}

/* ─── Layout ─────────────────────────────────────────────── */
#container { position: relative; z-index: 1; }

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-pad) clamp(24px, 8vw, 120px);
  position: relative;
}

.section-inner { max-width: 900px; margin: 0 auto; width: 100%; }

/* ─── Hero ────────────────────────────────────────────────── */
#hero { padding-top: 120px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo-mid);
  margin-bottom: 32px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1.5px;
  background: var(--indigo-mid);
  border-radius: 2px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--slate-900);
  margin-bottom: 32px;
}
.hero-headline em { font-style: italic; color: var(--indigo-mid); }

.hero-body {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.75;
  color: var(--slate-400);
  max-width: 560px;
  margin-bottom: 48px;
}

.hero-cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--indigo);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(55, 48, 163, 0.4);
  letter-spacing: 0.005em;
}
.btn-primary:hover {
  background: #312E81;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(55, 48, 163, 0.5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-700);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--slate-200);
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--indigo-mid); color: var(--indigo-mid); }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  color: var(--slate-400);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; transition: color 0.2s;
}
.scroll-hint:hover { color: var(--indigo-mid); }
.scroll-hint .mouse {
  width: 22px; height: 34px;
  border: 1.5px solid currentColor;
  border-radius: 12px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-hint .mouse::after {
  content: '';
  width: 3px; height: 6px;
  background: currentColor;
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  70%       { transform: translateY(8px); opacity: 0.2; }
}

/* ─── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--slate-200) 30%, var(--slate-200) 70%, transparent);
  margin: 0 clamp(24px, 8vw, 120px);
  position: relative; z-index: 1;
}

/* ─── Section Typography ─────────────────────────────────── */
.section-eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo-mid); margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--indigo-mid); }

.section-lead {
  font-size: 18px;
  color: var(--slate-400);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 56px;
}

/* ─── Competence Cards ───────────────────────────────────── */
.competences-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) { .competences-grid { grid-template-columns: 1fr; } }

.competence-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  padding: 28px 30px;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.competence-card:hover {
  box-shadow: 0 16px 48px rgba(12, 21, 36, 0.14);
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.25);
}

.competence-icon {
  width: 40px; height: 40px;
  background: var(--indigo-soft);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 18px;
}

.competence-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--indigo-mid); margin-bottom: 8px;
}

.competence-title {
  font-family: var(--font-display);
  font-size: 22px; color: var(--slate-900);
  margin-bottom: 10px; line-height: 1.25;
}

.competence-text { font-size: 14px; color: var(--slate-400); line-height: 1.65; }

/* ─── Portfolio List ─────────────────────────────────────── */
.portfolio-list { display: flex; flex-direction: column; }

.portfolio-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--slate-200);
}
.portfolio-item:first-child { border-top: 1px solid var(--slate-200); }

@media (max-width: 700px) {
  .portfolio-item { grid-template-columns: 1fr; gap: 8px; }
}

.portfolio-tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--indigo-mid); padding-top: 3px;
}

.portfolio-text { font-size: 15px; color: var(--slate-700); line-height: 1.65; }

.portfolio-accent {
  display: inline-block;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  white-space: nowrap; margin-top: 4px;
}

/* ─── References ─────────────────────────────────────────── */
.references-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.reference-pill {
  background: var(--off-white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 13px; font-weight: 500;
  color: var(--slate-700);
  cursor: default;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.reference-pill:hover { background: var(--indigo-soft); border-color: var(--indigo-mid); color: var(--indigo); }

/* ─── Patents ────────────────────────────────────────────── */
.patents-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.patent-link {
  display: inline-flex;
  align-items: center; gap: 10px;
  color: var(--slate-700); font-size: 14px;
  text-decoration: none;
  padding: 14px 20px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.patent-link:hover { border-color: var(--gold-vivid); color: var(--slate-900); background: #fef9c3; }
.patent-link .icon { font-size: 16px; flex-shrink: 0; }

/* ─── Approach ───────────────────────────────────────────── */
.approach-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) { .approach-layout { grid-template-columns: 1fr; } }

.principle-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--glass-shadow);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.principle-card:hover {
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 12px 40px rgba(12, 21, 36, 0.12);
  transform: translateY(-2px);
}

.principle-number {
  font-family: var(--font-display);
  font-size: 48px; line-height: 1;
  color: var(--slate-200);
  margin-bottom: 12px; font-style: italic;
}

.principle-title {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--slate-900); margin-bottom: 10px;
}

.principle-text { font-size: 14px; color: var(--slate-400); line-height: 1.65; }

/* ─── Destination ────────────────────────────────────────── */
.destination-glass {
  background: linear-gradient(135deg,
    rgba(250,250,250,0.82) 0%,
    rgba(238,242,255,0.78) 55%,
    rgba(254,252,232,0.74) 100%
  );
  backdrop-filter: blur(28px) saturate(2.2);
  -webkit-backdrop-filter: blur(28px) saturate(2.2);
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 32px;
  box-shadow: 0 24px 80px rgba(12, 21, 36, 0.11),
              inset 0 1px 0 rgba(255,255,255,0.85);
  padding: clamp(48px, 7vw, 96px) clamp(32px, 6vw, 80px);
  text-align: center;
}

.destination-glass .section-title {
  max-width: 700px; margin-left: auto; margin-right: auto; margin-bottom: 20px;
}
.destination-glass .section-title em { color: var(--gold-vivid); }

.destination-glass .section-lead {
  max-width: 520px; margin-left: auto; margin-right: auto;
}

.destination-ctas {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; margin-top: 40px;
}

/* ─── Contact / Footer ───────────────────────────────────── */
#contact {
  min-height: auto;
  padding: 80px clamp(24px, 8vw, 120px) 48px;
  position: relative; z-index: 1;
}

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: start;
  max-width: 900px; margin: 0 auto;
}
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-label {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--slate-400); margin-bottom: 8px;
}

.contact-value {
  font-family: var(--font-display);
  font-size: 26px; color: var(--slate-900);
  text-decoration: none; display: block;
  transition: color 0.2s;
}
.contact-value:hover { color: var(--indigo-mid); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; }

.footer-link {
  font-size: 13px; color: var(--slate-400);
  text-decoration: none; transition: color 0.2s;
}
.footer-link:hover { color: var(--indigo-mid); }

.footer-bottom {
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid var(--slate-200);
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
  max-width: 900px; margin-left: auto; margin-right: auto;
}
.footer-bottom p { font-size: 12px; color: var(--slate-400); }

/* ─── Lightboxes ─────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(12, 21, 36, 0.52);
  backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox-overlay.active { display: flex; }

.lightbox-box {
  background: var(--white);
  border-radius: 24px; padding: 48px;
  max-width: 640px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(12, 21, 36, 0.22);
}

.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  background: var(--off-white); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  cursor: pointer; font-size: 18px; color: var(--slate-700);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: var(--slate-200); }

.lightbox-box h2 { font-family: var(--font-display); font-size: 28px; margin-bottom: 24px; color: var(--slate-900); }
.lightbox-box h3 { font-size: 15px; font-weight: 600; color: var(--slate-700); margin: 20px 0 8px; }
.lightbox-box p  { font-size: 14px; color: var(--slate-400); line-height: 1.7; margin-bottom: 8px; }
.lightbox-box a  { color: var(--indigo-mid); }

/* ─── Scroll Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }

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