:root {
  /* Premium product — graphite + keycap cream (no neon / esports) */
  --bg0: #121314;
  --bg1: #1a1b1d;
  --ink: #f3f0ea;
  --muted: #9c9891;
  --line: rgba(243, 240, 234, 0.1);
  --accent: #e8e2d8;
  --accent-ink: #1c1a17;
  --accent-dim: rgba(232, 226, 216, 0.08);
  --warm: #c4b09a;
  --radius: 16px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --max: 1080px;
  --pad-x: clamp(1rem, 4vw, 1.5rem);
  --section-y: clamp(2.75rem, 8vw, 4.5rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.05rem);
  line-height: 1.55;
  overflow-x: clip;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  background:
    radial-gradient(1100px 640px at 78% -8%, rgba(232, 226, 216, 0.07), transparent 58%),
    radial-gradient(800px 520px at -8% 40%, rgba(196, 176, 154, 0.05), transparent 52%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 48%, #0e0f10);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(0.85rem + var(--safe-top)) var(--pad-x) 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
  border-bottom: none;
  isolation: isolate;
}

/* Soft veil that fades into the page — logo/nav stay fully opaque */
.top::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  translate: -50% 0;
  top: 0;
  width: 100vw;
  height: calc(100% + 0.5rem);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(18, 19, 20, 0.72) 0%,
    rgba(18, 19, 20, 0.38) 52%,
    rgba(18, 19, 20, 0.08) 78%,
    rgba(18, 19, 20, 0) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 48%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 48%, transparent 100%);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
}

.brand-mark__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark__icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.brand-mark__name {
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem 1rem;
  align-items: center;
  flex-shrink: 0;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.nav-cta {
  color: var(--accent-ink) !important;
  background: var(--accent);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) var(--pad-x) clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.25rem, 4vw, 2rem);
  align-items: center;
  min-height: calc(100dvh - 72px);
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-brand {
  margin: 0;
}

.hero-brand__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8.5vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(220px, 42vw, 380px);
}

.hero-logo {
  position: relative;
  width: min(86%, 440px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}

.section.band {
  max-width: none;
  padding-left: max(var(--pad-x), calc((100% - var(--max)) / 2));
  padding-right: max(var(--pad-x), calc((100% - var(--max)) / 2));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  border-block: 1px solid var(--line);
}

.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.5vw, 2.6rem);
  letter-spacing: -0.03em;
}

.section-lede {
  margin: 0.7rem 0 0;
  color: var(--muted);
  max-width: 36rem;
}

.feature-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.feature-list li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.feature-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  margin-bottom: 0.35rem;
}

.feature-list span {
  color: var(--muted);
}

.steps {
  margin: 1.6rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  max-width: 40rem;
}

.steps li {
  margin: 0.65rem 0;
  padding-right: 0.25rem;
}

.steps strong {
  color: var(--ink);
}

.hint {
  margin-top: 1.2rem;
  color: var(--warm);
  font-size: 0.95rem;
}

code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  word-break: break-word;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.8rem;
  max-width: 720px;
}

.link-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 72px;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--accent-dim);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-tile:hover {
  border-color: rgba(232, 226, 216, 0.35);
  transform: translateY(-2px);
}

.link-tile .label {
  font-family: var(--font-display);
  font-weight: 700;
}

.link-tile .meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--pad-x) calc(2.5rem + var(--safe-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.foot strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
}

.foot a {
  color: inherit;
  text-underline-offset: 0.15em;
}

.hero-copy,
.hero-visual,
.section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-copy.in,
.hero-visual.in,
.section.in {
  opacity: 1;
  transform: none;
}

.hero-visual {
  transition-delay: 0.12s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* —— Tablet —— */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
    padding-top: 1.25rem;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    min-height: clamp(200px, 48vw, 300px);
  }

  .hero-logo {
    width: min(58%, 300px);
  }

  .section-lede {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .section h2 {
    text-align: center;
  }

  .feature-list {
    text-align: left;
  }

  .steps {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .hint {
    text-align: center;
  }

  .link-grid {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row.centered,
  #download .cta-row {
    justify-content: center;
  }
}

/* —— Compact tablet / large phone —— */
@media (max-width: 720px) {
  .feature-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  nav a:not(.nav-cta) {
    display: none;
  }
}

/* —— Phone —— */
@media (max-width: 560px) {
  .brand-mark__icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .brand-mark__icon img {
    width: 30px;
    height: 30px;
  }

  .hero-logo {
    width: min(72%, 260px);
  }

  .cta-row {
    width: 100%;
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
  }

  .link-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
  }

  .section.band {
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
  }
}

/* —— Very small —— */
@media (max-width: 380px) {
  .nav-cta {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .hero-brand__name {
    font-size: clamp(2.2rem, 12vw, 2.8rem);
  }
}

/* —— Wide desktop —— */
@media (min-width: 1200px) {
  .hero-logo {
    width: min(90%, 460px);
  }
}

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

  .hero-logo {
    animation: none;
  }

  .hero-copy,
  .hero-visual,
  .section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .link-tile:hover {
    transform: none;
  }
}

/* —— Touch: no hover lift reliance —— */
@media (hover: none) {
  .btn:hover,
  .link-tile:hover {
    transform: none;
  }

  .link-tile:active {
    border-color: rgba(232, 226, 216, 0.35);
  }
}
