:root {
  --bg-canvas: #0b0b0d;
  --bg-surface: #19191e;
  --bg-surface-hover: #222229;
  --text-primary: #f5f2ed;
  --text-muted: #c0c4cc;
  --accent-primary: #dc2626;
  --accent-secondary: #991b1b;
  --border-subtle: #2e2e36;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: none;
  --glow-accent: none;
  --glass-backdrop: none;
}

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

html {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: Charter, Cambria, Georgia, serif;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: Charter, Cambria, Georgia, serif;
  overflow-wrap: anywhere;
  hyphens: auto;
}

a {
  color: var(--text-primary);
  text-decoration-color: var(--accent-primary);
  text-underline-offset: 0.2em;
}

a:hover { color: #ffffff; text-decoration-thickness: 2px; }

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

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: cover;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: 70ch;
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Header */
.site-header {
  position: static;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-group--secondary {
  padding-left: 1.25rem;
  border-left: 1px solid var(--border-subtle);
}

.nav-link {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.25rem 0;
}

.nav-link[aria-current="page"],
.nav-link:hover {
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-drawer {
  display: none;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.mobile-nav-list a {
  display: block;
  padding: 0.45rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Headline Band */
.hero-band {
  padding: 2.25rem 0 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-band h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  max-width: 24ch;
  font-weight: 700;
}

.hero-lead {
  margin: 0.75rem 0 0;
  max-width: 66ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Buttons & Badges */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 9999px;
  background: var(--accent-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-kinetic), transform 0.2s var(--ease-kinetic);
}

.btn-pill:hover {
  background: var(--accent-secondary);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-pill--ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-pill--ghost:hover {
  background: var(--bg-surface-hover);
}

.badge-round {
  display: inline-block;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.18rem 0.65rem;
  font-size: 0.78rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
}

.avatar-round {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* Section Clip Transitions & Layout */
.section-block {
  padding: 2.5rem 0;
}

.section-angled {
  background: var(--bg-surface);
  clip-path: polygon(0 18px, 100% 0, 100% calc(100% - 18px), 0 100%);
  padding: 3.25rem 0;
}

.section-curved {
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.75rem 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.65rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.25;
}

/* Flat 1px Panels & Grids */
.grid-fluid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  box-shadow: none;
  padding: 1.25rem;
}

.section-angled .panel {
  background: var(--bg-canvas);
}

.panel h3 {
  margin: 0.45rem 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.panel p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.panel p:last-child {
  margin-bottom: 0;
}

/* Labeled Stat / Input Strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin: 1.25rem 0;
}

.stat-cell {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stat-label {
  display: block;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.stat-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Media Frames */
.media-frame {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 0.65rem;
}

.media-16x9 { aspect-ratio: 16 / 9; width: 100%; }
.media-4x3 { aspect-ratio: 4 / 3; width: 100%; }
.media-1x1 { aspect-ratio: 1 / 1; width: 100%; }

.media-caption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Tabs */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.tab-btn {
  background: var(--bg-canvas);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.95rem;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.tab-panel[hidden] {
  display: none;
}

/* Accordions */
.accordion-list {
  display: grid;
  gap: 0.65rem;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.accordion-panel {
  padding: 0 1.1rem 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.accordion-panel[hidden] {
  display: none;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  margin: 1rem 0;
}

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

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-muted);
}

/* Forms & Brief Builder */
.field-grid {
  display: grid;
  gap: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.brief-output {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: var(--text-primary);
  min-height: 150px;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.footer-col {
  border-left: 1px solid var(--border-subtle);
  padding-left: 1rem;
}

.footer-col:first-child {
  border-left: none;
  padding-left: 0;
}

.footer-col h2 {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.1rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .split-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col { border-left: none; padding-left: 0; border-top: 1px solid var(--border-subtle); padding-top: 1rem; }
  .footer-col:first-child { border-top: none; padding-top: 0; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 1rem; }
  .section-angled { clip-path: none; padding: 2.25rem 0; }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
