@font-face {
  font-family: "SupercellMagic";
  src: url("/assets/SupercellMagic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --bg-elevated: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --green: #22c55e;
  --radius: 16px;
  --max: 1080px;
  --pad: clamp(1rem, 4vw, 1.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;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

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

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.nav,
main,
.footer {
  position: relative;
  z-index: 1;
  width: 100%;
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(0.9rem + var(--safe-top)) var(--pad) 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-family: "SupercellMagic", system-ui, sans-serif;
  letter-spacing: 0.04em;
  font-size: clamp(0.9rem, 3.5vw, 1rem);
  min-width: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.nav nav {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 3vw, 1.1rem);
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(0.8rem, 2.8vw, 0.9rem);
  font-weight: 600;
  padding: 0.35rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) var(--pad) clamp(2rem, 6vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.kicker {
  font-size: clamp(0.62rem, 2.2vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--faint);
  margin: 0 0 0.75rem;
  word-break: break-word;
}

.hero h1 {
  font-family: "SupercellMagic", system-ui, sans-serif;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.lede {
  color: var(--muted);
  font-size: clamp(0.98rem, 3.2vw, 1.1rem);
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: clamp(0.88rem, 2.8vw, 0.95rem);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
  text-align: center;
}

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

.btn.primary {
  background: var(--text);
  color: var(--bg);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn.wide {
  width: 100%;
  max-width: 28rem;
}

.fine {
  color: var(--faint);
  font-size: clamp(0.78rem, 2.6vw, 0.85rem);
  margin: 0;
  line-height: 1.45;
}

.fine a {
  color: var(--muted);
}

.hero-art {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.phone {
  width: min(280px, 100%);
  max-width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: clamp(20px, 5vw, 28px);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #18181b 0%, #09090b 55%, #111113 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: clamp(1rem, 4vw, 1.5rem) clamp(0.9rem, 3vw, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 10px;
  width: min(90px, 32%);
  height: 18px;
  border-radius: 999px;
  background: #000;
}

.phone-icon {
  width: min(160px, 48%);
  height: auto;
  aspect-ratio: 1;
  border-radius: 28px;
  border: 1px solid var(--border);
  margin-top: 1rem;
}

.phone-title {
  font-family: "SupercellMagic", system-ui, sans-serif;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  margin: 0.5rem 0 0;
  letter-spacing: 0.06em;
}

.phone-sub {
  margin: 0;
  color: var(--faint);
  font-size: clamp(0.75rem, 2.8vw, 0.85rem);
  text-align: center;
}

.score-chip {
  margin-top: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.9);
}

.score-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.score-num {
  font-family: "SupercellMagic", system-ui, sans-serif;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad) clamp(2.5rem, 7vw, 3.5rem);
}

.section h2 {
  font-family: "SupercellMagic", system-ui, sans-serif;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  letter-spacing: 0.03em;
  margin: 0 0 1.25rem;
  line-height: 1.2;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.25rem);
  min-width: 0;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(0.95rem, 3vw, 1rem);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 2.8vw, 0.95rem);
}

.download-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 4vw, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
}

.download-panel p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

.privacy p {
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
  font-size: clamp(0.92rem, 3vw, 1rem);
}

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

.footer .muted {
  color: var(--faint);
  font-weight: 400;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

/* Tablet */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-art {
    order: -1;
  }

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

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

  .cta-row {
    justify-content: center;
    width: 100%;
  }

  .phone {
    width: min(220px, 58vw);
  }
}

/* Phone */
@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .brand {
    justify-content: center;
  }

  .nav nav {
    justify-content: center;
    width: 100%;
  }

  .hero {
    padding-top: 0.75rem;
    padding-bottom: 2rem;
    gap: 1.25rem;
  }

  .kicker {
    letter-spacing: 0.1em;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .phone {
    width: min(200px, 56vw);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  }

  .phone-icon {
    border-radius: 22px;
  }

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

  .download-panel {
    align-items: stretch;
    text-align: left;
  }

  .download-panel .btn.wide {
    max-width: none;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .nav nav {
    gap: 0.5rem 0.75rem;
  }

  .nav a {
    font-size: 0.78rem;
  }

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

  .phone {
    width: min(180px, 62vw);
  }
}

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

  .btn:hover {
    transform: none;
  }
}
