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

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-var.woff2?v=20260226") format("woff2");
}

:root {
  --bg-base:        #030712;
  --bg-surface:     #111827;
  --accent:         #2563eb;
  --accent-glow:    rgba(255,255,255,0.12);
  --font-sans:      "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display:   "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-logo:      "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:      "Inter", ui-monospace, SFMono-Regular, monospace;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: #f3f4f6;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(37,99,235,0.3); }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─── Layout Helpers ────────────────────────────────────────────────────── */
.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
/* ─── Utilities ─────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
  .hidden-sm { display: none; }
}

/* ─── Background Layer ──────────────────────────────────────────────────── */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, black 0%, transparent 100%);
  mask-image:         radial-gradient(ellipse 60% 70% at 50% 30%, black 0%, transparent 100%);
}
.bg-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 50%);
  opacity: 0.25;
  filter: blur(48px);
  border-radius: 50%;
}

/* ─── Navbar ────────────────────────────────────────────────────────────── */
nav {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 50;
  padding-top: 1rem;
}
.nav-inner {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo svg { color: #3b82f6; }
.nav-logo span {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.nav-logo__image {
  display: block;
  height: 2.4rem;
  width: auto;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-lang {
  color: #9ca3af;
  font-weight: 500;
  transition: color .2s;
}
.nav-lang:hover { color: #fff; }
.btn-nav {
  padding: 0.625rem 1.25rem;
  background: #fff;
  color: #000;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background .2s;
}
.btn-nav:hover { background: #e5e7eb; }

.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  position: relative;
  z-index: 60;
  border-radius: 9999px;
  border: 1px solid rgba(148,163,184,0.28);
  background: rgba(15,23,42,0.55);
  color: #9ca3af;
  transition: color .2s, background-color .2s, border-color .2s;
}
.nav-hamburger:hover { color: #fff; }
.nav-hamburger.is-open {
  color: #fff;
  background: rgba(15,23,42,0.85);
  border-color: rgba(203,213,225,0.45);
}

/* Mobile menu */
.mobile-menu {
  display: flex;
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100dvh;
  background: linear-gradient(180deg, rgba(3,7,18,0.96), rgba(3,7,18,0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: calc(5.25rem + env(safe-area-inset-top)) 1.5rem 2rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.mobile-menu a {
  width: min(24rem, 100%);
  text-align: center;
  color: #e5e7eb;
  padding: 0.95rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(148,163,184,0.28);
  background: rgba(15,23,42,0.35);
  font-size: 1.05rem;
  font-weight: 600;
  transition: color .2s, background-color .2s, border-color .2s;
}
.mobile-menu a:hover {
  color: #fff;
  background: rgba(148,163,184,0.16);
  border-color: rgba(203,213,225,0.42);
}
.mobile-menu .btn-nav {
  width: min(24rem, 100%);
  margin-top: 0;
  padding: 0.78rem 1.25rem;
  border: 1px solid rgba(96,165,250,0.45);
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #f8fafc;
}
.mobile-menu .btn-nav:hover {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

@media (min-width: 768px) {
  .nav-links        { display: flex; }
  .nav-hamburger    { display: none; }
  .mobile-menu      { display: none !important; }
}

/* ─── Main wrapper ──────────────────────────────────────────────────────── */
main { position: relative; z-index: 10; flex-grow: 1; }
main::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.02));
  pointer-events: none;
  z-index: -1;
}
#root-wrap { display: flex; flex-direction: column; min-height: 100vh; }

/* ─── Hero Section ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 8rem;
  padding-bottom: 4rem;
  padding-inline: 1.25rem;
  text-align: center;
}
@media (min-width: 768px) {
  .hero { padding-top: 14rem; padding-bottom: 12rem; padding-inline: 1.5rem; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #d1d5db;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  position: relative;
}
@media (min-width: 768px) { .hero h1 { margin-bottom: 2rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 6.5rem; } }

.text-gradient {
  background: linear-gradient(to right, #fff, #d1d5db, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1rem;
  color: #9ca3af;
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 2rem;
  line-height: 1.7;
}
@media (min-width: 768px) { .hero p { font-size: 1.25rem; margin-bottom: 3rem; } }

.hero-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
@media (min-width: 640px) { .hero-btns { flex-direction: row; } }

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  min-width: 10rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9375rem;
  width: 100%;
}
@media (min-width: 640px) {
  .btn-primary, .btn-secondary { width: auto; padding: 1rem 2rem; min-width: 12rem; font-size: 1rem; }
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: #3b82f6; }
.btn-primary svg { transition: transform .2s; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.10); }

/* ─── Hero Decorative Dots ──────────────────────────────────────────────── */
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }

.hero-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  animation: twinkle 3s ease-in-out infinite;
}
.hero-dot-1 { top: 15%; left: 8%;  animation-delay: 0.5s; }
.hero-dot-2 { top: 35%; right: 8%; animation-delay: 1s; }
.hero-dot-3 { top: 10%; left: 55%; animation-delay: 2s; }
.hero-dot-4 { top: 40%; left: 22%; animation-delay: 2.5s; }
.hero-dot-5 { bottom: 25%; left: 10%; animation-delay: 0.8s; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

@media (max-width: 639px) {
  .hero-stars { display: none; }
}

/* ─── IDE Preview ────────────────────────────────────────────────────────── */
.ide-section {
  padding-inline: 1rem;
  padding-bottom: 6rem;
}
@media (min-width: 768px) {
  .ide-section { padding-inline: 1.5rem; padding-bottom: 10rem; }
}
.ide-wrapper {
  max-width: 56rem;
  margin-inline: auto;
  position: relative;
}
.ide-glow {
  position: absolute;
  inset: -16px;
  background: linear-gradient(135deg, #3b82f6, #6366f1, #9333ea);
  border-radius: 1.5rem;
  filter: blur(36px);
  opacity: 0.25;
  animation: ideGlow 6s ease-in-out infinite;
}
@keyframes ideGlow {
  0%, 100% { opacity: 0.2;  transform: scale(1); }
  50%      { opacity: 0.3;  transform: scale(1.02); }
}
.ide-shell {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(10,15,28,0.95);
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
@media (min-width: 768px) { .ide-shell { border-radius: 1rem; font-size: 0.875rem; } }

.ide-titlebar {
  height: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  justify-content: space-between;
  flex-shrink: 0;
}
.ide-dots { display: flex; gap: 0.5rem; }
.ide-dot  { width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.dot-red    { background: rgba(239,68,68,0.8); }
.dot-yellow { background: rgba(234,179,8,0.8); }
.dot-green  { background: rgba(34,197,94,0.8); }

.ide-filename {
  color: #9ca3af;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
}
.ide-filename svg { color: #60a5fa; }

.ide-body {
  display: flex;
  flex: 1;
  height: 320px;
}
@media (min-width: 768px) { .ide-body { height: 450px; } }

.ide-sidebar {
  width: 14rem;
  border-right: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.01);
  display: none;
  flex-direction: column;
  padding: 1rem 0.75rem;
  gap: 0.375rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
@media (min-width: 768px) { .ide-sidebar { display: flex; font-size: 0.875rem; } }

/* Mobile tab bar */
.ide-mobile-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  scrollbar-width: none;
  flex-shrink: 0;
}
.ide-mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tab {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #848d9c;
  white-space: nowrap;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.mobile-tab:hover { color: #9ca3af; }
.mobile-tab.active {
  color: #e5e7eb;
  border-bottom-color: #3b82f6;
  background: rgba(59,130,246,0.05);
}
@media (min-width: 768px) { .ide-mobile-tabs { display: none; } }

.sidebar-heading {
  color: #848d9c;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.625rem;
  margin-bottom: 0.75rem;
  padding-inline: 0.5rem;
}
.sidebar-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.sidebar-file:hover { background: rgba(255,255,255,0.05); }
.sidebar-file.active {
  background: rgba(59,130,246,0.1);
  color: #e5e7eb;
  border: 1px solid rgba(59,130,246,0.2);
}

.ext-ts    { color: #60a5fa; font-weight: 700; }
.ext-js    { color: #facc15; font-weight: 700; }
.ext-json  { color: #4ade80; font-weight: 700; }
.ext-md    { color: #a78bfa; font-weight: 700; }
.ext-html  { color: #f97316; font-weight: 700; }

.tok-gray  { color: #848d9c; font-style: italic; }

@keyframes fadePanel {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ide-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.code-area {
  animation: fadePanel .25s ease;
  flex: 1;
  min-height: 0;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  overflow: hidden;
}
.line-numbers {
  display: flex;
  flex-direction: column;
  color: #4b5563;
  text-align: right;
  user-select: none;
  opacity: 0.5;
  flex-shrink: 0;
}
.line-numbers span { line-height: 1.625; font-size: 0.875rem; }
.code-lines {
  display: flex;
  flex-direction: column;
  color: #d1d5db;
  white-space: pre;
  font-size: 0.875rem;
  line-height: 1.625;
  overflow: hidden;
}
@media (min-width: 768px) {
  .line-numbers span { font-size: 0.875rem; }
  .code-lines { font-size: 0.875rem; }
}
.code-lines .line { display: block; }

.tok-purple  { color: #c084fc; }
.tok-blue    { color: #93c5fd; }
.tok-green   { color: #86efac; }
.tok-yellow  { color: #fde047; }
.tok-orange  { color: #fb923c; }

/* ─── IDE Terminal ──────────────────────────────────────────────────────── */
.ide-terminal {
  height: 10rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #050810;
  padding: 0.75rem 0.75rem 1rem;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
@media (min-width: 768px) { .ide-terminal { height: 11rem; padding: 1rem 1rem 1.25rem; font-size: 0.8125rem; } }

.term-tabs {
  display: flex;
  gap: 1.5rem;
  color: #848d9c;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
}
@media (min-width: 768px) {
  .ide-filename { font-size: 0.9375rem; }
  .term-tabs { font-size: 0.8125rem; }
}
.term-tab-active {
  color: #e5e7eb;
  border-bottom: 2px solid #60a5fa;
  margin-bottom: -0.5rem;
  padding-bottom: 0.375rem;
}
.term-tabs span { cursor: pointer; transition: color .15s; }
.term-tabs span:hover { color: #d1d5db; }

@media (max-width: 767px) {
  .ide-terminal { padding-block: 0.625rem; }
  .term-tabs {
    gap: 1.25rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    font-size: 0.6875rem;
  }
  .term-tab-active {
    margin-bottom: -0.375rem;
    padding-bottom: 0.25rem;
  }
  .term-content[data-term="terminal"] {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    line-height: 1.25;
    padding-bottom: 0.125rem;
  }
  .term-content[data-term="terminal"] > div { margin-top: 0 !important; }
}

.t-green  { color: #4ade80; }
.t-gray   { color: #9ca3af; }
.t-blue   { color: #60a5fa; }
.t-white  { color: #f3f4f6; }

.term-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: #9ca3af;
  vertical-align: text-bottom;
  animation: pulse 1.2s steps(1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-base);
  position: relative;
  z-index: 20;
}
.footer-inner {
  max-width: 80rem;
  margin-inline: auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) { .footer-inner { padding: 0 1.5rem; } }

.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: #848d9c;
}

.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: #848d9c; transition: color .2s; }
.footer-bottom-links a:hover { color: #fff; }

/* ─── Scroll-reveal ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── Hero entrance animations ──────────────────────────────────────────── */
.hero-badge, .hero h1, .hero p, .hero-btns {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s ease forwards;
}
.hero h1    { animation-delay: 0.1s; }
.hero p     { animation-delay: 0.2s; }
.hero-btns  { animation-delay: 0.3s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Typewriter cursor ─────────────────────────────────────────────────── */
.type-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1.1em;
  background: #93c5fd;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: cursorBlink 1.1s steps(1) infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ─── Contact Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
body.modal-open { overflow: hidden; }

.modal-panel {
  position: relative;
  width: 90%;
  max-width: 32rem;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(165deg, rgba(17,24,39,0.98), rgba(3,7,18,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  padding: 2.5rem;
  transform: translateY(16px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 60px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-overlay.active .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  color: #848d9c;
  transition: color 0.2s, background 0.2s;
  padding: 0.375rem;
  border-radius: 0.375rem;
}
.modal-close:hover { color: #fff; background: rgba(255,255,255,0.06); }

.modal-header { margin-bottom: 2rem; }
.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.modal-header p {
  color: #848d9c;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8125rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.625rem;
  color: #f3f4f6;
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #4b5563; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.form-group input.invalid,
.form-group textarea.invalid { border-color: #ef4444; }
.form-group textarea { resize: vertical; }

.modal-submit { width: 100%; margin-top: 0.75rem; }

.modal-success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}
.modal-success.visible { display: block; }
.success-icon {
  width: 4rem; height: 4rem;
  background: rgba(34,197,94,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #4ade80;
}
.modal-success h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.modal-success p { color: #9ca3af; }

/* ─── Legal Page ────────────────────────────────────────────────────────── */
.legal-doc { overflow-y: scroll; }
.legal-doc body::after { display: none; }
.legal-doc main::after { display: none; }

/* Impressum header */
.header {
  position: relative;
  width: 100%;
  z-index: 50;
  padding-top: 1rem;
}
.header__inner {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo__image {
  display: block;
  height: 2.4rem;
  width: auto;
}
.logo__wordmark {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.header__contact {
  color: #9ca3af;
  transition: color .2s;
}
.header__contact:hover { color: #fff; }
.header__lang {
  color: #9ca3af;
  font-weight: 500;
  transition: color .2s;
}
.header__lang:hover { color: #fff; }

/* Impressum page body layout */
.legal-doc body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%);
  background-attachment: fixed;
}
.legal-doc main {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

/* Impressum footer */
footer.footer {
  background: var(--bg-base);
  position: relative;
  z-index: 20;
  margin-top: auto;
}
footer.footer .container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.footer__inner {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #848d9c;
}
.footer__link {
  color: #848d9c;
  transition: color .2s;
}
.footer__link:hover { color: #fff; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  color: #fff;
  border-radius: 0.25rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

@media (max-width: 47.99em) {
  .logo__image { height: 2rem; }
}

.legal-page {
  width: 100%;
  padding-block: clamp(1.5rem, 4svh, 2.5rem);
}
.legal-layout {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
}
.legal-page h1 {
  font-size: clamp(1.85rem, 3.1vw, 2.35rem);
  margin-bottom: clamp(1.5rem, 3svh, 2rem);
}
.legal-panel {
  width: 44rem;
  max-width: 100%;
  position: relative;
  padding: clamp(2rem, 4vw, 2.75rem);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  background: rgba(17,19,24,0.78);
  box-shadow: 0 12px 36px rgba(0,0,0,0.24);
  overflow: hidden;
}
.legal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(255,255,255,0.025) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 90%, rgba(255,255,255,0.015) 0%, transparent 60%);
}
.legal-panel > * { position: relative; z-index: 1; }

.legal-section h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: #f3f4f6;
}
.legal-section + .legal-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.legal-meta { display: grid; gap: 1rem; }
.legal-meta > div {
  display: grid;
  grid-template-columns: minmax(8ch, 12ch) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: baseline;
}
.legal-meta dt  { font-size: 0.9375rem; color: #9ca3af; }
.legal-meta dd  { color: #d1d5db; }
.legal-meta address { font-style: normal; color: #d1d5db; }

.legal-page a { color: #60a5fa; text-decoration: none; transition: color 0.2s; }
.legal-page a:hover { color: #93c5fd; }

/* ─── Focus Styles ──────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── 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;
  }
}

/* ─── Mobile adjustments ────────────────────────────────────────────────── */
@media (max-width: 47.99em) {
  .nav-logo__image { height: 2rem; }
  .legal-page { padding-block: 1.25rem; }
  .legal-panel { width: 100%; padding: 1.5rem; }
  .legal-meta > div { grid-template-columns: 1fr; gap: 0.3rem; }
}
