/* The Nawa website in Nawa Dark. Colours and fonts are the app's own tokens
   (css/tokens.css, generated from public/themes/nawa-dark.json). */

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

:root {
  --page-max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(96px, 13vw, 168px);
  --card-radius: 18px;
  --card-surface: linear-gradient(180deg, rgba(17, 28, 61, 0.52), rgba(10, 17, 38, 0.52));
  --nav-height: 64px;
}

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

code {
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--code-inline-bg);
  color: var(--code-inline-text);
}

strong {
  color: var(--text-strong);
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--control-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--menu-surface);
  border: 1px solid var(--button-border);
  color: var(--text);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Buttons and badges ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--button-border);
  color: var(--button-text);
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

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

.button-solid {
  background: var(--button-solid);
  color: var(--button-solid-text);
}

.button-solid:hover {
  background: var(--button-solid-hover);
}

.button-soft {
  background: var(--button-soft);
}

.button-soft:hover {
  background: var(--button-soft-hover);
}

.button-large {
  height: 46px;
  padding: 0 20px;
  font-size: 16px;
  border-radius: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(127, 217, 255, 0.28);
  background: rgba(127, 217, 255, 0.1);
  color: var(--control-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  color: var(--control-accent);
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
}

.text-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.text-link:hover svg {
  transform: translateX(3px);
}

/* ---------- Navigation ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-height);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.site-nav.is-solid,
.site-nav.is-open {
  background: rgba(3, 8, 22, 0.74);
  border-bottom-color: var(--divider);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--page-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.nav-logo img {
  width: 28px;
  height: 28px;
}

.nav-name {
  opacity: var(--brand-reveal, 1);
  transition: opacity 0.2s ease;
}

html.is-animated .site-nav {
  --brand-reveal: 0;
}

html.is-animated .nav-logo img {
  opacity: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover,
.site-nav.is-open .nav-toggle {
  background: var(--surface-hover);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .nav-inner {
    gap: 12px;
  }

  .nav-cta {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: rgba(3, 8, 22, 0.94);
    border-bottom: 1px solid var(--divider);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }

  .nav-links a {
    padding: 12px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--divider);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .site-nav.is-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

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

.hero {
  position: relative;
}

/* Without the animation: the still mark and the name, centred. */
.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-height) + 32px) var(--gutter) 64px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(50% 42% at 50% 38%, rgba(78, 110, 255, 0.12), transparent 72%),
    var(--bg);
}

.hero-canvas,
.hero-fly,
.hero-beat-intro,
.hero-beat-name {
  display: none;
}

.hero-still {
  width: clamp(128px, 22vw, 208px);
  height: auto;
}

.hero-title {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(54px, 8vw, 92px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 34ch;
  margin: 16px auto 0;
  color: var(--text-soft);
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.5;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.beat-line {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(23px, 3.2vw, 36px);
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.beat-line em {
  font-style: italic;
  font-weight: 500;
}

.beat-sub {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 19px);
}

.arabic {
  font-family: var(--font-arabic);
  font-weight: 600;
  unicode-bidi: isolate;
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-cue-line {
  position: relative;
  width: 1px;
  height: 38px;
  overflow: hidden;
  background: rgba(143, 167, 207, 0.22);
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--control-accent);
  animation: scroll-cue 2.2s ease-in-out infinite;
}

@keyframes scroll-cue {
  to {
    top: 100%;
  }
}

/* With the animation: a pinned stage scrubbed by the scroll position. */
html.is-animated .hero {
  height: 420vh;
  height: 420svh;
}

html.is-animated .hero-stage {
  position: sticky;
  top: 0;
  display: block;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  padding: 0;
  background: var(--bg);
}

html.is-animated .hero-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

html.is-animated .hero-still {
  display: none;
}

html.is-animated .hero-beat {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  width: min(760px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

html.is-animated .hero-beat-intro {
  bottom: max(6svh, 36px);
  opacity: 1;
}

html.is-animated .hero-beat-name {
  top: calc(var(--ring-bottom, 72svh) + 30px);
}

html.is-animated .hero-beat-final {
  top: calc(var(--mark-bottom, 62svh) + 26px);
}

html.is-animated .hero-fly {
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

@media (max-width: 760px) {
  html.is-animated .hero {
    height: 330vh;
    height: 330svh;
  }
}

/* Offered when the system asks for reduced motion and WebGL 2 is available:
   the still hero can play the animation, and the animation can stop again. */
.motion-toggle {
  display: none;
}

html.prefers-still.can-animate .motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--divider-strong);
  border-radius: 999px;
  background: rgba(3, 8, 22, 0.5);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

html.prefers-still.can-animate .motion-toggle:hover {
  border-color: var(--button-border);
  background: var(--surface-hover);
  color: var(--text);
}

.motion-icon {
  display: inline-grid;
  place-items: center;
}

.motion-toggle svg {
  width: 15px;
  height: 15px;
}

html:not(.is-animated) .motion-toggle .motion-stop,
html.is-animated .motion-toggle .motion-play {
  display: none;
}

html.is-animated.prefers-still .motion-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: max(3svh, 20px);
  z-index: 2;
}

/* The pinned stage already ends in open space below the name. */
html.is-animated .hero + .section {
  padding-top: clamp(24px, 4vw, 56px);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: var(--section-space) var(--gutter) 0;
}

.section-inner {
  max-width: var(--page-max);
  margin: 0 auto;
}

.section-head {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--control-accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.section-lede {
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

@media (max-width: 920px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Reveal on scroll; content is visible without JavaScript and with reduced motion. */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-cue-line::after {
    animation: none;
    top: 30%;
  }
}

/* ---------- Features ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--divider);
  border-radius: var(--card-radius);
  background: var(--card-surface);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgba(127, 217, 255, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover {
  border-color: var(--divider-strong);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin: 18px 0 8px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Nawa's own icons, as the app draws them: line icons take the accent
   colour, artwork keeps its gradients. */
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--divider);
  background: var(--surface-subtle);
  color: var(--control-accent);
}

.card-icon svg {
  display: block;
  width: 26px;
  height: 26px;
}

.also-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.also-list li {
  padding: 7px 14px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
}

.also-list code {
  padding: 0.05em 0.35em;
}

/* ---------- Models ---------- */

.model-panel {
  padding: 28px;
  border: 1px solid var(--divider);
  border-radius: 22px;
  background: var(--card-surface);
}

.provider-group + .provider-group {
  margin-top: 22px;
}

.provider-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 7px 13px;
  border: 1px solid var(--button-border);
  border-radius: 10px;
  background: rgba(82, 243, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 520;
}

.roles {
  display: grid;
  gap: 0;
  margin: 26px 0 0;
  border-top: 1px solid var(--divider);
}

.roles div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}

.roles dt {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
}

.roles dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.panel-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 520px) {
  .roles div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (max-width: 980px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.step {
  position: relative;
  padding: 24px 24px 22px;
  border: 1px solid var(--divider);
  border-radius: var(--card-radius);
  background: var(--card-surface);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(127, 217, 255, 0.34);
  color: var(--control-accent);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  margin: 16px 0 6px;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 620;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.owners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--divider);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.owner {
  padding: 26px 28px;
  background: rgba(8, 16, 36, 0.6);
}

.owner + .owner {
  border-left: 1px solid var(--divider);
}

.owner-title {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 620;
}

.owner p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 720px) {
  .owners {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner + .owner {
    border-left: 0;
    border-top: 1px solid var(--divider);
  }
}

/* ---------- Instructions, agents and skills ---------- */

/* Where an AGENTS.md lives decides what it governs, so the scopes nest like
   the folders they sit in, and the innermost that applies wins. */
.scopes {
  margin: 0;
  padding: 26px;
  border: 1px solid var(--divider);
  border-radius: 22px;
  background: var(--card-surface);
}

.scopes figcaption {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 15px;
}

.scopes-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--divider);
  border-radius: 11px;
  background: var(--surface-subtle);
  color: var(--control-accent);
}

.scopes-icon svg {
  width: 22px;
  height: 22px;
}

.scope {
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(127, 217, 255, calc(0.12 + var(--depth) * 0.08));
  border-radius: calc(16px - var(--depth) * 2px);
  background: rgba(127, 217, 255, calc(0.015 + var(--depth) * 0.02));
}

.scope .scope {
  margin-top: 12px;
}

.scope-chat {
  border-color: rgba(127, 217, 255, 0.6);
  background: linear-gradient(180deg, rgba(31, 45, 99, 0.62), rgba(14, 23, 48, 0.62));
}

.scope-head {
  margin: 0;
  font-size: 14px;
}

.scope-head code {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.scope-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.scopes-note {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}

@media (max-width: 760px) {
  .duo {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card .card-note {
  margin-top: 18px;
  font-size: 14px;
}

.duo .card {
  container-type: inline-size;
}

/* Names in one column as wide as the longest; a narrow card stacks them. */
.agents {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 20px;
  margin: 18px 0 0;
  border-top: 1px solid var(--divider);
}

.agents div {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  padding: 11px 0;
  border-bottom: 1px solid var(--divider);
}

.agents dt {
  color: var(--text-strong);
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
}

.agents dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@container (max-width: 460px) {
  .agents {
    grid-template-columns: minmax(0, 1fr);
  }

  .agents div {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }
}

.skills {
  margin-top: 18px;
}

.skills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.skills svg {
  width: 16px;
  height: 16px;
}

/* ---------- Safety ---------- */

.facts {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  position: relative;
  padding-left: 24px;
  color: var(--text-soft);
  font-size: 15px;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--control-accent);
}

.modes {
  display: grid;
  gap: 10px;
}

.mode {
  padding: 16px 20px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--card-surface);
}

.mode.is-default {
  border-color: rgba(127, 217, 255, 0.36);
  background: linear-gradient(180deg, rgba(31, 45, 99, 0.62), rgba(14, 23, 48, 0.62));
}

.mode-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 620;
}

.mode p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.modes-note {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- Windows ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 56px;
  border: 1px solid var(--divider);
  border-radius: var(--card-radius);
  background: var(--divider);
  overflow: hidden;
}

@media (max-width: 900px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .tile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tile {
  padding: 26px 26px 28px;
  background: #060d20;
}

.tile h3 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 620;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Themes ---------- */

.themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 520px) {
  .themes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.themes li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 520;
}

.swatch {
  position: relative;
  flex: 0 0 100%;
  height: 76px;
  margin-bottom: 6px;
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  background: var(--swatch-bg);
  overflow: hidden;
}

.swatch::before,
.swatch::after {
  content: "";
  position: absolute;
  border-radius: 4px;
}

.swatch::before {
  left: 12px;
  top: 14px;
  width: 44%;
  height: 7px;
  background: var(--swatch-accent);
}

.swatch::after {
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--swatch-accent) 45%, transparent);
  background: color-mix(in srgb, var(--swatch-accent) 10%, transparent);
}

.theme-note {
  color: var(--control-accent);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Download ---------- */

.section-download {
  padding-bottom: var(--section-space);
}

.download-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) clamp(24px, 5vw, 56px);
  border: 1px solid var(--divider);
  border-radius: 28px;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(78, 140, 255, 0.16), transparent 70%),
    var(--card-surface);
  text-align: center;
  overflow: hidden;
}

.download-mark {
  width: 88px;
  height: 88px;
  margin-bottom: 26px;
}

.download-panel h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.download-text {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--text-soft);
}

.download-alt {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.download-alt a {
  color: var(--control-accent);
}

/* The waiting list form: left-aligned inside the centred panel. */
.waitlist {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 580px;
  margin: 34px 0 0;
  text-align: left;
}

.waitlist[hidden],
.waitlist-done[hidden] {
  display: none;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  padding: 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
}

.field legend {
  margin-bottom: 10px;
}

.field-optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  background: var(--surface-field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(127, 217, 255, 0.36);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--control-accent);
  outline-offset: 1px;
  border-radius: 12px;
}

.field [aria-invalid="true"] {
  border-color: var(--status-error-text);
}

.field-error {
  margin: 0;
  color: var(--status-error-text);
  font-size: 13px;
}

/* Uses are checkboxes drawn as chips; the real input stays on top for
   keyboards, screen readers and clicks. */
.use-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.use-option {
  position: relative;
  display: inline-flex;
}

.use-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.use-option span {
  padding: 8px 14px;
  border: 1px solid var(--divider-strong);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.use-option input:hover + span {
  border-color: rgba(127, 217, 255, 0.36);
}

.use-option input:checked + span {
  border-color: rgba(127, 217, 255, 0.62);
  background: rgba(127, 217, 255, 0.12);
  color: var(--text-strong);
}

.use-option input:focus-visible + span {
  outline: 2px solid var(--control-accent);
  outline-offset: 2px;
}

fieldset[aria-invalid="true"] .use-option span {
  border-color: rgba(244, 192, 107, 0.5);
}

/* The field only bots fill in. */
.waitlist-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist-send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 4px;
}

.waitlist-send .button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.waitlist-note {
  flex: 1 1 220px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.waitlist-problem {
  margin: 0;
  color: var(--status-error-text);
  font-size: 14px;
}

.waitlist-done {
  margin-top: 30px;
  outline: none;
}

.waitlist-done p {
  margin: 0;
  color: var(--text-soft);
}

.waitlist-done .waitlist-done-title {
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 650;
}

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

.site-footer {
  border-top: 1px solid var(--divider);
  padding: 36px var(--gutter) 44px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  max-width: var(--page-max);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 650;
}

.footer-tagline {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

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