:root {
    --bg: #121214;
    --bg-panel: #1a1a1d;
    --bg-panel-raised: #212124;
    --steel: #45454a;
    --text: #f0eee9;
    --text-dim: #a3a1a1;
    --text-faint: #616063;
    --amber: #f2002b;
    --amber-dim: #b8001f;
    --diagnostic-blue: #d5d8db;
    --line: #2b2b2f;
    --radius: 3px;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    background-image:
      radial-gradient(circle at 15% 0%, rgba(242,0,43,0.07), transparent 45%),
      radial-gradient(circle at 90% 20%, rgba(213,216,219,0.03), transparent 40%);
  }

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

  /* ---------- SCROLL REVEAL ---------- */
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2,0.65,0.3,1), transform 0.7s cubic-bezier(0.2,0.65,0.3,1);
  }
  .reveal.is-visible { opacity: 1; transform: none; }

  /* ---------- HERO LOAD-IN ---------- */
  .hero-eyebrow, h1, .hero-sub, .hero-actions {
    opacity: 0;
    animation: rise-in 0.8s cubic-bezier(0.2,0.65,0.3,1) forwards;
  }
  .hero-eyebrow { animation-delay: 0.05s; }
  h1 { animation-delay: 0.16s; }
  .hero-sub { animation-delay: 0.3s; }
  .hero-actions { animation-delay: 0.42s; }
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  a { color: inherit; }

  /* ---------- BACKGROUND EMBLEM ---------- */
  .bg-emblem {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(175vw, 2000px);
    height: min(175vw, 2000px);
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.07;
    filter: grayscale(0.25) contrast(1.05);
    animation: emblem-spin 160s linear infinite;
  }
  .bg-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  @keyframes emblem-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
  }
  @media (max-width: 700px) {
    .bg-emblem { width: 280vw; height: 280vw; opacity: 0.06; }
  }
  header, .hero, .plate-section, .pillars-section, .cta-section, footer {
    position: relative;
    z-index: 1;
  }

  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

  /* ---------- NAV ---------- */
  header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(20,22,26,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.3s ease;
  }
  header.scrolled { box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  nav.wrap {
    display: flex; align-items: center; justify-content: space-between;
    height: 66px;
  }
  .logo {
    display: flex; align-items: center; gap: 10px;
  }
  .logo img {
    height: 52px;
    width: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
  }
  .logo:hover img { transform: scale(1.06) rotate(-2deg); filter: brightness(1.1); }
  .logo-text {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }
  .nav-links { display: flex; align-items: center; gap: 22px; }
  .nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  .nav-link:hover { color: var(--text); }
  .nav-link.active { color: var(--amber); }
  .nav-cta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--amber);
    padding: 9px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
    display: inline-block;
  }
  .nav-cta:hover { background: #ff2d4d; transform: translateY(-1px); }
  .nav-cta:focus-visible { outline: 2px solid var(--diagnostic-blue); outline-offset: 2px; }

  /* ---------- HERO ---------- */
  .hero {
    padding: 100px 0 80px;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
  }
  .hero-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--diagnostic-blue);
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 22px;
  }
  .hero-eyebrow::before {
    content: '';
    width: 26px; height: 1px;
    background: var(--diagnostic-blue);
  }
  h1 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 6.4vw, 74px);
    line-height: 1.03;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    max-width: 760px;
  }
  h1 span { color: var(--amber); }
  .hero-sub {
    margin-top: 24px;
    max-width: 520px;
    color: var(--text-dim);
    font-size: 17px;
    line-height: 1.65;
  }
  .hero-actions {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }
  .btn-primary {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--amber);
    color: var(--bg);
    padding: 14px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
  }
  .btn-primary:hover { background: #ff2d4d; transform: translateY(-1px); }
  .btn-primary:focus-visible { outline: 2px solid var(--diagnostic-blue); outline-offset: 2px; }
  .cta-section .btn-primary {
    animation: pulse-glow 2.8s ease-in-out infinite;
  }
  .cta-section .btn-primary:hover { animation-play-state: paused; }
  @keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242,0,43,0.45); }
    50% { box-shadow: 0 0 0 10px rgba(242,0,43,0); }
  }
  .btn-secondary {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    color: var(--text);
    padding: 14px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--steel);
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .btn-secondary:hover { border-color: var(--diagnostic-blue); color: var(--diagnostic-blue); }
  .btn-secondary:focus-visible { outline: 2px solid var(--diagnostic-blue); outline-offset: 2px; }

  /* decorative needle sweep */
  .gauge {
    position: absolute;
    right: -60px; top: 50%;
    transform: translateY(-50%);
    width: 380px; height: 380px;
    opacity: 0.5;
    pointer-events: none;
  }
  @media (max-width: 820px) { .gauge { display: none; } }
  .gauge svg { width: 100%; height: 100%; }
  .gauge-needle {
    transform-origin: 190px 190px;
    animation: sweep 5.5s cubic-bezier(0.65,0,0.35,1) infinite;
  }
  @keyframes sweep {
    0% { transform: rotate(-58deg); }
    50% { transform: rotate(48deg); }
    100% { transform: rotate(-58deg); }
  }

  /* ---------- SPEC PLATE ---------- */
  .plate-section { padding: 70px 0; border-bottom: 1px solid var(--line); }
  .section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 18px;
  }
  .plate {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 34px 38px;
    position: relative;
  }
  .plate::before, .plate::after,
  .plate .rivet-tr, .plate .rivet-bl {
    content: '';
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #55606b, #262b30);
  }
  .plate::before { top: 14px; left: 14px; }
  .plate::after { bottom: 14px; right: 14px; }
  .rivet-tr { top: 14px; right: 14px; }
  .rivet-bl { bottom: 14px; left: 14px; }

  .plate-heading {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 22px;
  }
  .plate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  @media (max-width: 640px) { .plate-grid { grid-template-columns: 1fr; } }
  .plate-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }
  .plate-grid > .plate-row:nth-child(odd) { padding-right: 28px; }
  .plate-grid > .plate-row:nth-child(even) { padding-left: 28px; }
  @media (max-width: 640px) {
    .plate-grid > .plate-row:nth-child(odd),
    .plate-grid > .plate-row:nth-child(even) { padding: 13px 0; }
  }
  .plate-key {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .plate-val {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13.5px;
    color: var(--text);
    text-align: right;
  }
  .plate-val.accent { color: var(--amber); }

  /* ---------- PILLARS ---------- */
  .pillars-section { padding: 70px 0; border-bottom: 1px solid var(--line); }
  h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(26px, 3.4vw, 34px);
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .section-sub { color: var(--text-dim); max-width: 480px; margin-bottom: 40px; font-size: 15px; }
  .pillar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }
  @media (max-width: 820px) { .pillar-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 480px) { .pillar-grid { grid-template-columns: 1fr; } }
  .pillar {
    background: var(--bg-panel);
    padding: 28px 22px;
    transition: background 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
  }
  .pillar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  .pillar:hover { background: var(--bg-panel-raised); transform: translateY(-4px); }
  .pillar:hover::before { transform: scaleX(1); }
  .pillar-index {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--diagnostic-blue);
    margin-bottom: 14px;
  }
  .pillar-title {
    font-family: 'Oswald', sans-serif;
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
  }
  .pillar-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }

  /* ---------- CTA / FOOTER ---------- */
  .cta-section { padding: 80px 0; text-align: center; }
  .cta-section h2 { margin-bottom: 14px; }
  .cta-section .section-sub { margin: 0 auto 34px; }
  .cta-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

  footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
  }
  footer .wrap {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  }
  .footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    color: var(--text-faint);
    letter-spacing: 0.04em;
  }
  .footer-links { display: flex; gap: 20px; }
  .footer-links a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    color: var(--text-faint);
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.15s ease;
  }
  .footer-links a:hover { color: var(--amber); }

  /* ---------- PAGE HEADER (non-home pages) ---------- */
  .page-header {
    padding: 64px 0 40px;
    border-bottom: 1px solid var(--line);
  }
  .page-header h1 {
    font-size: clamp(32px, 5vw, 52px);
    max-width: 700px;
  }
  .page-header .hero-sub { margin-top: 16px; }

  /* ---------- VIDEO GRID PAGE ---------- */
  .videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 56px 0 80px;
  }
  @media (max-width: 900px) { .videos-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 600px) { .videos-grid { grid-template-columns: 1fr; } }

  .vcard {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  }
  .vcard:hover {
    transform: translateY(-5px);
    border-color: var(--amber-dim);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  }
  .vcard-media {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
  }
  .vcard-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, filter 0.3s ease;
  }
  .vcard-media:hover img { transform: scale(1.06); filter: brightness(0.75); }
  .vcard-media iframe { width: 100%; height: 100%; display: block; border: 0; }
  .vcard-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(242,0,43,0.92);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease;
    pointer-events: none;
  }
  .vcard-media:hover .vcard-play { transform: translate(-50%, -50%) scale(1.1); background: #ff2d4d; }
  .vcard-play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
  .vcard-tag {
    position: absolute;
    top: 10px; left: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(18,18,20,0.85);
    color: var(--amber);
    padding: 4px 8px;
    border-radius: 3px;
    pointer-events: none;
  }
  .vcard-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
  .vcard-title {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  .vcard-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    color: var(--text-faint);
    margin-bottom: 12px;
  }
  .vcard-link {
    margin-top: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--diagnostic-blue);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  .vcard-link:hover { color: var(--amber); }

  /* ---------- VIDEO CARDS ---------- */
  .video-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  }
  .video-card:hover {
    transform: translateY(-6px);
    border-color: var(--amber-dim);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  }
  .video-card .thumb-wrap {
    display: block;
    overflow: hidden;
    border-radius: 6px;
  }
  .video-card img {
    width: 100%;
    display: block;
    border-radius: 6px;
    transition: transform 0.45s ease;
  }
  .video-card:hover img { transform: scale(1.08); }
