:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-alt: #101012;
  --bg-card: #121214;
  --fg: #f3f0e9;
  --muted: #a3a099;
  --line: #222225;
  --accent: #f3f0e9;
  --accent-hover: #ffffff;
  --accent-fg: #0a0a0b;
  --accent-soft: rgba(243, 240, 233, .08);
  --max: 70rem;
  --radius: .9rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
::selection { background: var(--accent); color: var(--accent-fg); }
* { box-sizing: border-box; }
.sprite { display: none; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: .25rem; }
[id] { scroll-margin-top: 5rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* header */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 10, 11, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
header.scrolled { border-color: var(--line); box-shadow: 0 10px 30px -20px rgba(0,0,0,.8); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }
.logo {
  display: flex; align-items: center; gap: .6rem;
  font: 400 1.35rem/1 Optima, "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  letter-spacing: .18em; text-decoration: none;
}
.logo .mark {
  width: 2.2rem; height: 2.2rem; display: inline-block; background: currentColor;
  -webkit-mask: url(logo.svg) center / contain no-repeat;
  mask: url(logo.svg) center / contain no-repeat;
  transition: transform .5s var(--ease);
}
.logo:hover .mark { transform: rotate(120deg); }
nav { display: flex; align-items: center; gap: 1.75rem; }
nav a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
nav a:hover { color: var(--fg); }
nav a.cta {
  color: var(--fg); padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s, background .2s;
}
nav a.cta:hover { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 40rem) { nav a:not(.cta) { display: none; } }

/* hero */
.hero { position: relative; overflow: hidden; padding: 7.5rem 0 6.5rem; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60rem 30rem at 15% -10%, rgba(243,240,233,.07), transparent 60%),
    radial-gradient(40rem 25rem at 90% 110%, rgba(243,240,233,.03), transparent 60%),
    radial-gradient(rgba(243,240,233,.10) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
  -webkit-mask: radial-gradient(70rem 40rem at 60% 40%, #000 30%, transparent 75%);
  mask: radial-gradient(70rem 40rem at 60% 40%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem; align-items: center; }
@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } .visual { display: none; } }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.25rem, 4.3vw, 3.4rem);
  line-height: 1.05; letter-spacing: -.03em; font-weight: 700;
  margin: 0 0 1.5rem; max-width: 18ch;
}
.hero h1 em { font-style: normal; color: var(--muted); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 54ch; margin: 0 0 2.25rem; }
.hero .eyebrow { max-width: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 1.5rem; height: 1px; background: currentColor; opacity: .7; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-fg);
  transition: transform .2s var(--ease), background .2s, box-shadow .2s;
  box-shadow: 0 8px 24px -12px rgba(243,240,233,.18);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 28px -12px rgba(243,240,233,.25); }
.btn .ico { width: 1.1rem; height: 1.1rem; stroke: currentColor; transition: transform .2s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* sections */
section { padding: 5.5rem 0; }
section + section { border-top: 1px solid var(--line); }
.alt { background: var(--bg-alt); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -.02em; margin: 0 0 .6rem; }
.lead { color: var(--muted); max-width: 60ch; margin: 0 0 2.5rem; font-size: 1.05rem; }

.two { display: grid; gap: 2rem 4rem; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.two .lead { margin-bottom: 0; }
@media (max-width: 48rem) { .two { grid-template-columns: 1fr; } }

.prose p { margin: 0 0 1.1rem; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }

/* cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.card {
  position: relative; display: block; padding: 1.75rem; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-alt));
  color: inherit; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--fg) 30%, var(--line));
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.9), 0 0 0 1px var(--accent-soft) inset;
}
.card h3 { margin: 0 0 .5rem; font-size: 1.08rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .ico {
  display: grid; place-items: center; box-sizing: content-box;
  width: 1.35rem; height: 1.35rem; padding: .55rem; margin-bottom: 1.1rem;
  border-radius: .7rem; background: var(--accent-soft);
  transition: background .2s, transform .2s var(--ease);
}
.card:hover .ico { background: color-mix(in srgb, var(--fg) 14%, transparent); transform: scale(1.06); }

/* lists */
.list, .how ol { margin: 0; padding: 0; list-style: none; }
.how ol { counter-reset: step; }
.list li, .how li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.list li:first-child, .how li:first-child { padding-top: 0; border-top: 0; }
.list li strong, .how li strong { display: block; margin-bottom: .2rem; }
.list li span, .how li span { color: var(--muted); }
.list li { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
.list li .ico { grid-row: span 2; margin-top: .15rem; }
.how li strong::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-block; min-width: 2.4rem; color: var(--muted);
  font-variant-numeric: tabular-nums; font-weight: 500;
}

/* definition tables */
.tech, .info { margin: 0; }
.tech div, .info div {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem;
  padding: .85rem 0; border-top: 1px solid var(--line);
}
.tech div:first-child, .info div:first-child { padding-top: 0; border-top: 0; }
.tech dt, .info dt { font-weight: 600; }
.tech dd, .info dd { margin: 0; color: var(--muted); }
.info dt { display: flex; align-items: center; gap: .6rem; }
.info dt .ico { width: 1.15rem; height: 1.15rem; }
.info a { color: var(--fg); text-decoration-color: color-mix(in srgb, var(--fg) 35%, transparent); text-underline-offset: 3px; }
.info a:hover { text-decoration-color: var(--fg); }
.info a.ext { display: inline-flex; align-items: center; gap: .25rem; }
.info a.ext .ico { width: .95rem; height: .95rem; stroke: var(--muted); }
.btn.ghost .ico { stroke: currentColor; }
.btn.ghost:hover .ico { transform: translate(2px, -2px); }
@media (max-width: 30rem) { .tech div, .info div { grid-template-columns: 1fr; gap: .2rem; } }

/* contact */
.contact .panel {
  position: relative; overflow: hidden;
  padding: 3rem; border-radius: calc(var(--radius) * 1.4); border: 1px solid var(--line);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(243,240,233,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-card), var(--bg-alt));
  display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center;
}
.contact .panel h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.contact .panel .lead { margin-bottom: 1.75rem; }
.contact .mail { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; text-decoration: none; }
.contact .mail:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact .info div { grid-template-columns: 8.5rem 1fr; }
.contact .info dd, .info a { overflow-wrap: anywhere; }
@media (max-width: 64rem) { .contact .panel { grid-template-columns: 1fr; } }
@media (max-width: 48rem) { .contact .panel { padding: 2rem; } }

/* icons */
.ico {
  width: 1.5rem; height: 1.5rem; flex: none;
  fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* footer */
footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; font-size: .9rem; color: var(--muted); }
footer .top {
  display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; margin-bottom: 2.5rem;
}
footer .top p { margin: .75rem 0 0; max-width: 34ch; }
footer h4 { margin: 0 0 .75rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
footer ul a { text-decoration: none; transition: color .2s; }
footer ul a:hover { color: var(--fg); }
footer .bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between;
  padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem;
}
@media (max-width: 40rem) { footer .top { grid-template-columns: 1fr; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .04s }
.reveal:nth-child(3) { transition-delay: .08s }
.reveal:nth-child(4) { transition-delay: .12s }
.reveal:nth-child(5) { transition-delay: .16s }
.reveal:nth-child(6) { transition-delay: .2s }
.reveal.in { will-change: auto; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

/* hero visual */
.visual { position: relative; }
.panel-ui {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-alt));
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(243,240,233,.03) inset;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition: transform .4s var(--ease);
}
.visual:hover .panel-ui { transform: perspective(1200px) rotateY(-2deg) rotateX(0); }
.panel-ui .bar {
  display: flex; align-items: center; gap: .4rem; padding: .7rem .9rem;
  border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--muted); letter-spacing: .04em;
}
.panel-ui .bar i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line); }
.panel-ui .bar span { margin-left: .5rem; }
.panel-ui .bar .live { margin-left: .75rem; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; color: var(--fg); display: inline-flex; align-items: center; gap: .4rem; }
.panel-ui .bar .live::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--fg); animation: pulse 1.6s ease-in-out infinite; }
.panel-ui .stages { list-style: none; margin: 0; padding: 1rem .9rem .6rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.panel-ui .stages li {
  display: grid; gap: .3rem; padding: .6rem .7rem; border-radius: .6rem; border: 1px solid var(--line);
  background: var(--bg); font-size: .72rem; opacity: 0; animation: fadein .35s var(--ease) forwards;
}
.panel-ui .stages li:nth-child(1) { animation-delay: .1s } .panel-ui .stages li:nth-child(2) { animation-delay: .25s }
.panel-ui .stages li:nth-child(3) { animation-delay: .4s } .panel-ui .stages li:nth-child(4) { animation-delay: .55s }
.panel-ui .stages .ico { width: .95rem; height: .95rem; stroke-width: 2.2; }
.panel-ui .stages li i { width: .95rem; height: .95rem; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--fg); animation: spin 1s linear infinite; }
.panel-ui .stages span { color: var(--fg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.panel-ui .stages em { font-style: normal; color: var(--muted); }
.panel-ui .stages .run { border-color: color-mix(in srgb, var(--fg) 30%, var(--line)); }
.panel-ui .progress { margin: .2rem .9rem .5rem; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.panel-ui .progress b { display: block; height: 100%; width: 0; background: var(--fg); animation: fill 3s var(--ease) .7s infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes fill { 0% { width: 0 } 70% { width: 72% } 100% { width: 72% } }
.panel-ui .rows { list-style: none; margin: 0; padding: .4rem .9rem .9rem; font-size: .8rem; }
.panel-ui .rows li {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .7rem;
  padding: .55rem 0; border-top: 1px solid var(--line);
}
.panel-ui .rows li:first-child { border-top: 0; }
.panel-ui .rows i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--fg); }
.panel-ui .rows i.deploy { background: transparent; border: 1.5px solid var(--muted); }
.panel-ui .rows span { color: var(--fg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.panel-ui .rows em { font-style: normal; font-variant-numeric: tabular-nums; }
.panel-ui .rows small { color: var(--muted); }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .8rem; border-radius: 999px; font-size: .78rem; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(16,16,18,.96);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.9);
}
.chip .ico { width: 1rem; height: 1rem; }
.chip.c1 { top: -1.2rem; right: -.75rem; animation: float 6s ease-in-out infinite; }
.chip.c2 { bottom: -1.1rem; left: -1rem; animation: float 7s ease-in-out 1s infinite; }
@keyframes fadein { to { opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(.75); opacity: .55 } }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@media (prefers-reduced-motion: reduce) {
  .panel-ui .progress b { animation: none; width: 72%; }
  .panel-ui .stages li { opacity: 1; animation: none; }
  .chip, .panel-ui .bar .live::before { animation: none; }
}

/* timeline on method */
.how ol { position: relative; }
.how li { position: relative; padding-left: 2.6rem; border-top: 0; padding-top: 0; padding-bottom: 1.6rem; }
.how li:last-child { padding-bottom: 0; }
.how li::before {
  content: ""; position: absolute; left: .45rem; top: .45rem; width: .6rem; height: .6rem;
  border-radius: 50%; background: var(--bg); border: 1.5px solid var(--fg); z-index: 1;
}
.how li::after {
  content: ""; position: absolute; left: .72rem; top: 1.2rem; bottom: 0; width: 1px;
  background: color-mix(in srgb, var(--fg) 25%, transparent);
}
.how li:last-child::after { display: none; }
.how li strong::before { display: none; }

/* contact watermark */
.contact .panel::after {
  content: ""; position: absolute; right: -4rem; top: 50%; width: 22rem; height: 22rem;
  transform: translateY(-50%); pointer-events: none;
  background: linear-gradient(160deg, rgba(243,240,233,.06), rgba(243,240,233,.01));
  -webkit-mask: url(logo.svg) center / contain no-repeat;
  mask: url(logo.svg) center / contain no-repeat;
}
.contact .panel > * { position: relative; z-index: 1; }

/* about illustration */
.about { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; }
.about .prose .lead { margin-bottom: 1.5rem; }
.art {
  margin: 0; position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(30rem 20rem at 60% 40%, rgba(243,240,233,.05), transparent 65%),
    linear-gradient(180deg, var(--bg-card), var(--bg));
  color: var(--fg);
}
.art .mesh { opacity: .95; }
.art .mesh { position: absolute; inset: 0; width: 100%; height: 100%; }
.art .core { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite; }
.art .orbit { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s var(--ease) forwards; }
.art .orbit.o1 { animation-delay: .15s } .art .orbit.o2 { animation-delay: .3s }
.art .node { animation: blink 4s ease-in-out infinite; }
.art .node:nth-of-type(2n) { animation-delay: 1.3s } .art .node:nth-of-type(3n) { animation-delay: 2.1s }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { 0%,100% { opacity: .9 } 50% { opacity: .3 } }
@media (max-width: 48rem) { .about { grid-template-columns: 1fr; } .art { aspect-ratio: 16 / 10; } }
@media (prefers-reduced-motion: reduce) { .art .orbit { stroke-dashoffset: 0; animation: none; } .art .core, .art .node { animation: none; } }

.art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at 55% 45%, transparent 55%, var(--bg-alt) 100%);
}
/* pause offscreen infinite animations */
.reveal:not(.in) .core, .reveal:not(.in) .node { animation-play-state: paused; }
