/* =========================================================
   KäferKind – minimal static stylesheet
   ========================================================= */

/* ----- Custom properties -------------------------------- */
:root {
  --color-bg:       #222222;
  --color-surface:  #2e2e2e;
  --color-border:   #444444;
  --color-text:     #eeeeee;
  --color-muted:    #bbbbbb;
  --color-accent:   #c8902a;   /* warm amber – Beetle yellow */
  --color-accent-light: #3a2e1a;

  --font-body:  system-ui, "Segoe UI", Helvetica, Arial, sans-serif;

  --space-xs:  0.5rem;
  --space-s:   1rem;
  --space-m:   2rem;
  --space-l:   4rem;
  --space-xl:  7rem;

  --max-w: 860px;
  --nav-h: 3.25rem;
}

/* ----- Reset -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw + 0.6rem, 1.125rem);
  line-height: 1.7;
}

/* ----- Navigation --------------------------------------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-h);
}

nav > div {
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
  display: flex;
  align-items: center;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
nav a:hover { color: var(--color-accent); }

/* --- Hamburger toggle (hidden input) --- */
nav input {
  display: none;
}

/* --- Hamburger icon (three lines) --- */
nav label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  flex-shrink: 0;
}

nav label span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-muted);
  border-radius: 2px;
  transition: background 0.15s;
}
nav label:hover span {
  background: var(--color-accent);
}

/* --- Nav menu (links) --- */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-m);
}

/* --- Mobile: below 640px --- */
@media (max-width: 639px) {
  nav {
    height: var(--nav-h);
    /* expands when menu is open */
  }

  nav label {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-xs) 0;
  }

  .nav-menu a {
    width: 100%;
    padding: 0.65rem var(--space-m);
    font-size: 1rem;
  }

  nav input:checked ~ .nav-menu {
    display: flex;
  }

  /* Animate hamburger to X when open */
  nav input:checked ~ label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  nav input:checked ~ label span:nth-child(2) {
    opacity: 0;
  }
  nav input:checked ~ label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  nav label span {
    transition: transform 0.2s, opacity 0.2s, background 0.15s;
  }
}

/* ----- Hero --------------------------------------------- */
header {
  position: relative;
  min-height: 60svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

header img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,18,12,0.72) 0%, rgba(20,18,12,0.15) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-l) var(--space-m);
  color: #fff;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw + 1rem, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-content p {
  margin-top: var(--space-xs);
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.2rem);
  color: rgba(255,255,255,0.85);
  max-width: 540px;
}

/* ----- Main layout -------------------------------------- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

/* ----- Section base ------------------------------------- */
section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}
section:last-child { border-bottom: none; }

section h2 {
  font-size: clamp(1.6rem, 2.5vw + 0.8rem, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-s);
}

blockquote {
  font-style: italic;
  color: var(--color-muted);
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-s);
  margin-bottom: var(--space-m);
  font-size: 1.05rem;
  line-height: 1.5;
  quotes: '«' '»';
}
blockquote::before { content: open-quote; }
blockquote::after  { content: close-quote; }

.section-sub {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-top: calc(-1 * var(--space-xs));
  margin-bottom: var(--space-m);
}

section p {
  color: var(--color-muted);
  max-width: 640px;
}

/* ----- Story text (Typenschild) ------------------------- */
#typenschild > div {
  max-width: 640px;
}

#typenschild > div p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--color-muted);
  max-width: 640px;
  margin-bottom: var(--space-s);
}

#typenschild > div p:last-child {
  margin-bottom: 0;
  font-style: italic;
  color: var(--color-text);
}

/* ----- Specs table (Zugluftgekühlt) --------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-m);
  font-size: 0.9rem;
}

table tr { border-bottom: 1px solid var(--color-border); }
table tr:last-child { border-bottom: none; }

table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.6rem 1rem 0.6rem 0;
  width: 40%;
  vertical-align: top;
}

table td {
  color: var(--color-muted);
  padding: 0.6rem 0;
  vertical-align: top;
}

/* ----- Pricing cards (Tacho) ---------------------------- */
.pricing-intro {
  color: var(--color-muted);
  max-width: 640px;
  margin-bottom: var(--space-l);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-m);
}

.price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.price-card .price-speed {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
}

.price-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.price-card .price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-accent);
  margin: var(--space-xs) 0;
}

.price-card p {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.price-card.highlight {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

/* When any card in the grid is hovered, suppress the default highlight … */
.pricing-grid:hover .price-card.highlight {
  border-color: var(--color-border);
  background: var(--color-surface);
}

/* … and highlight only the card under the cursor instead */
.pricing-grid:hover .price-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.pricing-note {
  margin-top: var(--space-l);
  padding: var(--space-m);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.pricing-note > div + div {
  margin-top: var(--space-m);
  padding-top: var(--space-m);
  border-top: 1px solid var(--color-border);
}

.pricing-note strong {
  display: block;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.pricing-note a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ----- Rückspiegel placeholder -------------------------- */
#rueckspiegel > div {
  margin-top: var(--space-m);
  border: 2px dashed var(--color-border);
  border-radius: 6px;
  padding: var(--space-l) var(--space-m);
  text-align: center;
  color: var(--color-border);
  font-size: 0.875rem;
}

/* ----- Contact (Blinker) -------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-l);
  margin-top: var(--space-m);
}

.contact-block h3 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.contact-block p,
.contact-block address {
  font-style: normal;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.contact-block a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.contact-block a:hover { color: var(--color-accent); }

.contact-block ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  list-style: none;
}

.contact-block ul a {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  transition: color 0.15s, border-color 0.15s;
}
.contact-block ul a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ----- Panel image dividers ----------------------------- */
.panel-image {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 80vh;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* iOS Safari doesn't support background-attachment: fixed inside
   scroll containers, so fall back to a static cover image */
@supports (-webkit-touch-callout: none) {
  .panel-image {
    background-attachment: scroll;
  }
}

/* Respect reduced-motion preference (vestibular / motion sensitivity) */
@media (prefers-reduced-motion: reduce) {
  .panel-image {
    background-attachment: scroll;
  }
}

/* ----- Footer ------------------------------------------- */
footer {
  text-align: center;
  padding: var(--space-l) var(--space-m);
  font-size: 0.8rem;
  color: var(--color-border);
}
