/* =====================================================================
   Padbangers — Global CSS framework
   The single source of design tokens + base element styles, the global
   header/sub-header/footer, buttons and shared layout helpers.
   Light "cream" palette with cyan + orange accents (the app look).
   Page-specific styles live in their own files (mpc-converter.css,
   mackie-configurator.css) and only consume these tokens.
   ===================================================================== */

/* ---- Design tokens (single source) --------------------------------- */
:root {
  --bg:         #ecebe6;
  --bg-2:       #e3e1da;
  --panel:      #f4f3ef;
  --edge:       #c4c2ba;
  --edge-dark:  #a6a49c;
  --display:    #161616;
  --display-2:  #232323;
  --text:       #2a2a28;
  --text-dim:   #5f6061;
  --cyan:       #1ec8e6;
  --cyan-dim:   #15a6c0;
  --orange:     #ff7a00;
  --orange-dim: #e86a00;
  --red:        #e30613;

  --container: 1180px;
  --radius:    12px;
  --radius-sm: 8px;
  --transition: 0.18s ease;
}

/* ---- Reset / base --------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Jump-mark offset: leave 50px above an anchored target when scrolling to it. */
[id] { scroll-margin-top: 50px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* sticky footer: body fills the viewport, footer pushed to the bottom */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-dim); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 1rem; }
p { margin: 0 0 1rem; }

main { flex: 1 0 auto; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---- Layout helpers ------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}
.text-dim { color: var(--text-dim); }

/* ---- Buttons (cyan/orange — never red) ----------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--radius-sm); padding: 13px 28px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: 1px solid transparent;
  transition: filter var(--transition), background var(--transition),
              border-color var(--transition), color var(--transition),
              transform var(--transition);
}
/* legacy modifier aliases (.primary/.ghost) kept so page markup that used
   the converter's bare classes keeps working alongside .btn--primary */
.btn--primary, .btn.primary {
  background: linear-gradient(var(--cyan), var(--cyan-dim)); color: #fff;
}
.btn--primary:hover, .btn.primary:hover {
  filter: brightness(1.08); text-decoration: none; color: #fff;
}
.btn--ghost, .btn.ghost {
  background: transparent; color: var(--text); border-color: var(--edge-dark);
}
.btn--ghost:hover, .btn.ghost:hover {
  background: var(--bg-2); text-decoration: none; color: var(--text);
}

/* =====================================================================
   Global header — stays the same on every page (home style)
   ===================================================================== */
.site-header {
  background: linear-gradient(var(--display-2), var(--display));
  border-bottom: 2px solid #000;
  position: relative;
  z-index: 60;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px;
  max-width: var(--container); margin: 0 auto; padding: 18px 28px;
}
.site-header__brand { display: inline-flex; min-width: 0; }
.site-header__brand:hover { text-decoration: none; }
/* wide 1200x180 banner — size by width, keep aspect ratio */
.site-header__logo { width: clamp(200px, 30vw, 300px); height: auto; max-width: 100%; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > a { color: #d8dde3; font-size: 16px; font-weight: 600; }
.site-nav > a:hover { color: #fff; text-decoration: none; }
.site-nav > a.is-active { color: #fff; }

/* Projects dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown__trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #d8dde3; font: inherit; font-size: 16px; font-weight: 600;
}
.nav-dropdown__trigger:hover,
.nav-dropdown__trigger.is-active { color: #fff; }
.nav-dropdown__icon { transition: transform var(--transition); }
.nav-dropdown__menu {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 70;
  min-width: 240px; padding: 8px;
  background: var(--display-2); border: 1px solid #000; border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  display: none; flex-direction: column; gap: 2px;
}
.nav-dropdown__menu a {
  display: block; padding: 9px 12px; border-radius: 6px;
  color: #d8dde3; font-size: 15px; font-weight: 600;
}
.nav-dropdown__menu a:hover { background: #000; color: #fff; text-decoration: none; }
/* opens on click only (JS toggles .is-open) */
.nav-dropdown.is-open .nav-dropdown__menu { display: flex; }
.nav-dropdown.is-open .nav-dropdown__icon { transform: rotate(180deg); }

/* social icon links */
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: #d8dde3;
  transition: color var(--transition), transform var(--transition);
}
.social:hover { color: #fff; transform: translateY(-1px); text-decoration: none; }
.social svg { width: 28px; height: 28px; display: block; }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.site-header__toggle { display: none; }
.hamburger {
  display: none;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  padding: 10px; margin-left: auto;
}
.hamburger span {
  display: block; height: 2px; background: #d8dde3; border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger span + span { margin-top: 5px; }

@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; }
  .hamburger { display: block; }
  .site-nav {
    flex-basis: 100%; order: 3;
    flex-direction: column; align-items: stretch; gap: 4px;
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-header__toggle:checked ~ .site-nav { max-height: 640px; padding-top: 12px; }
  .site-nav > a { padding: 10px 4px; }
  .nav-dropdown__trigger { padding: 10px 4px; width: 100%; justify-content: space-between; }
  .nav-dropdown__menu {
    position: static; display: flex; min-width: 0; box-shadow: none;
    margin: 0 0 4px; border: 0; background: transparent; padding: 0 0 0 12px;
  }
  .nav-dropdown__menu a { color: #b9c0c7; }
  .hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* =====================================================================
   Sub-header — per-page bar (converter style)
   ===================================================================== */
.topbar {
  background: linear-gradient(var(--display-2), var(--display));
  border-bottom: 2px solid #000;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px;
  max-width: var(--container); margin: 0 auto; padding: 14px 28px;
}
.subbrand { display: inline-flex; align-items: center; }
.subbrand img { height: 60px; width: auto; }
.subbrand:hover { text-decoration: none; }
.subnav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.subnav a { color: #d8dde3; font-size: 14px; font-weight: 600; }
.subnav a:hover { color: #fff; text-decoration: none; }
.pill {
  display: inline-flex; align-items: center; line-height: 1;
  border-radius: 6px; padding: 9px 16px; font-weight: 700; font-size: 13px;
  color: #fff !important; background: linear-gradient(var(--cyan), var(--cyan-dim));
}
.pill:hover { filter: brightness(1.08); text-decoration: none; }

@media (max-width: 860px) {
  .topbar__inner { flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
  .subbrand img { height: 48px; }
  .subnav { justify-content: center; gap: 14px 18px; }
}

/* =====================================================================
   Home hero + showcase cards
   ===================================================================== */
.home-hero {
  text-align: center;
  padding: 56px 28px 40px;
  max-width: var(--container); margin-inline: auto;
}
.home-hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 12px; }
.home-hero p  { color: var(--text-dim); font-size: 18px; max-width: 46ch; margin: 0 auto; }

.showcase { padding: 24px 28px 72px; max-width: var(--container); margin-inline: auto; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--edge);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  color: var(--text);
}
.card:hover {
  border-color: var(--cyan); transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.12); text-decoration: none;
}
.showcase-card__media {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); border-bottom: 1px solid var(--edge);
  padding: 28px; height: 300px;
}
.showcase-card__media img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.yt-icon {
  width: 120px; height: 120px; border-radius: 28px; background: #ff0000;
  display: grid; place-items: center; transition: transform var(--transition);
}
.card:hover .yt-icon { transform: scale(1.05); }
.yt-icon svg { width: 58px; height: 58px; }
.showcase-card__body { padding: 24px 24px 32px; text-align: center; }
.showcase-card__body h2 { font-size: 24px; margin: 0 0 8px; }
.showcase-card__body p { color: var(--text-dim); margin: 0 0 24px; }

@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* =====================================================================
   Global footer — same on every page
   ===================================================================== */
.site-footer {
  flex-shrink: 0;
  background: linear-gradient(var(--display-2), var(--display)); color: #cfcec9;
  text-align: center; padding: 28px; font-size: 13px;
}
.site-footer a { color: var(--cyan); }
.site-footer__links {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px;
}
.site-footer__social { display: flex; gap: 14px; justify-content: center; margin-bottom: 16px; }
.site-footer small { color: #8b8c8d; }
.site-footer .disclaimer {
  color: #8b8c8d; font-size: 11px; max-width: 640px; margin: 0 auto 12px; text-align: center;
}
.site-footer .copyright { color: #8b8c8d; display: block; }

/* =====================================================================
   Generic content page (contact, imprint) + form
   ===================================================================== */
.page { max-width: 820px; margin-inline: auto; padding: 40px 28px 72px; }
.page h1 { font-size: clamp(28px, 5vw, 36px); margin: 0 0 8px; }
.page__lead { color: var(--text-dim); font-size: 18px; margin: 0 0 32px; }
.page h2 { font-size: 22px; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--edge); }
.page p { color: var(--text-dim); }
.page a { color: var(--cyan-dim); }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 14px; color: var(--text-dim); }

.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input, .field textarea {
  font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--edge-dark);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(30,200,230,0.18);
}
.field textarea { min-height: 150px; resize: vertical; }
.form .btn { justify-self: start; }
/* honeypot — visually & semantically hidden, still in the DOM for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 4px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.form-status.is-success { color: #155724; background: #d7f0dd; border: 1px solid #a8d8b6; }
.form-status.is-error   { color: #7a1620; background: #f7d9dc; border: 1px solid #e3a5ac; }

.imprint address { font-style: normal; color: var(--text-dim); line-height: 1.6; }
