:root {
  --bg: #090b0d;
  --bg-soft: #101316;
  --surface: #171a1e;
  --surface-strong: #202429;
  --text: #f4f0e8;
  --muted: #b5b1a9;
  --line: rgba(244, 240, 232, 0.14);
  --teal: #A3E3FF;
  --rose: #f07d92;
  --gold: #f0bd61;
  --ink: #090b0d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(9, 11, 13, 0.76), rgba(9, 11, 13, 0.88)),
    url("assets/NGC6791_cover.jpg") center / cover fixed,
    var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(9, 11, 13, 0.76);
  border-bottom: 1px solid rgba(244, 240, 232, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.support-actions,
.social-links,
.tag-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink);
  background: var(--teal);
  border-radius: 8px;
  font-size: 0.78rem;
}

.nav-links {
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
}

.nav-links a:hover,
.social-links a:hover {
  color: var(--text);
}

.hero {
  min-height: 58vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  padding: 108px clamp(18px, 6vw, 88px) 46px;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: 3.2rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover,
.support-card:hover,
.video-link:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--ink);
  background: var(--teal);
}

.button.secondary,
.button.ghost {
  color: var(--text);
  background: rgba(244, 240, 232, 0.08);
  border-color: var(--line);
}

.button.ghost {
  background: transparent;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--teal);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section {
  padding: 64px clamp(18px, 6vw, 88px);
}

.product-section {
  background: linear-gradient(
    to bottom,
    transparent 0,
    rgba(9, 11, 13, 0.42) 90px,
    rgba(9, 11, 13, 0.7) 180px
  );
}

.site-footer {
  background: rgba(16, 19, 22, 0.84);
  backdrop-filter: blur(6px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: 2.65rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.product-copy {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tag-row {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.tag-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-row span:not(:first-child)::before {
  content: "/";
  margin-right: 12px;
  color: rgba(244, 240, 232, 0.3);
}

.product-copy h3 {
  margin-bottom: 12px;
  font-size: 1.48rem;
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: 0;
}

.product-copy p,
.feature-list {
  color: var(--muted);
}

.product-copy p {
  font-size: 0.98rem;
}

.feature-list {
  display: grid;
  gap: 0;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(244, 240, 232, 0.1);
}

.feature-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(244, 240, 232, 0.1);
}

.feature-list li::before {
  content: none;
}

.repo-copy {
  margin: 0 0 22px;
}

.repo-copy label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.repo-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.repo-copy input {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  color: var(--teal);
  background: rgba(9, 11, 13, 0.54);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
}

.repo-copy input:focus {
  border-color: rgba(163, 227, 255, 0.68);
  outline: none;
}

.copy-link-button {
  min-height: 48px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--gold);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.copy-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--gold);
  font-size: 0.86rem;
}

.repo-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.repo-help a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.screenshot-grid {
  display: grid;
  gap: 18px;
}

.screenshot-frame,
.screenshot-image {
  width: 100%;
  border-radius: 8px;
}

.screenshot-frame {
  margin: 0;
  border: 1px solid rgba(244, 240, 232, 0.16);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.screenshot-image {
  display: block;
  height: auto;
  aspect-ratio: 1701 / 1128;
  background:
    linear-gradient(135deg, rgba(163, 227, 255, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(240, 125, 146, 0.12), transparent 42%),
    #111418;
  object-fit: cover;
}

.screenshot-frame figcaption {
  padding: 12px 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.video-links,
.support-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.support-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease;
}

.video-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease;
}

.video-link:hover,
.support-card:hover {
  border-color: rgba(163, 227, 255, 0.36);
}

.support-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.support-card span:not(.support-icon) {
  color: var(--muted);
}

.video-area {
  margin-top: 44px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

.video-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.video-heading h3 {
  margin-bottom: 10px;
  font-size: 1.65rem;
  line-height: 1.15;
}

.video-heading p:not(.eyebrow) {
  color: var(--muted);
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #111418;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-thumb {
  background:
    linear-gradient(135deg, rgba(163, 227, 255, 0.18), transparent 40%),
    linear-gradient(315deg, rgba(240, 125, 146, 0.16), transparent 46%),
    #111418;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 46px;
  background: #ff0033;
  border-radius: 8px;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.play-button::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 13px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid var(--text);
}

.video-meta {
  display: block;
  padding: 16px;
}

.video-meta strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.video-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.support-section {
  background:
    linear-gradient(135deg, rgba(163, 227, 255, 0.1), transparent 32%),
    linear-gradient(315deg, rgba(240, 189, 97, 0.09), transparent 34%),
    rgba(9, 11, 13, 0.72);
}

.support-actions {
  align-items: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.support-card {
  min-height: 304px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bmc-card {
  align-items: center;
  gap: 10px;
  justify-content: center;
  text-align: center;
}

.bmc-button-slot {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  width: 100%;
}

.bmc-button-slot a {
  color: var(--teal);
  font-weight: 800;
}

.support-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 900;
}

.coffee .support-icon {
  background: var(--gold);
}

.patreon .support-icon {
  background: var(--rose);
}

.patreon {
  align-items: center;
  gap: 10px;
  justify-content: center;
  text-align: center;
}

.patreon-thumb {
  display: block;
  width: min(100%, 272px);
  height: 60px;
  margin: 12px auto 0;
  background: #16191d;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.patreon-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: 34px clamp(18px, 6vw, 88px);
  border-top: 1px solid var(--line);
}

.footer-profile {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 840px;
}

.footer-avatar {
  flex: 0 0 118px;
  width: 118px;
  height: 118px;
  object-fit: cover;
  border: 1px solid rgba(244, 240, 232, 0.18);
  border-radius: 8px;
}

.footer-title {
  margin-bottom: 5px;
  font-weight: 900;
}

.footer-bio {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.social-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.social-links img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 5px;
  transition: transform 160ms ease;
}

.social-links a:hover img {
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 92px;
    padding-bottom: 38px;
  }

  h1 {
    font-size: 2.7rem;
  }

  .section-heading h2 {
    font-size: 2.25rem;
  }

  .product-copy h3 {
    font-size: 1.42rem;
  }

  .product-layout,
  .video-links,
  .support-actions,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }

  .social-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2rem;
  }

  .section-heading h2 {
    font-size: 1.88rem;
  }

  .section {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .hero-copy {
    font-size: 1.04rem;
  }

  .button,
  .copy-link-button,
  .support-card,
  .video-link {
    width: 100%;
  }

  .repo-copy-row {
    grid-template-columns: 1fr;
  }
}
