/* Apollyon Corporation landing, round 2 (21/11/2026): one screen, no scroll. Dark, a 4 px corner on buttons and the
   panel. Space on the 4 px scale (4 8 12 16 24 32 48 64). Colours only from :root. Geist is self-hosted (OFL,
   ./fonts/OFL.txt), weights 400 and 600. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/Geist-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/Geist-SemiBold.woff2") format("woff2");
}

:root {
  --bone: #e8e2d6;
  --bone-soft: rgb(232 226 214 / 78%);
  --bone-dim: rgb(232 226 214 / 18%);
  --bone-faint: rgb(232 226 214 / 8%);
  --ember: #f2703a;
  --bg: #0a0b10;
  --surface: #10121a;
  --focus: #8fb8de;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* the mark: its box (the 256-unit svg) and where its centre sits */
  --mk: min(54svh, 80vw);
  --cy: 40svh;
}

* {
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: var(--bg);
}

body {
  color: var(--bone);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: var(--s4);
  top: var(--s4);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s4);
  background: var(--bone);
  color: var(--bg);
  border-radius: 4px;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}

.defs {
  position: absolute;
}

.c-cur {
  fill: var(--bone);
}
.c-ember {
  fill: var(--ember);
}
.mk-l {
  fill: var(--bone);
}
.mk-r {
  fill: var(--ember);
}

/* ---------- the stage: canvas, still mark, veil ---------- */

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
}
.anim .stage {
  opacity: 1;
  transition: opacity 1.2s ease;
}

.still {
  position: fixed;
  left: 50%;
  top: var(--cy);
  width: var(--mk);
  height: var(--mk);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}
.anim .still {
  opacity: var(--mark-o, 0);
}

/* keeps the text readable over the animation (AA: bone on this veil is above 12:1) */
.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--bg) 94%, transparent) 0, color-mix(in srgb, var(--bg) 84%, transparent) 16%, transparent 38%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 72%, transparent) 0, transparent 16%);
}

/* ---------- the screen ---------- */

.screen {
  position: relative;
  z-index: 3;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: var(--s5) var(--s6) max(var(--s6), env(safe-area-inset-bottom));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.lockup {
  height: 28px;
  width: auto;
  aspect-ratio: 503.94 / 96.5;
  display: block;
}

.corner {
  display: flex;
  align-items: center;
  gap: var(--s5);
}
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--bone-soft);
  text-decoration: none;
}
.link:hover {
  color: var(--bone);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.link-ember {
  color: var(--ember);
}
.link-ember:hover {
  color: var(--ember);
}

.copy {
  align-self: end;
  max-width: 48rem;
}
h1 {
  font-size: clamp(1.75rem, 1rem + 2.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.motto {
  margin-top: var(--s3);
  font-size: 1rem;
  color: var(--bone-soft);
  letter-spacing: 0.01em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}
.nojs {
  margin-top: var(--s4);
  font-size: 0.9375rem;
  color: var(--bone-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s4);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bone);
  background: transparent;
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--bone-soft);
}
.btn-bone {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--bg);
}
.btn-bone:hover {
  border-color: var(--bone);
  background: color-mix(in srgb, var(--bone) 88%, var(--bg));
}
.btn-ember {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--bg);
}
.btn-ember:hover {
  border-color: var(--ember);
  background: color-mix(in srgb, var(--ember) 90%, var(--bone));
}
.ico {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.ext {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  opacity: 0.8;
}

/* ---------- the panel: one full-screen dialog that dims the page, the text loose in the middle (the first
   template's reading, 21/11/2026), and a Next button that names where it goes ---------- */

.sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--bone);
  /* a neutral black, not the page's blue-black, and lighter at the edges so the ember haze still shows there */
  background: radial-gradient(ellipse 62% 60% at 50% 48%, rgb(9 9 9 / 93%) 35%, rgb(9 9 9 / 72%));
  border: 0;
  overflow: hidden;
}
.sheet[open] {
  display: flex;
  flex-direction: column;
}
.sheet::backdrop {
  background: transparent;
}
/* the page's own text and buttons step back while the panel is open: only the dimmed animation stays behind */
.screen {
  transition: opacity 0.3s ease-out;
}
body:has(.sheet[open]) .screen {
  opacity: 0;
}
.sheet-top {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(var(--s5), env(safe-area-inset-top)) var(--s8) 0;
}
.tabs {
  display: flex;
  gap: var(--s6);
}
.tab {
  position: relative;
  min-height: 44px;
  padding: 0 var(--s1);
  font: inherit;
  font-size: 1rem;
  color: var(--bone-soft);
  background: none;
  border: 0;
  cursor: pointer;
}
.tab:hover {
  color: var(--bone);
}
.tab[aria-current="true"] {
  color: var(--bone);
  font-weight: 600;
}
.tab[aria-current="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 6px;
  height: 2px;
  background: var(--ember);
}
.close {
  position: absolute;
  top: max(var(--s5), env(safe-area-inset-top));
  right: var(--s6);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--bone-soft);
  background: none;
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
  cursor: pointer;
}
.close:hover {
  color: var(--bone);
  border-color: var(--bone-soft);
}
.close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* only the text scrolls when it does not fit: the tabs, the X and Next stay on screen */
.sheet-body {
  flex: 1;
  min-height: 0;
  display: grid;
  padding: var(--s6) var(--s6) var(--s4);
  overflow-y: auto;
  overscroll-behavior: contain;
  text-shadow: 0 0 14px rgb(10 11 16 / 90%);
}
.pane {
  margin: auto;
  width: min(100%, 44rem);
  display: grid;
  justify-items: center;
  text-align: center;
}
.pane[data-pane="tools"] {
  width: min(100%, 68rem);
}
.pane[hidden] {
  display: none;
}
.pane-title {
  max-width: 20ch;
  font-size: clamp(2rem, 1.25rem + 2.4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pane-title:focus {
  outline: none;
}
.pane-lead {
  max-width: 36rem;
  margin-top: var(--s5);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.55;
  color: color-mix(in srgb, var(--bone) 92%, transparent);
  text-wrap: pretty;
}
.pane a:not(.btn, .link-ember, .card-links a) {
  color: var(--bone);
  text-underline-offset: 3px;
}
.facts {
  max-width: 36rem;
  margin-top: var(--s6);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s3);
  line-height: 1.6;
  color: var(--bone-soft);
  text-wrap: pretty;
}
.funding {
  width: min(100%, 32rem);
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--bone-dim);
  display: grid;
  justify-items: center;
  gap: var(--s2);
  line-height: 1.6;
  color: var(--bone-soft);
}
.pane-sub {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bone);
}
.pane .link-ember {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-weight: 600;
  text-underline-offset: 3px;
}
.funding .link-ember {
  min-height: 44px;
  text-decoration: none;
}
.pane .link-ember:hover {
  text-decoration: underline;
}
.pane-name {
  margin-top: var(--s7);
  font-size: 0.9375rem;
  color: var(--bone-soft);
}
.pane-close {
  margin-top: var(--s2);
  font-size: 1.0625rem;
  color: var(--ember);
}
.pane-close [lang] {
  font-style: italic;
}
.pane-foot {
  margin-top: var(--s6);
  color: var(--bone-soft);
}

/* the catalogue: one card is a centred feature; two or more fill columns of at least 18rem */
.catalog {
  width: 100%;
  margin-top: var(--s7);
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--s4);
  text-align: left;
  text-shadow: none;
}
.catalog:has(> .card:only-child) {
  grid-template-columns: minmax(0, 34rem);
  justify-content: center;
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  background: rgb(17 16 15 / 80%);
  border: 1px solid rgb(232 226 214 / 14%);
  border-radius: 4px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  font-size: 0.8125rem;
  color: var(--bone-soft);
}
/* the state stays inside the 60-30-10: bone text on the black, and ember only as the dot of a live project */
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px var(--s2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bone-soft);
  border: 1px solid var(--bone-dim);
  border-radius: 2px;
}
.state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.card[data-state="beta"] .state::before {
  background: currentColor;
}
.card[data-state="live"] .state {
  color: var(--bone);
}
.card[data-state="live"] .state::before {
  background: var(--ember);
  border-color: var(--ember);
}
.card-name {
  margin-top: var(--s1);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-text {
  line-height: 1.55;
  color: var(--bone-soft);
}
.card-links {
  margin-top: auto;
  padding-top: var(--s2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s5);
}
.card-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bone);
  text-decoration: none;
}
.card-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-row {
  margin-top: var(--s6);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
}
.pane .btn {
  text-shadow: none;
}
.btn-data {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.copy-status {
  min-height: 1.6em;
  margin-top: var(--s2);
  font-size: 0.875rem;
  color: var(--bone-soft);
}
.copy.is-copied {
  border-color: var(--ember);
}
.pane[data-pane="contact"] .facts {
  margin-top: var(--s4);
}

.sheet-foot {
  flex: none;
  display: flex;
  justify-content: center;
  padding: var(--s3) var(--s4) max(var(--s6), calc(env(safe-area-inset-bottom) + var(--s4)));
}
.next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-width: 10rem;
  min-height: 44px;
  padding: 0 var(--s5);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--bone);
  background: rgb(10 11 16 / 60%);
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
  cursor: pointer;
}
.next:hover {
  border-color: var(--bone-soft);
}
.next-hint {
  color: var(--bone-soft);
}
.next-label {
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .sheet[open] {
    animation: fade-in 0.35s ease-out;
  }
  .pane:not([hidden]) {
    animation: pane-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes pane-in {
  from {
    opacity: 0;
    translate: 0 12px;
    filter: blur(4px);
  }
}

/* ---------- phones ---------- */

@media (max-width: 700px) {
  :root {
    --cy: 34svh;
  }
  .screen {
    padding: var(--s4) var(--s4) max(var(--s5), env(safe-area-inset-bottom));
  }
  .corner {
    gap: var(--s4);
  }
  /* Support is one of the three actions below, so the corner keeps two */
  .link-ember {
    display: none;
  }
  .lockup {
    height: 24px;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  .sheet-top {
    justify-content: flex-start;
    padding: max(var(--s3), env(safe-area-inset-top)) var(--s4) 0;
  }
  .tabs {
    gap: var(--s5);
  }
  .close {
    top: max(var(--s3), env(safe-area-inset-top));
    right: var(--s3);
  }
  .sheet-body {
    padding: var(--s5) var(--s4) var(--s3);
  }
  .facts,
  .funding {
    text-align: left;
    justify-items: start;
  }
  .card {
    padding: var(--s4);
  }
  .sheet-foot {
    padding-top: var(--s2);
    background: linear-gradient(transparent, rgb(10 11 16 / 90%) 40%);
  }
}
