/* Iconoclast Audio — flat layout, Bauhaus palette (no glass / no card chrome) */

:root {
  color-scheme: light dark;
  --bg: #0f0f10;
  --fg: #eceae7;
  --muted: #9c9893;
  --surface-subtle: #121214;
  --surface: #161618;
  --border-subtle: #1e1e22;
  --border: #2a2a2e;
  --border-strong: #3d3d44;
  --rose-gold: #c9a090;
  --gold: #c4a035;
  --baby-blue: #8ec5f2;
  --baby-blue-hover: #b8d4ff;
  --seafoam: #6eb8a8;
  --accent: var(--rose-gold);
  --link: var(--baby-blue);
  --link-hover: var(--baby-blue-hover);
  --on-accent: #0f0f10;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans",
    sans-serif;
  line-height: 1.55;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  background: var(--bg);
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  z-index: 100;
  border-radius: 2px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
}

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

.site-shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
  padding: 0.85rem 0;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: none;
  padding: 0.15rem 0;
}

.site-nav a:hover {
  color: var(--link);
}

.site-nav a[aria-current="page"] {
  color: var(--gold);
  font-weight: 600;
}

.site-nav .nav-brand {
  margin-right: auto;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 0;
}

.nav-brand__logo {
  display: block;
  height: 1.75rem;
  width: auto;
  max-width: 11rem;
  flex-shrink: 0;
  object-fit: contain;
  object-position: left center;
}

.site-nav .nav-sep {
  width: 100%;
  height: 0;
  flex-basis: 100%;
}

@media (min-width: 640px) {
  .site-nav .nav-sep {
    display: none;
  }
  .site-nav .nav-brand {
    margin-right: 1rem;
  }
}

.site-header,
.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1.25rem;
  width: 100%;
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gold);
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
}

main {
  flex: 1;
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem 2.5rem;
}

main > section,
main > article {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

main > section:first-child,
main > article:first-child {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
}

main h2 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

main h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.panel h2,
article.panel h2 {
  margin: 0 0 0.65rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--fg);
}

p {
  margin: 0.65rem 0 0;
  max-width: 38rem;
}

.panel p:first-of-type,
article.panel p:first-of-type {
  margin-top: 0;
}

ul,
ol {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  max-width: 38rem;
}

li {
  margin: 0.35rem 0 0;
}

dt {
  font-weight: 600;
  margin-top: 1rem;
  color: var(--fg);
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.meta {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.pages-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 1rem 0 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border-strong);
}

.pages-note code {
  font-size: 0.85em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

/* Links / contact — plain list, no button blocks */
.link-stack {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  max-width: 22rem;
}

.link-stack li {
  margin: 0;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.link-stack li:last-child {
  border-bottom: none;
}

.link-stack a {
  font-weight: 500;
}

.rates-hero-strip {
  margin: 0 0 1rem;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.rates-hero-strip img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.rates-grid-img {
  margin: 0 0 0.85rem;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.rates-grid-img img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rates-columns {
  margin-top: 1rem;
}

@media (min-width: 520px) {
  .rates-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
  }
  .rates-columns > section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
}

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

.site-footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  text-align: left;
  background: var(--surface-subtle);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.5rem;
}

.site-footer .footer-links {
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.site-footer a {
  font-weight: 500;
}

.site-footer .wip {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.site-footer-brand img {
  width: 1.85rem;
  height: 1.85rem;
  opacity: 0.88;
  flex-shrink: 0;
}

.site-footer-brand nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  justify-content: center;
}

@media (min-width: 640px) {
  .site-footer-brand {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
  }
  .site-footer-brand nav {
    justify-content: flex-start;
  }
}

.brand-emblem {
  margin: 0;
  padding: 1rem 1rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.brand-emblem img {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto;
  display: block;
  object-fit: contain;
  opacity: 0.92;
}

.brand-emblem figcaption {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.error-code {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--gold);
  line-height: 1;
  margin: 0 0 0.35rem;
}

/* Asset gallery (site/public/index.html) — flat rows, no cards */
.gallery-header-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.gallery-header-brand > img {
  flex-shrink: 0;
  opacity: 0.9;
  margin-top: 0.15rem;
}

body.gallery .gallery-back {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

body.gallery .gallery-back a {
  color: var(--muted);
  text-decoration: none;
}

body.gallery .gallery-back a:hover {
  color: var(--link);
  text-decoration: underline;
}

body.gallery .gallery-header h1 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

body.gallery main > .asset-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

body.gallery .asset-section h2 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

body.gallery .asset-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.gallery .asset-row {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 1rem 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}

@media (max-width: 520px) {
  body.gallery .asset-row {
    grid-template-columns: 1fr;
  }
}

body.gallery .asset-preview {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem;
}

body.gallery .asset-preview img {
  max-width: 100%;
  max-height: 5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

body.gallery .asset-preview--file {
  min-height: 3.5rem;
  justify-content: center;
}

body.gallery .asset-ext {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

body.gallery .asset-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

body.gallery .asset-path {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  word-break: break-all;
}

body.gallery .asset-path code {
  font-size: 0.85em;
  color: var(--muted);
}

body.gallery .asset-desc {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 40rem;
}

body.gallery .asset-actions {
  margin: 0;
  font-size: 0.88rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2ef;
    --fg: #141210;
    --muted: #5c5854;
    --surface-subtle: #efede8;
    --surface: #e8e6e1;
    --border-subtle: #dcd8d0;
    --border: #d8d4cd;
    --border-strong: #c4bfb6;
    --rose-gold: #9a6b58;
    --gold: #8a6f18;
    --baby-blue: #1e5f9e;
    --baby-blue-hover: #164a7a;
    --seafoam: #2d7a6a;
    --accent: var(--rose-gold);
    --link: var(--baby-blue);
    --link-hover: var(--baby-blue-hover);
    --on-accent: #141210;
  }
}

@media (prefers-contrast: more) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #ffffff;
    --surface-subtle: #000000;
    --surface: #000000;
    --border-subtle: #ffffff;
    --border: #ffffff;
    --border-strong: #ffffff;
    --rose-gold: #ffffff;
    --gold: #ffffff;
    --baby-blue: #ffffff;
    --baby-blue-hover: #ffffff;
    --seafoam: #ffffff;
    --accent: #ffffff;
    --link: #ffffff;
    --link-hover: #ffffff;
    --on-accent: #000000;
  }
}

@media (prefers-color-scheme: light) and (prefers-contrast: more) {
  :root {
    --bg: #ffffff;
    --fg: #000000;
    --muted: #000000;
    --surface-subtle: #ffffff;
    --surface: #ffffff;
    --border-subtle: #000000;
    --border: #000000;
    --border-strong: #000000;
    --rose-gold: #000000;
    --gold: #000000;
    --baby-blue: #000000;
    --baby-blue-hover: #000000;
    --seafoam: #000000;
    --accent: #000000;
    --link: #000000;
    --link-hover: #000000;
    --on-accent: #ffffff;
  }
}

/* Design docs — same tokens; optional class for palette table */
body.design-docs .site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

body.design-docs .design-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin: -1.5rem -1.5rem 1rem;
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

body.design-docs .design-nav__live {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-bottom: none;
}

body.design-docs .design-nav__live:hover {
  color: var(--link);
}

body.design-docs .design-nav__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.design-docs .design-nav__pages a {
  padding: 0.25rem 0.5rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: none;
}

body.design-docs .design-nav__pages a:hover {
  color: var(--link);
}

body.design-docs .design-nav__pages a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.design-docs .site-header h1 {
  color: var(--gold);
}

body.design-docs main h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--accent);
}

.palette-lede,
.type-lede {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 38rem;
}

.palette-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.palette-table th,
.palette-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.palette-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.palette-table code {
  font-size: 0.82em;
}

.palette-swatch {
  width: 2.5rem;
  height: 1.25rem;
  border: 1px solid var(--border-strong);
}

.palette-subheading {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.palette-swatch {
  display: inline-block;
  width: 2.5rem;
  height: 1.1rem;
  border: 1px solid var(--border-strong);
  vertical-align: middle;
}

.palette-swatch--bg {
  background: var(--bg);
}
.palette-swatch--fg {
  background: var(--fg);
}
.palette-swatch--muted {
  background: var(--muted);
}
.palette-swatch--surface-subtle {
  background: var(--surface-subtle);
}
.palette-swatch--surface {
  background: var(--surface);
}
.palette-swatch--border {
  background: var(--bg);
  border-width: 2px;
  border-color: var(--swatch-border, var(--border));
}
.palette-swatch--rose-gold {
  background: var(--rose-gold);
}
.palette-swatch--gold {
  background: var(--gold);
}
.palette-swatch--baby-blue {
  background: var(--baby-blue);
}
.palette-swatch--seafoam {
  background: var(--seafoam);
}

.type-sample {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.type-sample:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.type-sample h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.type-meta {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.type-scale-table {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.type-scale-table th,
.type-scale-table td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.type-scale-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.type-preview-h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.type-preview-h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}
