@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #1f1726;
  --ink-deep: #120e18;
  --surf: #1d1626;
  --line: rgba(203, 170, 240, .17);
  --line-2: rgba(255, 255, 255, .085);
  --txt: #f0e8f8;
  --txt-2: #c3b6d2;
  --txt-3: #a498b4;
  --purple: #56228b;
  --purple-lt: #c9a0ff;
  --brown: #8b4513;
  --brown-lt: #dda46a;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 94px;
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(880px 520px at 94% -8%, rgba(86, 34, 139, .45), transparent 62%),
    radial-gradient(720px 470px at -14% 24%, rgba(139, 69, 19, .26), transparent 60%),
    radial-gradient(620px 420px at 58% 104%, rgba(86, 34, 139, .22), transparent 66%);
  background-attachment: fixed;
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  font-weight: 400;
}

body.menu-lock { overflow: hidden; }

a { color: var(--purple-lt); }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--brown-lt);
  outline-offset: 2px;
  border-radius: 6px;
}

.page { display: block; }

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

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.2rem 1.1rem 1.5rem;
  display: grid;
  gap: 1.1rem;
  text-align: right;
  align-content: center;
  min-height: 44vh;
}

.hero-copy { min-width: 0; }

.tick {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brown-lt);
  box-shadow: 0 0 0 5px rgba(221, 164, 106, .16);
  margin-bottom: .8rem;
}

.hero h1 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.85rem, 6.6vw, 3.3rem);
  line-height: 1.14;
  letter-spacing: -.022em;
  margin: 0 0 .8rem;
  color: #fbf7ff;
  text-wrap: balance;
}

.lede {
  margin: 0 0 0 auto;
  max-width: 44ch;
  color: var(--txt-2);
  font-size: 1rem;
}

.hero-fig {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 24px 24px 24px 6px;
  background:
    linear-gradient(148deg, rgba(86, 34, 139, .55), rgba(139, 69, 19, .38) 62%, rgba(18, 14, 24, .25));
  overflow: hidden;
  isolation: isolate;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  right: .7rem;
  bottom: .7rem;
  z-index: 2;
  padding: .18rem .62rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: #f7efff;
  background: rgba(18, 14, 24, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ---------- stage ---------- */

.stage {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.1rem 2.4rem;
  display: grid;
  gap: 1.5rem;
}

.side {
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: rgba(29, 22, 38, .62);
  padding: .85rem .85rem 1rem;
  align-self: start;
  overflow: hidden;
}

.side h2 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .2em;
  margin: 0 0 .45rem;
  color: var(--brown-lt);
}

.side hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 .75rem;
}

.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 .15rem;
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
  padding: .25rem .78rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: #d9cfe7;
  text-decoration: none;
  font-size: .9rem;
  transition: border-color .2s ease, color .2s ease;
}

.side-nav a:hover {
  border-color: var(--purple-lt);
  color: #fff;
}

/* ---------- prose ---------- */

.prose { min-width: 0; }

.prose > section {
  padding: 1.9rem 0;
  border-top: 1px solid var(--line-2);
  scroll-margin-top: 1.4rem;
}

.prose > section:first-child {
  border-top: 0;
  padding-top: .35rem;
}

.prose h2 {
  font-family: var(--mono);
  font-size: 1.42rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  font-weight: 600;
  color: #fbf6ff;
  margin: 0 0 .85rem;
  scroll-margin-top: 1.5rem;
}

.prose h3 {
  font-family: var(--mono);
  font-size: 1.12rem;
  line-height: 1.4;
  font-weight: 500;
  color: #ecdff9;
  margin: 1.7rem 0 .55rem;
  scroll-margin-top: 1.5rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--txt-2);
}

.prose strong { color: #f0d3a6; font-weight: 600; }
.prose em { color: #e6d7f5; }

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
  color: var(--txt-2);
}

.prose li { margin-bottom: .48rem; }

.prose li::marker { color: var(--brown-lt); }

.prose a {
  color: var(--purple-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: #fff; }

.prose hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 1.4rem 0;
}

.prose blockquote {
  margin: 1.3rem 0;
  padding: .3rem 0 .3rem 1rem;
  border-left: 3px solid var(--brown);
  color: #d8cce6;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 1.2rem 0; }

.prose img {
  display: block;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line-2);
}

.prose figcaption {
  font-size: .84rem;
  color: var(--txt-3);
  margin-top: .45rem;
}

.prose code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .1em .38em;
  border-radius: 6px;
  background: rgba(86, 34, 139, .3);
  border: 1px solid var(--line-2);
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

.foot {
  margin-top: 1.4rem;
  padding: 2.4rem 1.1rem 3rem;
  border-top: 1px solid var(--line);
  background: rgba(18, 14, 24, .55);
}

.foot-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.foot-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.3rem, 12vw, 4.6rem);
  line-height: .95;
  letter-spacing: -.04em;
  margin: 0 0 1.7rem;
  color: #2c2138;
  -webkit-text-stroke: 1.5px rgba(201, 160, 255, .5);
}

.foot-cols {
  display: grid;
  gap: 1.5rem;
}

.foot dt {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .18em;
  color: var(--brown-lt);
  margin-bottom: .5rem;
}

.foot dd { margin: 0; }

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #cfc3de;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.foot dd a:hover {
  color: #fff;
  border-bottom-color: var(--purple-lt);
}

.foot-copy {
  margin: 2rem 0 0;
  font-size: .82rem;
  color: var(--txt-3);
}

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem calc(.55rem + env(safe-area-inset-bottom));
  background: rgba(31, 23, 38, .95);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.dock-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  background: rgba(86, 34, 139, .3);
  text-decoration: none;
}

.dock-brand img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.mark-txt {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .02em;
  color: #efe3fb;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  font-family: inherit;
  font-size: .92rem;
  color: var(--txt);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease;
}

.dock-btn:hover {
  background: rgba(86, 34, 139, .35);
  border-color: var(--purple-lt);
}

.dock-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: .92rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--brown));
  transition: filter .22s ease, transform .22s ease;
}

.dock-cta:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
}

.dock-nav {
  position: fixed;
  inset: 0;
  z-index: 65;
  padding: 1.5rem 1rem 6.5rem;
  background: rgba(16, 12, 22, .965);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .26s ease, transform .26s ease, visibility .26s;
}

.dock.is-open .dock-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dock-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  display: grid;
  gap: .45rem;
}

.dock-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: .55rem 1rem;
  font-size: 1rem;
  color: #efe6f8;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px 14px 14px 5px;
  background: rgba(255, 255, 255, .03);
  transition: border-color .2s ease, background .2s ease;
}

.dock-nav a:hover {
  border-color: var(--purple-lt);
  background: rgba(86, 34, 139, .35);
}

/* ---------- desktop ---------- */

@media (min-width: 640px) {
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 2.2rem;
    padding: 3.4rem 1.5rem 2.6rem;
  }

  .hero-fig {
    width: 190px;
    aspect-ratio: 1;
    border-radius: 62% 38% 46% 54% / 48% 52% 44% 56%;
  }
}

@media (min-width: 900px) {
  .stage {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 2.6rem;
    padding-top: 1.8rem;
  }

  .side { position: sticky; top: 1.2rem; }

  .side-nav ul {
    flex-direction: column;
    overflow: visible;
    gap: .1rem;
  }

  .side-nav a {
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
    padding: .3rem .55rem;
  }

  .side-nav a:hover {
    background: rgba(86, 34, 139, .32);
    border-color: var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dock-nav,
  .side-nav a,
  .dock-btn,
  .dock-cta,
  .foot dd a { transition: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
