/* 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: var(--color-white);
  --os-text: var(--color-brand-deep);
  --os-text-muted: #42687c;
  --os-card: var(--color-white);
  --os-surface-muted: #e4edf3;
  --os-primary: var(--color-brand-deep);
  --os-primary-fg: var(--color-white);
  --os-border: rgba(8, 34, 106, 0.125);

  --os-windows-color: #2a7fd3;
  --os-button-hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  --os-roadmap-card-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);

  /* Layout: section containers use the global .container
     (--container-max, --space-page-x) like every other page */
  --os-max-width-narrow: 42rem;
  --os-section-y: var(--band-copy-space-y);
  --os-section-y-lg: var(--band-copy-space-y-lg);

  /* 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;

  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: var(--color-bg);
    --os-text: var(--color-text);
    --os-text-muted: var(--color-text-muted);
    --os-card: var(--color-bg);
    --os-surface-muted: var(--color-surface);
    --os-primary: #7aa2ff;
    --os-primary-fg: var(--color-bg);
    --os-border: rgba(148, 163, 184, 0.18);
  }
}

:root[data-theme="dark"] .os-landing {
  --os-bg: var(--color-bg);
  --os-text: var(--color-text);
  --os-text-muted: var(--color-text-muted);
  --os-card: var(--color-bg);
  --os-surface-muted: var(--color-surface);
  --os-primary: #7aa2ff;
  --os-primary-fg: var(--color-bg);
  --os-border: rgba(148, 163, 184, 0.18);
}

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

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

.os-landing #about,
.os-landing #goal,
.os-landing #status,
.os-landing #roadmap,
.os-landing #try {
  scroll-margin-top: calc(var(--site-header-height) + 1rem);
}

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

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

.os-landing .button {
  gap: 0.5rem;
  max-width: 100%;
  line-height: var(--line-height-snug);
  overflow-wrap: anywhere;
}

.os-landing .button--filled {
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast);
}

.os-landing .button--filled:is(:hover, :focus-visible) {
  transform: translateY(-1px);
  box-shadow: var(--os-button-hover-shadow);
}

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

.os-landing .os-download-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__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);
}

.os-landing .os-hero__subtitle > :first-child {
  margin-top: 0;
}

.os-landing .os-hero__subtitle > :last-child {
  margin-bottom: 0;
}

.os-landing .os-hero__lead {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
  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__accent,
.os-landing .os-hero__lead .os-hero__accent {
  color: var(--os-primary);
  font-weight: var(--font-weight-bold);
}

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

.os-landing .os-hero__actions,
.os-landing .os-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.os-landing .os-cta__actions {
  justify-content: center;
}

@media (max-width: 479px) {
  .os-landing :is(.os-hero__actions, .os-cta__actions) .button {
    width: 100%;
  }
}

.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: 26%;
  top: 40%;
  width: 25%;
  height: 35%;
  background: var(--os-windows-color);
}

.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;
}

/* ── About, Goal, Status and Roadmap ──────────────────────── */

.os-landing .os-roadmap__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--os-tracking-tight);
  color: var(--home-band-title-color);
}

.os-landing .os-status__download {
  margin: 1.25rem 0 0;
  font-size: var(--text-base);
}

/* ── Roadmap ─────────────────────────────────────────────── */

.os-landing .os-roadmap {
  padding-block: var(--os-section-y-lg);
  padding-top: var(--os-section-y);
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.os-landing .os-roadmap__title {
  color: var(--color-text);
}

.os-landing .os-roadmap__list {
  --os-roadmap-card-width: 100%;
  --os-roadmap-gap: clamp(2.5rem, 4vw, 3rem);
  display: grid;
  gap: var(--os-roadmap-gap);
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.os-landing .os-roadmap__step {
  position: relative;
  min-width: 0;
}

.os-landing .os-roadmap__card {
  position: relative;
  z-index: 1;
  width: var(--os-roadmap-card-width);
  margin-left: 0;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  border: 1px solid var(--color-border);
  border-radius: var(--os-radius-card);
  background: var(--color-surface);
  box-shadow: var(--os-roadmap-card-shadow);
}

.os-landing .os-roadmap__step:nth-child(even) .os-roadmap__card {
  margin-left: auto;
  margin-right: 0;
}

.os-landing .os-roadmap__number {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-brand-strong);
  font-family: var(--os-font-mono);
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
}

.os-landing .os-roadmap__card-title {
  margin: 0 0 0.75rem;
  color: var(--color-text);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  text-wrap: balance;
}

.os-landing .os-roadmap__text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.os-landing .os-roadmap__connector {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: var(--os-roadmap-gap);
  overflow: visible;
  pointer-events: none;
}

.os-landing .os-roadmap__step:nth-child(even) .os-roadmap__connector {
  transform: scaleX(-1);
}

.os-landing .os-roadmap__path {
  fill: none;
  stroke: var(--color-brand-strong);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.55;
  animation: os-roadmap-flow 1s linear infinite;
}

.os-landing .os-roadmap__path--desktop {
  display: none;
}

@media (min-width: 768px) {
  .os-landing .os-roadmap__list {
    --os-roadmap-card-width: 48%;
  }

  .os-landing .os-roadmap__path--desktop {
    display: block;
  }

  .os-landing .os-roadmap__path--mobile {
    display: none;
  }
}

/* ── 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);
  text-wrap: balance;
}

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

.os-landing .os-hero__github-icon,
.os-landing .os-cta__github-icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

.os-landing .os-cta__footnote {
  margin: 1.5rem 0 0;
  color: var(--os-text-muted);
  font-family: var(--os-font-mono);
  font-size: clamp(0.875rem, 0.8rem + 0.2vw, 0.9375rem);
}

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

@keyframes os-roadmap-flow {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -14;
  }
}

@media (prefers-reduced-motion: reduce) {
  .os-landing .button--filled,
  .os-landing .button--filled:is(:hover, :focus-visible) {
    transition: none;
    transform: none;
  }

  .os-landing .os-roadmap__path {
    animation: none;
  }

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