:root {
  --ink-strong: #04142f;
  --ink: #0d2452;
  --ink-soft: #24437b;
  --paper: #f4f8ff;
  --paper-deep: #d8e8ff;
  --line: #a9c7f8;
  --blue-main: #0a66ff;
  --blue-soft: #4f93ff;
  --blue-bright: #82b5ff;
  --panel: #081836;
  --panel-soft: #122a56;
  --te-radius: 24px;
  --shadow-xl: 0 28px 60px rgba(5, 20, 56, 0.3);
  --shadow-card: 0 20px 34px rgba(9, 32, 88, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-strong);
  background:
    linear-gradient(140deg, #f4f8ff 0%, #d7e9ff 46%, #f7fbff 100%),
    repeating-linear-gradient(
      to right,
      rgba(17, 81, 199, 0.04) 0,
      rgba(17, 81, 199, 0.04) 1px,
      transparent 1px,
      transparent 64px
    );
  min-height: 100vh;
  overflow-x: hidden;
}

.site-shell {
  width: min(1160px, calc(100vw - 44px));
  margin: 0 auto;
  padding-bottom: 40px;
}

.topbar {
  margin-top: 18px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(61, 118, 214, 0.26);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(242, 248, 255, 0.94), rgba(226, 239, 255, 0.84));
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(45, 84, 152, 0.12);
  position: sticky;
  top: 12px;
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 10px;
  justify-self: start;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--blue-main);
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--blue-main);
}

.brand-mark::before {
  width: 3px;
  height: 20px;
  left: 50%;
  top: -5px;
  transform: translateX(-50%);
}

.brand-mark::after {
  width: 20px;
  height: 3px;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
}

.brand-text {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 22px;
}

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

.topnav a:hover {
  color: var(--blue-main);
}

.topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #f7fbff;
  background: linear-gradient(150deg, #0f51cc, #0a67ff);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.github-link {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(79, 129, 213, 0.38);
  background: linear-gradient(180deg, rgba(237, 246, 255, 0.96), rgba(216, 232, 255, 0.92));
  color: #12316a;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  transition: transform 170ms ease, box-shadow 170ms ease, color 170ms ease;
}

.github-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.github-link:hover {
  color: var(--blue-main);
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(17, 62, 140, 0.18);
}

.hero {
  padding-top: 26px;
  position: relative;
}

.hero-scene {
  border-radius: 28px;
  min-height: 510px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(76, 128, 220, 0.25);
  background:
    linear-gradient(180deg, rgba(212, 231, 255, 0.9), rgba(240, 247, 255, 0.7) 52%, rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 70% 30%, rgba(111, 167, 255, 0.4), transparent 48%),
    radial-gradient(circle at 30% 65%, rgba(122, 175, 255, 0.36), transparent 52%);
  box-shadow: 0 32px 64px rgba(10, 45, 110, 0.2);
}

.scene-glow {
  position: absolute;
  inset: auto -10% 4% -10%;
  height: 44%;
  background:
    radial-gradient(ellipse at 35% 45%, rgba(89, 145, 245, 0.45), transparent 68%),
    radial-gradient(ellipse at 62% 56%, rgba(157, 197, 255, 0.45), transparent 70%),
    linear-gradient(180deg, rgba(224, 239, 255, 0.2), rgba(255, 255, 255, 0.74));
  filter: blur(2px);
}

.scene-ridge {
  position: absolute;
  width: 120%;
  left: -10%;
  border-radius: 50%;
}

.ridge-a {
  height: 240px;
  bottom: 28%;
  background: radial-gradient(ellipse at 50% 58%, rgba(66, 120, 212, 0.4), rgba(131, 178, 248, 0.06));
}

.ridge-b {
  height: 180px;
  bottom: 18%;
  background: radial-gradient(ellipse at 50% 52%, rgba(138, 183, 248, 0.45), rgba(202, 224, 255, 0.08));
}

.ridge-c {
  height: 140px;
  bottom: 8%;
  background: radial-gradient(ellipse at 50% 50%, rgba(179, 213, 255, 0.42), rgba(230, 243, 255, 0.06));
}

.control-panel {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1060px, calc(100% - 44px));
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(270px, 0.76fr) minmax(0, 1.24fr);
  gap: 0;
  border-radius: 22px;
  border: 1px solid rgba(132, 172, 244, 0.3);
  background: linear-gradient(180deg, rgba(11, 28, 61, 0.93), rgba(7, 21, 49, 0.93));
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.panel-list {
  padding: 14px;
  border-right: 1px solid rgba(103, 143, 214, 0.27);
}

.panel-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f0f5ff;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 180ms ease, transform 180ms ease;
}

.panel-item span {
  font-size: 0.98rem;
  font-weight: 600;
}

.panel-item small {
  font-size: 0.77rem;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  opacity: 0.8;
}

.panel-item:hover {
  background: rgba(112, 155, 233, 0.18);
}

.panel-item.active {
  background: linear-gradient(170deg, rgba(80, 135, 227, 0.44), rgba(39, 85, 176, 0.28));
  transform: translateX(2px);
}

.panel-preview {
  padding: 0;
  color: #f4f8ff;
  min-height: 100%;
}

.preview-top {
  position: relative;
  width: 100%;
  height: 100%;
  border-left: 1px solid rgba(103, 143, 214, 0.22);
  background: rgba(10, 25, 58, 0.82);
  overflow: hidden;
}

.panel-shot {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top left;
  transition: opacity 160ms ease;
}

.panel-shot.is-loading {
  opacity: 0.42;
}

.panel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 24px 22px;
  background: linear-gradient(180deg, rgba(5, 16, 40, 0) 0%, rgba(7, 20, 49, 0.86) 40%, rgba(7, 20, 49, 0.98) 100%);
}

.panel-preview h2 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  min-height: 1.4em;
}

.panel-preview p {
  margin: 0;
  color: rgba(231, 240, 255, 0.86);
  line-height: 1.58;
  font-size: 0.93rem;
  min-height: 4.8em;
  max-height: 4.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hero-content {
  position: relative;
  z-index: 5;
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
  padding: 20px 18px 24px;
}

.eyebrow,
.tag {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.73rem;
  color: var(--ink-soft);
  margin: 0;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.75;
  color: rgba(19, 43, 91, 0.85);
  margin: 0 auto;
  max-width: 680px;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 170ms ease, box-shadow 170ms ease, background-color 170ms ease;
}

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

.btn-primary {
  color: #eef4ff;
  background: linear-gradient(160deg, #0a5fff, #1c7bff);
  box-shadow: 0 14px 22px rgba(18, 81, 186, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 20px 30px rgba(18, 81, 186, 0.32);
}

.btn-secondary {
  color: #12316a;
  background: linear-gradient(180deg, rgba(237, 246, 255, 0.96), rgba(214, 231, 255, 0.92));
  border: 1px solid rgba(89, 141, 225, 0.38);
}

.hero-meta {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 11px;
  flex-wrap: wrap;
}

.hero-meta span {
  border: 1px solid rgba(74, 124, 214, 0.28);
  color: #173c7c;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.74rem;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(237, 245, 255, 0.86);
}

.section {
  margin-top: 74px;
}

.feature-grid {
  margin-top: 58px;
}

.feature-grid .hero-scene {
  min-height: 660px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-grid .control-panel {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: min(1060px, 100%);
}

.section-head {
  text-align: center;
}

.section-head h2,
.workflow-copy h2,
.cta h2 {
  margin: 14px auto 0;
  max-width: 760px;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.workflow {
  border-radius: 28px;
  border: 1px solid rgba(88, 141, 226, 0.32);
  background: linear-gradient(180deg, rgba(236, 246, 255, 0.94), rgba(215, 233, 255, 0.88));
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: grid;
  grid-template-columns: 0.96fr 1.2fr;
  gap: 26px;
}

.workflow-copy p {
  margin: 14px 0 0;
  color: rgba(22, 52, 106, 0.84);
  line-height: 1.7;
}

.workflow-track {
  display: grid;
  gap: 12px;
}

.track-item {
  border-radius: 16px;
  border: 1px solid rgba(89, 143, 228, 0.32);
  padding: 14px 16px;
  background: rgba(244, 250, 255, 0.9);
}

.track-item span {
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.75rem;
  color: rgba(20, 57, 118, 0.72);
}

.track-item h3 {
  margin: 6px 0;
  font-size: 1.01rem;
}

.track-item p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.9rem;
  color: rgba(20, 52, 110, 0.82);
}

.command-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.command-card {
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 28, 66, 0.96), rgba(6, 21, 50, 0.97));
  border: 1px solid rgba(89, 143, 228, 0.32);
  box-shadow: 0 16px 30px rgba(9, 31, 73, 0.25);
}

.command-title {
  margin: 0 0 10px;
  color: rgba(216, 232, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.72rem;
}

.command-card code {
  display: block;
  white-space: nowrap;
  overflow: auto;
  color: #d8e9ff;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.82rem;
}

.cta {
  border-radius: 22px;
  border: 1px solid rgba(86, 140, 225, 0.33);
  background:
    linear-gradient(160deg, rgba(7, 38, 102, 0.9), rgba(15, 80, 188, 0.87)),
    radial-gradient(circle at 70% 30%, rgba(131, 181, 255, 0.24), transparent 54%);
  color: #f1f7ff;
  text-align: center;
  padding: 36px 24px;
  box-shadow: var(--shadow-xl);
}

.cta .tag {
  color: rgba(210, 226, 255, 0.84);
}

.cta h2 {
  color: #f6fbff;
}

.cta-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta .btn-secondary {
  border-color: rgba(164, 200, 255, 0.6);
  color: #0e3b8b;
}

.footer {
  margin-top: 44px;
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: rgba(17, 45, 94, 0.72);
  font-size: 0.86rem;
}

.footer-graphic {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 0;
}

.footer-wordmark {
  margin: 0;
  font-weight: 800;
  font-size: clamp(4.4rem, 18vw, 15rem);
  letter-spacing: -0.045em;
  line-height: 0.84;
  text-transform: lowercase;
  white-space: nowrap;
  position: relative;
  width: 100%;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.6px rgba(26, 82, 182, 0.38);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.95) 62%, rgba(0, 0, 0, 0.4) 86%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.95) 62%, rgba(0, 0, 0, 0.4) 86%, rgba(0, 0, 0, 0) 100%);
  user-select: none;
  pointer-events: none;
}

.footer-wordmark::after {
  content: attr(data-word);
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(180deg, rgba(33, 108, 230, 0.36) 8%, rgba(33, 108, 230, 0.2) 58%, rgba(33, 108, 230, 0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand p {
  margin: 0;
}

.footer-brand a {
  color: #1f488f;
  text-decoration: none;
  border-bottom: 1px solid rgba(86, 140, 225, 0.42);
}

.footer-brand a:hover {
  color: #0a66ff;
  border-bottom-color: rgba(45, 113, 224, 0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  max-width: 680px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1f488f;
  border: 1px solid rgba(86, 140, 225, 0.32);
  border-radius: 9px;
  background: rgba(238, 246, 255, 0.86);
  height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  line-height: 1;
  font-family: "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.72rem;
  transition: color 170ms ease, border-color 170ms ease, background-color 170ms ease;
}

.footer-links a:hover {
  color: #0a66ff;
  border-color: rgba(45, 113, 224, 0.6);
  background: rgba(232, 243, 255, 0.95);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 460ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 460ms ease;
}

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

@media (max-width: 1080px) {
  .topbar {
    display: flex;
    justify-content: space-between;
  }

  .topnav {
    display: none;
  }

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

  .workflow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(1160px, calc(100vw - 26px));
  }

  .topbar {
    padding: 12px;
    gap: 10px;
  }

  .topbar-cta {
    padding: 9px 14px;
    font-size: 0.8rem;
  }

  .brand-text {
    font-size: 1.16rem;
  }

  .github-link {
    width: 35px;
    height: 35px;
  }

  .hero-scene {
    min-height: 700px;
  }

  .control-panel {
    top: 22px;
    grid-template-columns: 1fr;
    width: calc(100% - 22px);
    min-height: 0;
  }

  .panel-list {
    order: 2;
    border-right: 0;
    border-top: 1px solid rgba(103, 143, 214, 0.27);
    border-bottom: 0;
    padding: 10px;
  }

  .panel-item {
    padding: 10px 12px;
  }

  .panel-preview {
    order: 1;
    min-height: 340px;
  }

  .preview-top {
    min-height: 340px;
  }

  .panel-caption {
    padding: 14px 14px 12px;
  }

  .panel-preview p {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.5rem);
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .command-card code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .section {
    margin-top: 60px;
  }

  .workflow {
    padding: 20px;
  }

  .footer {
    font-size: 0.8rem;
    margin-top: 34px;
  }

  .footer-graphic {
    padding: 0;
  }

  .footer-wordmark {
    font-size: clamp(3.2rem, 25vw, 6.6rem);
    -webkit-text-stroke: 1.2px rgba(26, 82, 182, 0.36);
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-links {
    justify-content: flex-start;
    max-width: 100%;
  }

  .feature-grid .hero-scene {
    min-height: 830px;
    padding: 20px;
  }

  .feature-grid .control-panel {
    width: 100%;
  }

  .panel-preview {
    min-height: 300px;
  }

  .panel-caption {
    padding: 16px 16px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
