/* Kalu Audio — vintage valve look: dark wood/leather, brass gold, burgundy */

:root {
  --bg:        #0b0a09;
  --bg-raised: #141210;
  --bg-panel:  #1a1714;
  --line:      #352c22;
  --gold:      #d8b878;
  --gold-soft: #b8975a;
  --cream:     #ead6ab;
  --text:      #e8dcc6;
  --muted:     #a8977c;
  --burgundy:  #6e1419;
  --burgundy-hi: #8c1d23;
  --lamp:      #ff4a2a;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 10px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the aspect ratio when CSS changes the width (the HTML width/height
   attributes are only there to reserve space while loading) */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--cream); }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.1;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: .01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 11, 9, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--cream);
}

.brand img { width: 34px; height: 34px; }

.nav { display: flex; gap: 2rem; }

.nav a {
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cream);
  padding: .4rem .7rem;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 1rem 20px; border-top: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, #f0d79c, #c79f55);
  color: #2a1a08;
  box-shadow: 0 6px 24px rgba(216, 184, 120, .2);
}

.btn-primary:hover { color: #2a1a08; background: linear-gradient(180deg, #f8e3b0, #d4ab60); }

.btn-ghost { border-color: var(--gold-soft); color: var(--gold); }
.btn-ghost:hover { border-color: var(--cream); }

.btn small { font-weight: 400; letter-spacing: .05em; text-transform: none; opacity: .75; }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---------- Sections ---------- */

section { padding: clamp(4rem, 9vw, 7rem) 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.section-head .lead { margin-inline: auto; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
  opacity: .5;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  /* warm valve glow on black, matching the black skin */
  background:
    radial-gradient(ellipse 70% 55% at 50% 15%, rgba(255, 150, 60, .09), transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(216, 184, 120, .06), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* minmax: don't let the 1941px screenshot widen the column */
  gap: 3rem;
  align-items: center;
}

.hero-shot {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .75), 0 8px 20px rgba(0, 0, 0, .5);
}

/* Product screenshots get more room than the text column */
.shot-wide { width: min(1440px, 100vw - 40px); margin: 3rem auto 0; }

/* ---------- Product card (home) ---------- */

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.product-card img { border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }

@media (max-width: 860px) {
  .product-card { grid-template-columns: minmax(0, 1fr); }
}

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }

.tags li {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .8rem;
  color: var(--muted);
}

.tags li.highlight { border-color: var(--gold-soft); color: var(--gold); }

/* ---------- Skin switcher ---------- */

.skin-viewer { position: relative; }

.skin-viewer img { transition: opacity .35s; }

.skin-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin-top: 1.4rem;
  font-family: var(--serif);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: .9rem;
}

.skin-switch button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #6d5634;
  cursor: pointer;
  padding: 0;
  transition: transform .2s, border-color .2s;
}

.skin-switch button:hover { transform: scale(1.12); }
.skin-switch button[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 184, 120, .25); }

/* ---------- Signal chain ---------- */

.chain {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  counter-reset: stage;
}

.stage {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.3rem;
}

.stage::before {
  counter-increment: stage;
  content: "0" counter(stage);
  display: block;
  font-family: var(--serif);
  color: var(--gold-soft);
  font-size: 1rem;
  letter-spacing: .2em;
  margin-bottom: .6rem;
}

.stage h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.stage p { margin: 0; color: var(--muted); font-size: .93rem; }

@media (max-width: 980px) { .chain { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .chain { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.feature {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.feature h3 { font-size: 1.3rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Tubes table ---------- */

.tubes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.tube {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 150, 60, .06), transparent 70%), var(--bg-panel);
  border: 1px solid var(--line);
}

.tube .name { font-family: var(--serif); font-size: 1.55rem; color: var(--cream); letter-spacing: .08em; }
.tube .model { font-size: .78rem; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.tube p { margin: .4rem 0 0; color: var(--muted); font-size: .92rem; }

.tube .stats {
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Science ---------- */

.science {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.science p { color: var(--muted); }
.science h3 { margin-top: 2rem; }
.science h3:first-child { margin-top: 0; }

@media (max-width: 900px) { .science { grid-template-columns: minmax(0, 1fr); } }

.equation {
  margin: 1.5rem 0;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  font-family: "Cambria Math", "STIX Two Math", Cambria, Georgia, serif;
  font-size: 1.15rem;
  color: var(--cream);
  line-height: 2;
  overflow-x: auto;
}

.equation .label {
  display: block;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  line-height: 1.4;
  margin-bottom: .4rem;
}

.equation var { font-style: italic; }

.stage-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .82rem;
}

.stage-diagram li {
  padding: .45rem .8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-panel);
  color: var(--cream);
}

.stage-diagram li.arrow { border: 0; background: none; color: var(--gold); padding: 0; }

.data-table-wrap { overflow-x: auto; margin-top: 1rem; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.data-table th, .data-table td {
  padding: .6rem .5rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th:first-child, .data-table td:first-child { text-align: left; }

.data-table th {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: normal;
  vertical-align: bottom;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.data-table td:first-child strong { color: var(--cream); font-family: var(--serif); font-size: 1.1rem; letter-spacing: .06em; }
.data-table td:first-child span { color: var(--muted); font-size: .8rem; margin-left: .4rem; }
.data-table td { color: var(--text); }
.data-table .est { color: var(--gold); }

.note { font-size: .82rem; color: var(--muted); margin-top: .9rem; }

/* ---------- Specs ---------- */

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.specs dl { margin: 0; }

.specs dt {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 1.2rem;
}

.specs dd { margin: .2rem 0 0; }

.steps { margin: 0; padding-left: 1.3rem; }
.steps li { margin-bottom: .8rem; }
.steps code {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .85em;
  word-break: break-all;
}

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 0 auto; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.2rem 0;
}

.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--cream);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: .8rem 0 0; }

/* ---------- Download band ---------- */

.download-band {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 150, 60, .10), transparent 70%),
    var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.download-band .actions { justify-content: center; }

.fine { font-size: .85rem; color: var(--muted); margin-top: 1.2rem; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

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

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

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: .88rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer .brand { font-size: 1.1rem; }

/* ---------- Badge (like the plugin's brass plate) ---------- */

.plate {
  display: inline-block;
  padding: .35rem 1.1rem;
  border-radius: 5px;
  background: linear-gradient(135deg, #f6dc9a, #cfa456 35%, #9a7330 65%, #6e4e1c);
  color: #2a1a08;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .35em;
  font-size: .85rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(58, 40, 16, .6);
}

/* ---------- Accessibility ---------- */

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
