:root {
  --bg: #0a0a0f;
  --panel-top: rgba(31, 43, 64, 0.97);
  --panel-bottom: rgba(13, 19, 31, 0.985);
  --panel-strong-top: rgba(36, 49, 73, 0.985);
  --panel-strong-bottom: rgba(14, 21, 34, 0.995);
  --border: rgba(148, 163, 184, 0.28);
  --border-strong: rgba(148, 163, 184, 0.42);
  --text: #f8fafc;
  --muted: rgba(226, 232, 240, 0.80);
  --soft: rgba(148, 163, 184, 0.84);
  --blue: #38bdf8;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 28px 90px rgba(2, 6, 23, 0.58);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 26%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.15), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "Outfit", sans-serif;
}

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

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

.page-shell {
  position: relative;
  overflow: clip;
}

.site-main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* --- Atmospheric background --- */

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(150px);
  opacity: 0.22;
  pointer-events: none;
}

.glow-1 {
  width: 38rem;
  height: 38rem;
  top: -9rem;
  left: -8rem;
  background: rgba(56, 189, 248, 0.38);
}

.glow-2 {
  width: 28rem;
  height: 28rem;
  top: 14rem;
  right: -8rem;
  background: rgba(139, 92, 246, 0.28);
}

.glow-3 {
  width: 34rem;
  height: 34rem;
  bottom: -10rem;
  right: 8rem;
  background: rgba(245, 158, 11, 0.22);
}

/* --- Corner frame --- */

.corner-frame {
  position: fixed;
  inset: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  pointer-events: none;
  animation: frame-fade-in 1.8s ease backwards;
  animation-delay: 0.6s;
}

.corner {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.46);
}

.corner-tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.corner-tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.corner-bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

.corner-br {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

@keyframes frame-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Layout --- */

.site-main {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

/* --- Glass panel mixin --- */

.hero-copy,
.featured-copy-card,
.cta-card,
.value-card,
.video-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --- Hero --- */

.hero {
  min-height: min(80vh, 46rem);
  display: flex;
  align-items: center;
  padding: 3.5rem 0 2rem;
}

.hero-copy {
  padding: clamp(1.8rem, 4vw, 3.8rem);
  border-radius: 34px;
  width: 100%;
}

.hero-brand-label {
  margin: 0 0 1.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 163, 184, 0.88);
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.hero-summary,
.section-summary,
.featured-hook,
.value-card p:last-child,
.video-description {
  color: var(--muted);
  line-height: 1.68;
}

.hero-summary {
  max-width: 46rem;
  margin: 1.4rem 0 0;
  font-size: 1.05rem;
}

/* --- Buttons & links --- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button,
.card-link,
.text-link {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
}

.button:hover,
.button:focus-visible,
.card-link:hover,
.card-link:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--blue), #2563eb);
  color: #06131f;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.3);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.42);
}

.button-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(28, 39, 59, 0.95), rgba(11, 17, 28, 0.96));
  border-color: var(--border-strong);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(56, 189, 248, 0.46);
}

.external-icon {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  opacity: 0.7;
}

/* --- Focus ring --- */

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.button:focus-visible {
  outline-offset: 4px;
  border-radius: 999px;
}

.video-card:focus-within {
  border-color: rgba(56, 189, 248, 0.5);
}

/* --- Sections --- */

.section {
  padding: 3.6rem 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 1.6rem;
}

.section-heading.narrow {
  max-width: 38rem;
}

/* --- Kicker & eyebrow labels --- */

.eyebrow,
.section-kicker,
.video-series,
.meta-line {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-kicker,
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: var(--blue);
}

.section-kicker.kicker-warm,
.eyebrow.eyebrow-warm {
  color: var(--amber);
}

.section-heading h2,
.cta-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.section-summary {
  margin: 1rem 0 0;
  font-size: 1.04rem;
}

/* --- Featured section --- */

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 1.3rem;
  align-items: stretch;
}

.featured-copy-card {
  border-radius: 24px;
  padding: 1.5rem;
}

.featured-copy-card h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.featured-hook {
  margin: 1rem 0 0;
  font-size: 1rem;
}

.featured-embed-shell {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, var(--panel-strong-top), var(--panel-strong-bottom));
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 80px rgba(56, 189, 248, 0.08),
    0 0 160px rgba(139, 92, 246, 0.06);
}

.featured-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: #020617;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: rgba(125, 211, 252, 0.98);
  font-weight: 600;
}

/* --- Value grid --- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.value-card {
  border-radius: 22px;
  padding: 1.4rem;
  transition: border-color 200ms ease, transform 200ms ease;
}

.value-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.value-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.value-card p:last-child {
  margin: 0.95rem 0 0;
  font-size: 0.98rem;
}

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

.video-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.video-card {
  border-radius: 22px;
  overflow: clip;
  display: flex;
  flex-direction: column;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
}

.video-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  transform: translateY(-3px);
  box-shadow:
    var(--shadow),
    0 0 40px rgba(56, 189, 248, 0.08);
}

.video-card-media {
  position: relative;
  overflow: hidden;
}

.video-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent 42%),
    linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(139, 92, 246, 0.04));
  pointer-events: none;
}

.video-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 320ms ease;
}

.video-card:hover .video-card-media img {
  transform: scale(1.04);
}

.video-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.2rem 1.15rem 1.15rem;
}

.video-series {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  color: var(--blue);
}

.video-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.video-description {
  margin: 0.85rem 0 0;
  font-size: 0.96rem;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: rgba(248, 250, 252, 0.94);
  font-weight: 600;
}

/* --- CTA --- */

.cta-section {
  padding-bottom: 1.8rem;
}

.cta-card {
  border-radius: 28px;
  padding: clamp(1.8rem, 5vw, 3rem);
}

/* --- Footer --- */

.site-footer {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin: 0 auto;
  padding: 0 0 2.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-brand {
  color: rgba(148, 163, 184, 0.56);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-links a {
  color: rgba(148, 163, 184, 0.88);
  transition: color 160ms ease, transform 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: rgba(248, 250, 252, 0.96);
  transform: translateY(-1px);
}

/* --- Responsive --- */

@media (max-width: 1100px) {
  .featured-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .corner-frame {
    inset: 0.95rem;
    border-radius: 20px;
  }

  .site-main,
  .site-footer {
    width: min(calc(100% - 2.1rem), var(--max-width));
  }

  .site-main {
    padding-top: 1rem;
  }

  .hero {
    padding-top: 1.6rem;
    min-height: auto;
  }

  .hero-copy,
  .cta-card {
    border-radius: 24px;
  }

  .hero-summary,
  .section-summary,
  .featured-hook,
  .video-description,
  .value-card p:last-child {
    font-size: 0.98rem;
  }

  .value-grid,
  .video-card-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.6rem 0;
  }

  .site-footer {
    padding-bottom: 2rem;
    font-size: 0.72rem;
    justify-content: center;
    text-align: center;
  }

  .footer-brand {
    width: 100%;
  }
}

/* --- Animations --- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .featured-copy-card,
  .featured-embed-shell,
  .value-card,
  .video-card,
  .cta-card {
    animation: rise-in 720ms ease backwards;
  }

  .featured-copy-card { animation-delay: 90ms; }
  .featured-embed-shell { animation-delay: 140ms; }
  .value-card:nth-child(2) { animation-delay: 100ms; }
  .value-card:nth-child(3) { animation-delay: 140ms; }
  .value-card:nth-child(4) { animation-delay: 180ms; }
  .video-card:nth-child(2) { animation-delay: 80ms; }
  .video-card:nth-child(3) { animation-delay: 140ms; }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
