/* Frag Vroni — visual identity
   Direction: a calm "wayfinding" feel for Austrian officialdom. Petrol carries
   trust without the coldness of a government portal; a honey accent marks the
   way like a signpost. Provenance ("geprüft am ...") is shown, not hidden,
   because trust is the product. */

:root {
  --ink: #18242b;
  --muted: #56666a;
  --petrol: #0f5a63;
  --petrol-dark: #0a434a;
  --honey: #d8930f;
  --eligible: #2e7d58;
  --paper: #e9eeec;
  --surface: #ffffff;
  --line: #d3ddda;
  --radius: 14px;
  --maxw: 880px;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* language visibility: toggled by body.lang-de / body.lang-en in app.js */
[data-en] { } /* content set via JS textContent */

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip-link:focus { left: 8px; top: 8px; border-radius: 8px; }

/* Header */
.site-header {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--petrol-dark); }
.brand-mark { display: inline-flex; color: var(--honey); }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
.site-nav a:hover { color: var(--petrol); }
.lang-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--petrol-dark);
  font-weight: 700; border-radius: 999px; padding: .35rem .8rem; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--petrol); }

/* Sections */
main { display: block; }
section { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem); }
section + section { border-top: 1px solid var(--line); }
h1, h2 { letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 0 0 .4rem; }

/* Hero */
.hero { text-align: left; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--honey); margin: 0 0 .8rem; }
.hero-title { font-size: clamp(2.4rem, 8vw, 4rem); font-weight: 800; margin: 0 0 1rem; color: var(--petrol-dark); }
.hero-lead { font-size: clamp(1.05rem, 2.5vw, 1.25rem); color: var(--ink); max-width: 60ch; margin: 0 0 1.6rem; }
.hero-note { color: var(--muted); font-size: .9rem; margin-top: .9rem; }

.cta {
  display: inline-block; background: var(--petrol); color: #fff; text-decoration: none;
  font-weight: 700; border: none; cursor: pointer; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: 999px;
}
.cta:hover { background: var(--petrol-dark); }
.cta:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }

/* Check form */
.section-lead { margin: 0 0 1rem; }
.check-form { display: grid; gap: 1.6rem; margin: 1.5rem 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--surface); }
legend { font-weight: 700; padding: 0 .4rem; }
.choice { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; cursor: pointer; }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--petrol); }

.field-label {
  display: block; font-weight: 600; font-size: .92rem; margin: .6rem 0 .35rem;
}
.field-hint { color: var(--muted); font-size: .88rem; margin: .5rem 0 0; max-width: 55ch; }

select, .gemeinde-search {
  width: 100%; max-width: 28rem; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: var(--surface);
}
select:disabled, .gemeinde-search:disabled { opacity: .55; cursor: not-allowed; }

.privacy-callout {
  background: #eef6f4; border: 1px solid #c5ddd6; border-radius: var(--radius);
  padding: .75rem 1rem; font-size: .9rem; color: var(--petrol-dark); margin: 0 0 1rem;
}

/* Wizard */
.wizard-progress {
  display: flex; align-items: flex-start; gap: .4rem; margin: 1.2rem 0 1.6rem;
}
.wizard-step-item { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 4rem; }
.wizard-step-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-align: center; }
.wizard-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 999px;
  border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: .9rem;
}
.wizard-step.active { border-color: var(--petrol); color: var(--petrol); background: #e8f2f3; }
.wizard-step.done { border-color: var(--eligible); color: #fff; background: var(--eligible); }
.wizard-line { flex: 1; max-width: 3rem; height: 2px; background: var(--line); margin-top: 1rem; }
.flag-grid, .radio-grid { display: grid; gap: .2rem; }
.field-hint-inline { margin: 0 0 .6rem; }
.offices-form { margin-top: 1rem; }
.offices-summary {
  grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem 1rem; font-size: .92rem;
}
.wizard-panel { display: none; gap: 1.2rem; }
.wizard-panel.active { display: grid; }
.wizard-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.btn-secondary {
  background: var(--surface); color: var(--petrol-dark);
  border: 1px solid var(--line); font-weight: 700; cursor: pointer;
  padding: .75rem 1.25rem; border-radius: 999px; font-size: 1rem;
}
.btn-secondary:hover { border-color: var(--petrol); color: var(--petrol); }

/* Results */
.results { display: grid; gap: 1rem; margin-top: 1rem; }
.coverage-panel {
  background: linear-gradient(135deg, #f4f8f7 0%, var(--surface) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.coverage-panel h3 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--petrol-dark); }
.coverage-stats { font-weight: 600; margin: 0 0 .35rem; color: var(--ink); }
.coverage-note, .coverage-disclaimer { color: var(--muted); font-size: .9rem; margin: .35rem 0 0; }
.results-group-title {
  font-size: 1rem; color: var(--petrol-dark); margin: 1.2rem 0 .4rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.jurisdiction {
  display: inline-block; margin-left: .4rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  vertical-align: middle;
}
.tag.guide { background: #eef4fa; color: var(--petrol); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--eligible); border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.card.discontinued { border-left-color: var(--muted); opacity: .92; }
.card h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.card .amounts { font-weight: 600; }
.card .note { color: var(--muted); font-size: .92rem; margin-top: .5rem; }
.card .meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--line);
  font-size: .82rem; color: var(--muted);
}
.stamp { font-family: var(--mono); background: #eef3f1; color: var(--petrol-dark); padding: .15rem .5rem; border-radius: 6px; }
.card a.source { color: var(--petrol); font-weight: 600; text-decoration: none; }
.card a.source:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: #e7f0ec; color: var(--eligible); padding: .15rem .5rem; border-radius: 6px; }
.tag.off { background: #eceeed; color: var(--muted); }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.2rem; }

/* Offices */
.section-lead { color: var(--muted); max-width: 60ch; }
.office-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 1.2rem; }
.office { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.office h3 { margin: 0 0 .25rem; font-size: 1.02rem; }
.office .topic { font-size: .78rem; color: var(--honey); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.office p { color: var(--muted); font-size: .92rem; }
.office a { color: var(--petrol); font-weight: 600; text-decoration: none; }

/* Grund */
.grund-list {
  margin: 1rem 0 0; padding-left: 1.2rem; max-width: 65ch;
  display: grid; gap: .65rem; color: var(--ink);
}
.grund-list li { padding-left: .2rem; }

/* Footer & Marquee */
.marquee-container {
  overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  display: flex;
  white-space: nowrap;
  position: relative;
}
.marquee {
  display: flex;
  align-items: center;
  gap: 4rem;
  animation: marquee-scroll 25s linear infinite;
  padding-left: 4rem; /* Match gap for seamless loop */
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.marquee-item svg {
  height: 28px;
  width: 28px;
  min-width: 28px;
  color: var(--petrol);
}

.site-footer {
  background: var(--petrol-dark);
  color: #fff;
  padding: 4rem clamp(1rem, 4vw, 2rem) 2rem;
  border-top: 5px solid var(--honey);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-col h4 {
  color: var(--honey);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
}
.footer-col p {
  color: #aebec1;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}
.footer-col a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--honey);
}
.footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.footer-brand svg {
  color: var(--honey);
}
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.social-links a:hover {
  background: var(--honey);
  color: var(--petrol-dark);
}
.footer-bottom {
  max-width: var(--maxw);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-bottom .disclaimer {
  max-width: 60ch;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: #7b9498;
}
.footer-bottom .copyright {
  font-size: 0.85rem;
  color: #aebec1;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem;
  background: var(--surface); border: 1px solid var(--petrol); border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 1000;
  max-width: var(--maxw); margin: 0 auto;
}
.cookie-banner.hidden { display: none; }
.cookie-banner-content {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.2rem;
}
@media (min-width: 600px) {
  .cookie-banner-content { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cookie-text { margin: 0; font-size: .9rem; color: var(--petrol-dark); flex: 1; }
.cookie-actions { display: flex; gap: .75rem; align-items: center; }
.cta-small, .btn-small { padding: .5rem 1rem; font-size: .9rem; border-radius: 999px; cursor: pointer; font-weight: 700; }
.cta-small { background: var(--petrol); color: #fff; border: none; }
.cta-small:hover { background: var(--petrol-dark); }
.btn-small { background: var(--surface); color: var(--petrol-dark); border: 1px solid var(--line); }
.btn-small:hover { border-color: var(--petrol); color: var(--petrol); }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
