/* ==========================================================================
   Marktstrategie — Design System
   Structure borrowed from a warm, card-driven editorial layout.
   Palette is Marktstrategie's own: deep fir ink + amber accent on cream.
   ========================================================================== */

/* --- 0. Fonts -------------------------------------------------------------
   Self-hosted deliberately. Loading Inter from Google's CDN would transmit
   every visitor's IP address to Google, which German courts have treated as
   requiring consent. These two files cover Latin and Latin Extended.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Surface */
  --c-bg:            #fbf7f0;
  --c-surface:       #ffffff;
  --c-surface-alt:   #f4ede1;
  --c-surface-sunk:  #efe6d8;

  /* Ink */
  --c-ink:           #14201c;
  --c-ink-soft:      #3c4b45;
  --c-ink-muted:     #6b7a73;
  --c-ink-faint:     #9aa6a0;

  /* Brand */
  --c-brand:         #1d3b32;
  --c-brand-deep:    #14201c;
  --c-brand-soft:    #2a5245;

  /* Accent — exactly one */
  --c-accent:        #e07a2f;
  --c-accent-hover:  #c9681f;
  --c-accent-soft:   #fdf0e4;

  /* Support */
  --c-line:          #e4dccd;
  --c-line-strong:   #d2c7b3;
  --c-success:       #3f7d5f;

  /* Type */
  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
  --f-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg:   1.1875rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.75rem;
  --fs-4xl:  3.5rem;

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Form */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 32, 28, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 32, 28, 0.08);
  --shadow-lg: 0 12px 40px rgba(20, 32, 28, 0.12);

  --w-max: 1200px;
  --w-prose: 68ch;

  --t-fast: 140ms ease;
  --t-base: 220ms ease;
}

/* --- 2. Reset ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-4);
  font-weight: 700;
  color: var(--c-ink);
}

h1 { font-size: clamp(2.25rem, 5vw, var(--fs-4xl)); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--sp-4); color: var(--c-ink-soft); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; color: var(--c-ink-soft); }
li { margin-bottom: var(--sp-2); }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --- 3. Layout ----------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-7); }
.section--alt { background: var(--c-surface-alt); }
.section--dark { background: var(--c-brand); color: var(--c-bg); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p { color: rgba(255, 255, 255, 0.78); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding-block: var(--sp-7); }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  z-index: 999;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

/* --- 4. Announcement + header -------------------------------------------- */

.announce {
  background: var(--c-accent);
  color: #fff;
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--sp-3) var(--sp-4);
  font-weight: 500;
}
.announce a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announce a:hover { text-decoration-thickness: 2px; }

.site-header {
  background: var(--c-brand-deep);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--c-accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.brand__name { line-height: 1.1; }
.brand__sub {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.nav { display: flex; align-items: center; gap: var(--sp-5); }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list li { margin: 0; }
.nav__link {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color var(--t-fast);
  padding-block: var(--sp-2);
}
.nav__link:hover,
.nav__link[aria-current="page"] { color: #fff; }

.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }

.lang {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.6);
}
.lang a {
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.lang a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.lang a[aria-current="true"] {
  color: var(--c-brand-deep);
  background: var(--c-accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--r-sm);
  color: #fff;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  cursor: pointer;
}

@media (max-width: 960px) {
  .nav__list { display: none; }
  .nav-toggle { display: block; }
  .nav--open .nav__list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-brand-deep);
    padding: var(--sp-5);
    gap: var(--sp-4);
    border-bottom: 3px solid var(--c-accent);
  }
  .nav--open .nav__cta {
    display: inline-flex;
    width: 100%;
    margin-top: var(--sp-2);
  }
  .nav__list { position: relative; }
  .brand { min-width: 0; }
  .brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* The header CTA used to be a separate button beside the nav. It now lives as
   the last item of the nav list, so there is one button at every width and
   nothing to hide or duplicate. */
.nav__cta {
  display: inline-flex;
  padding-block: 6px;
}

@media (min-width: 961px) {
  .nav__cta { margin-left: var(--sp-2); }
}

@media (max-width: 460px) {
  .nav__cta { padding-block: 8px; }
}

@media (max-width: 420px) {
  .brand__sub { display: none; }
  .wrap { padding-inline: var(--sp-4); }
}

/* --- 5. Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-hover); }

.btn--dark { background: var(--c-brand-deep); color: #fff; }
.btn--dark:hover { background: var(--c-brand-soft); }

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-line-strong);
}
.btn--ghost:hover { background: var(--c-surface-alt); border-color: var(--c-ink-faint); }

.btn--light {
  background: #fff;
  color: var(--c-brand-deep);
}
.btn--light:hover { background: var(--c-surface-alt); }

.btn--lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* --- 6. Hero ------------------------------------------------------------- */

.hero {
  background: var(--c-surface-alt);
  padding-block: var(--sp-9);
  border-bottom: 1px solid var(--c-line);
}
.hero__inner { max-width: 62ch; }
.hero h1 { margin-bottom: var(--sp-5); }
.hero__lead {
  font-size: var(--fs-lg);
  color: var(--c-ink-soft);
  margin-bottom: var(--sp-6);
}
.hero__actions { margin-bottom: var(--sp-6); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-4);
}

/* Compact page header for subpages */
.page-head {
  background: var(--c-surface-alt);
  padding-block: var(--sp-7);
  border-bottom: 1px solid var(--c-line);
}
.page-head__inner { max-width: var(--w-prose); }
.page-head p { font-size: var(--fs-lg); margin-bottom: 0; }

/* --- 7. Cards ------------------------------------------------------------ */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-base), box-shadow var(--t-base),
              transform var(--t-base);
}
.card--link:hover {
  border-color: var(--c-line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-4);
  flex-shrink: 0;
}
.card__icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: var(--sp-3); font-size: var(--fs-lg); }
.card p { font-size: var(--fs-sm); margin-bottom: var(--sp-4); }

.card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-sm);
}
.card__list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: var(--sp-2);
  color: var(--c-ink-soft);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--c-accent);
}

.card__foot { margin-top: auto; padding-top: var(--sp-3); }

.card__more {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.card--link:hover .card__more { color: var(--c-accent-hover); }
.card__more::after { content: "\2192"; transition: transform var(--t-fast); }
.card--link:hover .card__more::after { transform: translateX(3px); }

/* --- 8. Stats band ------------------------------------------------------- */

.stats {
  background: var(--c-brand);
  color: #fff;
  padding-block: var(--sp-8);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.stat__value {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  margin-bottom: var(--sp-2);
}
.stat__value span { color: var(--c-accent); }
.stat__label {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.4;
}
@media (max-width: 780px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
  .stat__value { font-size: var(--fs-2xl); }
}

/* --- 9. Steps ------------------------------------------------------------ */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.step__num {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--c-accent);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.step h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.step p { font-size: var(--fs-sm); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* --- 10. Split / CTA blocks --------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-8);
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-6); }
}

.cta-band {
  background: var(--c-brand-deep);
  color: #fff;
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-7);
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: var(--sp-4); }
.cta-band p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--sp-6);
}
.cta-band .btn-row { justify-content: center; }

/* --- 11. Prose ----------------------------------------------------------- */

.prose { max-width: var(--w-prose); }
.prose h2 { margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-6); }
.prose ul { margin-bottom: var(--sp-5); }
.prose a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* --- 12. Forms ----------------------------------------------------------- */

.form { display: grid; gap: var(--sp-4); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: var(--sp-2); }
.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
}
.field .hint { font-size: var(--fs-xs); color: var(--c-ink-muted); font-weight: 400; }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.check {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  min-height: 44px;
  padding-block: var(--sp-2);
}
.check input {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin-top: -0.2em;
  flex-shrink: 0;
}
.check a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

.form__status {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--c-accent-soft);
  border: 1px solid var(--c-line);
  font-size: var(--fs-sm);
  color: var(--c-ink);
}
.form__status[hidden] { display: none; }
.form__status--error {
  background: #fdf1ef;
  border-color: #e6b3a8;
  color: #8a3a24;
}

.field__error {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #a8452c;
}
.field__error[hidden] { display: none; }
.field--invalid input,
.field--invalid textarea { border-color: #c9705a; }
.field--invalid input:focus,
.field--invalid textarea:focus {
  border-color: #c9705a;
  box-shadow: 0 0 0 3px #f7e2dc;
}

/* Honeypot: reachable by a naive bot parsing the DOM, never by a person. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- 13. Info list / contact -------------------------------------------- */

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--c-line);
  margin: 0;
}
.info-list li:first-child { padding-top: 0; }
.info-list__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-1);
}
.info-list__value { font-size: var(--fs-base); color: var(--c-ink); }

/* --- 14. Footer ---------------------------------------------------------- */

.site-footer {
  background: var(--c-brand-deep);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--sp-8) var(--sp-6);
  font-size: var(--fs-sm);
}
.site-footer a { color: rgba(255, 255, 255, 0.7); transition: color var(--t-fast); }
.site-footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__title {
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: var(--sp-3); }
.footer__about { max-width: 34ch; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

/* --- 15. Utilities ------------------------------------------------------- */

.tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 2px var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}
.center { text-align: center; }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media print {
  .site-header, .site-footer, .announce, .cta-band { display: none; }
  body { background: #fff; }
}
