/* =============================================
   Legal Hub — InfraCraft Design System
   Dark default · EN default · Phosphor icons
   ============================================= */

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

/* ─── Design Tokens ─── */
:root {
  --bg:        #090909;
  --bg2:       #141414;
  --surf:      rgba(255,255,255,0.04);
  --bdr:       rgba(255,255,255,0.09);
  --bdr2:      rgba(255,255,255,0.05);
  --tx:        #EDEDED;
  --tx2:       #888888;
  --tx3:       #616161;
  --blue:      #2563EB;
  --blue2:     #1D4ED8;
  --cyan:      #0891B2;
  --green:     #059669;
  --grad:      linear-gradient(135deg,#2563EB,#0891B2);
  --ease:      cubic-bezier(.25,.46,.45,.94);
  --t:         .2s;
  --r1: 5px; --r2: 8px; --r3: 10px;
  --sh-card:   0 0 0 1px rgba(255,255,255,0.06);
}

[data-theme="light"] {
  --bg:#FAFAFA; --bg2:#F0F0F0;
  --surf:rgba(0,0,0,.04); --bdr:rgba(0,0,0,.1); --bdr2:rgba(0,0,0,.06);
  --tx:#0F172A; --tx2:#555555; --tx3:#999999;
  --sh-card:0 0 0 1px rgba(0,0,0,0.09);
}

/* ─── Base ─── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

a { color: var(--blue); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--blue); text-decoration: underline; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--r2);
}

/* ─── Accessibility ─── */
.skip-link {
  position: absolute; left: 8px; top: -120px;
  background: var(--blue); color: #fff;
  padding: 8px 18px; border-radius: 0 0 var(--r2) var(--r2);
  font-size: 13px; font-weight: 600; z-index: 9999;
  text-decoration: none; transition: top var(--t);
}
.skip-link:focus { top: 0; }

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

/* ─── i18n ─── */
[data-lang="de"] .lang-en { display: none; }
[data-lang="en"] .lang-de { display: none; }

/* ─── Layout ─── */
.ws { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Fade-in ─── */
.fi { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.fi.vis { opacity: 1; transform: none; }
.fi-d1 { transition-delay: .08s; }
.fi-d2 { transition-delay: .16s; }
.fi-d3 { transition-delay: .24s; }
.fi-d4 { transition-delay: .32s; }
.fi-d5 { transition-delay: .40s; }

/* ─── Nav ─── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999; height: 56px;
  background: rgba(9,9,9,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bdr2);
  transition: background var(--t) var(--ease);
}
[data-theme="light"] .site-nav { background: rgba(250,250,250,.94); }

.nav-in {
  max-width: 820px; margin: 0 auto; padding: 0 1.5rem; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; }

.nav-logo-bolt {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--grad);
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .875rem; font-weight: 700; letter-spacing: -.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-controls {
  display: flex; align-items: center; gap: .4rem;
}

.nav-btn {
  height: 30px; padding: 0 .65rem;
  background: transparent; border: 1px solid var(--bdr); border-radius: var(--r1);
  color: var(--tx3); font-family: inherit; font-size: .76rem; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: .3rem;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
}
.nav-btn:hover { color: var(--tx); border-color: var(--bdr); background: var(--surf); }
.nav-btn.active { color: var(--tx2); border-color: var(--bdr); }

/* ─── Page scaffold ─── */
.page-wrap {
  padding-top: 80px;
  padding-bottom: 80px;
}

/* ─── Section label ─── */
.s-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tx3); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem;
}
.s-label::before {
  content: ''; display: inline-block; width: 14px; height: 2px; background: var(--blue);
  flex-shrink: 0;
}

/* ─── Section title ─── */
.s-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1.1; color: var(--tx); margin-bottom: .75rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}
.s-sub { font-size: .875rem; color: var(--tx2); max-width: 52ch; line-height: 1.65; }

/* ─── Gradient text ─── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Eyebrow with pulse dot ─── */
.eyebrow {
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tx3); margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.eyebrow::before {
  content: ''; width: 7px; height: 7px; background: var(--green); border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ─── Hero ─── */
.hero { padding: 3rem 0 2.5rem; }
.hero-h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700; letter-spacing: -.05em; line-height: 1.05;
  margin-bottom: .75rem;
}
.hero-sub { font-size: .9375rem; color: var(--tx2); line-height: 1.7; max-width: 50ch; }

/* ─── Background radial glow ─── */
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(37,99,235,.07) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

main { position: relative; z-index: 1; }

/* ─── Card grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ─── Link card (hub) ─── */
.link-card {
  display: flex; flex-direction: column; gap: .875rem;
  background: var(--surf);
  box-shadow: var(--sh-card);
  border-radius: var(--r3);
  padding: 1.5rem;
  text-decoration: none; color: var(--tx);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
  cursor: pointer;
}
.link-card:hover {
  box-shadow: 0 0 0 1px var(--blue), 0 8px 24px rgba(37,99,235,.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.link-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.lc-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem;
}

.lc-icon-box {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(37,99,235,.12);
  border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  transition: background var(--t) var(--ease);
}
.link-card:hover .lc-icon-box { background: rgba(37,99,235,.2); }

.lc-arrow {
  color: var(--tx3);
  transition: transform var(--t) var(--ease), color var(--t) var(--ease);
  display: flex; align-items: center;
}
.link-card:hover .lc-arrow { transform: translateX(3px); color: var(--blue); }

.lc-meta {
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tx3); margin-bottom: .25rem;
}
.lc-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em;
  color: var(--tx); margin-bottom: .35rem;
}
.lc-desc { font-size: .8125rem; color: var(--tx2); line-height: 1.6; }

/* ─── Sites section ─── */
.sites-section { margin-top: 3rem; }

.sites-card {
  background: var(--surf);
  box-shadow: var(--sh-card);
  border-radius: var(--r3);
  padding: 1.5rem;
  margin-top: 1rem;
}

.site-row {
  display: flex; align-items: flex-start; gap: .875rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--bdr2);
}
.site-row:last-child { border-bottom: none; padding-bottom: 0; }
.site-row:first-child { padding-top: 0; }

.site-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0; margin-top: 5px;
}
.site-dot.cyan { background: var(--cyan); }
.site-dot.green { background: var(--green); }

.site-info { min-width: 0; flex: 1; }

.site-url {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .8125rem; font-weight: 500; color: var(--tx);
  text-decoration: none; transition: color var(--t) var(--ease);
}
.site-url:hover { color: var(--blue); text-decoration: none; }
.site-url svg { flex-shrink: 0; opacity: .5; transition: opacity var(--t) var(--ease); }
.site-url:hover svg { opacity: 1; }

.site-desc { font-size: .75rem; color: var(--tx3); margin-top: .15rem; }

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex; align-items: center; gap: .35rem;
  margin-bottom: 1.75rem;
  font-size: .8125rem; color: var(--tx3);
}
.breadcrumb a {
  color: var(--tx3); text-decoration: none;
  transition: color var(--t) var(--ease);
}
.breadcrumb a:hover { color: var(--tx2); }
.breadcrumb .bc-cur { color: var(--tx2); }

/* ─── Page header (subpages) ─── */
.page-header { margin-bottom: 2.5rem; }

.page-header h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700; letter-spacing: -.04em; line-height: 1.1;
  color: var(--tx); margin-bottom: .5rem;
}
.page-header .s-sub { margin-top: .5rem; }

/* ─── Legal cards (subpages) ─── */
.legal-card {
  background: var(--surf);
  box-shadow: var(--sh-card);
  border-radius: var(--r3);
  padding: 1.5rem;
  margin-bottom: .875rem;
  transition: box-shadow var(--t) var(--ease);
}

.card-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tx3); margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--bdr2);
  display: flex; align-items: center; gap: .4rem;
}

.legal-card h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .9375rem; font-weight: 600; color: var(--tx);
  margin: 1.25rem 0 .5rem; letter-spacing: -.02em;
}
.legal-card h3:first-child { margin-top: 0; }

.legal-card p {
  font-size: .875rem; color: var(--tx2); line-height: 1.75; margin-bottom: .625rem;
}
.legal-card p:last-child { margin-bottom: 0; }

.legal-card address { font-style: normal; }

.legal-card a { color: var(--blue); }
.legal-card a:hover { text-decoration: underline; }

.legal-card strong { color: var(--tx); font-weight: 600; }

.legal-card .section-divider {
  border: none; border-top: 1px solid var(--bdr2);
  margin: 1.25rem 0;
}

/* ─── Check list (no bullets) ─── */
.check-list {
  list-style: none; display: flex; flex-direction: column; gap: .5rem;
  margin: .5rem 0;
}
.check-list li {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .875rem; color: var(--tx2); line-height: 1.6;
}
.check-list li svg { flex-shrink: 0; color: var(--green); margin-top: 2px; }
.check-list li strong { color: var(--tx); }

/* ─── Standard legal list ─── */
.legal-list {
  list-style: none; display: flex; flex-direction: column; gap: .4rem;
  margin: .625rem 0;
  padding-left: .875rem;
}
.legal-list li {
  position: relative; font-size: .875rem; color: var(--tx2); line-height: 1.7;
}
.legal-list li::before {
  content: ''; position: absolute; left: -0.875rem; top: .625em;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--blue);
}
.legal-list li strong { color: var(--tx); }
.legal-list li a { color: var(--blue); }

/* ─── Inline code (JetBrains Mono) ─── */
.code {
  font-family: 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  font-size: .75rem; background: var(--bg2);
  border: 1px solid var(--bdr2); border-radius: 4px;
  padding: 1px 6px; color: var(--tx);
}
[data-theme="light"] .code { background: #F0F0F0; }

/* ─── Note callout (warning/info) ─── */
.note-callout {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .875rem 1rem;
  background: rgba(234,179,8,.06);
  border-left: 2px solid rgba(234,179,8,.5);
  border-radius: 0 var(--r2) var(--r2) 0;
  margin: .875rem 0;
}
[data-theme="light"] .note-callout { background: rgba(234,179,8,.08); }
.note-callout svg { flex-shrink: 0; color: rgba(234,179,8,.8); margin-top: 2px; }
.note-callout p {
  font-size: .8125rem; color: var(--tx2); line-height: 1.65; margin: 0;
}

/* ─── External link inline icon ─── */
.ext-link {
  display: inline-flex; align-items: center; gap: .2rem;
  text-decoration: none; color: var(--blue);
}
.ext-link:hover { text-decoration: underline; }
.ext-link svg { flex-shrink: 0; opacity: .7; }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--bdr2);
  padding: 1.5rem 0;
  margin-top: 1rem;
}
.footer-in {
  max-width: 820px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  font-size: .8125rem; color: var(--tx3);
}
.footer-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.footer-links a {
  color: var(--tx3); transition: color var(--t) var(--ease);
  display: inline-flex; align-items: center; gap: .2rem;
}
.footer-links a:hover { color: var(--tx2); text-decoration: none; }
.footer-links a svg { opacity: .5; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1.4rem;
  border-radius: var(--r2); font-size: .875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--t) var(--ease);
  font-family: inherit;
}
.btn-pri { background: var(--blue); color: #fff; }
.btn-pri:hover { background: var(--blue2); }
.btn-ghost {
  background: transparent; color: var(--tx2);
  border: 1px solid var(--bdr);
}
.btn-ghost:hover { color: var(--tx); border-color: rgba(255,255,255,.2); }
[data-theme="light"] .btn-ghost:hover { border-color: rgba(0,0,0,.2); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .ws { padding: 0 1rem; }
  .nav-in { padding: 0 1rem; }
  .footer-in { padding: 0 1rem; }
  .page-wrap { padding-top: 72px; padding-bottom: 60px; }
  .hero { padding: 2rem 0 1.75rem; }
  .legal-card { padding: 1.125rem; }
  .sites-card { padding: 1.125rem; }
  .link-card { padding: 1.125rem; }
  .footer-in { flex-direction: column; align-items: flex-start; }
  .card-grid { gap: .75rem; }
}
