:root {
  --bg: #000;
  --bg-elevated: #0a0a0c;
  --bg-card: rgba(22, 22, 28, 0.72);
  --text: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.72);
  --text-tertiary: rgba(245, 245, 247, 0.48);
  --accent: #2997ff;
  --accent-soft: rgba(41, 151, 255, 0.18);
  --glow: rgba(88, 101, 242, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 20px;
  --radius-lg: 28px;
  --nav-h: 52px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --content-max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 10vw, 120px);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Display',
    'SF Pro Text',
    'PingFang SC',
    'Helvetica Neue',
    sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Nav ── */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gutter);
  padding-top: env(safe-area-inset-top, 0);
  transition:
    background 0.45s var(--ease-out),
    backdrop-filter 0.45s var(--ease-out),
    border-color 0.45s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  border-color: var(--border);
}

.nav-inner {
  width: min(var(--content-max), 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 10px);
  font-size: clamp(0.84rem, 2.5vw, 0.92rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  min-width: 0;
}

.nav-brand img {
  width: clamp(26px, 7vw, 28px);
  height: clamp(26px, 7vw, 28px);
  border-radius: 7px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

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

.nav-cta {
  flex-shrink: 0;
  padding: 8px clamp(12px, 3vw, 16px);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: clamp(0.72rem, 2.5vw, 0.78rem);
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.nav-cta:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(41, 151, 255, 0.35);
}

/* ── Hero ── */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding:
    calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(32px, 6vw, 48px))
    var(--gutter)
    clamp(48px, 8vw, 80px);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.06);
  animation: heroKenBurns 18s var(--ease-out) infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.2) 32%, rgba(0, 0, 0, 0.94) 90%),
    radial-gradient(ellipse 90% 55% at 50% 18%, rgba(88, 101, 242, 0.22), transparent 62%);
}

@keyframes heroKenBurns {
  from {
    transform: scale(1.06) translateY(0);
  }
  to {
    transform: scale(1.1) translateY(-1.5%);
  }
}

.hero-glow {
  position: absolute;
  width: min(72vw, 560px);
  height: min(72vw, 560px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 68%);
  top: clamp(6%, 12vw, 12%);
  left: 50%;
  translate: -50% 0;
  filter: blur(60px);
  opacity: 0.5;
  animation: pulseGlow 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  from {
    opacity: 0.32;
    transform: scale(0.95);
  }
  to {
    opacity: 0.58;
    transform: scale(1.06);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
}

.hero-eyebrow {
  margin: 0 0 clamp(8px, 2vw, 12px);
  font-size: clamp(0.72rem, 2.2vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.2s forwards;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 8.5vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.35s forwards;
}

.hero-sub {
  margin: clamp(14px, 3vw, 20px) auto 0;
  max-width: min(520px, 100%);
  font-size: clamp(0.95rem, 2.8vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.5s forwards;
}

.hero-actions {
  margin-top: clamp(22px, 4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.65s forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px clamp(20px, 5vw, 28px);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: clamp(0.92rem, 2.8vw, 1rem);
  font-weight: 600;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(41, 151, 255, 0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 12px clamp(18px, 4vw, 24px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  font-size: clamp(0.92rem, 2.8vw, 1rem);
  font-weight: 500;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-version {
  margin-top: 12px;
  font-size: clamp(0.72rem, 2.2vw, 0.78rem);
  color: var(--text-tertiary);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.8s forwards;
}

/* ── Sections ── */

.section {
  padding: var(--section-y) var(--gutter);
  position: relative;
}

.section-inner {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
}

.section-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0;
  font-size: clamp(1.65rem, 5.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section-lead {
  margin: clamp(12px, 2.5vw, 16px) 0 0;
  max-width: min(560px, 100%);
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  line-height: 1.55;
  color: var(--text-secondary);
}

.section-lead--center {
  margin-inline: auto;
}

/* ── Feature showcase ── */

.showcase {
  background: var(--bg-elevated);
}

.feature-grid {
  margin-top: clamp(36px, 6vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.5vw, 20px);
}

.feature-card {
  padding: clamp(20px, 4vw, 28px) clamp(18px, 3.5vw, 24px);
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px);
  transition:
    transform 0.45s var(--ease-out),
    border-color 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.feature-icon {
  width: clamp(40px, 10vw, 44px);
  height: clamp(40px, 10vw, 44px);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: clamp(12px, 2.5vw, 18px);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.02rem, 3vw, 1.15rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  font-size: clamp(0.86rem, 2.4vw, 0.92rem);
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Bento / visual block ── */

.bento {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(14px, 2.5vw, 20px);
  align-items: stretch;
}

.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: clamp(260px, 42vw, 360px);
  background: linear-gradient(145deg, #12121a, #0a0a10);
}

.bento-card.large {
  min-height: clamp(300px, 52vw, 420px);
}

.bento-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(16px, 4vw, 24px);
}

.bento-orb {
  width: clamp(160px, 42vw, 280px);
  height: clamp(160px, 42vw, 280px);
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    rgba(41, 151, 255, 0.5),
    rgba(88, 101, 242, 0.35),
    rgba(35, 165, 89, 0.25),
    rgba(41, 151, 255, 0.5)
  );
  filter: blur(2px);
  animation: spinSlow 14s linear infinite;
}

.bento-orb::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.15), transparent 55%),
    #0c0c12;
}

@keyframes spinSlow {
  to {
    transform: rotate(360deg);
  }
}

.bento-screen {
  position: relative;
  width: min(88%, 420px);
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #1a1a24 0%, #0e0e14 100%);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bento-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(41, 151, 255, 0.08) 50%, transparent 100%);
  animation: shimmer 3.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

.screen-ui {
  position: absolute;
  inset: 12% 8% 8%;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 20%, rgba(88, 101, 242, 0.35), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(35, 165, 89, 0.2), transparent 40%),
    #15151f;
}

.screen-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}

.screen-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.screen-dot.live {
  background: #23a559;
  box-shadow: 0 0 10px rgba(35, 165, 89, 0.7);
}

.bento-copy {
  position: absolute;
  left: clamp(16px, 4vw, 28px);
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 2;
}

.bento-copy h3 {
  margin: 0 0 6px;
  font-size: clamp(1.15rem, 3.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-copy p {
  margin: 0;
  font-size: clamp(0.86rem, 2.5vw, 0.95rem);
  color: var(--text-secondary);
  line-height: 1.5;
}

.bento-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.5vw, 20px);
  min-height: 0;
}

.stat-card {
  flex: 1;
  padding: clamp(20px, 4vw, 28px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
}

.stat-value {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 30%, rgba(255, 255, 255, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  margin: 6px 0 0;
  font-size: clamp(0.82rem, 2.4vw, 0.88rem);
  color: var(--text-secondary);
}

/* ── Download ── */

.download {
  text-align: center;
  padding-bottom: clamp(80px, 12vw, 140px);
}

.download-card {
  margin: clamp(32px, 5vw, 48px) auto 0;
  width: min(640px, 100%);
  padding: clamp(28px, 6vw, 48px) clamp(20px, 5vw, 40px);
  border-radius: clamp(20px, 4vw, 32px);
  background: linear-gradient(160deg, rgba(41, 151, 255, 0.12), rgba(88, 101, 242, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.download-card img {
  width: clamp(72px, 18vw, 88px);
  height: clamp(72px, 18vw, 88px);
  margin: 0 auto clamp(14px, 3vw, 20px);
  border-radius: clamp(18px, 4vw, 22px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.download-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 700;
}

.download-card .btn-primary {
  width: min(100%, 320px);
}

.download-meta {
  margin: 0 0 clamp(20px, 4vw, 28px);
  font-size: clamp(0.84rem, 2.5vw, 0.9rem);
  color: var(--text-secondary);
}

.download-note {
  margin: 14px 0 0;
  font-size: clamp(0.72rem, 2.2vw, 0.78rem);
  color: var(--text-tertiary);
  line-height: 1.5;
  word-break: break-word;
}

.download-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Footer ── */

.footer {
  padding: clamp(28px, 5vw, 40px) var(--gutter) calc(clamp(32px, 5vw, 48px) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-tertiary);
  font-size: clamp(0.72rem, 2.2vw, 0.78rem);
}

.footer p {
  margin: 4px 0;
  padding-inline: 8px;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }

  .bento-stack {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .bento-stack .stat-card {
    flex: 1.1;
  }

  .bento-stack .bento-card {
    flex: 1.4;
    min-height: clamp(240px, 36vw, 300px);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 48px;
  }

  .nav-links {
    display: none;
  }

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

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

  .bento-stack {
    flex-direction: column;
  }

  .bento-card.large {
    min-height: clamp(280px, 72vw, 360px);
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 br {
    display: none;
  }

  .hero-bg img {
    object-position: center 22%;
  }

  .nav-brand span {
    display: none;
  }

  .nav-brand::after {
    content: 'Pigeon';
    font-size: 0.84rem;
  }

  .bento-copy {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72) 35%);
    padding-top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    padding-inline: 16px;
    padding-bottom: 16px;
  }
}

@media (min-width: 1400px) {
  :root {
    --content-max: 1140px;
  }

  .hero h1 {
    font-size: 5.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}