/* raio landing page — same visual system as the project's demo video:
   muted cream/blueprint canvas, bold editorial serif, rust-orange accent,
   monospace for anything technical. Plain CSS, no build step. */

:root {
  --cream: #fdfbf7;
  --cream-panel: #f4eee2;
  --ink: #1c1b18;
  --ink-sub: #5b584f;
  --grid: rgba(28, 27, 24, 0.07);
  --grid-strong: rgba(28, 27, 24, 0.14);
  --rust: #d35400;
  --rust-deep: #a8420a;
  --rust-tint: #f7e2ce;
  --charcoal: #232019;
  --success: #1e7a4c;
  --success-tint: #dcefe4;

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --maxw: 1160px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* blueprint grid canvas, same recipe as the video background */
body {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size:
    28px 28px,
    28px 28px,
    168px 168px,
    168px 168px;
  background-position: -1px -1px;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-sub);
}

.eyebrow .rule {
  width: 22px;
  height: 1.5px;
  background: var(--rust);
  display: inline-block;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grid-strong);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand .dot {
  width: 9px;
  height: 9px;
  background: var(--rust);
  border-radius: 2px;
}

.brand .io {
  color: var(--rust);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--ink-sub);
  transition: color 0.15s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  position: relative;
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--rust);
}

.nav-backdrop {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 70;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -7px;
}

.nav-toggle span::after {
  position: absolute;
  top: 7px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--rust-deep);
  border-color: var(--rust-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--cream-panel);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* ---------- language switch ---------- */

.lang-switch {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--grid-strong);
  border-radius: 20px;
  padding: 5px 11px;
  color: var(--ink-sub) !important;
  text-decoration: none;
}

.lang-switch:hover {
  color: var(--ink) !important;
  border-color: var(--ink);
}

.footer-links .lang-switch {
  padding: 4px 10px;
}

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 18px 0 20px;
}

.hero h1 .accent {
  color: var(--rust);
}

.hero p.lead {
  font-size: 19px;
  color: var(--ink-sub);
  max-width: 52ch;
  margin: 0 0 30px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badges img {
  height: 20px;
}

.hero-visual {
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 10px 10px 0 var(--grid-strong);
  background: var(--charcoal);
}

.hero-visual img {
  width: 100%;
  display: block;
}

.hero-visual figcaption {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(253, 251, 247, 0.55);
  padding: 10px 14px;
  border-top: 1px solid rgba(253, 251, 247, 0.1);
}

/* Phone demo video — the mp4 already carries the phone bezel + drop shadow on a
   solid cream background that matches the page, so it floats seamlessly. */
.hero-phone {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-phone video {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

.hero-phone figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-sub);
  text-align: center;
}

.hero-phone figcaption a {
  text-decoration: underline;
  text-decoration-color: var(--grid-strong);
  text-underline-offset: 3px;
}

/* ---------- quickstart ---------- */

.quickstart {
  margin-top: 8px;
}

.codebox {
  position: relative;
  background: var(--charcoal);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 14.5px;
  color: #f0ebe0;
  line-height: 1.7;
  overflow-x: auto;
}

.codebox .muted {
  color: rgba(240, 235, 224, 0.45);
}

.codebox .rust-hl {
  color: #f0a868;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(253, 251, 247, 0.08);
  border: 1px solid rgba(253, 251, 247, 0.16);
  color: rgba(253, 251, 247, 0.75);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(253, 251, 247, 0.14);
}

/* ---------- sections ---------- */

section {
  padding: 72px 0;
}

section.alt {
  background: var(--cream-panel);
  border-top: 1px solid var(--grid-strong);
  border-bottom: 1px solid var(--grid-strong);
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.01em;
  margin: 14px 0 10px;
}

.section-head p {
  color: var(--ink-sub);
  font-size: 17px;
  margin: 0;
}

/* ---------- is/isn't table ---------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--grid-strong);
  border: 1px solid var(--grid-strong);
  border-radius: 8px;
  overflow: hidden;
}

.compare > div {
  background: var(--cream);
  padding: 26px 28px;
}

.compare h3 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.compare .is h3 {
  color: var(--rust-deep);
}

.compare .isnt h3 {
  color: var(--ink-sub);
}

.compare ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare li {
  display: flex;
  gap: 10px;
  font-size: 15.5px;
  align-items: flex-start;
}

.compare .mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.compare .is .mark {
  background: var(--rust-tint);
  color: var(--rust-deep);
}

.compare .isnt .mark {
  background: var(--grid-strong);
  color: var(--ink-sub);
}

/* ---------- crate diagram ---------- */

.crate-diagram {
  position: relative;
}

.crate-core {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 8px;
  display: block;
}

.crate-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.crate-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.crate-grid.cols-1 {
  grid-template-columns: 1fr;
}

.crate-card {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 5px 5px 0 var(--grid-strong);
}

.crate-card .name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--rust);
  margin-bottom: 6px;
}

.crate-card .desc {
  font-size: 14px;
  color: var(--ink-sub);
  line-height: 1.5;
}

.crate-card.examples {
  border-style: dashed;
  opacity: 0.85;
}

/* ---------- the one rule ---------- */

.rule-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.rule-quote {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.rule-quote .rust {
  color: var(--rust);
}

.rule-seams {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.seam {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--cream-panel);
  border-radius: 6px;
}

.seam code {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--rust-deep);
  white-space: nowrap;
}

.seam p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-sub);
}

/* ---------- roadmap ---------- */

.roadmap-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--grid-strong);
}

.roadmap-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 4px;
  border-bottom: 1px solid var(--grid-strong);
}

.roadmap-item .milestone {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--rust);
}

.roadmap-item .title {
  font-weight: 600;
  font-size: 16px;
}

.roadmap-item .sub {
  font-size: 14px;
  color: var(--ink-sub);
  margin-top: 2px;
}

.pill {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.pill.good-first {
  background: var(--rust-tint);
  color: var(--rust-deep);
}

.pill.wanted {
  background: var(--grid-strong);
  color: var(--ink-sub);
}

.pill.shipped {
  background: var(--success-tint);
  color: var(--success);
}

.crate-card.shipped {
  border-color: var(--success);
  box-shadow: 5px 5px 0 var(--success-tint);
}

.crate-card.shipped .name {
  color: var(--success);
}

.crate-subhead {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-sub);
  margin: 26px 0 12px;
}

.roadmap-cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */

footer {
  padding: 48px 0 60px;
  border-top: 1px solid var(--grid-strong);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 14.5px;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-sub);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-note {
  font-size: 13.5px;
  color: var(--ink-sub);
  max-width: 40ch;
}

/* ---------- reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 0.5s ease,
    translate 0.5s ease;
}

.reveal.in {
  opacity: 1;
  translate: 0 0;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .rule-block {
    grid-template-columns: 1fr;
  }

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

  .compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  /* Off-canvas nav slides in from the RIGHT, not down from the top. */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(320px, 82vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 92px 26px 32px;
    gap: 18px;
    background: var(--cream);
    border-left: 1px solid var(--grid-strong);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 60;
    display: flex;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a:not(.btn) {
    padding: 4px 0;
  }

  .nav-links a[aria-current="page"]::after {
    left: 0;
    right: auto;
    width: 22px;
    bottom: -2px;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 27, 24, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 80;
  }

  .nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span {
    background: transparent;
  }

  .nav-toggle.open span::before {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-phone video {
    max-width: 300px;
  }

  .crate-grid,
  .crate-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .roadmap-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .roadmap-item .pill {
    justify-self: start;
  }

  section {
    padding: 52px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
    opacity: 1;
    translate: 0 0;
  }
}
