:root {
  color-scheme: dark;
  --ink: #f4f8ff;
  --muted: #a8b5c8;
  --surface: rgba(12, 26, 44, 0.78);
  --line: rgba(171, 198, 232, 0.17);
  --ionic: #4f8dff;
  --cyan: #44d7f1;
  --green: #83e9b0;
  --violet: #c6a5ff;
  --gold: #ffd78a;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #07111f;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(48, 109, 218, 0.2), transparent 33rem),
    linear-gradient(145deg, #07111f 0%, #091829 54%, #07111f 100%);
}

main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.masthead {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(86, 158, 255, 0.7);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(60, 137, 255, 0.34), rgba(45, 98, 196, 0.08));
  box-shadow: inset 0 0 24px rgba(61, 144, 255, 0.14);
  color: #9dcaff;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
}

.edition,
.note,
footer {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  padding: 88px 0 96px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: #9fc8ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--ionic);
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.7rem, 4.8vw, 4.6rem);
  line-height: 1.09;
  letter-spacing: -0.025em;
  word-spacing: 0.025em;
}

.intro {
  max-width: 580px;
  margin: 30px 0 36px;
  color: #bcc8d8;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.75;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 22px;
  border-radius: 14px;
  color: #06111e;
  background: linear-gradient(100deg, #77b8ff, #57e0ee);
  box-shadow: 0 18px 50px rgba(47, 139, 230, 0.24);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-action svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.primary-action span {
  margin-left: 2px;
  font-size: 1.15rem;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(47, 139, 230, 0.34);
}

.primary-action:focus-visible,
.brand:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.note {
  margin: 18px 0 0;
}

.code-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(17, 35, 58, 0.95), rgba(8, 20, 35, 0.95));
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  transform: perspective(1100px) rotateY(-4deg) rotateX(1deg);
}

.code-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.035), transparent 28%);
}

.card-bar,
.card-footer {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #95a5b9;
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
}

.card-bar {
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.lights {
  display: flex;
  gap: 6px;
}

.lights i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334760;
}

.lights i:nth-child(2) { background: #466785; }
.lights i:nth-child(3) { background: var(--ionic); }

.branch {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
}

.code-body {
  min-height: 340px;
  padding: 38px 24px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: clamp(0.68rem, 1.1vw, 0.84rem);
  line-height: 1.9;
  overflow: hidden;
}

.code-body p {
  margin: 0;
  white-space: nowrap;
}

.muted {
  display: inline-block;
  width: 34px;
  color: #4e647d;
  user-select: none;
}

.violet { color: var(--violet); }
.green { color: var(--green); }
.blue { color: #70b7ff; }
.gold { color: var(--gold); }

.card-footer {
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.card-footer span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-footer b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3178c6;
}

footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.footer-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  width: 420px;
  height: 420px;
  right: -180px;
  top: 18%;
  border: 1px solid rgba(72, 148, 255, 0.11);
  box-shadow: 0 0 100px rgba(57, 135, 255, 0.08);
}

.ambient-two {
  width: 180px;
  height: 180px;
  left: -90px;
  bottom: 5%;
  border: 1px solid rgba(74, 220, 239, 0.1);
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 64px;
    padding: 72px 0;
  }

  .copy {
    max-width: 700px;
  }

  .code-card {
    width: min(650px, 100%);
    transform: none;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 30px, 1180px);
  }

  .masthead {
    min-height: 84px;
  }

  .brand > span:last-child,
  .edition {
    font-size: 0.76rem;
  }

  .hero {
    padding: 58px 0 64px;
    gap: 48px;
  }

  h1 {
    font-size: clamp(2.35rem, 11.5vw, 3.35rem);
  }

  .primary-action {
    width: 100%;
    justify-content: center;
    padding: 0 16px;
  }

  .code-body {
    min-height: 290px;
    padding: 28px 16px;
  }

  .card-footer span:last-child,
  footer span:first-child,
  .brand > span:last-child {
    display: none;
  }

  .footer-line {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-action {
    transition: none;
  }
}
