:root {
  --bg: #f6f4ec;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --ink: #1f2a2e;
  --ink-soft: #425258;
  --line: rgba(26, 45, 54, 0.14);
  --accent: #0f7b8b;
  --accent-alt: #d56b2d;
  --shadow: 0 20px 44px rgba(20, 39, 48, 0.12);
  --radius-lg: 22px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(15, 123, 139, 0.16), transparent 46%),
    radial-gradient(circle at 92% 22%, rgba(213, 107, 45, 0.15), transparent 42%),
    var(--bg);
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

.bg-glow-a {
  top: -22rem;
  right: -10rem;
  background: rgba(15, 123, 139, 0.24);
}

.bg-glow-b {
  bottom: -20rem;
  left: -12rem;
  background: rgba(213, 107, 45, 0.2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(246, 244, 236, 0.84);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3.2rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), #2ca3b8);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.76rem;
}

.brand-text {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2.4vw, 1.5rem);
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
}

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

.nav-more {
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}

main,
.footer {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.hero {
  padding: clamp(2.8rem, 8vw, 5.8rem) 0 2.2rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.77rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

.hero h1 {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: clamp(2.1rem, 6.2vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.hero h1 span {
  display: block;
  margin-top: 0.35rem;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: clamp(1.2rem, 3.1vw, 2.25rem);
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}

.hero-copy {
  margin: 1.2rem 0 0;
  max-width: 72ch;
  color: var(--ink-soft);
  line-height: 1.65;
}

.hero-showcase {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.hero-shot {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-shot:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 123, 139, 0.45);
  box-shadow: 0 18px 34px rgba(20, 39, 48, 0.18);
}

.hero-shot:focus-visible {
  outline: 2px solid rgba(15, 123, 139, 0.42);
  outline-offset: 2px;
}

.hero-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 220ms ease;
}

.hero-shot:hover img {
  transform: scale(1.05);
}

.hero-shot span {
  display: block;
  padding: 0.65rem 0.78rem 0.72rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.hero-actions {
  margin-top: 1.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.btn-solid {
  background: linear-gradient(130deg, var(--accent), #1c97ad);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 123, 139, 0.28);
}

.btn-soft {
  background: rgba(15, 123, 139, 0.12);
  color: #115b67;
}

.btn-line {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.lang-link {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.lang-link.is-active {
  color: var(--ink);
}

.hero-metrics {
  margin-top: 1.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.metric-value {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.9vw, 2rem);
  color: var(--accent-alt);
}

.metric-label {
  margin: 0.28rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.metric-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(66, 82, 88, 0.5);
}

.metric-link:hover {
  color: var(--ink);
  border-bottom-color: rgba(31, 42, 46, 0.7);
}

.section {
  padding: 3.2rem 0 0;
}

.section-head {
  margin-bottom: 1.35rem;
}

.section h2 {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.card-grid,
.matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.info-card,
.matrix-card,
.link-card,
.timeline-item,
pre {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.info-card,
.matrix-card,
.timeline-item,
.link-card {
  padding: 1rem 1.1rem;
}

.info-card h3,
.matrix-card h3,
.link-card h3 {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1.02rem;
}

.info-card p,
.matrix-card p,
.link-card p,
.timeline-item p {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.timeline-item {
  display: grid;
  gap: 0.35rem;
}

.phase {
  display: inline-flex;
  width: fit-content;
  padding: 0.25rem 0.56rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0d5e6d;
  background: rgba(15, 123, 139, 0.16);
}

.matrix {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.site-map-grid {
  margin-top: 0.6rem;
}

.site-tree {
  margin: 0.58rem 0 0;
  padding: 0 0 0 1.1rem;
  display: grid;
  gap: 0.24rem;
  color: var(--ink-soft);
}

.site-tree a {
  color: #0e5f91;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.site-tree a:hover {
  color: #0c4f79;
}

.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.95rem;
}

.bundle-actions {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.copy-status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  min-height: 1.2rem;
}

.copy-status[data-kind="success"] {
  color: #166235;
}

.copy-status[data-kind="error"] {
  color: #8e2f24;
}

.preface-card {
  margin-top: 0.95rem;
  padding: 0.85rem;
}

.preface-card summary {
  cursor: pointer;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.preface-card pre {
  margin-top: 0.7rem;
}

.screenshot-head {
  margin-top: 1.2rem;
}

.shot-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shot-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shot-card img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-card figcaption {
  padding: 0.62rem 0.8rem 0.75rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 1.2rem 1.25rem;
  background: #142228;
}

pre code {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  color: #dff4f8;
  font-size: 0.9rem;
  line-height: 1.55;
}

code {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}

p code,
li code,
td code,
.info-card code,
.matrix-card code {
  color: #16313a;
  background: rgba(22, 49, 58, 0.08);
  border: 1px solid rgba(22, 49, 58, 0.16);
  border-radius: 6px;
  padding: 0.08rem 0.36rem;
  font-weight: 600;
}

.concept-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.concept-table th,
.concept-table td {
  border-bottom: 1px solid rgba(26, 45, 54, 0.1);
  padding: 0.5rem 0.62rem;
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.concept-table th {
  color: var(--ink);
  font-weight: 700;
  background: rgba(15, 123, 139, 0.08);
}

.concept-note {
  border-left: 4px solid rgba(15, 123, 139, 0.5);
  padding: 0.45rem 0.72rem;
  margin-top: 0.72rem;
  color: var(--ink-soft);
  background: rgba(15, 123, 139, 0.06);
  border-radius: 8px;
}

.start-actions {
  display: grid;
  gap: 0.9rem;
}

.link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, border-color 180ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(213, 107, 45, 0.45);
}

.footer {
  padding: 3rem 0 2rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: grid;
  gap: 0.45rem;
}

.footer a {
  color: inherit;
}

body.no-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 1.4rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(11, 21, 26, 0.78);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-panel {
  width: min(1040px, 94vw);
  max-height: calc(100vh - 2rem);
  background: #0f1619;
  border: 1px solid rgba(220, 240, 245, 0.2);
  border-radius: 16px;
  padding: 0.85rem;
  display: grid;
  gap: 0.6rem;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42);
}

.lightbox-image-wrap {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1114;
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  background: #0b1114;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lightbox-caption {
  margin: 0;
  color: #e3edf0;
  font-size: 0.88rem;
  line-height: 1.42;
}

.lightbox-close {
  border: 1px solid rgba(227, 237, 240, 0.28);
  background: rgba(227, 237, 240, 0.12);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.42rem 0.75rem;
}

.lightbox-close:hover {
  background: rgba(227, 237, 240, 0.2);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-metrics,
  .card-grid,
  .matrix,
  .doc-grid,
  .start-grid,
  .hero-showcase,
  .shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .topbar-actions {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-metrics,
  .card-grid,
  .matrix,
  .doc-grid,
  .start-grid,
  .hero-showcase,
  .shot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding-top: 2.7rem;
  }
}
