/* ==========================================================================
   base.css — reset, element defaults, typography, utility classes.
   Depends on tokens.css. See plans/landing.MD §5, §6.2, §13.
   ========================================================================== */

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
address { font-style: normal; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.68;
  color: var(--text-body);
  background: var(--surface);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* -- Headings -- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  text-wrap: balance;
  hyphens: none;
}
h1 { font-size: var(--fs-h1); line-height: 1.10; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.16; letter-spacing: -0.018em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.012em; }
h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-h4); line-height: 1.35; letter-spacing: -0.005em; color: var(--text-primary); }

/* asymmetric heading rhythm: a heading after a paragraph gets a bigger top gap */
p + h2, p + h3, p + h4 { margin-top: var(--space-10); }
h2, h3, h4 { margin-bottom: var(--space-4); }

p {
  max-width: 68ch;
  text-wrap: pretty;
  hyphens: none;
}

@media (max-width: 640px) {
  h1 { font-size: 32px; }
  h2 { font-size: 27px; }
  h3 { font-size: 21px; }
  h4 { font-size: 18px; }
  body { font-size: 16px; }
}

/* -- Container (§6.2) -- */
.container {
  width: min(100% - 2 * var(--container-gutter), var(--container-max));
  margin-inline: auto;
}
.container--narrow {
  width: min(100% - 2 * var(--container-gutter), var(--container-narrow));
  margin-inline: auto;
}

/* -- Eyebrow label -- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--green-700);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--kit-green);
  flex-shrink: 0;
}
.eyebrow--onDark {
  color: var(--green-300);
}
.eyebrow--onDark::before {
  background: var(--kit-green);
}
.eyebrow--center {
  justify-content: center;
}

/* -- Buttons (§9.2) -- shared across hero and CTA band */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.btn__arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  .btn:hover .btn__arrow { transform: translateX(3px); }
}

.btn--primary {
  background: var(--grad-brand);
  color: var(--text-inverse);
  box-shadow: 0 6px 18px rgba(0,105,91,.32);
}
@media (hover: hover) {
  .btn--primary:hover {
    background: var(--green-700);
    box-shadow: 0 10px 26px rgba(0,105,91,.40);
    transform: translateY(-2px);
  }
}
.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: rgba(255,255,255,.08);
  color: var(--text-inverse);
  border: 1px solid rgba(255,255,255,.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (hover: hover) {
  .btn--ghost:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.62);
  }
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--green-200);
  color: var(--green-700);
}
@media (hover: hover) {
  .btn--outline:hover {
    background: var(--green-50);
    border-color: var(--kit-green);
  }
}

/* -- Link-arrow component (§9.3) -- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--green-700);
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--green-200);
  transition: border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.link-arrow__arrow {
  width: 13px;
  height: 13px;
  transition: transform var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  .link-arrow:hover {
    border-color: var(--kit-green);
    color: var(--green-800);
  }
  .link-arrow:hover .link-arrow__arrow { transform: translateX(3px); }
}

/* -- Section titles standing in for a removed eyebrow label (§9) --
   --green-800 (9.27:1) rather than the base --kit-green (3.69:1, AA for
   large text only) — darker, and stays compliant even if this class is
   ever reused at a smaller size. Small-caps matches the treatment on
   css/research.css's card titles. */
.section-title--accent {
  color: var(--green-800);
  font-variant: small-caps;
  /* font-synthesis: none (below) blocks *synthesized* small-caps too —
     Inter's loaded subset has no true small-cap glyphs. Same fix as
     css/research.css's .card--research .card__title. */
  font-synthesis: small-caps;
  letter-spacing: 0.02em;
}

/* -- Utility classes -- */
.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;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--kit-green);
  color: #fff;
  font-weight: 600;
  font-size: var(--fs-small);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
}

/* -- Focus -- */
:focus-visible {
  outline: 2px solid var(--kit-green);
  outline-offset: 3px;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-xs);
}

/* -- KIT logo chip (asset reconciliation) --
   The English KIT wordmark ships as an opaque PNG with a baked-in white
   background; the German one is a transparent SVG. Wrapping both in a
   small white rounded chip makes the PNG's background read as an
   intentional badge instead of a rendering bug, and is harmless on the
   transparent SVG too. Used identically in both navbar states and in the
   footer — see plans/landing.MD §7.2, §7.6, §8.2. */
.kit-logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: #fff;
  border-radius: var(--radius-sm);
  line-height: 0;
}

/* -- Placeholder content marker (§1) -- inert hook, no default styling */
.ph {}
/* Uncomment to audit remaining placeholder content:
body.debug-placeholders .ph { background: #FCE50033; outline: 1px dashed #DF9B1B; }
*/

/* -- Reduced-contrast preference (§13.10, optional refinement) -- */
@media (prefers-contrast: more) {
  :root {
    --border-subtle: var(--ink-300);
    --text-accent: var(--green-800);
    --link: var(--green-800);
  }
}
