/* ==========================================================================
   Oxoia Website Design System — prototype stylesheet
   Source of truth for tokens: see branding-guide.html
   Brand: Oxoia Green #019C4B · Dark Blue #012A39 · Typeface: Urbanist
   Light + dark theme, fully responsive, WCAG 2.2 AA contrast pairs.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Brand core */
  --ox-green:        #019C4B;  /* brand green — graphics, large text, fills */
  --ox-green-text:   #017A3B;  /* AA-safe green for small text on white */
  --ox-green-strong: #016B34;
  --ox-green-soft:   #E6F5EC;
  --ox-green-tint:   #BFE7D1;
  --ox-navy:         #012A39;  /* primary ink / dark surfaces */
  --ox-navy-soft:    #0E4256;
  --ox-navy-tint:    #DCE8ED;

  /* Accent (energy/amber — sparingly: highlights, annotations) */
  --ox-amber:        #E8A317;
  --ox-amber-soft:   #FCF3DE;

  /* Neutrals */
  --ox-white:        #FFFFFF;
  --ox-grey-50:      #F7F9F8;
  --ox-grey-100:     #EEF2F0;
  --ox-grey-300:     #C9D2CE;
  --ox-grey-500:     #6C7A75;
  --ox-grey-700:     #3D4A46;

  /* Semantic */
  --ox-success: #017A3B;
  --ox-warning: #B97A00;
  --ox-error:   #C0392B;
  --ox-info:    #0E5E7E;

  /* Theme mapping (light) */
  --bg:            var(--ox-white);
  --bg-alt:        var(--ox-grey-50);
  --bg-inset:      var(--ox-grey-100);
  --ink:           var(--ox-navy);
  --ink-soft:      var(--ox-grey-700);
  --ink-faint:     var(--ox-grey-500);
  --line:          var(--ox-grey-300);
  --brand:         var(--ox-green);
  --brand-text:    var(--ox-green-text);
  --brand-soft:    var(--ox-green-soft);
  --on-brand:      #FFFFFF;
  --surface-navy:  var(--ox-navy);
  --on-navy:       #E9F2EE;

  /* Type scale (fluid) */
  --fs-hero: clamp(2rem, 5vw, 3.25rem);
  --fs-h1:   clamp(1.75rem, 4vw, 2.5rem);
  --fs-h2:   clamp(1.35rem, 2.6vw, 1.75rem);
  --fs-h3:   1.15rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-tiny: .78rem;

  /* Rhythm */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-6: 1.5rem; --sp-8: 2rem;  --sp-12: 3rem;  --sp-16: 4rem;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 2px 8px rgba(1, 42, 57, .08), 0 8px 28px rgba(1, 42, 57, .07);
  --shadow-soft: 0 1px 4px rgba(1, 42, 57, .07);
  --maxw: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #071E28;
    --bg-alt:       #0A2632;
    --bg-inset:     #0E2F3D;
    --ink:          #E9F2EE;
    --ink-soft:     #B9CBC4;
    --ink-faint:    #8AA39B;
    --line:         #1D4254;
    --brand:        #2FBF71;      /* lighter green for dark bg */
    --brand-text:   #4ECb85;
    --brand-soft:   #0E3B2A;
    --on-brand:     #04140C;
    --surface-navy: #0A2632;
    --on-navy:      #E9F2EE;
    --ox-amber-soft: #3A2E10;
  }
}

/* ---- Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: 'Urbanist', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--sp-4); font-weight: 700; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0 0 var(--sp-4); }
a  { color: var(--brand-text); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-6); }
section { padding: var(--sp-16) 0; }
section.alt { background: var(--bg-alt); }
.kicker {
  display: block; font-size: var(--fs-small); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text);
  margin-bottom: var(--sp-2);
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46rem; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---- Header / navigation -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--sp-6);
  min-height: 4.25rem;
}
.logo { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; color: var(--ink); }
.logo b { color: var(--brand); }
.nav-toggle-box { display: none; }
.nav-toggle { display: none; margin-left: auto; cursor: pointer; padding: var(--sp-2); }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
nav.main { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; flex-wrap: wrap; }
.site-header .btn { padding: .55rem 1.15rem; }
nav.main a:not(.btn) { color: var(--ink); font-weight: 600; font-size: var(--fs-small); padding: var(--sp-2) var(--sp-2); }
nav.main a:not(.btn)[aria-current="page"] { color: var(--brand-text); }
nav.main .actions { display: flex; gap: var(--sp-3); margin-left: var(--sp-4); }
.lang { font-size: var(--fs-tiny); color: var(--ink-faint); letter-spacing: .05em; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  nav.main {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--sp-4) var(--sp-6) var(--sp-6);
    box-shadow: var(--shadow);
  }
  nav.main a:not(.btn) { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
  nav.main .actions { margin: var(--sp-4) 0 0; flex-direction: column; }
  .nav-toggle-box:checked ~ nav.main { display: flex; }
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block; font-weight: 700; font-size: var(--fs-small);
  padding: .8rem 1.5rem; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--ox-green-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary:hover { background: #4ECB85; color: #04140C; } }
.btn-secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost { color: var(--brand-text); background: transparent; }
.btn-lg { font-size: 1rem; padding: 1rem 2rem; }
.on-dark .btn-secondary { border-color: var(--on-navy); color: var(--on-navy); }

/* ---- Hero ------------------------------------------------------------------ */
.hero { padding: var(--sp-16) 0; }
.hero h1 { font-size: var(--fs-hero); max-width: 18ch; }
.hero .sub { font-size: 1.3rem; font-weight: 600; color: var(--brand-text); margin-bottom: var(--sp-3); }
.hero .lede { margin-bottom: var(--sp-8); }
.hero .cta-row { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; }
.hero .cta-note { font-size: var(--fs-small); color: var(--ink-faint); width: 100%; }

/* ---- Layout helpers -------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-6); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-6);
  box-shadow: var(--shadow-soft);
}
section.alt .card { background: var(--bg); }
.card h3 { margin-top: var(--sp-2); }
.card .icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--brand-soft); color: var(--brand-text);
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 800;
}
.card.featured { border: 2px solid var(--brand); position: relative; }
.card .flag {
  position: absolute; top: -0.9rem; left: var(--sp-6);
  background: var(--brand); color: var(--on-brand);
  font-size: var(--fs-tiny); font-weight: 800; letter-spacing: .06em;
  padding: .2rem .8rem; border-radius: var(--radius-pill); text-transform: uppercase;
}

/* ---- KPI band --------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); text-align: center; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi .num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--brand-text); line-height: 1.1; }
.kpi .lbl { font-size: var(--fs-small); color: var(--ink-soft); }

/* ---- Steps ------------------------------------------------------------------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 4rem; margin-bottom: var(--sp-6); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
}

/* ---- Logo strip / testimonials ------------------------------------------------ */
.logo-strip { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-8); align-items: center; justify-content: center; }
.logo-strip .cust {
  font-weight: 700; color: var(--ink-faint); font-size: var(--fs-small);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .5rem 1rem; background: var(--bg);
}
.quote { border-left: 4px solid var(--brand); padding: var(--sp-2) var(--sp-6); }
.quote p { font-size: 1.05rem; font-style: italic; }
.quote footer { font-size: var(--fs-small); color: var(--ink-soft); font-style: normal; }
.quote footer b { color: var(--ink); }

/* ---- Tables (pricing, comparison) ---------------------------------------------- */
.table-scroll { overflow-x: auto; }
table.ox { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 40rem; }
table.ox th, table.ox td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ox thead th { font-size: var(--fs-tiny); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
table.ox td.yes { color: var(--ox-success); font-weight: 700; }
table.ox td.no { color: var(--ink-faint); }

/* ---- Forms ---------------------------------------------------------------------- */
form.ox { display: grid; gap: var(--sp-4); max-width: 34rem; }
form.ox label { font-weight: 600; font-size: var(--fs-small); display: grid; gap: var(--sp-1); }
form.ox input, form.ox textarea, form.ox select {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .9rem; width: 100%;
}
form.ox input:focus, form.ox textarea:focus { border-color: var(--brand); outline: none; }
form.ox .hint { font-size: var(--fs-tiny); color: var(--ink-faint); font-weight: 400; }

/* ---- Dark band / final CTA ------------------------------------------------------- */
.band {
  background: var(--surface-navy); color: var(--on-navy);
  border-radius: var(--radius); padding: var(--sp-12) var(--sp-8);
  text-align: center;
}
.band h2 { color: #fff; }
.band .lede { color: var(--on-navy); }
.band .btn-primary { background: var(--ox-green); color: #fff; }

/* ---- Recommendation annotations (prototype-only) ----------------------------------- */
.rec {
  border: 2px dashed var(--ox-amber);
  background: var(--ox-amber-soft);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-6);
  margin: var(--sp-6) 0;
  font-size: var(--fs-small);
}
.rec::before {
  content: "📌 Empfehlung"; display: block; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; font-size: var(--fs-tiny);
  color: var(--ox-warning); margin-bottom: var(--sp-1);
}
.rec b { color: var(--ink); }

/* ---- Status chips (roadmap/innovation) ------------------------------------------------ */
.status {
  display: inline-block; font-size: var(--fs-tiny); font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .2rem .75rem; border-radius: var(--radius-pill);
}
.status-live { background: var(--brand-soft); color: var(--brand-text); }
.status-beta { background: var(--ox-navy-tint); color: var(--ox-navy); }
@media (prefers-color-scheme: dark) { .status-beta { background: #123B4C; color: #B9D4E2; } }
.status-soon { background: var(--ox-amber-soft); color: var(--ox-warning); }

/* ---- Chat mock (agent preview) --------------------------------------------------------- */
.chat {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-6);
  max-width: 34rem; display: grid; gap: var(--sp-3);
}
.chat .msg {
  max-width: 85%; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius); font-size: var(--fs-small); line-height: 1.5;
}
.chat .msg.user { justify-self: end; background: var(--surface-navy); color: var(--on-navy); border-bottom-right-radius: 4px; }
.chat .msg.agent { justify-self: start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat .msg.agent b { color: var(--brand-text); }
.chat .msg .confirm { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.chat .msg .confirm span {
  font-size: var(--fs-tiny); font-weight: 700; padding: .3rem .9rem;
  border-radius: var(--radius-pill); cursor: default;
}
.chat .msg .confirm .ok { background: var(--brand); color: var(--on-brand); }
.chat .msg .confirm .cancel { border: 1.5px solid var(--line); color: var(--ink-soft); }
.chat .meta { font-size: var(--fs-tiny); color: var(--ink-faint); justify-self: center; }
@media (prefers-reduced-motion: no-preference) {
  .chat .msg { opacity: 0; transform: translateY(6px); animation: msgIn .45s ease forwards; }
  .chat .msg:nth-child(1) { animation-delay: .1s; }
  .chat .msg:nth-child(2) { animation-delay: .7s; }
  .chat .msg:nth-child(3) { animation-delay: 1.5s; }
  .chat .msg:nth-child(4) { animation-delay: 2.2s; }
  .chat .msg:nth-child(5) { animation-delay: 3.1s; }
  .chat .msg:nth-child(6) { animation-delay: 3.9s; }
  .chat .msg:nth-child(7) { animation-delay: 4.7s; }
  @keyframes msgIn { to { opacity: 1; transform: none; } }
}

/* ---- FAQ ---------------------------------------------------------------------------- */
details.faq { border-bottom: 1px solid var(--line); padding: var(--sp-3) 0; }
details.faq summary { font-weight: 700; cursor: pointer; }
details.faq[open] summary { color: var(--brand-text); }

/* ---- Footer --------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-navy); color: var(--on-navy);
  padding: var(--sp-12) 0 var(--sp-8); margin-top: var(--sp-16);
  font-size: var(--fs-small);
}
.site-footer a { color: var(--on-navy); }
.site-footer .grid { margin-bottom: var(--sp-8); }
.site-footer h4 { color: #fff; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.15); padding-top: var(--sp-4); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; color: #9DB4AC; }

/* ---- Breadcrumb / page hero ------------------------------------------------------------ */
.page-hero { padding: var(--sp-12) 0 var(--sp-8); background: var(--bg-alt); }
.page-hero h1 { max-width: 24ch; }

/* ---- Swatches & guide-specific (branding-guide.html) ------------------------------------- */
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--sp-4); }
.swatch { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.swatch .chip { height: 4.5rem; }
.swatch .meta { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-tiny); }
.swatch .meta b { display: block; }
.type-sample { border-bottom: 1px solid var(--line); padding: var(--sp-4) 0; display: flex; gap: var(--sp-6); align-items: baseline; flex-wrap: wrap; }
.type-sample .spec { font-size: var(--fs-tiny); color: var(--ink-faint); min-width: 12rem; }
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 700px) { .do-dont { grid-template-columns: 1fr; } }
.do, .dont { border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-6); font-size: var(--fs-small); }
.do { background: var(--ox-green-soft); border-left: 4px solid var(--ox-success); }
.dont { background: #FBEAE7; border-left: 4px solid var(--ox-error); }
@media (prefers-color-scheme: dark) { .dont { background: #3A1712; } }
.do::before { content: "✓ Do"; font-weight: 800; display: block; color: var(--ox-success); }
.dont::before { content: "✗ Don't"; font-weight: 800; display: block; color: var(--ox-error); }

/* ---- Lead-form enhancement (forms.js) --------------------------------------------------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { font-size: var(--fs-small); min-height: 1.2em; margin: 0; }
