:root {
  color-scheme: light dark;

  --bg-light: #faf7f2;
  --bg-dark: #0e0e0d;
  --surface-light: #ffffff;
  --surface-dark: #161513;
  --surface-elevated-light: #f2ece2;
  --surface-elevated-dark: #1f1d1a;
  --text-light: #181614;
  --text-dark: #f2ede5;
  --muted-light: #5c554c;
  --muted-dark: #b3aa9d;
  --border-light: #e2d8c8;
  --border-dark: #2f2b25;
  --gold-light: #8d6b2d;
  --gold-dark: #c9a662;
  --emerald-light: #123c2c;
  --emerald-dark: #1f5c44;
  --danger-light: #b3261e;
  --danger-dark: #f28b82;
  --success-light: #1a6838;
  --success-dark: #7bd89b;

  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-elevated: var(--surface-elevated-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --border: var(--border-light);
  --gold: var(--gold-light);
  --emerald: var(--emerald-light);
  --danger: var(--danger-light);
  --success: var(--success-light);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --surface-elevated: var(--surface-elevated-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --border: var(--border-dark);
    --gold: var(--gold-dark);
    --emerald: var(--emerald-dark);
    --danger: var(--danger-dark);
    --success: var(--success-dark);
  }
}

@supports (color: light-dark(white, black)) {
  :root {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --surface-elevated: light-dark(var(--surface-elevated-light), var(--surface-elevated-dark));
    --text: light-dark(var(--text-light), var(--text-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --gold: light-dark(var(--gold-light), var(--gold-dark));
    --emerald: light-dark(var(--emerald-light), var(--emerald-dark));
    --danger: light-dark(var(--danger-light), var(--danger-dark));
    --success: light-dark(var(--success-light), var(--success-dark));
  }
}

html {
  accent-color: var(--gold);
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* Header */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-lockup img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.brand-name {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.header-nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--gold);
  color: #141210;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary:hover {
  background: var(--surface-elevated);
}

/* Hero */
.hero {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-block-end: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  line-height: 1.12;
  margin: 0.75rem 0 1.2rem;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.04rem;
  max-width: 54ch;
  margin-block-end: 1.8rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--border);
  margin-block-start: 2rem;
}

.hero-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero-meta dd {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  font-weight: 500;
}

.hero-media {
  position: relative;
  border: 1px solid var(--border);
  background: #0d0d0c;
  overflow: hidden;
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Sections */
.section {
  padding-block: clamp(3rem, 6vw, 4.75rem);
  border-block-end: 1px solid var(--border);
}

.section-header {
  max-width: 68ch;
  margin-block-end: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.2;
}

.section-header p {
  color: var(--muted);
  margin: 0;
}

/* Collection Grid (6 Offerings) */
.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.75rem;
}

.edition-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.edition-media {
  aspect-ratio: 16 / 10;
  background: #141311;
  overflow: hidden;
  border-block-end: 1px solid var(--border);
}

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

.edition-artwork {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 30% 20%, #24211c, #11100e);
  color: #f2ede5;
  text-align: center;
}

.edition-artwork .spec-pill {
  display: inline-block;
  border: 1px solid rgba(201, 166, 98, 0.55);
  color: #c9a662;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.edition-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.edition-body h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.3rem;
}

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

.spec-list {
  list-style: none;
  padding: 0;
  margin: auto 0 1.25rem;
  font-size: 0.84rem;
  border-block-start: 1px solid var(--border);
  padding-block-start: 0.85rem;
}

.spec-list li {
  padding-block: 0.2rem;
}

.gated-note {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

/* Sleeve Previewer */
.previewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

.preview-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.preview-canvas-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #141311;
}

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

.sleeve-overlay {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 18%;
  width: 24%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  border-inline: 1px solid rgba(201, 166, 98, 0.55);
}

.sleeve-overlay[data-theme="obsidian"] {
  background: linear-gradient(165deg, #1b1a18, #0b0a09);
  color: #f4efe6;
}

.sleeve-overlay[data-theme="emerald"] {
  background: linear-gradient(165deg, #164936, #0d2b1f);
  color: #f4efe6;
}

.sleeve-overlay[data-theme="sandstone"] {
  background: linear-gradient(165deg, #efe7da, #dccfb9);
  color: #1c1916;
}

.sleeve-logo-img {
  max-width: 78%;
  max-height: 44px;
  object-fit: contain;
  margin-bottom: 0.45rem;
}

.sleeve-company-text {
  font-family: Georgia, serif;
  font-size: clamp(0.62rem, 1.1vw, 0.86rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  word-break: break-word;
}

.sleeve-subtext {
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 0.35rem;
}

/* Forms + Accessible Validation (:user-invalid + fallback) */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

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

.field {
  display: flex;
  flex-direction: column;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.68rem 0.8rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.92rem;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger);
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) ~ .error-msg {
  display: block;
}

:is(input, select, textarea):user-valid {
  border-color: var(--success);
}

.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 400;
  font-size: 0.86rem;
  cursor: pointer;
}

.status-banner {
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-size: 0.9rem;
}

.status-banner.error {
  border-color: var(--danger);
  color: var(--danger);
}

.status-banner.success {
  border-color: var(--success);
}

/* Responsive Tables */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 80vh);
  container-type: inline-size;
  border: 1px solid var(--border);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

caption {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 600;
  border-block-end: 1px solid var(--border);
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--surface-elevated);
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-block-end: 1px solid var(--border);
}

tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface);
  z-index: 1;
}

@container (width < 600px) {
  .responsive-table table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td {
    display: block;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    margin-block-end: 1rem;
    border-block-end: 2px solid var(--border);
  }

  .responsive-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-elevated);
  }

  .responsive-table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--muted);
  }
}

/* Native Modal Dialog */
dialog {
  max-width: 520px;
  width: calc(100% - 2rem);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--gold);
  padding: 1.75rem;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Privacy Bar & Footer */
.privacy-bar {
  background: var(--surface-elevated);
  border-block-start: 1px solid var(--border);
  padding-block: 1.15rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.privacy-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer {
  padding-block: 2.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.badge-warn {
  border-color: var(--danger);
  color: var(--danger);
}

.badge-rfq {
  border-color: #2c7a7b;
  color: #4fd1c5;
  background: rgba(44, 122, 123, 0.14);
}

.badge-briefing-unread {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(155, 123, 62, 0.14);
}

.view-tabs {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.tab-btn {
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab-btn.is-active {
  border-color: var(--gold);
  color: var(--text);
  background: var(--surface-elevated);
}

.briefing-body {
  white-space: pre-wrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  margin: 0.75rem 0;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
