/* Auf dein Wort — Website. Markensystem aus docs/branding: Mitternachtsblau + Gold + Creme.
   Bewusst ohne Web-Fonts (DSGVO: keine Drittanbieter-Requests) — kuratierte System-Stacks. */

:root {
  /* Marke */
  --blue-900: #070f22; /* tiefstes Mitternachtsblau */
  --blue-800: #0c1d3f; /* primäres Mitternachtsblau */
  --blue-700: #12294f; /* Verlaufs-Oberkante (aus dem Logo) */
  --gold: #e9b949;
  --gold-deep: #c98f2c;
  --cream: #fbf3de;

  /* Neutrale, leicht warm (auf die Marke gestimmt, nicht rein grau) */
  --paper: #fdfaf2;
  --paper-2: #f6efdf;
  --ink: #1c2230; /* Fließtext auf hell — blauschwarz, kein reines Schwarz */
  --ink-soft: #4a5266;
  --line: #e7ddc6;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 66ch;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(7, 15, 34, 0.35);
  --shadow-soft: 0 8px 28px -14px rgba(7, 15, 34, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

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

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

a {
  color: var(--gold-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.9rem;
}

/* Layout */
.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section--dark {
  background: linear-gradient(160deg, var(--blue-700), var(--blue-800) 55%, var(--blue-900));
  color: var(--cream);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: #fff;
}
.section--dark .eyebrow {
  color: var(--gold);
}
.section--dark p {
  color: #cfd7e8;
}

.section--paper2 {
  background: var(--paper-2);
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--blue-900);
  box-shadow: 0 10px 24px -10px rgba(233, 185, 73, 0.6);
}
.btn-ghost {
  border-color: rgba(251, 243, 222, 0.4);
  color: var(--cream);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: #fff;
}
.btn-dark {
  background: var(--blue-800);
  color: var(--cream);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 15, 34, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 185, 73, 0.18);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}
.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.nav-links a {
  color: #cfd7e8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--gold);
}
.nav-links .btn {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}
/* `.nav-links a` (helle Linkfarbe) schlug `.btn-primary` an Spezifität — der Knopf „Mittesten"
   stand hell auf Gold und war kaum lesbar (23.09.2026). */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: var(--blue-900);
}

/* Menu button: only exists on narrow screens. Three lines fold into a cross via aria-expanded,
   so the state lives in the accessible attribute and the CSS merely follows it. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid rgba(233, 185, 73, 0.35);
  border-radius: 10px;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  place-items: center;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}
.nav-toggle line {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .line-top {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .line-mid {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .line-bottom {
  transform: translateY(-6px) rotate(-45deg);
}
.nav-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 980px) {
  .nav {
    flex-wrap: wrap;
  }
  .nav-toggle {
    display: grid;
  }
  /* The link row becomes a panel below the brand line. Without JavaScript nothing can open it,
     so the <noscript> rule in every page's <head> keeps it permanently visible. */
  .nav-links {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.3rem 0 1rem;
    border-top: 1px solid rgba(233, 185, 73, 0.18);
  }
  .nav-links:not(.is-open) {
    display: none;
  }
  .nav-links a:not(.btn) {
    padding: 0.7rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(251, 243, 222, 0.08);
  }
  .nav-links .btn {
    margin-top: 0.9rem;
    justify-content: center;
    padding: 0.75rem 1.1rem;
    font-size: 1rem;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-700), var(--blue-800) 55%, var(--blue-900));
  color: var(--cream);
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 78% 18%, rgba(233, 185, 73, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-grid p {
    margin-inline: auto;
  }
  .hero .btn-row {
    justify-content: center;
  }
}
.hero h1 {
  color: #fff;
}
.hero-lead {
  font-size: 1.2rem;
  color: #d7deee;
}
/* One honest line under the primary button: the app is not in the App Store yet. */
.hero-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #aeb8cf;
}
.hero-shot {
  justify-self: center;
  width: min(300px, 72vw);
  border-radius: 34px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(233, 185, 73, 0.25);
}

/* Feature grid */
.grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  margin-top: 2.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
}
.section--dark .card {
  background: rgba(251, 243, 222, 0.06);
  border-color: rgba(233, 185, 73, 0.22);
}
.card h3 {
  margin-top: 0.4rem;
}
.card p {
  color: var(--ink-soft);
  margin-bottom: 0;
  font-size: 0.97rem;
}
.section--dark .card p {
  color: #c5cee0;
}
/* Feature icons: gold line drawings on a cream disc. The disc stays cream on the dark cards too,
   so the same stroke colour reads on both backgrounds. */
.card .ico {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid rgba(201, 143, 44, 0.28);
  color: var(--gold-deep);
}
.card .ico svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section--dark .card .ico {
  box-shadow: 0 0 0 4px rgba(233, 185, 73, 0.14);
}

/* Screenshot strip */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(230px, 62vw);
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x mandatory;
}
.shots figure {
  margin: 0;
  scroll-snap-align: center;
}
.shots img {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(233, 185, 73, 0.25);
}
.shots figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: #cfd7e8;
  text-align: center;
}

/* Documentation (funktionen.html) */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  /* minmax(0, 1fr), not 1fr: a grid track's automatic minimum is the content's min-content width,
     and the chip row below would otherwise widen the page instead of scrolling. */
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.doc-nav {
  position: sticky;
  top: 84px;
  font-size: 0.92rem;
}
.doc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.doc-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.doc-nav a:hover {
  background: var(--paper-2);
  color: var(--ink);
  border-left-color: var(--gold);
}
/* Below the sidebar breakpoint the twelve-entry table of contents becomes one row of chips that
   scrolls sideways and bleeds to the viewport edges (the .wrap leaves 4vw on each side). Placed
   after the base rules on purpose: same specificity, so source order decides. */
@media (max-width: 860px) {
  .doc-nav {
    position: static;
  }
  .doc-nav ul {
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    margin-inline: -4vw;
    padding: 0.2rem 4vw 0.7rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .doc-nav a {
    white-space: nowrap;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    scroll-snap-align: start;
  }
  .doc-nav a:hover {
    border-color: var(--gold);
    background: #fff;
  }
}
.doc-section {
  margin-bottom: 3rem;
  scroll-margin-top: 90px;
}
.doc-section > h2 {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--line);
}
.feat {
  margin: 1.6rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--gold);
}
.feat h3 {
  margin-bottom: 0.3rem;
}
.feat p {
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

/* Legal / prose pages */
.prose {
  max-width: 760px;
}
.prose h2 {
  margin-top: 2.2rem;
}
.prose h3 {
  margin-top: 1.6rem;
}
.prose p,
.prose li {
  color: var(--ink-soft);
  max-width: none;
}
.prose ul {
  padding-left: 1.2rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.94rem;
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  color: var(--ink);
}
.placeholder {
  background: #fff6d6;
  border: 1px dashed var(--gold-deep);
  color: #7a5a12;
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  font-size: 0.9em;
}

/* Footer */
.site-footer {
  background: var(--blue-900);
  color: #aeb8cf;
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(233, 185, 73, 0.15);
}
.foot-grid a {
  color: #cfd7e8;
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
}
.foot-grid a:hover {
  color: var(--gold);
}
.foot-grid h4 {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.foot-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: #7f8aa3;
  font-size: 0.85rem;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.foot-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.center {
  text-align: center;
}
.center p {
  margin-inline: auto;
}
