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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;               /* nothing may widen the page sideways (clip keeps the sticky header working) */
}

html,
body {
  overscroll-behavior-x: none;    /* no sideways rubber-band / swipe shift on trackpads */
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- Base ---------- */
:root {
  --bg: #000;            /* pure black so logo/product images blend in */
  --surface: #0e0e0e;
  --line: #222;
  --fg: #fff;
  --muted: #a3a3a3;
  --gold: #c9a45c;       /* accent taken from the Deluxe flyer */
  --gold-soft: rgba(201, 164, 92, 0.12);

  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 72px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100svh; /* avoids jump from mobile browser toolbars */
  -webkit-font-smoothing: antialiased;
}

/* Full-page background photo: stays fixed while scrolling, covers the whole
   viewport (background-size: cover) and is darkened by a black overlay.
   Built as a fixed pseudo-element instead of background-attachment: fixed,
   which iOS Safari ignores. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("../images/backgrounds/kryner-bckg.webp") center / cover no-repeat;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background: var(--bg);   /* solid, so the logo's black box never shows */
  border-bottom: 1px solid var(--line);
}

/* Start page: header floats over the centered logo */
.site-header--overlay {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
  border-bottom: 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}

.site-header--overlay .site-header__inner {
  justify-content: flex-end;
}

.site-header__logo img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.nav a {
  position: relative;
  padding-block: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--fg);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- Hero (start page) ---------- */
.hero {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.hero__logo {
  width: min(80vw, 640px);
  animation: fade-in 1.2s ease-out both;
  mix-blend-mode: screen;   /* logo PNG has a black box – screen makes black see-through */
}

/* Landscape phones: keep the logo inside the short viewport */
@media (orientation: landscape) and (max-height: 500px) {
  .hero__logo {
    width: min(60vw, 70svh * 2.13);
  }
}

/* ---------- Page intro ---------- */
.page-intro {
  padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.page-intro h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.page-intro p {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.page-intro .page-intro__credit {
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-intro__credit strong {
  font-weight: 700;
}

/* ---------- Product list ---------- */
.product-list {
  display: grid;
  /* one centered column on phones/tablets, two side by side from 900px */
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-block: clamp(1rem, 3vw, 2rem) clamp(4rem, 10vw, 7rem);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.7);   /* lets the page background shine through a little */
  transition: border-color 0.3s;
}

/* Side-by-side cards share one set of rows, so title, image and button
   line up regardless of text length. Every card must keep these 6 children:
   eyebrow, title, lead, desc, media, button. */
@supports (grid-template-rows: subgrid) {
  .product-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 6;
    row-gap: 0;
  }
}

.product-card:hover {
  border-color: rgba(201, 164, 92, 0.55);
}

.product-card__title {
  margin-top: 0.6rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.product-card__title span {
  color: var(--gold);
}

.product-card__lead {
  margin-top: 0.9rem;
  font-size: clamp(1.05rem, 2vw, 1.15rem);
  font-weight: 500;
  text-wrap: balance;
}

@media (max-width: 640px) {
  .product-card__lead {
    font-size: clamp(0.9rem, 4vw, 1.05rem);
  }
}

.product-card__desc {
  flex-grow: 1;   /* fallback without subgrid: pushes image + button down */
  margin-top: 0.9rem;
  color: var(--muted);
}

/* Same image box in every card, so portrait and landscape pedals line up */
.product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(260px, 60vw, 400px);
  margin-block: clamp(1.75rem, 4vw, 2.5rem);
}

.product-card__media img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  /* product photos have a solid black box – lighten lets the card show through it */
  mix-blend-mode: lighten;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.02);
}

/* Control chips – currently unused on the listing, kept for the product detail pages */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-self: start;          /* don't stretch to the shared subgrid row height */
  align-content: flex-start;
  gap: 0.5rem;
}

.controls li {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* "Mehr Info" – subtle outline button, bottom right of the card */
.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: start;
  width: max-content;
  margin-top: 0;         /* spacing comes from the image's bottom margin */
  margin-left: auto;     /* right-aligned in both the flex fallback and subgrid */
  padding: 0.55rem 1.1rem;
  border: 1px solid #333;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.btn-more span {
  color: var(--gold);
  transition: transform 0.25s;
}

.btn-more:hover,
.btn-more:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.btn-more:hover span {
  transform: translateX(4px);
}

/* Whole card clickable: the "Mehr Info" link is stretched over the card.
   Only cards whose button has an href (= product page exists) react. */
.product-card {
  position: relative;
}

.product-card .btn-more[href]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.product-card:has(.btn-more[href]):hover .btn-more {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.product-card:has(.btn-more[href]):hover .btn-more span {
  transform: translateX(4px);
}

.product-card:not(:has(.btn-more[href])):hover {
  border-color: var(--line);     /* no hover highlight on cards without a page yet */
}

/* ---------- Product detail page ---------- */
.nav a.is-active {             /* parent section of a sub page */
  color: var(--fg);
}

.nav a.is-active::after {
  transform: scaleX(1);
}

.muted {
  color: var(--muted);
}

.breadcrumb {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb span {
  margin-inline: 0.6rem;
  color: var(--gold);
}

/* Panels share the look of the product cards (translucent, no stacking
   context after the animation, so the photos' mix-blend-mode still works) */
.product-hero,
.tab-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.7);
}

.product-hero {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin-top: 1.25rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  animation: rise-in 0.9s ease-out backwards;
}

@media (min-width: 900px) {
  .product-hero {
    grid-template-columns: 1fr 1.2fr;
  }
}

.product-hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(320px, 80vw, 540px);
}

.product-hero__media img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  mix-blend-mode: lighten;   /* hides the photo's black box, like on the cards */
}

.product-hero__title {
  margin-top: 0.6rem;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.product-hero__slogan {
  margin-top: 0.8rem;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 600;
  color: var(--gold);
  text-wrap: balance;
}

@media (max-width: 640px) {
  .product-hero__slogan {
    font-size: clamp(0.9rem, 4vw, 1.2rem);   /* slogan stays on one line on phones */
  }
}

.product-hero__text {
  max-width: 34rem;
  margin-top: 1.1rem;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.facts li {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
}

/* Tabs */
.tabs {
  margin-block: clamp(2rem, 5vw, 3rem) clamp(4rem, 10vw, 7rem);
}

.tab-list {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;              /* tabs scroll sideways on small phones */
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  margin-bottom: -1px;
  padding: 0.9rem 1.1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: var(--fg);
}

.tab[aria-selected="true"] {
  color: var(--fg);
  border-bottom-color: var(--gold);
}

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

.tab__badge {
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--gold-soft);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  vertical-align: 1px;
}

.tab-panel {
  margin-top: 1.25rem;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.tab-panel:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Beschreibung */
.prose-lead {
  max-width: 46rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 500;
  line-height: 1.55;
}

.prose-grid {
  display: grid;
  gap: 2rem clamp(2rem, 5vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

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

.prose-grid h3,
.prose-closing h3 {
  font-size: 1.02rem;
  font-weight: 700;
}

.prose-grid p,
.prose-closing p {
  margin-top: 0.5rem;
  color: var(--muted);
}

/* Model name in the product title ("The Kryner EQ") */
.product-hero__title span {
  color: var(--gold);
}

/* Inline link inside the description, e.g. "Zum Kryner →" */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--gold);
}

/* Several inline links side by side ("Zum Kryner → Zum Kryner EQ →") */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

.link-row .text-link {
  margin-top: 0;
}

/* Two ways to connect, written as a signal chain */
.signal-chain {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.signal-chain li {
  padding: 0.55rem 0.8rem;
  border-left: 2px solid var(--gold);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.signal-chain strong {
  font-weight: 600;
  color: var(--fg);
}

.prose-closing {
  max-width: 46rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
}

.prose-closing .prose-signoff {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
}

/* Regler & Technik */
.spec-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}

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

.panel-heading {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.knobs {
  display: grid;
  gap: 0.75rem;
}

.knob {
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.knob dt {
  font-weight: 700;
}

.knob dd {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.specs div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.specs div:first-child {
  padding-top: 0;
}

.specs dt {
  font-size: 0.85rem;
  color: var(--muted);
}

.specs dd {
  font-size: 0.95rem;
}

.spec-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.spec-note strong {
  font-weight: 600;
  color: var(--gold);
}

/* Placeholders for upcoming content (sound samples, gallery) */
.placeholder {
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  text-align: center;
  color: var(--muted);
}

.placeholder__icon {
  width: 3rem;
  height: 3rem;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.placeholder h3 {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--fg);
}

.placeholder p {
  max-width: 28rem;
  margin: 0.5rem auto 0;
}

@media (max-width: 640px) {
  .product-hero,
  .tab-panel {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .tab {
    padding: 0.8rem 0.85rem;
  }

  .specs div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-hero { animation: none; }
}

/* Accordion (phones): the same panels, opened section by section.
   On desktop the headings are hidden and the tab list is used instead. */
.accordion-heading {
  display: none;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.05rem 1rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
}

.accordion-trigger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  border-radius: 14px;
}

.accordion-icon {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: auto;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

@media (max-width: 767px) {
  .tab-list {
    display: none;
  }

  .accordion-heading {
    display: block;
  }

  /* sections stack without gaps – one joined block */
  .tab-section {
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.7);
    scroll-margin-top: calc(var(--header-h) + 1rem);
  }

  .tab-section + .tab-section {
    border-top-color: rgba(255, 255, 255, 0.06);
    margin-top: -1px;              /* borders overlap instead of doubling */
  }

  .tab-list + .tab-section {
    border-radius: 14px 14px 0 0;
  }

  .tab-section:last-child {
    border-radius: 0 0 14px 14px;
  }

  /* the section box replaces the panel's own box */
  .tab-section .tab-panel {
    margin-top: 0;
    padding: 0.25rem 1rem 1.5rem;
    border: 0;
    border-radius: 0;
    background: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .accordion-icon { transition: none; }
}

/* Phones: cards, product header and accordion run edge to edge –
   their inner padding (= page gutter) keeps text aligned with the header */
@media (max-width: 640px) {
  .product-list {
    padding-inline: 0;
  }

  .product-hero,
  .tabs {
    margin-inline: calc(-1 * var(--gutter));
  }

  .product-card,
  .product-hero,
  .tab-list + .tab-section,
  .tab-section,
  .tab-section:last-child {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .product-card,
  .product-hero {
    padding-inline: var(--gutter);
  }

  .accordion-trigger {
    padding-inline: var(--gutter);
  }

  .tab-section .tab-panel {
    padding-inline: var(--gutter);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Motion ---------- */
@keyframes fade-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* fill-mode "backwards" (not "both"): after the animation no transform stays on
   the cards, so they don't become a stacking context – otherwise the product
   images' mix-blend-mode can't reach the page background */
.page-intro,
.product-card {
  animation: rise-in 0.9s ease-out backwards;
}

.product-card {
  animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo,
  .page-intro,
  .product-card { animation: none; }
  .product-card__media img { transition: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  :root { --gutter: 1rem; }
  .eyebrow { letter-spacing: 0.14em; }

  .page-intro {
    padding-block: 2.5rem 1.75rem;
  }

  .product-list {
    gap: 1rem;
    padding-bottom: 3rem;
  }

  .product-card {
    padding: 1.25rem var(--gutter);   /* edge to edge on phones, see "Phones" block above */
    border-radius: 0;
  }

  .product-card__media {
    margin-block: 1.25rem;
  }
}

@media (max-width: 480px) {
  :root { --header-h: 60px; }
  .site-header__logo img { height: 32px; }
}
