/* =========================================================
   Übersetzungsbüro-Verbund · premium stylesheet
   Light + Dark theme via [data-theme]
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gold: #c6a35a;
  --gold-soft: #d8bd84;
  --navy: #0e1b2c;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --container: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --shadow-sm: 0 1px 2px rgba(10, 15, 25, .06), 0 4px 14px rgba(10, 15, 25, .05);
  --shadow-lg: 0 18px 50px -18px rgba(10, 15, 25, .28);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-2: #efeae0;
  --surface: #fffdf9;
  --surface-2: #f4efe6;
  --ink: #15191f;
  --ink-soft: #444b54;
  --muted: #6c7077;
  --line: rgba(20, 25, 32, .10);
  --line-strong: rgba(20, 25, 32, .16);
  --accent: #9c7a2e;
  --accent-ink: #7d6021;
  --header-bg: rgba(252, 250, 245, .72);
  --aurora-1: rgba(198, 163, 90, .35);
  --aurora-2: rgba(46, 86, 132, .22);
  --aurora-3: rgba(160, 120, 70, .20);
  --grid-line: rgba(20, 25, 32, .035);
  --glass: rgba(255, 253, 249, .7);
  color-scheme: light;
}

/* ---------- Dark theme ---------- */
:root[data-theme="dark"] {
  --bg: #0a0d13;
  --bg-2: #0e131c;
  --surface: #121823;
  --surface-2: #161d2a;
  --ink: #eef1f6;
  --ink-soft: #c3cad6;
  --muted: #8b94a4;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --accent: #d8bd84;
  --accent-ink: #e6d2a4;
  --header-bg: rgba(12, 16, 24, .62);
  --aurora-1: rgba(198, 163, 90, .28);
  --aurora-2: rgba(58, 110, 175, .30);
  --aurora-3: rgba(120, 80, 160, .22);
  --grid-line: rgba(255, 255, 255, .035);
  --glass: rgba(18, 24, 35, .6);
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .4s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* ---------- Decorative background ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-grid {
  position: absolute; inset: -2px;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 80%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .9; transition: background .6s var(--ease); }
.blob-1 { width: 46vw; height: 46vw; background: var(--aurora-1); top: -14vw; left: -8vw; animation: drift1 26s ease-in-out infinite; }
.blob-2 { width: 40vw; height: 40vw; background: var(--aurora-2); top: 8vw; right: -12vw; animation: drift2 30s ease-in-out infinite; }
.blob-3 { width: 34vw; height: 34vw; background: var(--aurora-3); top: 60vh; left: 30vw; animation: drift1 34s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vw,5vw) scale(1.08); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw,3vw) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .5s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, var(--navy), #1d3450);
  color: var(--gold); font-family: var(--font-display); font-size: 24px; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; gap: 28px; }
.nav a { color: var(--ink-soft); font-size: 14.5px; font-weight: 500; position: relative; padding: 6px 0; transition: color .25s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); border-radius: 2px; transition: width .3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header-tools { display: flex; align-items: center; gap: 10px; }

/* Language switcher */
.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600;
  transition: border-color .25s, transform .15s;
}
.lang-btn:hover { border-color: var(--line-strong); }
.lang-flag { border-radius: 3px; }
.lang-btn .chev { color: var(--muted); transition: transform .25s var(--ease); }
.lang[aria-open="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 168px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.lang[aria-open="true"] .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; font-size: 14px; color: var(--ink-soft);
  transition: background .18s, color .18s;
}
.lang-menu li img { border-radius: 3px; }
.lang-menu li:hover { background: var(--surface-2); color: var(--ink); }
.lang-menu li[aria-selected="true"] { color: var(--accent-ink); font-weight: 600; }

/* Theme toggle */
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  transition: border-color .25s, transform .4s var(--ease);
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle:active { transform: rotate(40deg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--navy), #1f3a5a);
  color: #fdf8ee; box-shadow: 0 10px 26px -10px rgba(14, 27, 44, .65);
}
:root[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: #1a130a; box-shadow: 0 12px 30px -12px rgba(198,163,90,.5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(14, 27, 44, .7); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.btn-soft { height: 40px; padding: 0 16px; font-size: 13.5px; background: var(--surface-2); color: var(--ink-soft); border-color: var(--line); }
.btn-soft:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }
.btn-link { height: 40px; padding: 0 6px; color: var(--accent-ink); font-size: 13.5px; }
.btn-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 11vw, 130px) 0 clamp(40px, 7vw, 80px); }
.hero-inner { max-width: 880px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--glass);
}
.hero-title { font-size: clamp(2.5rem, 6.4vw, 5rem); font-weight: 600; margin: 22px 0 0; letter-spacing: -.025em; overflow-wrap: break-word; hyphens: auto; }
.accent-text {
  background: linear-gradient(120deg, var(--accent), var(--gold-soft) 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
}
.hero-sub { margin-top: 24px; font-size: clamp(1.05rem, 2.1vw, 1.3rem); color: var(--ink-soft); max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Stats */
.stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; margin: clamp(48px, 7vw, 76px) 0 0; padding: 0;
}
.stats li {
  padding: 22px 18px; border-radius: var(--radius-lg);
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  text-align: left;
}
.stat-num { display: block; font-family: var(--font-display); font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 600; color: var(--ink); line-height: 1; }
.stat-label { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted); letter-spacing: .01em; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); margin-top: 12px; }
.section-lead { margin-top: 18px; color: var(--ink-soft); font-size: clamp(1rem, 1.7vw, 1.15rem); }

/* ---------- Office cards ---------- */
.office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.office-card {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 28px; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.office-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
  opacity: .8;
}
.office-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(120% 80% at 100% 0%, var(--aurora-1), transparent 55%);
  opacity: 0; transition: opacity .4s var(--ease); pointer-events: none;
}
.office-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.office-card:hover::after { opacity: .5; }
.office-card.is-flagged { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow-lg); }

.office-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.office-logo {
  display: grid; place-items: center;
  height: 56px; min-width: 96px; padding: 10px 16px;
  background: #ffffff; border: 1px solid rgba(20,25,32,.12); border-radius: 14px;
  box-shadow: 0 4px 14px -8px rgba(10,15,25,.4);
}
.office-logo img { max-height: 34px; width: auto; object-fit: contain; }

.office-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-ink);
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface-2); white-space: nowrap;
}
.office-name { font-size: 1.42rem; margin-top: 2px; min-height: 2.16em; }
.office-desc { margin-top: 10px; color: var(--muted); font-size: 14.5px; min-height: 70px; }

.office-info { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); display: block; flex: 1; }
.office-info li {
  display: flex; gap: 12px; align-items: center;
  height: 56px; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.35; color: var(--ink-soft);
}
.office-info li:last-child { border-bottom: none; }
.office-info svg { width: 19px; height: 19px; flex: none; color: var(--accent); }
.office-info a { color: var(--ink-soft); transition: color .2s; }
.office-info a:hover { color: var(--accent-ink); }
.office-info strong { color: var(--ink); font-weight: 600; }

.office-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }

/* ---------- Map ---------- */
.section-map { background: linear-gradient(180deg, transparent, var(--bg-2) 40%, transparent); }
.map-shell { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--surface); }
.map-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.map-tab {
  height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.map-tab:hover { border-color: var(--accent); color: var(--ink); }
.map-tab.is-active { background: var(--navy); color: #fdf8ee; border-color: var(--navy); }
:root[data-theme="dark"] .map-tab.is-active { background: var(--gold); color: #1a130a; border-color: var(--gold); }
.leaflet-map { height: clamp(380px, 56vh, 560px); width: 100%; background: var(--surface-2); }

/* Leaflet popups themed */
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.leaflet-popup-tip { background: var(--surface); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 14px 16px; font-family: var(--font-sans); }
.leaflet-popup-content b { font-family: var(--font-display); font-size: 15px; }
.leaflet-popup-content .pop-city { color: var(--accent-ink); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.leaflet-popup-content a { color: var(--accent-ink); font-weight: 600; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--surface-2); }

.map-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: linear-gradient(145deg, var(--navy), #24435f);
  border: 2px solid var(--gold);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -4px rgba(0,0,0,.5);
}
.map-pin span { transform: rotate(45deg); color: var(--gold); font-weight: 700; font-size: 13px; font-family: var(--font-display); }

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-card {
  padding: 28px 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.service-ico { font-size: 30px; display: block; }
.service-card h3 { font-size: 1.2rem; margin-top: 16px; }
.service-card p { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---------- CTA ---------- */
.cta-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  padding: clamp(34px, 5vw, 56px); border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(198,163,90,.16), transparent 50%),
    linear-gradient(135deg, var(--navy), #14283f);
  color: #f3ece0; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.08);
}
.cta-title { font-size: clamp(1.6rem, 3.2vw, 2.4rem); max-width: 18ch; color: #fbf4e7; }
.cta-sub { margin-top: 14px; color: #cfd8e4; max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-card .btn-ghost { color: #f3ece0; border-color: rgba(255,255,255,.25); }
.cta-card .btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 56px 0 28px; background: var(--bg-2); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 32ch; }
.footer-brand p { color: var(--muted); font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-family: var(--font-sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer-col a, .footer-col span { color: var(--ink-soft); font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--accent-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-reveal-delay="1"] { transition-delay: .08s; }
.reveal[data-reveal-delay="2"] { transition-delay: .16s; }
.reveal[data-reveal-delay="3"] { transition-delay: .24s; }
.reveal[data-reveal-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .office-grid { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 680px) {
  .office-grid, .service-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .brand-text small { display: none; }
  .cta-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .lang-code { display: none; }
  .hero-title { font-size: clamp(2.05rem, 9vw, 2.6rem); }
  .eyebrow { font-size: 11.5px; }
}
