/* ============================================================
   Basilica Audio — suite stylesheet
   Near-black charcoal ground, antique gold, engraved-serif display.
   Zero external dependencies: system fonts only.
   ============================================================ */

:root {
  --bg: #0e0d0f;
  --bg-raised: #141216;
  --bg-card: #131115;
  --gold: #c9a25e;
  --gold-bright: #e3c78f;
  --gold-faint: rgba(201, 162, 94, 0.14);
  --hairline: rgba(201, 162, 94, 0.26);
  --ink: #e9e4da;
  --ink-muted: #a99f8f;
  --ink-faint: #7c7365;
  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Optima", "Avenir Next", "Avenir", "Gill Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
  --measure: 64ch;
}

/* ---- reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(ellipse 90% 40% at 50% -5%, rgba(201, 162, 94, 0.055), transparent 70%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 0.5em;
}

a { color: var(--gold); text-decoration: none; transition: color 140ms ease; }
a:hover { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 0.22em; }

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

code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--gold-bright);
  background: var(--gold-faint);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--bg);
  padding: 0.6em 1.2em;
  z-index: 100;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* ---- gold hairline rules ---- */
.hairline {
  height: 1px;
  border: 0;
  margin: 4rem auto;
  max-width: 58rem;
  background: linear-gradient(90deg, transparent, var(--hairline) 18%, var(--hairline) 82%, transparent);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.2rem auto;
  max-width: 22rem;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline));
}
.ornament::after { background: linear-gradient(90deg, var(--hairline), transparent); }
.ornament span {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.85;
}

/* ---- header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(201, 162, 94, 0.12);
}

.header-nav-group {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand:hover { color: var(--gold-bright); text-decoration: none; }
.brand img { /* transparent squircle icon — no circle clip */ }

.site-nav { display: flex; gap: 1.8rem; }
.site-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.site-nav a:hover { color: var(--gold-bright); text-decoration: none; }

/* ---- language switch ---- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  padding-left: 1.6rem;
  border-left: 1px solid rgba(201, 162, 94, 0.2);
}
.lang-switch span[aria-hidden] { color: var(--ink-faint); }
.lang-link { color: var(--ink-faint); }
.lang-link:hover { color: var(--gold-bright); text-decoration: none; }
.lang-link-active { color: var(--gold); }

@media (max-width: 36rem) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem 1.5rem;
    text-align: center;
  }
  .brand { font-size: 0.92rem; letter-spacing: 0.2em; }
  .header-nav-group { flex-wrap: wrap; justify-content: center; gap: 0.7rem 1.3rem; }
  .site-nav { gap: 1.3rem; }
  .lang-switch { padding-left: 0; border-left: 0; }
}

/* ---- main column ---- */
main {
  display: block;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ---- hero (overview page) ---- */
.hero {
  text-align: center;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 1rem;
}

.hero-emblem {
  /* icons are cut out (transparent PNG) — glow must follow the alpha shape */
  filter: drop-shadow(0 0 30px rgba(201, 162, 94, 0.18));
}

.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 1.8rem 0 0.4rem;
  text-indent: 0.28em; /* optically recenter letterspaced caps */
}

.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: var(--gold);
  margin: 0 auto;
  max-width: 38em;
}

.hero-sub {
  color: var(--ink-muted);
  max-width: 44em;
  margin: 0 auto;
  font-size: 0.98rem;
}

/* ---- plugin card grid ---- */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.4rem;
  padding: 3.5rem 0 5rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 2.2rem 1.5rem 1.9rem;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-card));
  border: 1px solid rgba(201, 162, 94, 0.16);
  border-radius: 6px;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.card:hover {
  border-color: rgba(201, 162, 94, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.card-icon {
  width: 92px;
  height: 92px;
  /* icons are cut out (transparent PNG) — no clipping ring */
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  margin-bottom: 0.9rem;
}

.card h2 {
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

/* whole card clickable through the title link */
.card-link { color: var(--ink); }
.card-link:hover { color: var(--gold-bright); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }

.card-role {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin: 0 0 0.9rem;
}

.card-actions {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  gap: 1.4rem;
}
.card-actions .details-hint { color: var(--ink-faint); }
.card:hover .details-hint { color: var(--gold); }

/* ---- product page ---- */
.breadcrumb { padding: 1.8rem 0 0; }
.breadcrumb a {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.breadcrumb a:hover { color: var(--gold-bright); text-decoration: none; }

.product-hero {
  display: flex;
  align-items: center;
  gap: clamp(1.8rem, 5vw, 3.5rem);
  padding: clamp(2.2rem, 6vw, 4rem) 0 0;
}

.product-icon {
  flex: 0 0 auto;
  /* icons are transparent squircle cutouts — no clipping, alpha-following glow */
  filter: drop-shadow(0 0 26px rgba(201, 162, 94, 0.16));
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.product-intro h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.35em;
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 34em;
  margin: 0 0 1rem;
}

.formats {
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0;
}

.rename-note {
  font-size: 0.92rem;
  color: var(--ink-muted);
  border-left: 2px solid var(--gold);
  padding-left: 1em;
  margin: 1.1rem 0 0;
  max-width: 40em;
}

@media (max-width: 40rem) {
  .product-hero { flex-direction: column; text-align: center; }
  .product-intro h1 { letter-spacing: 0.12em; }
  .rename-note { text-align: left; }
}

/* ---- generic sections ---- */
.section { padding: 0 0 3.4rem; }

.section h2 {
  font-size: 1.45rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.section h2::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 1px;
  margin-top: 0.7rem;
  background: var(--hairline);
}

.prose { max-width: var(--measure); color: var(--ink); }

/* ---- features ---- */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}
.features li {
  position: relative;
  padding: 0.45em 0 0.45em 1.7em;
  border-bottom: 1px solid rgba(201, 162, 94, 0.09);
}
.features li:last-child { border-bottom: 0; }
.features li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 1.05em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  opacity: 0.7;
  transform: rotate(45deg);
}
.features strong { color: var(--gold-bright); font-weight: 600; }

/* ---- downloads ---- */
.download-area { max-width: 46rem; }

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.4rem 0 1rem;
}

.dl-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 15rem;
  padding: 0.95rem 1.35rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(201, 162, 94, 0.1), rgba(201, 162, 94, 0.03));
  color: var(--ink);
  transition: background 160ms ease, box-shadow 160ms ease;
}
.dl-btn:hover {
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(201, 162, 94, 0.22), rgba(201, 162, 94, 0.08));
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}
.dl-btn .dl-platform {
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.dl-btn .dl-meta { font-size: 0.85rem; color: var(--ink-muted); }
.dl-btn .dl-file { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); overflow-wrap: anywhere; }

.dl-release-link { font-size: 0.9rem; color: var(--ink-muted); }
.download-fallback { color: var(--ink-muted); max-width: var(--measure); }

.unsigned-note {
  margin-top: 1.6rem;
  max-width: 46rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid rgba(201, 162, 94, 0.2);
  border-radius: 6px;
  background: var(--bg-raised);
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.unsigned-note p { margin: 0 0 0.6em; }
.unsigned-note p:last-child { margin-bottom: 0; }
.unsigned-note ul { margin: 0 0 0.6em; padding-left: 1.2em; }
.unsigned-note strong { color: var(--ink); }

/* ---- empty-state stubs (screenshots / audio) ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  max-width: 46rem;
  padding: 3rem 2rem;
  text-align: center;
  border: 1px dashed rgba(201, 162, 94, 0.3);
  border-radius: 6px;
  background: rgba(201, 162, 94, 0.025);
}
.empty-glyph {
  font-size: 1.6rem;
  color: var(--gold);
  opacity: 0.75;
  line-height: 1;
}
.empty-state p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--ink-muted); }
.empty-state .empty-sub { font-family: var(--sans); font-style: normal; font-size: 0.88rem; color: var(--ink-faint); max-width: 34em; }

/* ---- media galleries (auto-populated when files exist) ---- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.2rem;
  max-width: 58rem;
}
.shot-grid figure { margin: 0; }
.shot-grid img {
  border: 1px solid rgba(201, 162, 94, 0.22);
  border-radius: 4px;
  display: block;
}
.shot-grid figcaption { font-size: 0.85rem; color: var(--ink-muted); padding-top: 0.4rem; }

.audio-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.audio-list li { padding: 0.7rem 0; border-bottom: 1px solid rgba(201, 162, 94, 0.09); }
.audio-list li:last-child { border-bottom: 0; }
.audio-list .audio-caption { display: block; font-size: 0.92rem; color: var(--ink-muted); margin-bottom: 0.4rem; }
.audio-list audio { width: 100%; }

/* ---- donations stub ---- */
.donate-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.4rem 0 0.9rem; }

.donate-btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
  border: 1px solid rgba(201, 162, 94, 0.35);
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
}
.donate-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.stub-note { font-size: 0.88rem; color: var(--ink-faint); max-width: var(--measure); }

/* ---- links list ---- */
.link-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.link-list li { padding: 0.35em 0; }
.link-list a { letter-spacing: 0.04em; }

/* ---- manual pages ---- */
.manual {
  max-width: var(--measure);
  padding: 1.6rem 0 5rem;
}
.manual h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  letter-spacing: 0.06em;
  margin: 0.2em 0 0.5em;
}
.manual h2 {
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 2.4em 0 0.6em;
  padding-top: 0.2em;
  border-top: 1px solid rgba(201, 162, 94, 0.14);
}
.manual h1 + h2, .manual h2:first-child { border-top: 0; margin-top: 1em; }
.manual h3 {
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 1.8em 0 0.5em;
}
.manual p { margin: 0 0 1.1em; }
.manual em { font-family: var(--serif); font-style: italic; color: var(--ink-muted); }
.manual strong { color: var(--gold-bright); font-weight: 600; }
.manual a { text-underline-offset: 0.2em; }

.manual ul, .manual ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.manual li { margin: 0.35em 0; }
.manual ul { list-style: none; padding-left: 1.1em; }
.manual ul li { position: relative; }
.manual ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--gold);
  opacity: 0.75;
  transform: rotate(45deg);
}
.manual ol { list-style: decimal; }
.manual ol li::marker { color: var(--gold); }

.manual pre {
  margin: 0 0 1.4em;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  background: var(--bg-raised);
  border: 1px solid rgba(201, 162, 94, 0.18);
  border-radius: 6px;
}
.manual pre code {
  background: none;
  padding: 0;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.55;
}

.manual blockquote {
  margin: 0 0 1.4em;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 2px solid var(--gold);
  color: var(--ink-muted);
}
.manual blockquote p:last-child { margin-bottom: 0; }

.manual hr {
  border: 0;
  height: 1px;
  margin: 2.6rem 0;
  background: linear-gradient(90deg, var(--hairline), transparent 70%);
}

.manual .table-scroll {
  overflow-x: auto;
  margin: 0 0 1.6em;
  border: 1px solid rgba(201, 162, 94, 0.18);
  border-radius: 6px;
}
.manual table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.92rem;
}
.manual th, .manual td {
  padding: 0.6em 0.9em;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(201, 162, 94, 0.12);
}
.manual thead th {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--bg-raised);
  white-space: nowrap;
}
.manual tbody tr:last-child td { border-bottom: 0; }
.manual tbody tr:hover { background: rgba(201, 162, 94, 0.04); }

/* ---- footer ---- */
.site-footer {
  text-align: center;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 3.5rem;
}
.site-footer .hairline { margin: 0 auto 2.6rem; }
.footer-brand {
  font-family: var(--serif);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
  text-indent: 0.3em;
}
.footer-links { margin: 0 0 1rem; }
.footer-links span { color: var(--ink-faint); padding: 0 0.5em; }
.footer-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 46em;
  margin: 0 auto;
}

.signing-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.prose.lore {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
}
