:root {
  --bg: #0d1119;
  --bg-panel: #121826;
  --line: rgba(245, 246, 248, 0.10);
  --ink: #f5f6f8;
  --ink-dim: rgba(245, 246, 248, 0.68);
  --ink-faint: rgba(245, 246, 248, 0.42);
  --red: #c8202c;
  --red-dim: rgba(200, 32, 44, 0.14);
  --green: #3c6b35;
  --edge: 48px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(28px + env(safe-area-inset-top));
  padding-right: calc(var(--edge) + env(safe-area-inset-right));
  padding-bottom: 28px;
  padding-left: calc(var(--edge) + env(safe-area-inset-left));
  background: rgba(13, 17, 25, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-name a { text-decoration: none; }

.back-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--ink); }

.back-link svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.spec-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.spec-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.spec-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,13,20,0.15) 0%, rgba(10,13,20,0.55) 55%, rgba(10,13,20,0.94) 100%);
}

.spec-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--edge) 56px var(--edge);
  width: 100%;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(200, 32, 44, 0.4);
  background: var(--red-dim);
  border-radius: 2px;
}

.spec-hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 10px;
}

.spec-hero .series {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 26px;
}

.spec-hero p {
  max-width: 560px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-dim);
  font-weight: 300;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 2px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
}

.btn-primary:hover {
  background: #a91a24;
  border-color: #a91a24;
  transform: translateY(-1px);
}

.btn-primary svg { width: 15px; height: 15px; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(245, 246, 248, 0.28);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(245, 246, 248, 0.06);
}

/* ---------- Section shell ---------- */
section {
  padding: 96px var(--edge);
  border-bottom: 1px solid var(--line);
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  max-width: 760px;
}

/* ---------- Spec table ---------- */
.spec-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: start;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
}

.spec-table tr {
  border-bottom: 1px solid var(--line);
}

.spec-table tr:first-child {
  border-top: 1px solid var(--line);
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 18px 4px;
  font-size: 14.5px;
  font-weight: 400;
}

.spec-table th {
  color: var(--ink-faint);
  font-weight: 400;
  letter-spacing: 0.02em;
  width: 46%;
}

.spec-table td {
  color: var(--ink);
  font-weight: 500;
}

.spec-table tr.highlight th,
.spec-table tr.highlight td {
  color: var(--red);
  font-weight: 600;
}

.remote-panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
  margin-top: 40px;
}

.remote-panel img {
  border-radius: 4px;
  margin-bottom: 4px;
}

.remote-caption {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 18px;
}

/* ---------- Legacy / feature section ---------- */
.legacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 56px;
}

.legacy-photo {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.legacy-copy p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-dim);
  font-weight: 300;
  max-width: 480px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 88px;
}

.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(245, 246, 248, 0.25);
  transform: translateY(-3px);
}

.feature-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.feature-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-body {
  padding: 22px 24px 28px;
}

.feature-index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 10px;
}

.feature-body h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.feature-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
  font-weight: 300;
}

/* ---------- CTA / document callout ---------- */
.doc-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 44px 48px;
}

.doc-callout-text h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.doc-callout-text p {
  font-size: 14.5px;
  color: var(--ink-dim);
  font-weight: 300;
  max-width: 440px;
  line-height: 1.6;
}

.doc-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--red-dim);
  border: 1px solid rgba(200, 32, 44, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.doc-icon svg {
  width: 20px;
  height: 20px;
  color: var(--red);
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-top: 40px;
  padding-right: calc(var(--edge) + env(safe-area-inset-right));
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  padding-left: calc(var(--edge) + env(safe-area-inset-left));
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

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

.nav-link.active {
  color: var(--ink);
  border-color: var(--red);
}

.nav-divider {
  color: var(--ink-faint);
  font-size: 11px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .spec-layout,
  .legacy-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .legacy-grid {
    display: flex;
    flex-direction: column-reverse;
  }
}

@media (max-width: 640px) {
  :root { --edge: 22px; }

  .site-header { padding: 20px var(--edge); }

  section { padding: 64px var(--edge); }

  .spec-hero { min-height: 74vh; }

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

  .doc-callout { flex-direction: column; align-items: flex-start; }

  .site-footer { flex-direction: column; text-align: center; }

  .footer-nav { gap: 8px; }

  .nav-link {
    font-size: 10px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .nav-divider { font-size: 10px; }
}
