/* Entry stylesheet: the only file pages link. Order matters. build.py inlines the
   imports into one file in dist/, so the browser makes a single request. */
/* Self-hosted fonts (SIL Open Font License, see assets/fonts/LICENSE-*.txt): variable
   WOFF2 subsets made by web/tools/subset-fonts.sh. No third-party font requests. */
@font-face {
  font-family: "Exo 2";
  src: url("/assets/fonts/exo2.woff2?v=ee79dac0a4") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url("/assets/fonts/orbitron.woff2?v=ee79dac0a4") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

/* Design tokens: the palette and type of Orbit (UiTheme). Change values here, not in components. */
:root {
  /* Colours */
  --bg: #040a13;
  --bg-2: #0a1422;
  --card: #0e1827;
  --card-top: #101c2d;
  --line: #1f3147;
  --text: #eaeaea;
  --text-soft: #cfd6de;
  --muted: #9aa8b8;
  --faint: #6b7a8c;
  --accent: #4ecdc4;
  --accent-hover: #6fe0d8;
  --blue: #8fd3ff;
  --gold: #ffd166;
  --coral: #ff6b6b;

  /* Type */
  --font-display: "Orbitron", sans-serif;
  --font-body: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-base: 17px;
  --leading: 1.65;

  /* Spacing and shape */
  --space-1: 6px;
  --space-2: 12px;
  --space-3: 18px;
  --space-4: 28px;
  --space-5: 48px;
  --space-6: 84px;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1080px;
  --header-h: 64px;
}

/* Reset, page background, typography and the translation-loading guard. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 700px at 15% -10%, #0f2236 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 10%, #1a1030 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
}
/* A few fixed stars; decoration only. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 64%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 58%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 88%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 36%, #8fd3ff66 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 90%, #fff6 50%, transparent 51%);
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: .01em;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); margin-bottom: 14px; }
h3 { font-size: 1.05rem; margin-bottom: 6px; }
.accent { color: var(--accent); }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 620px; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 8px 14px; background: var(--accent); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; color: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Page frame: container, header, navigation, language selector, footer. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
main { flex: 1; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: #040a13cc;
  border-bottom: 1px solid #ffffff0d;
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: .02em; margin-right: auto; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 22px; font-size: .95rem; }
.nav a { color: var(--muted); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Language selector: a disclosure with one link per language. */
.lang { position: relative; font-size: .9rem; }
.lang summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .06em;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--text); border-color: #8fd3ff55; }
.lang summary svg { width: 16px; height: 16px; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 170px; list-style: none; padding: 6px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px #000a;
}
.lang li a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 8px; color: var(--text-soft); }
.lang li a:hover { background: #ffffff0a; color: var(--text); }
.lang li a[aria-current="true"] { color: var(--accent); }
.lang li a small { color: var(--faint); font-family: var(--font-display); font-size: .7rem; letter-spacing: .06em; align-self: center; }

/* Footer */
.foot { border-top: 1px solid #ffffff0d; padding: 28px 0; color: var(--faint); font-size: .9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: #8a99ab; }

/* Grid of cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

@media (max-width: 760px) {
  .top .wrap { gap: 12px; }
  .nav { gap: 14px; font-size: .88rem; }
}
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .top .wrap { gap: 10px; }
  .brand { font-size: 1.05rem; }
  .nav { gap: 12px; font-size: .85rem; }
  .lang summary { padding: 6px 8px; }
}

/* Reusable pieces: hero, buttons, pills, cards, projects, services, about, screenshots, long text, FAQ, picker. */

/* Hero */
.hero { padding: var(--space-6) 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr .9fr; }
.hero h1 { margin-top: 16px; }
.h1-sub { display: block; margin-top: 10px; font-family: var(--font-body); font-weight: 600; font-size: clamp(1.15rem, 3.2vw, 1.5rem); letter-spacing: 0; color: var(--text-soft); }

/* Breadcrumbs on sub-pages */
.crumbs { margin-bottom: 18px; font-size: .9rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text-soft); }
.crumbs li, .prose .crumbs li + li { margin-top: 0; }
.hero .lead { margin-top: var(--space-3); }
.hero-art { justify-self: center; position: relative; }
.hero-art img { width: min(300px, 70vw); border-radius: 28%; box-shadow: 0 30px 80px #4ecdc433, 0 0 0 1px #ffffff14; }
.hero--center { text-align: center; }
.hero--center .wrap { display: block; }
.hero--center .lead { margin: var(--space-3) auto 0; }
.hero--center .actions { justify-content: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-4); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .03em;
  border: 2px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: var(--bg); }
.btn-solid:hover { background: var(--accent-hover); color: var(--bg); }
.btn-ghost { border-color: #8fd3ff55; color: var(--blue); }
.btn-ghost:hover { border-color: var(--blue); color: var(--text); }

/* Pills */
.pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .82rem; line-height: 1.4; border: 1px solid #ffd16655; color: var(--gold); font-family: var(--font-body); font-weight: 500; letter-spacing: 0; }

/* Sections and cards */
.section { padding: var(--space-5) 0; }
.card {
  background: linear-gradient(180deg, var(--card-top), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card p { color: var(--muted); }
.card .icon { font-size: 1.6rem; margin-bottom: 8px; }

/* Projects (home): one card per entry of data/projects.json. */
.section-intro { color: var(--muted); max-width: 680px; margin: -4px 0 var(--space-4); }
.projects { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.project-card { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: start; }
.project-card img { width: 120px; border-radius: 26%; box-shadow: 0 14px 34px #4ecdc422; }
.project-card h3 { font-size: 1.3rem; margin: 10px 0 6px; }
.project-card h3 a { color: var(--text); }
.project-card h3 a:hover { color: var(--accent); }
.project-card:hover { border-color: #4ecdc455; }
.project-card--next { border-style: dashed; background: transparent; align-items: center; }
.project-card--next:hover { border-color: var(--line); }
.next-mark {
  width: 120px; height: 120px; border-radius: 26%; display: grid; place-items: center;
  border: 1px dashed var(--line); color: var(--faint); font-family: var(--font-display); font-size: 2.4rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .82rem; line-height: 1.4;
  background: #8fd3ff14; border: 1px solid #8fd3ff33; color: var(--blue);
}
.pill--live { border-color: #4ecdc466; color: var(--accent); }
.pill--inDevelopment { border-color: #ffffff22; color: var(--muted); }
.actions--tight { margin-top: var(--space-2); gap: 10px; }
.btn-sm { padding: 8px 16px; font-size: .82rem; }

/* Services: a quiet preview while site.json has "services": "soon". */
.services h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.services h2 .pill { font-size: .78rem; }
.services--soon .service-card { background: transparent; border-style: dashed; }
.services--soon .service-card h3 { color: var(--text-soft); }

/* Who's behind it + contact call to action. */
.about { display: grid; gap: 28px; grid-template-columns: 1.1fr .9fr; align-items: start; }
.about > div > p { color: var(--text-soft); max-width: 560px; }
.about strong { color: var(--text); }
.contact-box {
  background: linear-gradient(180deg, #4ecdc418, #4ecdc408); border: 1px solid #4ecdc455;
  border-radius: var(--radius); padding: 24px;
}
.contact-box p { color: var(--text-soft); }
.contact-box .actions { margin-top: var(--space-3); }
.contact-box .btn-solid { overflow-wrap: anywhere; }
.about--compact { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.about--compact .about { grid-template-columns: 1fr; }
.about--compact h2 { margin-top: 0; }

/* Home hero art: a planet with a ship going round it (decoration only). */
.orbit-art { width: min(320px, 72vw); aspect-ratio: 1; display: grid; place-items: center; }
.orbit-art > * { grid-area: 1 / 1; }
.orbit-planet {
  width: 42%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #bff3ff 0%, #4ecdc4 26%, #1f6f8f 62%, #0b2238 100%);
  box-shadow: 0 0 60px #4ecdc455, inset -14px -18px 30px #0008;
}
.orbit-ring { border-radius: 50%; border: 1px solid #8fd3ff33; }
.orbit-ring--outer { width: 100%; aspect-ratio: 1; border-style: dashed; border-color: #8fd3ff22; }
.orbit-ring--inner { width: 72%; aspect-ratio: 1; position: relative; animation: orbit-spin 9s linear infinite; }
.orbit-ship {
  position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 16px var(--coral), 0 0 4px #fff;
}
.orbit-moon {
  width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--gold);
  transform: translate(-330%, 290%); box-shadow: 0 0 18px #ffd16666;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit-ring--inner { animation: none; } }

/* Screenshots. Without JavaScript: a horizontal strip that scrolls. With it,
   assets/js/carousel.js adds .is-carousel and Swiper turns it into a coverflow. */
.shots-carousel { position: relative; }
.shots-carousel:not(.is-carousel) .shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
}
.shots-carousel:not(.is-carousel) .shot { scroll-snap-align: start; }
.shots-carousel:not(.is-carousel) .carousel-controls { display: none; }

/* Every screenshot sits in a phone: a dark bezel, rounded, with a thin rim. */
.shot-frame {
  position: relative;
  padding: 9px;
  border-radius: 36px;
  background: linear-gradient(160deg, #22354d, #0b1422 60%, #16243a);
  box-shadow: inset 0 0 0 1px #ffffff14, 0 18px 50px #000a;
}
.shot-frame::before { /* the speaker slot */
  content: "";
  position: absolute;
  top: 16px; left: 50%;
  width: 22%; height: 5px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #0006;
  z-index: 1;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 28px;
  background: var(--card);
}
.shot figcaption {
  color: var(--muted); font-size: .92rem; line-height: 1.4;
  margin-top: 14px; text-align: center;
}

/* Carousel mode. */
.is-carousel { padding: 24px 0 8px; overflow: hidden; }
.is-carousel::before { /* a soft glow behind the centred phone */
  content: "";
  position: absolute;
  left: 50%; top: 42%;
  width: min(520px, 90vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, #4ecdc42e, transparent 70%);
  pointer-events: none;
}
.is-carousel .shot { width: min(270px, 64vw); transition: opacity .45s ease, filter .45s ease; }
.is-carousel .shot:not(.swiper-slide-active) { opacity: .45; filter: saturate(.6) brightness(.8); }
.is-carousel .shot figcaption { opacity: 0; transition: opacity .35s ease; }
.is-carousel .shot.swiper-slide-active figcaption { opacity: 1; color: var(--text); }
.is-carousel .swiper-slide-active .shot-frame {
  box-shadow: inset 0 0 0 1px #4ecdc466, 0 0 0 1px #4ecdc433, 0 28px 80px #4ecdc433, 0 18px 50px #000a;
}

.carousel-controls {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 22px;
}
.carousel-prev, .carousel-next {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid #8fd3ff44;
  background: #0e1827cc;
  color: var(--blue);
  font-size: 1.7rem; line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.carousel-prev:hover, .carousel-next:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.carousel-prev:focus-visible, .carousel-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.carousel-dots { display: flex; gap: 8px; position: static !important; width: auto !important; }
.carousel-dots .swiper-pagination-bullet {
  width: 8px; height: 8px; margin: 0 !important;
  background: #8fd3ff55; opacity: 1;
  transition: width .3s ease, background .3s ease;
}
.carousel-dots .swiper-pagination-bullet-active { width: 26px; border-radius: 99px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .is-carousel .shot, .is-carousel .shot figcaption, .carousel-dots .swiper-pagination-bullet { transition: none; }
}

/* Long text: policy and help */
.prose { max-width: 760px; padding: 56px 0 72px; }
.prose h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: .92rem; margin-bottom: 30px; }
.prose .scope { color: var(--muted); font-size: .95rem; margin-top: 14px; }
.prose h2 { font-size: 1.25rem; margin: 34px 0 10px; color: var(--accent); }
.prose p, .prose li { color: var(--text-soft); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin-top: 8px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
.summary {
  background: #4ecdc414; border: 1px solid #4ecdc455; border-radius: var(--radius);
  padding: 18px 22px; margin: 8px 0 10px;
}
.summary p { color: var(--text); }
.mail {
  display: inline-block; margin-top: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 4vw, 1.4rem);
  color: var(--gold); word-break: break-all;
}

/* FAQ */
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 20px; margin-top: 12px;
}
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-display); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted); }

@media (max-width: 760px) {
  .hero { padding: var(--space-5) 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .hero-art { order: -1; }
  .hero .crumbs ol { justify-content: center; }
  .project-card { grid-template-columns: 1fr; text-align: center; }
  .project-card img, .next-mark { margin: 0 auto; }
  .project-card .tags, .project-card .actions { justify-content: center; }
  .about { grid-template-columns: 1fr; }
  .section-intro { margin-top: 0; }
}

/* Language picker at "/" (only visible for a moment, or without JavaScript). */
.picker { max-width: 520px; padding: 72px 20px; text-align: center; }
.picker .brand { display: inline-block; font-size: 1.6rem; margin: 0 0 28px; }
.picker-list { list-style: none; display: grid; gap: 10px; }
.picker-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
}
.picker-list a:hover { border-color: #4ecdc455; color: var(--text); }
.picker-list span { color: var(--muted); font-size: .9rem; text-align: right; }

