/* OS landing — C:\Deb (tokens from v0 globals.css, scoped to .os-landing) */

body:has(.os-landing) .main {
  min-height: 0;
}

/* Header, footer and --home-band-bg come from the shared "banded"
   pattern in layout.css (this page opts in via body_class, like home). */

/* ── Design tokens ─────────────────────────────────────────── */

.os-landing {
  /* Surfaces & text (v0: #EFF6FB / #08226A / #42687C) */
  --os-bg: #ffffff;
  --os-text: var(--color-brand-deep);
  --os-text-muted: #42687c;
  --os-card: #ffffff;
  --os-surface-muted: #e4edf3;
  --os-primary: var(--color-brand-deep);
  --os-primary-fg: #ffffff;
  --os-border: rgba(8, 34, 106, 0.125);

  /* Layout: section containers use the global .container
     (--container-max, --space-page-x) like every other page */
  --os-max-width-narrow: 42rem;
  --os-max-width-diagram: 56rem;
  --os-section-y: clamp(2.5rem, 5vw, 3.5rem);
  --os-section-y-lg: clamp(3rem, 6vw, 5rem);
  --os-section-y-xl: clamp(4rem, 8vw, 6rem);

  /* Typography (system fonts — no Geist) */
  --os-font: var(--font-main);
  --os-font-mono: var(--font-mono);
  --os-tracking-tight: -0.025em;

  /* Radius (v0 --radius: 0rem) */
  --os-radius: 0;
  --os-radius-card: 5px;

  /* SVG / concept diagram */
  --os-svg-color: var(--os-primary);

  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: var(--os-bg);
  color: var(--os-text);
  font-family: var(--os-font);
  overflow-x: clip;
}

/* Dark theme: follows the OS unless overridden via data-theme on <html> */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .os-landing {
    --os-bg: #0f172a;
    --os-text: #e6eaf0;
    --os-text-muted: #9aa7b8;
    --os-card: #0f172a;
    --os-surface-muted: #1e293b;
    --os-primary: #7aa2ff;
    --os-primary-fg: #0f172a;
    --os-border: rgba(148, 163, 184, 0.18);
  }
}

:root[data-theme="dark"] .os-landing {
  --os-bg: #0f172a;
  --os-text: #e6eaf0;
  --os-text-muted: #9aa7b8;
  --os-card: #0f172a;
  --os-surface-muted: #1e293b;
  --os-primary: #7aa2ff;
  --os-primary-fg: #0f172a;
  --os-border: rgba(148, 163, 184, 0.18);
}

/* ── Layout ────────────────────────────────────────────────── */

.os-landing .os-landing__section {
  width: 100%;
}

/* ── Buttons ──────────────────────────────────────────────── */

/* Buttons reuse the global .button component (components.css);
   only the external-link icon spacing is local. */

.os-landing .button {
  gap: 0.5rem;
}

.os-landing .os-external-icon {
  flex-shrink: 0;
}

/* ── Hero (v0: py-12 lg:py-20, grid lg:12 cols) ───────────── */

/* Brand-blue band like the home page-hero: site text tokens track
   --color-brand in both light and dark themes. */

.os-landing .os-hero {
  --os-text: var(--color-text);
  --os-text-muted: var(--color-text-muted);
  --os-primary: var(--color-brand-strong);
  --os-primary-fg: var(--color-bg);
  padding-block: var(--os-section-y-lg);
  background: var(--color-brand);
}

.os-landing .os-hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.os-landing .os-hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.os-landing .os-hero__prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--os-font-mono);
  font-size: var(--text-sm);
  color: var(--os-text-muted);
}

.os-landing .os-hero__prompt-prefix {
  color: var(--os-primary);
}

.os-landing .os-hero__cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1rem;
  background: var(--os-primary);
  animation: os-cursor-pulse 1s step-end infinite;
}

.os-landing .os-hero__title {
  margin: 0;
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: var(--font-weight-bold);
  line-height: 0.9;
  letter-spacing: var(--os-tracking-tight);
  text-wrap: balance;
  color: var(--os-text);
}

.os-landing .os-hero__subtitle {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-snug);
  color: var(--os-text-muted);
}

.os-landing .os-hero__subtitle-accent {
  color: var(--os-primary);
  font-weight: var(--font-weight-bold);
}

.os-landing .os-hero__lead {
  max-width: 28rem;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.625;
  color: var(--os-text-muted);
}

.os-landing .os-hero__lead strong {
  color: var(--os-text);
  font-weight: var(--font-weight-bold);
}

.os-landing .os-hero__actions {
  padding-top: 0.5rem;
}

.os-landing .os-hero__aside {
  display: none;
}

@media (min-width: 1024px) {
  .os-landing .os-hero__grid {
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
  }

  .os-landing .os-hero__aside {
    display: block;
  }
}

/* ── Hero logo: Windows squares + Tux easter egg ──────────── */

/* The overlay geometry matches the empty 2x2 squares baked into
   logo.webp (1796x1350): x 491–874, y 588–972 with 34px gutters. */

.os-landing .os-hero__logo {
  position: relative;
  overflow: hidden;
}

/* The Windows squares sit under the logo image (z-index 0) and show
   through its transparent 2x2 slots. tux.svg is cropped to the head only
   and sits between the squares and the logo image: on hover the head pops
   up like a mole from a hole through the bottom-right slot, covering its
   Windows square, while the logo itself hides the rest. Geometry in % of
   logo.webp. */

.os-landing .os-hero__logo-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
}

.os-landing .os-hero__logo-windows {
  position: absolute;
  z-index: 0;
  left: 27.34%;
  top: 43.56%;
  width: 21.33%;
  height: 28.44%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8.85% 8.88%;
}

.os-landing .os-hero__logo-window {
  background: #2a7fd3;
}

.os-landing .os-hero__logo-tux {
  position: absolute;
  z-index: 1;
  right: 48.5%;
  bottom: 27.4%;
  height: 14.8%;
  width: auto;
  opacity: 0;
  transform: translate(6%, 110%);
  transition:
    opacity 0.25s ease,
    transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}

.os-landing .os-hero__logo:hover .os-hero__logo-tux {
  opacity: 1;
  transform: translate(0, 0) rotate(-3deg);
}

/* ── Product preview (v0: py-10 lg:py-14, rounded-[5px]) ───── */

.os-landing .os-preview {
  padding-block: var(--os-section-y);
  background: var(--color-bg);
}

.os-landing .os-preview__frame {
  overflow: hidden;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-card);
  background: var(--os-card);
}

.os-landing .os-preview__image {
  display: block;
  width: 100%;
  height: auto;
}

.os-landing .os-preview__caption {
  margin: 1rem 0 0;
  color: var(--os-text-muted);
  font-family: var(--os-font-mono);
  font-size: var(--text-xs);
  text-align: center;
}

/* ── Quote (v0: border-l-2 border-primary) ────────────────── */

.os-landing .os-quote {
  padding-block: var(--os-section-y);
  background: var(--color-bg);
}

.os-landing .os-quote__block {
  margin: 0;
  padding-left: clamp(1.5rem, 4vw, 2rem);
  border-left: 2px solid var(--os-primary);
}

.os-landing .os-quote__text {
  margin: 0;
  color: var(--os-text-muted);
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: var(--line-height-body);
  text-wrap: pretty;
}

.os-landing .os-quote__text strong {
  color: var(--os-text);
  font-weight: var(--font-weight-bold);
}

.os-landing .os-quote__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.os-landing .os-quote__rule {
  flex-shrink: 0;
  width: 2rem;
  height: 1px;
  background: var(--os-border);
}

.os-landing .os-quote__cite {
  color: var(--os-text);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--font-weight-medium);
}

/* ── Features / manifesto (v0: py-12 bg-card border-y) ────── */

/* Light band (--home-band-bg from body.banded), forced light regardless
   of the site theme (same approach as .band-section on home). */

.os-landing .os-features {
  --os-text: #08226a;
  --os-text-muted: #42687c;
  --os-primary: #08226a;
  --os-primary-fg: #ffffff;
  --os-border: rgba(8, 34, 106, 0.125);
  padding-block: 3rem;
  background: var(--home-band-bg);
  border-block: 1px solid var(--os-border);
}

.os-landing .os-features__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.os-landing .os-features__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--os-tracking-tight);
  text-wrap: balance;
  color: var(--os-text);
}

.os-landing .os-features__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.os-landing .os-features__text {
  margin: 0;
  color: var(--os-text-muted);
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: var(--line-height-body);
}

.os-landing .os-features__text strong {
  color: var(--os-text);
  font-weight: var(--font-weight-bold);
}

@media (min-width: 1024px) {
  .os-landing .os-features__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ── Concept (v0: py-16 lg:py-24, max-w-4xl diagram) ────────── */

/* Light band continuing the features section (forced light). */

.os-landing .os-concept {
  --os-text: #08226a;
  --os-text-muted: #42687c;
  --os-primary: #08226a;
  --os-primary-fg: #ffffff;
  --os-border: rgba(8, 34, 106, 0.125);
  padding-block: var(--os-section-y-xl);
  background: var(--home-band-bg);
}

.os-landing .os-concept__header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.os-landing .os-concept__title {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--os-tracking-tight);
  color: var(--os-text);
}

.os-landing .os-concept__lead {
  max-width: var(--os-max-width-narrow);
  margin: 0 auto;
  color: var(--os-text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: var(--line-height-body);
}

.os-landing .os-concept__lead strong {
  color: var(--os-text);
  font-weight: var(--font-weight-bold);
}

.os-landing .os-concept__diagram {
  width: 100%;
  max-width: var(--os-max-width-diagram);
  margin-inline: auto;
  overflow: hidden;
}

.os-landing .os-concept__svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  color: var(--os-svg-color);
}

.os-landing .os-concept__svg .os-concept__label text,
.os-landing .os-concept__svg .os-concept__timeline text {
  font-family: var(--os-font-mono);
  font-size: 16px;
  font-weight: var(--font-weight-medium);
}

.os-landing .os-concept__svg .os-concept__destination text {
  fill: var(--os-primary-fg);
  font-family: var(--os-font-mono);
  font-size: 14px;
  font-weight: var(--font-weight-bold);
}

.os-landing .os-concept__svg .os-concept__timeline text {
  font-size: 10px;
}

.os-landing .os-concept__path--dash {
  animation: os-concept-dash 20s linear infinite;
}

.os-landing .os-concept__path--dash-delay {
  animation-delay: -10s;
}

@media (max-width: 767px) {
  .os-landing .os-concept__diagram {
    margin-inline: calc(var(--space-page-x) * -0.15);
  }

  .os-landing .os-concept__svg .os-concept__label text,
  .os-landing .os-concept__svg .os-concept__timeline text {
    font-size: 14px;
  }

  .os-landing .os-concept__svg .os-concept__destination text {
    font-size: 12px;
  }
}

/* ── Credit (light band, same as features/concept) ────────── */

.os-landing .os-credit {
  --os-text: #08226a;
  --os-text-muted: #42687c;
  --os-primary: #08226a;
  --os-primary-fg: #ffffff;
  --os-border: rgba(8, 34, 106, 0.125);
  padding-block: 3rem;
  background: var(--home-band-bg);
}

.os-landing .os-credit__inner {
  max-width: var(--os-max-width-narrow);
  margin-inline: auto;
  text-align: center;
}

.os-landing .os-credit__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--os-tracking-tight);
  text-wrap: balance;
  color: var(--os-text);
}

.os-landing .os-credit__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.os-landing .os-credit__text {
  margin: 0;
  color: var(--os-text-muted);
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: var(--line-height-body);
}

.os-landing .os-credit__text strong {
  color: var(--os-text);
  font-weight: var(--font-weight-bold);
}

/* ── CTA (brand band like the hero) ───────────────────────── */

.os-landing .os-cta {
  --os-text: var(--color-text);
  --os-text-muted: var(--color-text-muted);
  --os-primary: var(--color-brand-strong);
  --os-primary-fg: var(--color-bg);
  padding-block: clamp(3rem, 6vw, 4rem);
  background: var(--color-brand);
  color: var(--os-text);
  overflow: hidden;
}

.os-landing .os-cta__inner {
  max-width: var(--os-max-width-narrow);
  margin-inline: auto;
  text-align: center;
}

.os-landing .os-cta__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--os-tracking-tight);
  color: var(--os-text);
}

.os-landing .os-cta__footnote {
  margin: 1.5rem 0 0;
  color: var(--os-text-muted);
  font-family: var(--os-font-mono);
  font-size: var(--text-xs);
}

/* ── Motion ───────────────────────────────────────────────── */

@keyframes os-cursor-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes os-concept-dash {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -1000;
  }
}

@media (prefers-reduced-motion: reduce) {
  .os-landing .os-hero__cursor,
  .os-landing .os-concept__path--dash {
    animation: none;
  }

  .os-landing .os-hero__logo-tux {
    transition: none;
  }
}
