/* ================================================================
   ARTIFAQT — site.css
   Dark, immersive, high-end. Mobile-first.
================================================================ */

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

:root {
  --black:        #000000;
  --near-black:   #080808;
  --surface-1:    #0d0d0d;
  --surface-2:    #111111;
  --surface-3:    #1a1a1a;
  --white:        #ffffff;
  --off-white:    #e8e8e8;
  --muted:        #555555;
  --muted-light:  #888888;
  --accent:       #ff0101;       /* neon red */
  --accent-dim:   rgba(255,1,1,0.15);
  --chrome:       #c8c8d0;

  --font-sans:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  --nav-h:        64px;
  --section-pad:  clamp(80px, 12vw, 140px);
  --container:    1100px;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.76, 0, 0.24, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img, iframe, video {
  display: block;
  max-width: 100%;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar            { width: 4px; }
::-webkit-scrollbar-track      { background: var(--black); }
::-webkit-scrollbar-thumb      { background: var(--surface-3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover{ background: var(--muted); }

/* ── SELECTION ────────────────────────────────────────────── */
::selection {
  background: var(--accent-dim);
  color: var(--white);
}

/* ── CONTAINER ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

/* ── SECTION BASE ─────────────────────────────────────────── */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section-header {
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}

.section-subtext {
  margin-top: 12px;
  font-size: clamp(13px, 1.4vw, 15px);
  color: var(--muted);
  font-weight: 300;
}

/* ── REVEAL ANIMATIONS ────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.22s; }
.delay-3 { transition-delay: 0.36s; }


/* ================================================================
   NAVIGATION
================================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255,255,255,0.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--white);
  opacity: 0.9;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 1; }

/* ── Desktop links ─── */
.nav-links-desktop {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-light);
  transition: color 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav-link:hover       { color: var(--white); }
.nav-link:hover::after { width: 100%; }

/* ── Hamburger button ─── */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 300;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out);
}

/* Resting: two bars offset from center */
.nav-toggle::before { transform: translate(-50%, calc(-50% - 6px)); }
.nav-toggle::after  { transform: translate(-50%, calc(-50% + 6px)); }

/* Open: both rotate through center → clean X */
.nav-toggle.open::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle.open::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ── Mobile full-screen menu (outside #nav in DOM) ─── */
.mobile-menu {
  display: none;
}

@media (max-width: 700px) {
  /* Hide desktop links */
  .nav-links-desktop {
    display: none;
  }

  /* Show hamburger */
  .nav-toggle {
    display: block;
  }

  /* Mobile overlay */
  .mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.96);
    align-items: center;
    justify-content: center;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-link {
    font-family: var(--font-mono);
    font-size: clamp(22px, 6vw, 32px);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--off-white);
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-link:hover,
  .mobile-link:active {
    color: var(--accent);
  }
}


/* ================================================================
   HERO
================================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Media layer ─── */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
}

/* ── Overlay ─── */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.75) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.65) 100%);
}

/* ── Grain ─── */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
}

/* ── Hero content ─── */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vw, 24px);
  padding: 0 24px;
  width: 100%;
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-light);
  font-weight: 400;
}

.hero-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(44px, 13vw, 130px);
  letter-spacing: 0.06em;
  line-height: 1;
  /* Chrome shimmer */
  background: linear-gradient(135deg, #ffffff 0%, #c8c8d8 40%, #ffffff 60%, #a0a0b0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Prevent overflow on small screens */
  max-width: 100%;
  word-break: break-word;
}

.hero-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.8;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  transition: color 0.3s, transform 0.3s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 8px;
}

.hero-cta:hover {
  color: var(--white);
  transform: translateY(4px);
}

/* ── Scroll indicator ─── */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0));
  margin: 0 auto;
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.6); }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: clamp(36px, 15vw, 52px);
  }
}


/* ================================================================
   WORLD / ABOUT
================================================================ */
.world-section {
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.world-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(40px, 8vw, 80px);
  align-items: center;
}

.world-statement {
  font-family: var(--font-mono);
  font-size: clamp(20px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: clamp(24px, 4vw, 40px);
  letter-spacing: 0.02em;
}

.world-body {
  color: var(--muted-light);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.9;
  margin-bottom: 20px;
  font-weight: 300;
}

.world-tagline {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: clamp(24px, 3vw, 36px);
  opacity: 0.85;
}

/* Sigil */
.world-sigil {
  position: relative;
  width: clamp(100px, 18vw, 220px);
  aspect-ratio: 1;
  flex-shrink: 0;
}

.sigil-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  inset: 0;
  margin: auto;
}

.ring-1 {
  width: 100%;
  height: 100%;
  border-color: rgba(255,1,1,0.15);
  animation: ringRotate 24s linear infinite;
}

.ring-2 {
  width: 70%;
  height: 70%;
  border-color: rgba(255,1,1,0.25);
  animation: ringRotate 16s linear infinite reverse;
}

.ring-3 {
  width: 40%;
  height: 40%;
  border-color: rgba(255,1,1,0.4);
  animation: ringRotate 10s linear infinite;
}

.sigil-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  box-shadow: 0 0 20px 6px rgba(255,1,1,0.3);
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .world-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .world-sigil {
    width: 90px;
    margin: 0 auto;
    order: -1;
  }
  .world-tagline {
    margin-left: auto;
    margin-right: auto;
  }
}


/* ================================================================
   SOUND
================================================================ */
.sound-section {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.sound-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}

.sound-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sound-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sound-channel {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.sc-embed-wrap {
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
}

.sc-embed-wrap iframe {
  display: block;
  border: none;
}

.sound-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  align-self: flex-start;
}

.sound-external:hover {
  color: var(--white);
}

.sound-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 720px) {
  .sound-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   PRESENCE
================================================================ */
.presence-section {
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.presence-content {
  max-width: 640px;
}

.presence-statement {
  font-family: var(--font-sans);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 300;
  color: var(--off-white);
  line-height: 1.5;
  margin-bottom: clamp(32px, 5vw, 56px);
  font-style: italic;
}

.presence-placeholder {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(32px, 5vw, 48px);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.presence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}

.presence-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  flex-shrink: 0;
}

.presence-venue {
  font-size: 14px;
  color: var(--muted-light);
  flex: 1;
  min-width: 80px;
}

.presence-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}

.presence-status.upcoming {
  color: var(--accent);
  border: 1px solid rgba(255,1,1,0.3);
  background: rgba(255,1,1,0.08);
}

.presence-email {
  color: var(--off-white);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: color 0.2s, border-color 0.2s;
}

.presence-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.presence-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .presence-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}


/* ================================================================
   LAB
================================================================ */
.lab-section {
  background: var(--surface-1);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 20px);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.lab-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface-2);
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
  cursor: default;
}

.lab-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.lab-card-media {
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
}

.lab-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px;
  /* Subtle animated gradient to signal "active / coming" */
  background: linear-gradient(135deg,
    rgba(255,1,1,0.04) 0%,
    rgba(0,0,0,0) 60%
  );
}

.lab-card-type {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.06);
}

.lab-card-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.lab-card-title {
  font-size: 13px;
  color: var(--off-white);
  font-weight: 400;
  line-height: 1.3;
}

.lab-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* TikTok card overrides */
.lab-card-media--tiktok {
  aspect-ratio: unset;
  height: auto;
  overflow: visible;
  background: var(--black);
}

.lab-card--tiktok .tiktok-embed {
  margin: 0 !important;
  min-width: unset !important;
  max-width: 100% !important;
  width: 100% !important;
}

.lab-card--tiktok .tiktok-embed iframe {
  width: 100% !important;
}

.lab-footer {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.lab-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.lab-more:hover {
  color: var(--white);
}

@media (max-width: 900px) {
  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .lab-grid {
    gap: 10px;
  }
}


/* ================================================================
   CONTACT
================================================================ */
.contact-section {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
}

.contact-heading {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.contact-body {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--muted-light);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 28px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: 0.04em;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 4px;
  transition: border-color 0.2s, color 0.2s;
  word-break: break-all;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Social links */
.social-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 16px;
  -webkit-tap-highlight-color: transparent;
}

.social-link:hover .social-handle {
  color: var(--white);
}

.social-platform {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 90px;
  flex-shrink: 0;
}

.social-handle {
  font-size: 14px;
  color: var(--muted-light);
  transition: color 0.2s;
}

@media (max-width: 680px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: clamp(40px, 10vw, 60px);
  }
}

@media (max-width: 400px) {
  .social-platform {
    min-width: 70px;
  }
  .social-handle {
    font-size: 13px;
  }
}


/* ================================================================
   FOOTER
================================================================ */
#footer {
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.6;
}

.footer-top {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.footer-top:hover {
  color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 520px) {
  .footer-inner {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 16px;
  }
}


/* ================================================================
   FOOTER — legal links
================================================================ */
.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-legal-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.footer-legal-link:hover {
  opacity: 1;
  color: var(--off-white);
}

@media (max-width: 520px) {
  .footer-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}


/* ================================================================
   LEGAL MODALS (Impressum / Datenschutz)
================================================================ */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.legal-modal:not([hidden]) {
  opacity: 1;
}

/* hidden via attribute — keep display:flex but invisible when hidden */
.legal-modal[hidden] {
  display: none;
}

.legal-modal-inner {
  position: relative;
  background: var(--surface-1);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 52px);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.legal-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
}

.legal-modal-close:hover {
  color: var(--white);
}

.legal-heading {
  font-family: var(--font-mono);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 6px;
}

.legal-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.legal-block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.legal-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 10px;
}

.legal-block p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted-light);
}

.legal-block p + p {
  margin-top: 10px;
}

.legal-block a {
  color: var(--off-white);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: color 0.2s, border-color 0.2s;
}

.legal-block a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.legal-block strong {
  color: var(--off-white);
  font-weight: 500;
}


/* ================================================================
   FOCUS / ACCESSIBILITY
================================================================ */
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
