/* =============================================================
   components.css — Reusable UI Components
   Buttons, service cards, gallery carousel, instrument grid,
   section content blocks, video embeds, and page-specific
   blocks (sound-fx, referenzen, legal). Structural scaffolding
   lives in layout.css.

   All colour, radius, link and typography values flow from the
   design tokens in variables.css so every component matches.
   Layout (grids, ratios, positioning) is unchanged.
   ============================================================= */

/* ========== SERVICES ========== */
/* Vertical rhythm comes from the shared .section-content padding —
   no extra element padding here, so this section matches every other. */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.service-card {
  display: flex;
  flex-direction: column;
}

.service-img-wrap {
  width: 100%;
  padding-bottom: 66.67%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}

.service-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

/* Image zoom on card hover */
.service-card:hover .service-img-wrap img {
  transform: scale(1.05);
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--c-heading);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
}

.service-card p a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 126, 60, 0.3);
  transition: color var(--dur-fast);
}

.service-card p a:hover {
  color: var(--accent-ink);
}

/* ========== GALLERY CAROUSEL ========== */
.gallery {
  position: relative;
  width: 100%;
  /* Taller frame so more of the landscape liveroom photos is visible
     (less top/bottom cropping from object-fit: cover). */
  height: 660px;
  overflow: hidden;
  background: var(--dark-media);
  border-radius: var(--radius-sm);
}

/* Each slide fills the container and cross-fades */
.gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

.gallery__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prev / Next arrow buttons */
.gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast);
  z-index: 5;
}

.gallery__btn:hover,
.gallery__btn:focus-visible {
  background: rgba(0, 0, 0, 0.65);
  outline: none;
}

.gallery__btn--prev { left: 0; }
.gallery__btn--next { right: 0; }

/* Dot navigation */
.gallery__dots {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 5;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur-fast), transform var(--dur-fast);
}

.gallery__dot:hover,
.gallery__dot:focus-visible {
  background: rgba(255, 255, 255, 0.75);
  outline: none;
}

.gallery__dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

/* ========== FLUEGEL (dark parallax content) ========== */
#fluegel .section-content {
  max-width: 1200px;
}

.fluegel-inner {
  display: flex;
  justify-content: flex-end;
}

.fluegel-text {
  /* Wide enough that "AUFNAHMEN" still fits on one line at the heading's
     max font size (80px). The column is flush-right (justify-content: flex-end),
     so widening it grows to the left and keeps the right edge — and thus the
     alignment of heading and paragraph — unchanged. */
  max-width: 640px;
  text-align: right;
}

/* On dark photo background the section title must stay white, overriding
   the default near-black heading colour. */
.fluegel-text .section-title {
  text-align: right;
  color: #fff;
}

.fluegel-text .section-subtitle {
  margin-left: auto;
  text-align: right;
}

/* ========== BUTTONS ==========
   Two skins share one architectural shape (tracked uppercase sans label,
   gently rounded, hairline border):
     .btn-outline       — ghost on dark/photo surfaces (light border)
     .btn-outline-dark   — solid espresso primary on ivory surfaces
   The brass accent appears on hover. */
.btn-outline {
  display: inline-block;
  margin-top: var(--space-5);
  padding: 15px 34px;
  border: 1px solid var(--border-on-dark);
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.btn-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
}

/* Solid primary for light surfaces (contact submit, YouTube link) */
.btn-outline-dark {
  border-color: var(--c-heading);
  background: var(--c-heading);
  color: var(--surface);
}

.btn-outline-dark:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--surface);
}

/* ========== INSTRUMENTS (gallery) ========== */
#instruments {
  padding: 0;
}

#instruments .section-content {
  padding-top: var(--space-section);
  padding-bottom: var(--space-6);
}

.instruments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: 0;
}

.instr-item {
  position: relative;
  padding-bottom: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.instr-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.instr-item:hover img {
  transform: scale(1.06);
}

.instruments-desc {
  max-width: 700px;
  margin: var(--space-6) auto 0;
  text-align: center;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  padding: 0 var(--space-4) var(--space-section);
}

/* ========== ANGEBOT (dark parallax content) ========== */
#angebot {
  text-align: center;
}

#angebot .section-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Dark photo background: keep the title white */
#angebot .section-title {
  color: #fff;
}

#angebot .section-subtitle {
  text-align: center;
}

/* ========== ENTSPANNT (light, text + image) ========== */
#entspannt .section-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-7);
  align-items: center;
}

.entspannt-text .section-subtitle {
  color: var(--c-text);
}

.entspannt-img {
  width: 100%;
  padding-bottom: 66.6%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.entspannt-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== ABOUT ========== */
/* Mirrored vs. "Entspannt": image column first (left), text second (right).
   A warm off-white background + top hairline separate it visually
   from the "Entspannt" section above. */
#about {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}

#about .section-content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-7);
  align-items: center;
}

.about-text .section-subtitle { color: var(--c-text); }

/* Name shown as an intro line under the "About" heading.
   In the brass accent it reads as a signature line. */
.about-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--accent-strong);
  letter-spacing: -0.01em;
  margin: -4px 0 20px;
}

/* Labelled sub-blocks (Instrumente / Ausbildung) */
.about-block {
  margin-top: var(--space-4);
}

.about-block__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: var(--space-2);
}

/* Instruments rendered as a plain inline list with middot separators */
.about-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-body);
  color: var(--c-text);
  line-height: 1.6;
}

.about-tags li {
  display: inline;
}

.about-tags li:not(:last-child)::after {
  content: '·';
  margin: 0 9px;
  color: var(--c-muted);
}

/* Education kept subtle: small, muted, no decorative bullets */
.about-credentials {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about-credentials li {
  margin-bottom: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  line-height: 1.6;
}

.about-yt {
  margin-top: var(--space-5);
}

.about-img {
  width: 100%;
  padding-bottom: 75%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  /* Align to the top of the (taller) text column instead of centring */
  align-self: start;
  box-shadow: var(--shadow-md);
}

.about-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== KONTAKT ========== */
#kontakt .section-content {
  max-width: 960px;
}

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-7);
  align-items: start;
  margin-top: var(--space-6);
}

.kontakt-info {
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--c-text);
}

.kontakt-info a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.kontakt-info a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

/* Formspree contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-text);
}

.form-group input,
.form-group textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--c-text);
  background: var(--surface-input);
  transition: border-color var(--dur-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form__submit {
  align-self: flex-start;
  margin-top: var(--space-2);
}

/* GDPR consent row: checkbox + small print, aligned to the top */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.form-consent input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

.form-consent label {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--c-muted);
}

.form-consent a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 108, 48, 0.35);
  transition: color var(--dur-fast);
}

.form-consent a:hover {
  color: var(--accent-ink);
}

/* Form feedback banners — visibility controlled by @formspree/ajax.
   They sit as the first item inside the form; the form's flex gap handles
   the spacing to the fields below, so no extra margin is needed here. */
.form-message {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.form-message--success {
  background: #f0faf0;
  color: #2a5c2a;
  border: 1px solid #b4ddb4;
}

.form-message--error {
  background: #fff5f5;
  color: #8b1a1a;
  border: 1px solid #f5b8b8;
}

/* Field-level inline error text rendered by @formspree/ajax */
.form-field-error {
  display: block;
  font-size: var(--fs-sm);
  color: #c0392b;
  margin-top: var(--space-1);
  min-height: 18px;
}

/* ========== RESPONSIVE (components) ========== */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .instruments-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fluegel-inner {
    justify-content: flex-start;
  }
  .fluegel-text {
    text-align: left;
    max-width: 100%;
  }
  .fluegel-text .section-title {
    text-align: left;
  }
  .fluegel-text .section-subtitle {
    margin-left: 0;
  }
  #entspannt .section-content {
    grid-template-columns: 1fr;
  }
  .gallery {
    height: 380px;
  }
  #about .section-content {
    grid-template-columns: 1fr;
  }
  .kontakt-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .instruments-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== VIDEO WRAP — reusable responsive 16:9 container ========== */
/* Works for both <video> and <iframe> embeds.
   Usage: <div class="video-wrap"><video …></video></div>
          <div class="video-wrap"><iframe …></iframe></div>  */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: var(--dark-media);
  border-radius: var(--radius-sm);
}

.video-wrap > video,
.video-wrap > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== YOUTUBE CLICK-TO-LOAD OVERLAY ========== */
/* Fills the .video-wrap container (position:absolute, inset:0) until clicked.
   On click, js in sound-fx.html replaces it with the real iframe. */
.yt-consent {
  position: absolute;
  inset: 0;
  background: var(--dark-media);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.yt-consent:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.yt-consent__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  text-align: center;
  max-width: 360px;
}

.yt-consent__play {
  width: 68px;
  height: 48px;
  transition: transform 0.15s var(--ease);
}

.yt-consent:hover .yt-consent__play,
.yt-consent:focus-visible .yt-consent__play {
  transform: scale(1.12);
}

.yt-consent__text {
  font-size: 13px;
  color: var(--c-on-dark-muted);
  line-height: 1.6;
  margin: 0;
}

.yt-consent__btn {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid var(--border-on-dark);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.yt-consent:hover .yt-consent__btn,
.yt-consent:focus-visible .yt-consent__btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ========== SOUND FX PAGE ========== */

/* Extra top padding so the fixed navbar clears the first section heading */
#sound-fx.section-light .section-content {
  padding-top: var(--space-navclear);
}

/* Intro paragraph — constrained width for comfortable line length */
.sfx-intro {
  max-width: 760px;
  margin-bottom: var(--space-4);
}

/* Small disclaimer below the intro text */
.sfx-disclaimer {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  font-style: italic;
  margin-bottom: var(--space-5);
}

.sfx-disclaimer a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.sfx-disclaimer a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

/* ========== AUDIO FOR GAMES SECTION ========== */

/* Two-column grid: image left, text right */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-6);
}

.game-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.game-text h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--c-heading);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.game-text p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
}

/* ========== RESPONSIVE (sound-fx page) ========== */
@media (max-width: 900px) {
  #sound-fx.section-light .section-content {
    padding-top: 110px;
  }
  .game-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

/* ========== REFERENZEN PAGE ========== */

/* Navbar clearance for the first section on referenzen.html */
#referenzen .section-content {
  padding-top: var(--space-navclear);
}

/* Each reference entry: two equal columns, image + text */
.ref-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
}

.ref-entry:first-child {
  border-top: none;
  padding-top: var(--space-6);
}

/* Even entries: swap columns so image appears on the right */
.ref-entry:nth-child(even) .ref-entry__img  { order: 2; }
.ref-entry:nth-child(even) .ref-entry__text { order: 1; }

/* Intrinsic-ratio image shell — 3:2 landscape, consistent across entries */
.ref-entry__img-inner {
  position: relative;
  width: 100%;
  padding-bottom: 66.67%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

/* Photo variant: fill the frame */
.ref-entry__img-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.ref-entry:hover .ref-entry__img-inner img {
  transform: scale(1.04);
}

/* Logo variant: image contained with breathing room.
   Background matches the page (white) so the transparent PNGs
   blend in seamlessly instead of sitting on a coloured tile. */
.ref-entry__img-inner--logo {
  background: var(--surface);
}

.ref-entry__img-inner--logo img {
  inset: 28px;
  width: calc(100% - 56px);
  height: calc(100% - 56px);
  object-fit: contain;
}

/* Logos don't zoom on hover */
.ref-entry:hover .ref-entry__img-inner--logo img {
  transform: none;
}

/* Reference entry text block */
.ref-entry__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  color: var(--c-heading);
  letter-spacing: -0.02em;
  line-height: var(--lh-snug);
  margin-bottom: var(--space-4);
}

.ref-entry__body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  max-width: 480px;
}

/* Even entries: align text block to the right within its column */
.ref-entry:nth-child(even) .ref-entry__text {
  text-align: left; /* text stays left-aligned; the column itself is left */
}

/* ========== AUDIOBEISPIELE SECTION ========== */

/* Warm off-white distinguishes this section from the referenzen above */
#audiobeispiele {
  background: var(--surface-alt);
  /* Ensure the fixed navbar doesn't overlap when jumped to via #audiobeispiele */
  scroll-margin-top: 80px;
}

/* Decorative accent rule rendered as a CSS pseudo-element before the heading */
#audiobeispiele .section-content::before {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-6);
}

#audiobeispiele .section-subtitle {
  color: var(--c-text);
  margin-bottom: var(--space-6);
}

/* Max-width container centres the Spotify embed at a comfortable reading width */
.spotify-wrap {
  max-width: 760px;
  margin: 0 auto;
}

/* ========== RESPONSIVE (referenzen page) ========== */
@media (max-width: 900px) {
  #referenzen .section-content {
    padding-top: 110px;
  }

  .ref-entry {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }

  /* Always render image above text on mobile — reset order swap */
  .ref-entry:nth-child(even) .ref-entry__img,
  .ref-entry:nth-child(even) .ref-entry__text {
    order: 0;
  }

  .ref-entry__body {
    max-width: 100%;
  }
}

/* Honeypot anti-spam field — hidden from users, only bots fill it in */
.contact-form__honeypot {
  display: none;
}

/* ========== LEGAL PAGES (Impressum, Datenschutz) ========== */

/* Narrow, readable measure; extra top padding clears the fixed navbar */
.legal .section-content {
  padding-top: var(--space-navclear);
  max-width: 820px;
}

/* "Stand: …" date line above the page title */
.legal__updated {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

/* Each thematic block (one service / one legal point) */
.legal__block {
  margin-top: var(--space-6);
}

.legal__block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--c-heading);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.legal__block h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lead);
  color: var(--c-heading);
  margin: var(--space-4) 0 var(--space-2);
}

.legal__block p,
.legal__block li {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
}

.legal__block ul {
  padding-left: 1.3em;
  margin: var(--space-2) 0;
}

.legal__block li {
  margin-bottom: 6px;
}

.legal__block a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 126, 60, 0.3);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}

.legal__block a:hover {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

/* Placeholders ([NAME] etc.) stand out so they are easy to find & replace */
.legal__block mark {
  background: #fdf3d8;
  color: #7a5b13;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  font-style: normal;
}

@media (max-width: 900px) {
  .legal .section-content {
    padding-top: 120px;
  }
}
