/* Albedo Interactive Labs: v1 one-page site. Spec: albedo-handoff/HANDOFF.md */

:root {
  --night: #0F1B2A;
  --night-horizon: #16283A;
  --canopy: #2B4A3E;
  --canopy-dark: #1C3530;
  --moon-white: #EDE8DC;
  --lantern: #E9A23B;
  --lantern-hover: #F2B962;
  --mist: #9AABB8;

  --serif: 'Young Serif', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --logo: 'Pacifico', cursive;

  --radius: 6px;
  --rule: rgba(154, 171, 184, .28);

  /* Side padding: 120px at 1440, content capped at 1200px, margins grow past 1440. */
  --pad: max(64px, calc((100vw - 1200px) / 2));
  --nav-h: 108px;
  --treeline-h: 270px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--moon-white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, figure { margin: 0; }
img, svg { display: block; }

a { color: var(--lantern); text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lantern);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layers (§4) ---------- */

#sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

.treeline {
  position: sticky;
  bottom: 0;
  z-index: 2;
  height: var(--treeline-h);
  overflow: hidden;
  pointer-events: none;
}
.treeline img {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 2560px;
  height: 270px;
  max-width: none;
}

.footer {
  position: relative;
  z-index: 3;
  background: var(--canopy-dark);
}

/* ---------- Shared components ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--mist);
}
.label::before {
  content: "";
  flex: none;
  width: 28px;
  height: 1.5px;
  background: var(--lantern);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--moon-white);
}

.amber { color: var(--lantern); }
.muted { color: var(--mist); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 30px;
  border-radius: var(--radius);
  font-size: 17px;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--lantern);
  color: var(--night);
  font-weight: 600;
}
.btn-primary:hover { background: var(--lantern-hover); }
.btn-secondary {
  border: 1.5px solid rgba(237, 232, 220, .42);
  color: var(--moon-white);
  font-weight: 500;
}
.btn-secondary:hover { border-color: rgba(237, 232, 220, .8); }

.text-link {
  color: var(--lantern);
  font-size: 16px;
  font-weight: 600;
}
.text-link:hover { color: var(--lantern-hover); }

/* ---------- Nav ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
  padding: 0 var(--pad);
}
.wordmark {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -.01em;
  color: var(--moon-white);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 44px;
}
.nav-links a {
  font-size: 16px;
  font-weight: 500;
  color: var(--mist);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--moon-white); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 96px) var(--pad) calc(var(--treeline-h) - 40px);
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero h1 {
  margin-top: 28px;
  max-width: 1120px;
  font-size: 88px;
  line-height: 1.04;
  letter-spacing: -.015em;
}
.hero-line {
  margin-top: 28px;
  max-width: 620px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--mist);
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 44px;
}

/* ---------- Grid helper ---------- */

.why,
.updraft-head,
.updraft-media,
.contact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

/* ---------- Why we exist ---------- */

.why { padding: 140px var(--pad) 170px; }
.why-head {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.why h2 {
  font-size: 54px;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.why-body {
  grid-column: 7 / span 6;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 52px;
  font-size: 19px;
  line-height: 1.68;
}

/* ---------- Updraft ---------- */

.updraft {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 120px var(--pad) 170px;
}
.updraft-head { align-items: end; }
.updraft-title {
  grid-column: 1 / span 6;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.updraft-logo {
  padding-bottom: 4px;
  font-family: var(--logo);
  font-size: 100px;
  line-height: 1.2;
  text-shadow: 5px 5px 0 var(--canopy);
}
.updraft-intro {
  grid-column: 8 / span 5;
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--mist);
}

.updraft-media { align-items: start; }
.trailer {
  grid-column: 1 / span 7;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trailer-link {
  position: relative;
  display: block;
  aspect-ratio: 5 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--canopy);
}
.trailer-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.trailer-link:hover img { transform: scale(1.015); }
.trailer-frame {
  aspect-ratio: 5 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--night);
}
.trailer-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--lantern);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(15, 27, 42, .45);
  transition: background-color .15s ease;
}
.trailer-link:hover .play { background: var(--lantern-hover); }
.play svg { width: 22px; height: 24px; fill: var(--night); }
.trailer figcaption {
  font-size: 14px;
  font-weight: 500;
  color: var(--mist);
}
@media (prefers-reduced-motion: reduce) {
  .trailer-link img { transition: none; }
  .trailer-link:hover img { transform: none; }
}

.versions {
  grid-column: 9 / span 4;
  display: flex;
  flex-direction: column;
}
.version {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--rule);
}
.version:last-child { border-bottom: 1px solid var(--rule); }
.version-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--mist);
}
.version h3 {
  font-size: 30px;
  line-height: 1.15;
}
.version-text {
  font-size: 16px;
  line-height: 1.6;
}
.version-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 4px;
  margin-top: 6px;
}
.version-note {
  font-size: 14px;
  color: var(--mist);
}

/* ---------- Contact ---------- */

.contact {
  padding: 90px var(--pad) 200px;
  align-content: start;
}
.contact-inner {
  grid-column: 2 / span 8;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact h2 {
  font-size: 64px;
  line-height: 1.08;
  letter-spacing: -.01em;
}
.contact-text {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--mist);
}
.email {
  align-self: flex-start;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.3;
  color: var(--lantern);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 10px;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--lantern-hover); }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  row-gap: 0;
  padding: 30px var(--pad) 40px;
}
.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 22px;
}
.footer-wordmark {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--moon-white);
}
.footer-copy {
  font-size: 14px;
  color: var(--mist);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-links a {
  font-size: 14px;
  color: var(--mist);
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--moon-white); }
.credit {
  flex-basis: 100%;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(154, 171, 184, .18);
  font-size: 13px;
  line-height: 1.5;
  color: var(--mist);
}
.credit a {
  color: var(--mist);
  text-decoration: underline;
  text-decoration-color: rgba(154, 171, 184, .45);
  text-underline-offset: 3px;
}
.credit a:hover { color: var(--moon-white); }

/* ---------- 768–1023: tablet (not drawn; per §3, ~15% smaller type, 48px sides) ---------- */

@media (max-width: 1023px) {
  :root { --pad: 48px; --nav-h: 100px; }

  .wordmark { font-size: 27px; }
  .nav-links { gap: 36px; }

  .hero { padding-top: calc(var(--nav-h) + 84px); }
  .hero h1 { font-size: 75px; }
  .hero-line { font-size: 18px; }

  .why { padding-top: 120px; padding-bottom: 150px; row-gap: 22px; }
  .why-head, .why-body { grid-column: 1 / -1; }
  .why-head { gap: 22px; }
  .why-body { padding-top: 0; max-width: 680px; font-size: 18px; }
  .why h2 { font-size: 46px; max-width: 640px; }

  .updraft { gap: 48px; padding-top: 100px; padding-bottom: 150px; }
  .updraft-head { row-gap: 18px; }
  .updraft-title, .updraft-intro { grid-column: 1 / -1; }
  .updraft-intro { max-width: 560px; margin-bottom: 0; font-size: 18px; }
  .updraft-logo { font-size: 85px; text-shadow: 4px 4px 0 var(--canopy); }

  .updraft-media { row-gap: 28px; }
  .trailer, .versions { grid-column: 1 / -1; }
  .versions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
  .version { border-bottom: 1px solid var(--rule); }
  .version h3 { font-size: 26px; }

  .contact { padding-top: 80px; }
  .contact-inner { grid-column: 1 / -1; }
  .contact h2 { font-size: 54px; }
  .contact-text { font-size: 18px; }
  .email { font-size: 34px; }
}

/* ---------- < 768: mobile ---------- */

@media (max-width: 767px) {
  :root { --pad: 24px; --nav-h: 88px; --treeline-h: 180px; }

  .treeline img { width: 900px; height: 180px; }

  .label { gap: 12px; font-size: 12px; }
  .label::before { width: 22px; }

  .btn { height: 54px; }

  .wordmark { font-size: 24px; }
  .nav-links { gap: 0; margin-right: -8px; }
  .nav-links a {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 8px;
    font-size: 15px;
  }

  .hero { padding-top: calc(var(--nav-h) + 72px); }
  .hero h1 { margin-top: 22px; font-size: 44px; line-height: 1.08; }
  .hero-line { margin-top: 22px; font-size: 17px; }
  .buttons {
    flex-direction: column;
    align-self: stretch;
    gap: 12px;
    margin-top: 32px;
  }
  .buttons .btn { width: 100%; }

  .why, .updraft-head, .updraft-media, .contact { display: flex; flex-direction: column; }

  .why { gap: 22px; padding: 96px var(--pad) 96px; }
  .why-head { gap: 22px; }
  .why h2 { font-size: 36px; line-height: 1.14; }
  .why-body { gap: 22px; font-size: 17px; line-height: 1.65; }

  .updraft { gap: 18px; padding: 72px var(--pad) 104px; }
  .updraft-head { gap: 18px; }
  .updraft-logo { font-size: 58px; line-height: 1.25; text-shadow: 3px 3px 0 var(--canopy); }
  .updraft-intro { font-size: 17px; }

  .updraft-media { gap: 0; margin-top: 8px; }
  .trailer { align-self: stretch; gap: 14px; }
  .play { width: 56px; height: 56px; box-shadow: 0 4px 18px rgba(15, 27, 42, .45); }
  .play svg { width: 18px; height: 20px; }
  .trailer figcaption { font-size: 13px; }

  .versions { display: flex; flex-direction: column; margin-top: 22px; }
  .version { gap: 10px; padding: 24px 0 28px; border-bottom: 0; }
  .version:last-child { border-bottom: 1px solid var(--rule); }
  .version-label { font-size: 12px; }
  .version h3 { font-size: 26px; line-height: 1.18; }
  .version-row { align-items: center; row-gap: 0; margin-top: 2px; }
  .version-row .text-link { display: inline-flex; align-items: center; min-height: 44px; }

  .contact { gap: 18px; padding: 64px var(--pad) 230px; }
  .contact-inner { gap: 18px; }
  .contact h2 { font-size: 40px; line-height: 1.1; }
  .contact-text { font-size: 17px; }
  .email {
    margin-top: 8px;
    padding: 10px 0;
    font-size: 19px;
    text-underline-offset: 6px;
  }

  .footer {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 16px var(--pad) 40px;
  }
  .footer-brand { gap: 14px; }
  .footer-wordmark { font-size: 20px; }
  .footer-copy { font-size: 13px; }
  .footer-links { column-gap: 22px; row-gap: 4px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .credit { margin-top: 0; padding-top: 16px; font-size: 12px; line-height: 1.55; }
}

/* Very narrow phones (320–359): keep all three nav links on one line without overflow */
@media (max-width: 359px) {
  .wordmark { font-size: 22px; }
  .nav-links a { padding: 0 6px; font-size: 14px; }
  .hero h1 { font-size: 40px; } /* "doomscrolling" is wider than 272px at 44px */
}
