:root {
  --bg: #0a0c0e;
  --bg-elevated: #12171b;
  --ink: #eef2f4;
  --muted: #8b969e;
  --line: #243038;
  --accent: #2dd4bf;
  --accent-deep: #0f766e;
  --accent-glow: rgba(45, 212, 191, 0.22);
  --warn: #d4a574;
  --font-display: "Syne", "Avenir Next", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(900px 520px at 78% 8%, rgba(15, 118, 110, 0.28), transparent 60%),
    radial-gradient(700px 420px at 8% 20%, rgba(45, 212, 191, 0.08), transparent 55%),
    linear-gradient(180deg, #0d1114 0%, var(--bg) 42%, #080a0c 100%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #5eead4;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Top bar (minimal; brand lives in hero) —— */
.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  font-size: 0.92rem;
}

.top a {
  color: var(--muted);
  text-decoration: none;
}

.top a:hover {
  color: var(--ink);
}

/* —— Hero: one composition —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 35%, rgba(10, 12, 14, 0.55) 62%, var(--bg) 92%),
    radial-gradient(ellipse 80% 55% at 70% 40%, rgba(45, 212, 191, 0.12), transparent 70%);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 65% 35%, black, transparent);
  opacity: 0.5;
}

.keyboard-stage {
  position: absolute;
  right: max(-4%, calc(50% - 36rem));
  top: 12%;
  width: min(58vw, 640px);
  aspect-ratio: 16 / 10;
  transform: perspective(900px) rotateY(-12deg) rotateX(8deg);
  transform-origin: center;
  animation: stage-in 1.1s var(--ease) both;
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: perspective(900px) rotateY(-12deg) rotateX(8deg) translateY(28px);
  }
  to {
    opacity: 1;
    transform: perspective(900px) rotateY(-12deg) rotateX(8deg) translateY(0);
  }
}

.keyboard {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  padding: 4.5% 3.5% 5%;
  background:
    linear-gradient(145deg, #1a2228 0%, #0e1317 55%, #151c22 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 2.2%;
}

.key-row {
  display: grid;
  gap: 1.6%;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.key-row.offset-1 {
  padding-left: 3%;
}

.key-row.offset-2 {
  padding-left: 7%;
}

.key {
  border-radius: 7px;
  background: linear-gradient(180deg, #2a333b 0%, #1c242b 100%);
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.key.wide {
  grid-column: span 2;
}

.key.hit {
  background: linear-gradient(180deg, #3dfff0 0%, var(--accent-deep) 100%);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 0 22px var(--accent-glow);
  animation: key-pulse 2.4s var(--ease) infinite;
}

.key.hit:nth-child(2) {
  animation-delay: 0.35s;
}

.key.hit:nth-child(5) {
  animation-delay: 0.7s;
}

@keyframes key-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

.wave {
  position: absolute;
  left: 8%;
  bottom: 22%;
  width: min(34vw, 320px);
  height: 64px;
  opacity: 0.55;
  animation: wave-in 1.2s 0.2s var(--ease) both;
}

@keyframes wave-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 0.55;
    transform: translateY(0);
  }
}

.wave span {
  display: inline-block;
  width: 4px;
  margin-right: 5px;
  height: 20%;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: bottom;
  animation: bar 1.1s ease-in-out infinite;
}

.wave span:nth-child(2) {
  animation-delay: 0.08s;
  height: 45%;
}
.wave span:nth-child(3) {
  animation-delay: 0.16s;
  height: 80%;
}
.wave span:nth-child(4) {
  animation-delay: 0.24s;
  height: 55%;
}
.wave span:nth-child(5) {
  animation-delay: 0.32s;
  height: 95%;
}
.wave span:nth-child(6) {
  animation-delay: 0.4s;
  height: 40%;
}
.wave span:nth-child(7) {
  animation-delay: 0.48s;
  height: 70%;
}
.wave span:nth-child(8) {
  animation-delay: 0.56s;
  height: 35%;
}
.wave span:nth-child(9) {
  animation-delay: 0.64s;
  height: 60%;
}
.wave span:nth-child(10) {
  animation-delay: 0.72s;
  height: 25%;
}

@keyframes bar {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1);
  }
}

.hero-copy {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(6rem, 14vh, 9rem) 0 clamp(3.5rem, 8vh, 5rem);
  animation: copy-in 0.9s var(--ease) both;
}

@keyframes copy-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.1rem;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0;
}

.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 0 0.85rem;
  line-height: 1.2;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 34ch;
  font-size: 1.08rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #042f2e;
}

.btn-primary:hover {
  background: #5eead4;
  color: #042f2e;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--ink);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent-deep);
  color: var(--ink);
}

.privacy-line {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 42ch;
}

/* —— Sections —— */
.section {
  padding: clamp(3.5rem, 9vh, 5.5rem) 0;
  border-top: 1px solid var(--line);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  font-weight: 700;
}

.section .support {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 42ch;
}

.media-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 220px;
}

.media-frame img {
  width: 100%;
  height: auto;
}

.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.06), transparent 40%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.015) 10px,
      rgba(255, 255, 255, 0.015) 11px
    );
}

.media-placeholder strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.download-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 1.5rem;
}

.download-option {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 23, 27, 0.85);
}

.download-option h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.download-option p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.note {
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--warn);
  background: rgba(212, 165, 116, 0.08);
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.note strong {
  color: var(--ink);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.meta-row code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--bg-elevated);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.trust-list li {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.trust-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.trust-list strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
}

.trust-list span {
  color: var(--muted);
}

footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site-foot .foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

footer.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

footer.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

footer.site-foot a:hover {
  color: var(--ink);
}

/* —— Inner pages —— */
.page {
  padding: 5.5rem 0 3rem;
}

.page .brand-name {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 1.5rem 0 0.75rem;
}

.reasons {
  display: grid;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.reason {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.reason:hover,
.reason[aria-pressed="true"] {
  border-color: var(--accent-deep);
  background: rgba(45, 212, 191, 0.08);
}

.steps {
  margin: 1.25rem 0 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.steps li {
  margin: 0.55rem 0;
}

.steps strong {
  color: var(--ink);
}

@media (max-width: 860px) {
  .keyboard-stage {
    position: absolute;
    right: -8%;
    top: 6%;
    width: 78vw;
    opacity: 0.55;
  }

  .wave {
    display: none;
  }

  .hero-copy {
    padding-top: clamp(10rem, 42vh, 16rem);
  }

  .headline {
    max-width: 22ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
