:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --surface: rgba(20, 20, 20, 0.85);
  --surface-soft: rgba(28, 28, 28, 0.65);
  --surface-strong: rgba(14, 14, 14, 0.95);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8e8e8;
  --muted: #858585;
  --accent: #d4a052;
  --accent-deep: #b8862e;
  --accent-warm: #d4a052;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  --radius-xl: 3px;
  --radius-lg: 3px;
  --radius-md: 2px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* ---------- shell + background texture ---------- */

.site-shell {
  position: relative;
}

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(255, 255, 255, 0.012) 1px,
      rgba(255, 255, 255, 0.012) 2px
    );
  background-size: 100% 4px;
  opacity: 0.6;
}

/* ---------- layout ---------- */

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section--quiet {
  padding-top: 2rem;
}

.hero-section {
  padding-top: 8rem;
}

.hero-section--compact {
  padding-bottom: 2.5rem;
}

/* ---------- header ---------- */

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-alt);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand--footer {
  margin-bottom: 1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-menu a {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 150ms ease;
}

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

.nav-menu--static {
  gap: 0;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
}

/* ---------- grid systems ---------- */

.hero-grid,
.split-layout,
.form-layout,
.footer-grid,
.steps-grid,
.card-grid,
.form-grid {
  display: grid;
}

.hero-grid {
  grid-template-columns: minmax(0, 720px);
  gap: 3rem;
  align-items: start;
}

.hero-grid--single {
  grid-template-columns: minmax(0, 720px);
}

/* ---------- flex stacks ---------- */

.hero-copy,
.section-heading,
.stack-s,
.stack-m,
.stack-l,
.signal-list,
.form-shell,
.admin-shell {
  display: flex;
  flex-direction: column;
}

.stack-s {
  gap: 0.75rem;
}

.stack-m,
.signal-list {
  gap: 1rem;
}

.stack-l,
.admin-shell {
  gap: 1.5rem;
}

/* ---------- typography ---------- */

.eyebrow,
.card-kicker,
.panel-label,
.footer-title {
  margin: 0;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title,
.section-heading h2,
.card h3,
.surface h3,
.step h3,
.cta-banner h2,
.data-table th,
.admin-panel h2 {
  margin: 0;
}

.hero-title,
.section-heading h2,
.cta-banner h2 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  max-width: none;
  color: var(--text);
}

.hero-text,
.section-heading p,
.card p,
.surface p,
.step p,
.footer-copy,
.muted,
.signal-list p {
  margin: 0;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  line-height: 1.75;
}

.field-error,
.notice {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-text,
.section-heading p {
  font-size: 1rem;
  max-width: 58ch;
}

/* ---------- actions ---------- */

.hero-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.form-actions--between {
  justify-content: space-between;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.btn:hover {
  transform: none;
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn--secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.btn--secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ---------- panels / cards / surfaces ---------- */

.hero-panel,
.surface,
.card,
.step,
.form-shell,
.cta-banner,
.table-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.hero-panel,
.form-shell,
.cta-banner {
  padding: 1.5rem;
}

.surface,
.card,
.step {
  padding: 1.35rem;
}

.card {
  position: relative;
  transition: border-color 200ms ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: height 300ms ease;
}

.card:hover {
  border-color: var(--line-strong);
}

.card:hover::before {
  height: 100%;
}

.surface--soft {
  background: var(--surface-soft);
  border-left: 2px solid var(--line-strong);
}

.signal-title {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 0.88rem;
}

/* ---------- section heading ---------- */

.section-heading {
  gap: 0.85rem;
  max-width: 48rem;
}

.section-heading h2,
.cta-banner h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

/* ---------- card grid ---------- */

.card-grid {
  gap: 1px;
  background: var(--line);
}

.card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid .card {
  border: none;
  border-radius: 0;
  background: var(--bg);
}

.card-grid .card::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transition: width 0ms, background 300ms ease;
}

.card-grid .card:hover::before {
  height: 2px;
  background: var(--accent);
}

.card {
  gap: 0.9rem;
}

.card h3,
.surface h3,
.step h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
}

.text-link {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 150ms ease;
}

.text-link:hover {
  border-bottom-color: var(--accent);
}

/* ---------- split layout ---------- */

.split-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2rem;
}

.split-layout--balanced {
  align-items: start;
}

/* ---------- steps ---------- */

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.steps-grid .step {
  border: none;
  border-radius: 0;
  background: var(--bg);
}

.step-number {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-color: var(--line-strong);
  background: var(--bg-alt);
}

/* ---------- footer ---------- */

.site-footer {
  padding: 2rem 0 3rem;
}

.footer-grid {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.footer-grid a {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-grid a:hover {
  color: var(--text);
}

.footer-title {
  font-size: 0.68rem;
}

.footer-copy {
  font-size: 0.88rem;
}

.footer-bottom {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* ---------- forms ---------- */

.form-layout {
  grid-template-columns: minmax(0, 720px);
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  padding: 0.85rem 0.9rem;
  outline: none;
  transition: border-color 150ms ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field-error {
  color: #d97474;
  font-size: 0.82rem;
  font-family: "IBM Plex Mono", monospace;
}

.notice {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
}

.notice--success {
  border-color: rgba(100, 180, 100, 0.3);
  color: #8dbd8d;
  background: rgba(100, 180, 100, 0.06);
}

.notice--error {
  border-color: rgba(217, 116, 116, 0.25);
  color: #d97474;
  background: rgba(166, 61, 49, 0.08);
}

/* ---------- admin / tables ---------- */

.admin-panel,
.table-shell {
  max-width: none;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.data-table td {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.data-table td strong,
.data-table td a {
  color: var(--text);
}

/* ---------- reveal animation ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .split-layout,
  .footer-grid,
  .steps-grid,
  .card-grid--three,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .steps-grid {
    gap: 1px;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero-section {
    padding-top: 6rem;
  }

  .nav {
    flex-wrap: wrap;
    padding: 0.85rem 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.75rem;
    gap: 0.75rem;
  }

  .nav-menu.is-open,
  .nav-menu--static {
    display: flex;
  }

  .hero-title {
    max-width: none;
  }

  .hero-actions,
  .form-actions,
  .form-actions--between {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .container {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
