/* Jagdschein LernApp – website styles.
   Colours come from the app icon; radii and card style follow the app
   (lib/config/app_theme.dart). */

/* ---------- Fonts (Poppins, SIL OFL 1.1, see /assets/fonts/OFL.6be04893d7.txt) ---------- */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-400.8a29cbb5d4.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600.09193b5b52.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-700.a59053b3ca.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

/* Brand palette from the app icon: forest green #1e3d2d (primary), facet
   green #385844 (secondary), dark face green #193829, brown #8a6346 (accent),
   cream #fbf8f2 (page background). Values marked "derived" are not in the
   logo; they are tints/shades of it, chosen for WCAG AA contrast. */

:root {
  color-scheme: light dark;

  /* Brand, constant across modes */
  --forest: #1e3d2d;
  --forest-dark: #193829;
  --facet: #385844;
  --brown: #8a6346;
  --cream: #fbf8f2;
  /* Readiness band colour of the app (phone mockup only) */
  --orange: #fb8c00;

  /* Light mode */
  --bg: var(--cream);
  --surface: #ffffff;
  --fill: #f3efe6; /* derived */
  --text: #1a1a1a;
  --text-2: #5c625d; /* derived */
  --border: #e8e2d6; /* derived */
  --accent-text: var(--facet);
  --accent-bg: #e7eee8; /* derived */
  --eyebrow: var(--brown);
  --button-bg: var(--forest);
  --button-bg-hover: var(--forest-dark);
  --header-bg: rgb(251 248 242 / 0.92);
  --card-shadow: 0 4px 12px rgb(30 61 45 / 0.06);
  --soft-shadow: 0 2px 8px rgb(30 61 45 / 0.04), 0 8px 24px rgb(30 61 45 / 0.02);
  --contour: rgb(56 88 68 / 0.1);
  --focus: var(--forest);

  /* Phone mockup (app UI in the matching mode) */
  --app-bg: var(--cream);
  --app-card: #ffffff;
  --app-bar: var(--forest);
  --app-border: #e8e2d6;
  --app-accent: var(--facet);
  --device: #18201b;

  --radius-card: 16px;
  --radius-inner: 12px;
  --radius-pill: 20px;
  --gutter: 16px;
  --max: 1080px;

  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a15; /* derived */
    --surface: #1b2620; /* derived */
    --fill: #17201b; /* derived */
    --text: #ece6da; /* derived (cream, dimmed) */
    --text-2: #a9b0a8; /* derived */
    --border: #2c3d32; /* derived */
    --accent-text: #9cc4a8; /* derived (facet green, lightened) */
    --accent-bg: #233529; /* derived */
    --eyebrow: #d0a684; /* derived (brown, lightened) */
    --button-bg: var(--facet);
    --button-bg-hover: #42664f; /* derived */
    --header-bg: rgb(18 26 21 / 0.92);
    --card-shadow: none;
    --soft-shadow: none;
    --contour: rgb(156 196 168 / 0.07);
    --focus: #9cc4a8;

    --app-bg: #121a15;
    --app-card: #1b2620;
    --app-bar: var(--forest);
    --app-border: #2c3d32;
    --app-accent: #9cc4a8;
    --device: #050706;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--button-bg);
  color: #fff;
  border-radius: var(--radius-inner);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--fill);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-text);
}

/* On narrow phones the section links give way; Support stays reachable. */
@media (max-width: 559px) {
  .site-nav .nav-section {
    display: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 3.5rem 0;
}

@media (min-width: 900px) {
  .section {
    padding: 5rem 0;
  }
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.25rem;
}

.section-head p {
  color: var(--text-2);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--eyebrow);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3.5rem;
}

/* Contour lines, as on a topographic map. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 85% 35%, transparent 54%, var(--contour) 54.3%, transparent 54.8%),
    radial-gradient(ellipse 60% 55% at 85% 35%, transparent 64%, var(--contour) 64.3%, transparent 64.8%),
    radial-gradient(ellipse 60% 55% at 85% 35%, transparent 74%, var(--contour) 74.3%, transparent 74.8%),
    radial-gradient(ellipse 60% 55% at 85% 35%, transparent 84%, var(--contour) 84.3%, transparent 84.8%),
    radial-gradient(ellipse 60% 55% at 85% 35%, transparent 94%, var(--contour) 94.3%, transparent 94.8%);
}

.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 4.5rem 0 5rem;
  }

  .hero .container {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
  }
}

.hero-lead {
  max-width: 36rem;
  color: var(--text-2);
  font-size: 1.12rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 10rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  line-height: 1.3;
}

.store-badge small {
  color: var(--text-2);
  font-size: 0.78rem;
}

.store-badge span {
  font-weight: 600;
}

.hero-note {
  color: var(--text-2);
  font-size: 0.9rem;
}

/* ---------- Pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-accent {
  border-color: transparent;
  background: var(--accent-bg);
  color: var(--accent-text);
}

/* ---------- Cards and feature grid ---------- */

.card {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}

.section-alt .card {
  background: var(--bg);
  box-shadow: none;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-inner);
  background: var(--accent-bg);
  color: var(--accent-text);
}

.icon-tile svg {
  width: 24px;
  height: 24px;
}

/* ---------- Split layout (text + mockup) ---------- */

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 4rem;
  }
}

/* ---------- Catalog overview ---------- */

.catalog-groups {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.catalog-group h3 {
  margin-bottom: 0.35rem;
}

.catalog-group p {
  margin-bottom: 0.75rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

.state-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan h3 {
  font-size: 1.3rem;
}

.plan-tag {
  margin-bottom: 1rem;
  color: var(--text-2);
}

.plan-premium {
  border: 2px solid var(--accent-text);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.55rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.38em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--accent-bg);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 0.52rem;
  top: 0.56em;
  width: 0.32rem;
  height: 0.55rem;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 50rem;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.2rem;
  border: solid var(--text-2);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq summary:focus-visible {
  outline-offset: -3px;
  border-radius: var(--radius-card);
}

.faq .answer {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-2);
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

/* ---------- Phone mockups (representative app UI, decorative) ---------- */

.mockups {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 0;
}

.phone {
  flex: none;
  width: 272px;
  padding: 9px;
  border-radius: 46px;
  background: var(--device);
  box-shadow: 0 30px 60px -20px rgb(30 61 45 / 0.45);
  font-size: 11px;
  line-height: 1.4;
}

.phone-screen {
  overflow: hidden;
  height: 560px;
  border-radius: 38px;
  background: var(--app-bg);
  color: var(--text);
}

.phone-status {
  height: 34px;
  background: var(--app-bar);
}

.phone-bar {
  padding: 4px 16px 12px;
  background: var(--app-bar);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.phone-body {
  display: grid;
  gap: 10px;
  padding: 14px 12px;
}

.phone-greeting strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.phone-greeting span {
  color: var(--text-2);
}

.phone-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.phone .pill {
  padding: 1px 8px;
  border-color: var(--app-border);
  font-size: 10px;
}

.phone-card {
  padding: 12px;
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 14px;
}

.phone-button {
  padding: 9px;
  border-radius: 10px;
  background: var(--button-bg);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.phone-muted {
  margin-top: 6px;
  color: var(--text-2);
  text-align: center;
}

.phone-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.readiness {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.readiness-ring {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0 68%, var(--app-border) 68% 100%);
}

.readiness-ring span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--app-card);
  font-size: 13px;
  font-weight: 700;
}

.readiness-level {
  color: var(--orange);
  font-weight: 600;
}

.readiness dl {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 8px;
  margin: 4px 0 0;
  color: var(--text-2);
}

.readiness dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.bar {
  height: 6px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--app-border);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--app-accent);
}

.bar-62 span {
  width: 62%;
}

.progress-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--text-2);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-2);
}

.quiz-question {
  margin: 4px 0 2px;
  font-size: 14px;
  font-weight: 600;
}

.quiz-hint {
  color: var(--text-2);
}

.quiz-options {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiz-options li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 12px;
}

.quiz-options li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--app-border);
  border-radius: 4px;
}

.quiz-options .is-selected {
  border-color: var(--app-accent);
}

.quiz-options .is-selected::before {
  border-color: var(--app-accent);
  background: var(--app-accent);
}

.quiz-source {
  color: var(--text-2);
}

/* ---------- Legal and text pages ---------- */

.page-head {
  padding: 2.75rem 0 1rem;
}

.page-head p {
  color: var(--text-2);
}

.prose {
  max-width: 46rem;
  padding-bottom: 4rem;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.prose h3 {
  margin-top: 1.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose address {
  font-style: normal;
}

.prose .card {
  margin: 1.25rem 0;
}

.table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--fill);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.toc {
  margin: 1.5rem 0 0;
}

.toc ol {
  margin: 0.5rem 0 0;
  columns: 2 14rem;
}

.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.8rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 700;
}

.not-found {
  padding: 5rem 0 6rem;
  text-align: center;
}

.not-found img {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-inner);
  background: var(--button-bg);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--button-bg-hover);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.92rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
}
