/**
 * SpaceX IR Platform — mid-2026 aesthetic (ir.spacex.com)
 * Pure black cinematic investor relations design system
 */
@import url('/css/ir-fonts.css');

:root {
  --ir-bg: #000000;
  --ir-text: #f0f0fa;
  --ir-text-secondary: #d8d8e0;
  --ir-text-muted: rgba(240, 240, 250, 0.55);
  --ir-border: rgba(240, 240, 250, 0.12);
  --ir-border-hover: rgba(240, 240, 250, 0.35);
  --ir-surface: #0a0a0a;
  --ir-surface-elevated: #141414;
  --ir-charcoal: #18181b;
  --ir-zinc: #27272a;

  --ir-font: 'D-DIN', 'Arial Narrow', Arial, Verdana, sans-serif;
  --ir-font-display: 'D-DIN', 'Arial Narrow', Arial, Verdana, sans-serif;
  --ir-nav-h: 54px;
  --ir-ticker-h: 40px;
  --ir-header-h: calc(var(--ir-nav-h) + var(--ir-ticker-h));
  --ir-max: 72rem;
  --ir-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ir-duration: 400ms;
}

/* ── Base ── */
.ir-platform,
.ir-platform body {
  margin: 0;
  background: var(--ir-bg) !important;
  color: var(--ir-text-secondary);
  font-family: var(--ir-font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.ir-platform img,
.ir-platform video {
  max-width: 100%;
  display: block;
}

.ir-platform a {
  color: inherit;
  text-decoration: none;
}

/* ── Typography ── */
.ir-display {
  font-family: var(--ir-font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: var(--ir-text);
  text-transform: uppercase;
}

.ir-display-sm {
  font-family: var(--ir-font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: var(--ir-text);
  text-transform: uppercase;
}

.ir-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  margin: 0 0 1rem;
}

.ir-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--ir-text-secondary);
  max-width: 42rem;
}

.ir-body-muted {
  color: var(--ir-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ── Layout ── */
.ir-container {
  width: 100%;
  max-width: var(--ir-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ir-section {
  padding: clamp(4rem, 10vw, 7rem) 0;
  position: relative;
}

.ir-section + .ir-section {
  border-top: 1px solid var(--ir-border);
}

/* ── Header / Nav ── */
.ir-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ir-border);
}

.ir-site-header.has-ticker {
  top: var(--ir-ticker-h);
}

.ir-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--ir-nav-h);
  max-width: var(--ir-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 2rem;
}

.ir-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.ir-brand img {
  height: 14px;
  width: auto;
  filter: brightness(0) invert(1);
}

.ir-brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  border-left: 1px solid var(--ir-border);
  padding-left: 0.75rem;
  white-space: nowrap;
}

.ir-nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

@media (min-width: 900px) {
  .ir-nav-desktop {
    display: flex;
  }
}

.ir-nav-desktop a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  transition: color var(--ir-duration) var(--ir-ease), background var(--ir-duration) var(--ir-ease);
}

.ir-nav-desktop a:hover,
.ir-nav-desktop a.active {
  color: var(--ir-text);
}

.ir-nav-desktop a.active {
  background: rgba(255, 255, 255, 0.06);
}

.ir-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ir-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ir-text);
  cursor: pointer;
  transition: border-color var(--ir-duration) var(--ir-ease), background var(--ir-duration) var(--ir-ease);
}

@media (min-width: 900px) {
  .ir-menu-btn {
    display: none;
  }
}

.ir-menu-btn:hover,
.ir-menu-btn[aria-expanded="true"] {
  border-color: var(--ir-border-hover);
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile drawer */
.ir-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ir-ease), visibility 0.35s;
}

.ir-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.ir-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #000;
  border-left: 1px solid var(--ir-border);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.4s var(--ir-ease);
  padding: calc(var(--ir-header-h) + 1rem) 1.5rem 2rem;
  overflow-y: auto;
}

.ir-drawer.open {
  transform: translateX(0);
}

.ir-drawer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ir-drawer-links li {
  border-bottom: 1px solid var(--ir-border);
}

.ir-drawer-links a {
  display: block;
  padding: 1rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  transition: color 0.25s;
}

.ir-drawer-links a:hover,
.ir-drawer-links a.active {
  color: var(--ir-text);
}

/* ── Ticker bar ── */
.ir-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  height: var(--ir-ticker-h);
  background: #000;
  border-bottom: 1px solid var(--ir-border);
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.ir-ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--ir-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 1rem;
}

.ir-ticker-symbol {
  font-weight: 700;
  color: var(--ir-text);
}

.ir-ticker-price {
  color: var(--ir-text);
  font-weight: 600;
}

.ir-ticker-change.up { color: #6ee7a0; }
.ir-ticker-change.down { color: #f87171; }

.ir-ticker-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #6ee7a0;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.ir-ticker-live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7a0;
  animation: ir-pulse 1.5s ease infinite;
}

@keyframes ir-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Hero ── */
.ir-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--ir-header-h) + 3rem) 0 5rem;
  overflow: hidden;
}

.ir-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ir-hero-bg img,
.ir-hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: ir-hero-zoom 24s ease-out forwards;
}

@keyframes ir-hero-zoom {
  to { transform: scale(1); }
}

.ir-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    rgba(0, 0, 0, 0.92) 100%
  );
  z-index: 1;
}

.ir-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ── Buttons (ir.spacex.com ghost pill) ── */
.ir-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--ir-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ir-text);
  background: rgba(240, 240, 250, 0.1);
  border: 1px solid rgba(240, 240, 250, 0.35);
  border-radius: 32px;
  cursor: pointer;
  transition: border-color var(--ir-duration) var(--ir-ease),
    background var(--ir-duration) var(--ir-ease),
    color var(--ir-duration) var(--ir-ease);
}

.ir-btn:hover {
  border-color: rgba(240, 240, 250, 0.55);
  background: rgba(240, 240, 250, 0.14);
  color: #ffffff;
}

.ir-btn-ghost {
  background: transparent;
  border-color: rgba(240, 240, 250, 0.35);
}

.ir-btn-ghost:hover {
  background: rgba(240, 240, 250, 0.08);
}

.ir-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ── Cards & lists ── */
.ir-card-grid {
  display: grid;
  gap: 1px;
  background: var(--ir-border);
  border: 1px solid var(--ir-border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .ir-card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .ir-card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.ir-card {
  background: var(--ir-bg);
  padding: 1.75rem 1.5rem;
  transition: background var(--ir-duration) var(--ir-ease);
}

.ir-card:hover {
  background: var(--ir-surface);
}

.ir-card-date {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  margin-bottom: 0.65rem;
}

.ir-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ir-text);
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

.ir-card-desc {
  font-size: 0.88rem;
  color: var(--ir-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* Event / document rows */
.ir-list {
  border-top: 1px solid var(--ir-border);
  margin-top: 2rem;
}

.ir-list-item {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--ir-border);
  transition: background 0.3s var(--ir-ease);
}

.ir-list-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 640px) {
  .ir-list-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.ir-list-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ir-text-muted);
  text-transform: uppercase;
}

.ir-list-title {
  font-weight: 600;
  color: var(--ir-text);
}

.ir-list-meta {
  font-size: 0.8rem;
  color: var(--ir-text-muted);
}

.ir-list-action {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  white-space: nowrap;
}

.ir-list-item:hover .ir-list-action {
  color: var(--ir-text);
}

/* Leadership */
.ir-leadership-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .ir-leadership-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .ir-leadership-grid { grid-template-columns: repeat(3, 1fr); }
}

.ir-leader {
  border: 1px solid var(--ir-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ir-surface);
  transition: border-color var(--ir-duration) var(--ir-ease);
}

.ir-leader:hover {
  border-color: var(--ir-border-hover);
}

.ir-leader-photo {
  aspect-ratio: 4/3;
  background: #111;
  overflow: hidden;
}

.ir-leader-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(10%);
  transition: filter 0.5s var(--ir-ease), transform 0.6s var(--ir-ease);
}

.ir-leader:hover .ir-leader-photo img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.ir-leader-info {
  padding: 1.25rem 1.35rem 1.5rem;
}

.ir-leader-name {
  font-weight: 700;
  color: var(--ir-text);
  margin: 0 0 0.25rem;
}

.ir-leader-role {
  font-size: 0.82rem;
  color: var(--ir-text-muted);
  margin: 0;
}

/* Financial stats */
.ir-stats {
  display: grid;
  gap: 1px;
  background: var(--ir-border);
  border: 1px solid var(--ir-border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .ir-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .ir-stats { grid-template-columns: repeat(4, 1fr); }
}

.ir-stat {
  background: var(--ir-bg);
  padding: 1.75rem 1.5rem;
}

.ir-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  margin-bottom: 0.5rem;
}

.ir-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ir-text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Newsletter / forms */
.ir-newsletter {
  background: var(--ir-surface);
  border-top: 1px solid var(--ir-border);
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.ir-form {
  max-width: 32rem;
  margin-top: 2rem;
}

.ir-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.ir-form label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
}

.ir-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--ir-font);
  font-size: 0.95rem;
  color: var(--ir-text);
  background: #000;
  border: 1px solid var(--ir-border);
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ir-input:focus {
  outline: none;
  border-color: var(--ir-border-hover);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.ir-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.82rem;
  color: var(--ir-text-muted);
  line-height: 1.5;
}

.ir-checkbox-row input {
  margin-top: 0.2rem;
  accent-color: #fff;
}

/* Footer */
.ir-footer {
  border-top: 1px solid var(--ir-border);
  padding: 2.5rem 0 3rem;
}

.ir-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.ir-footer-copy {
  font-size: 0.78rem;
  color: var(--ir-text-muted);
}

.ir-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.ir-footer-links a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  transition: color 0.25s;
}

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

/* Legal pages (privacy, terms, disclosures) */
.ir-legal-main {
  padding-top: var(--ir-nav-h);
  min-height: 100vh;
}

.ir-legal {
  max-width: 44rem;
}

.ir-legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  margin-bottom: 2rem;
  transition: color 0.25s;
}

.ir-legal-back:hover {
  color: var(--ir-text);
}

.ir-legal-updated {
  font-size: 0.82rem;
  color: var(--ir-text-muted);
  margin: -0.5rem 0 2rem;
}

.ir-legal h2 {
  font-family: var(--ir-font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ir-text);
  margin: 2.25rem 0 0.85rem;
}

.ir-legal p,
.ir-legal li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ir-text-secondary);
}

.ir-legal ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.ir-legal li + li {
  margin-top: 0.45rem;
}

.ir-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ir-border);
}

.ir-legal-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ir-text-muted);
  transition: color 0.25s;
}

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

/* Post-login platform hero — hide login video until platform hero is swapped */
html.ir-platform-video-pending #root .aspect-video,
html.ir-platform-video-pending #root .aspect-video video {
  visibility: hidden !important;
}

html.ir-platform-video-ready #root .aspect-video,
html.ir-platform-video-ready #root .aspect-video video {
  visibility: visible !important;
}

#root .ir-platform-hero-hidden {
  display: none !important;
}

/* ── Reveal animations ── */
.ir-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ir-ease), transform 0.65s var(--ir-ease);
}

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

.ir-reveal-delay-1 { transition-delay: 0.1s; }
.ir-reveal-delay-2 { transition-delay: 0.2s; }
.ir-reveal-delay-3 { transition-delay: 0.3s; }

/* Cinematic band (shared) */
.ir-band {
  position: relative;
  background-color: #000;
  background-size: cover;
  background-position: center;
}

.ir-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.95));
  pointer-events: none;
}

.ir-band > .ir-container {
  position: relative;
  z-index: 1;
}

.ir-band-orbit {
  background-image: url('https://images.unsplash.com/photo-1457364887197-9150188c107b?w=2400&q=90');
}

.ir-band-launch {
  background-image: url('https://images.unsplash.com/photo-1541182424269-3764a44c25f2?w=2400&q=90');
}

.ir-band-starship {
  background-image: url('https://images.unsplash.com/photo-1516849841032-87cbac4d88f7?w=2400&q=90');
}

/* Hero sections extend under fixed header; content padding handled per-section */
