/* Mermoz landing: light-blue paper, pencil strokes, Liquid Glass accents. */

:root {
  --ground: #EAF3FB;
  --paper: #F7FBFF;
  --ink: #0D2436;
  --ink-2: #4B6477;
  --ink-3: #7A93A6;
  --accent: #1F6FB5;
  --accent-soft: #DCEBFA;
  --pencil: #5F7F99;
  --line: #DDE9F3;
  --radius: 22px;
  --serif: "Fraunces", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Paper grain over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.45 0 0 0 0 0.55 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
a { color: var(--accent); }
kbd {
  font-family: var(--sans);
  font-size: 0.82em;
  padding: 1px 7px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line);
}

/* Navigation: a floating glass bar. */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(1100px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(31, 111, 181, 0.10);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav nav a:hover { color: var(--ink); }
.nav .nav-cta { color: #fff !important; background: var(--accent); padding: 8px 16px; border-radius: 12px; }

/* Hero: the sky the plane crosses. */
.hero {
  position: relative;
  /* Full first screen, without stretching absurdly on very tall windows. */
  min-height: min(100vh, 1000px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 80px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 20% 10%, #F8FBFF 0%, transparent 60%),
    radial-gradient(900px 500px at 85% 80%, #E3DAFB55 0%, transparent 60%),
    linear-gradient(180deg, #F4F9FE 0%, var(--ground) 70%);
}
.sky { position: absolute; inset: 0; pointer-events: none; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail path { fill: none; stroke: var(--pencil); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; opacity: 0.55; filter: url(#pencil); }
.plane { position: absolute; left: 0; top: 0; width: 120px; height: 80px; will-change: transform; filter: drop-shadow(0 14px 14px rgba(31, 111, 181, 0.18)); z-index: 3; }

/* Crumpled paper balls and pencil-hatched clouds, injected by main.js. */
.ball { position: absolute; will-change: transform; }
.hatch { position: absolute; will-change: transform; opacity: 0.55; }

.hero-copy { position: relative; z-index: 4; text-align: center; max-width: 820px; }
/* A soft paper glow behind the text keeps it crisp over the drifting sky. */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -40px -80px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(244, 249, 254, 0.92), rgba(244, 249, 254, 0.6) 60%, transparent);
  filter: blur(10px);
}
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 116px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); max-width: 620px; margin: 26px auto 34px; }
.ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 16px 40px rgba(31, 111, 181, 0.35); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(31, 111, 181, 0.42); }
.btn.ghost { color: var(--ink); background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.95); backdrop-filter: blur(16px); }
.btn.ghost:hover { transform: translateY(-2px); }
.btn.big { font-size: 20px; padding: 18px 34px; }
.fine { font-size: 14px; color: var(--ink-3); margin-top: 18px; }

/* Handwritten pencil annotations. */
.note { font-family: var(--hand); font-size: 26px; color: var(--pencil); transform: rotate(-4deg); }
.note-hero { position: absolute; right: -120px; top: 40px; }

/* Paper cards. */
.paper-card {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(31, 111, 181, 0.14), 0 2px 6px rgba(13, 36, 54, 0.05);
  border: 1px solid #fff;
}
.taped::before, .taped::after {
  content: "";
  position: absolute;
  top: -14px;
  width: 120px;
  height: 30px;
  background: rgba(220, 235, 250, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(13, 36, 54, 0.06);
}
.taped::before { left: 40px; transform: rotate(-5deg); }
.taped::after { right: 40px; transform: rotate(4deg); }

.film { padding: 40px 24px 120px; display: flex; justify-content: center; }
.film figure { margin: 0; width: min(1100px, 100%); padding: 18px; }
.film video { width: 100%; display: block; border-radius: 14px; background: var(--ground); }
.film figcaption { font-family: var(--hand); font-size: 24px; color: var(--pencil); text-align: center; margin-top: 10px; }

/* Features: paper notes pinned slightly off-grid. */
.features { padding: 40px 24px 120px; max-width: 1140px; margin: 0 auto; text-align: center; }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(36px, 5vw, 58px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 16px; }
.section-lede { color: var(--ink-2); font-size: 20px; max-width: 640px; margin: 0 auto 54px; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; text-align: left; }
.note-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 28px 28px 24px;
  border: 1px solid #fff;
  box-shadow: 0 16px 40px rgba(31, 111, 181, 0.10);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.note-card:nth-child(3n + 1) { transform: rotate(-0.8deg); }
.note-card:nth-child(3n + 2) { transform: rotate(0.6deg) translateY(14px); }
.note-card:nth-child(3n) { transform: rotate(-0.3deg); }
.note-card:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 24px 60px rgba(31, 111, 181, 0.16); }
.doodle { width: 54px; height: 54px; margin-bottom: 10px; }
.note-card h3 { font-family: var(--serif); font-size: 23px; margin: 0 0 8px; letter-spacing: -0.01em; }
.note-card p { margin: 0; color: var(--ink-2); font-size: 16.5px; }

/* Agent first: the command line as a first-class citizen. */
.agents { padding: 40px 24px 130px; }
.agents-inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.agents p { color: var(--ink-2); font-size: 19px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; color: var(--ink-2); font-size: 17px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.terminal { position: relative; background: #0F2234; border-radius: 18px; box-shadow: 0 30px 80px rgba(13, 36, 54, 0.28); overflow: hidden; transform: rotate(0.6deg); }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #15304A; }
.terminal-bar span { width: 12px; height: 12px; border-radius: 6px; background: #FF5F57; }
.terminal-bar span:nth-child(2) { background: #FEBC2E; }
.terminal-bar span:nth-child(3) { background: #28C840; }
.terminal-bar em { margin-left: 10px; font-style: normal; color: #7E9BB6; font-size: 13px; }
.terminal pre { margin: 0; padding: 22px 24px 90px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; line-height: 1.7; color: #E3EEF8; white-space: pre-wrap; }
.terminal .c { color: #6FB1F0; }
.terminal .o { color: #9FB6CB; }
.terminal .w { color: #F5C66B; }
.approve-card { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); font-size: 15px; color: var(--ink); }
.approve-card b { background: var(--accent); color: #fff; padding: 7px 14px; border-radius: 10px; font-weight: 600; }

/* The story: Jean Mermoz and the Aéropostale. */
.story { padding: 60px 24px 140px; }
.story-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  align-items: center;
}
.postmark { width: 240px; height: 240px; transform: rotate(-10deg); opacity: 0.9; }
.story p { color: var(--ink-2); font-size: 19px; }
.story .note { margin-top: 10px; }

.download { padding: 0 24px 140px; display: flex; justify-content: center; }
.download-card { text-align: center; padding: 56px 40px 40px; width: min(720px, 100%); }
.download-card img { border-radius: 26px; }
.download-card p { color: var(--ink-2); max-width: 480px; margin: 10px auto 30px; }

.footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1100px; margin: 0 auto; padding: 30px 24px 50px; color: var(--ink-3); font-size: 14px; border-top: 1px dashed #C9DAE9; }

/* Scroll reveal. */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.shown { opacity: 1; transform: none; }
.note-card.reveal.shown:nth-child(3n + 1) { transform: rotate(-0.8deg); }
.note-card.reveal.shown:nth-child(3n + 2) { transform: rotate(0.6deg) translateY(14px); }
.note-card.reveal.shown:nth-child(3n) { transform: rotate(-0.3deg); }

@media (max-width: 900px) {
  .notes { grid-template-columns: 1fr 1fr; }
  .agents-inner { grid-template-columns: 1fr; }
  .story-inner { grid-template-columns: 1fr; text-align: center; }
  .postmark { margin: 0 auto; width: 180px; height: 180px; }
  .note-hero { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .notes { grid-template-columns: 1fr; }
  .note-card:nth-child(n) { transform: none; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
