/* pulse.shop — tokens ported from pulse/web globals.css. Deliberately
   light-only: the marketing surface is the Apple-soft light look regardless
   of OS theme. */

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Europa Grotesk med ext: reserved for the lowercase `pulse` wordmark,
   mirroring the iOS app (BrandFont.swift). */
@font-face {
  font-family: 'Europa';
  src: url('/assets/fonts/europa.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: oklch(0.985 0.002 264);
  --fg: oklch(0.17 0.005 264);
  --card: oklch(1 0 0);
  --muted: oklch(0.5 0.005 264);
  --border: oklch(0.92 0.003 264);
  --signal: oklch(0.7 0.16 150);
  --tile-bg: rgb(255 255 255 / 0.6);
  --tile-ring: rgb(255 255 255 / 0.7);
  --wash-from: rgb(231 229 228 / 0.55); /* stone-200 */
  --wash-via: rgb(245 245 244 / 0.25);  /* stone-100 */
  --shadow-soft:
    0 1px 2px color-mix(in oklab, var(--fg) 4%, transparent),
    0 8px 24px -12px color-mix(in oklab, var(--fg) 8%, transparent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; user-select: none; }

/* ---- Nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 6%, transparent);
}

.nav-inner {
  margin: 0 auto;
  max-width: 80rem;
  padding: 0.625rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  padding: 0.375rem 0;
  font-family: 'Europa', 'Geist', sans-serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.014em;
  color: var(--fg);
  text-decoration: none;
  user-select: none;
}

.nav-cta {
  background: var(--fg);
  color: var(--bg);
  border-radius: 9999px;
  padding: 0.375rem 0.875rem;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.nav-cta:hover { background: color-mix(in oklab, var(--fg) 90%, transparent); }

/* ---- Hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 0 2.5rem;
}

.hero-copy {
  position: relative;
  margin: 0 auto;
  max-width: 48rem;
  padding-top: 5rem;
  padding-bottom: 2rem;
  text-align: center;
}

.hero-copy h1 {
  font-size: 64px;
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-copy h1 .dim { color: color-mix(in oklab, var(--fg) 35%, transparent); }

.hero-copy p {
  margin: 1.75rem auto 0;
  max-width: 36rem;
  font-size: 18px;
  line-height: 1.625;
  letter-spacing: -0.025em;
  color: var(--muted);
}

/* ---- Phone showcase ---- */

.showcase {
  position: relative;
  margin: 0 auto;
  height: 600px;
  width: 100%;
  max-width: 760px;
}

.showcase-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28rem;
  height: 24rem;
  border-radius: 9999px;
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--fg) 4%, transparent),
    transparent
  );
  filter: blur(64px);
}

.phone {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 250px;
  user-select: none;
}

.phone > img {
  position: relative;
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 24px 50px rgb(15 15 20 / 0.18));
}

.phone-ground {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.5rem;
  height: 3rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--fg) 15%, transparent);
  filter: blur(40px);
}

/* Modern iOS banner anatomy, ported from the app's VignetteNotification:
   app icon left, title + message stacked, glass card. Sizes are the app's
   330pt banner scaled to the 250px phone mock. */
.notification {
  position: absolute;
  top: 10%;
  left: 8%;
  right: 8%;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 13px;
  background: rgb(255 255 255 / 0.88);
  padding: 9px;
  box-shadow:
    0 6px 18px -6px rgb(0 0 0 / 0.18),
    inset 0 0 0 0.5px rgb(255 255 255 / 0.7);
  backdrop-filter: blur(12px);
  color: #111;
}

.notification-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 5.5px;
}

.notification-text { min-width: 0; }

.notification-title {
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.notification-sub {
  margin-top: 1px;
  font-size: 9.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  opacity: 0.75;
}

/* ---- Floating tiles ---- */

.tile {
  position: absolute;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: var(--tile-bg);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  box-shadow:
    0 18px 40px -12px rgb(15 15 20 / 0.18),
    0 4px 10px -4px rgb(15 15 20 / 0.08),
    inset 0 0 0 1px var(--tile-ring);
  transform: rotate(var(--tile-rotate, 0deg));
  animation: tile-bob 5.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0.7), rgb(255 255 255 / 0) 50%, transparent);
  pointer-events: none;
}

.tile::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  top: 1px;
  height: 1px;
  border-radius: 9999px;
  background: white;
  pointer-events: none;
}

.tile-lg { width: 96px; height: 96px; }
.tile-md { width: 76px; height: 76px; }

.tile-icon {
  position: relative;
  width: 36px;
  height: 36px;
  color: color-mix(in oklab, var(--fg) 55%, transparent);
}

.tile-icon-lg { width: 48px; height: 48px; }

.tile-icon img,
.tile-icon svg { width: 100%; height: 100%; object-fit: contain; }

.tile-gpu      { top: 6%; left: 6%; --tile-rotate: -8deg; animation-delay: 0s; }
.tile-camera   { top: 10%; right: 8%; --tile-rotate: 7deg; animation-delay: -1.8s; }
.tile-memory   { top: calc(44% - 38px); left: 2%; --tile-rotate: -4deg; animation-delay: -3.6s; }
.tile-cpu      { top: 40%; right: 3%; --tile-rotate: 5deg; animation-delay: -0.9s; }
.tile-storage  { bottom: 14%; left: 10%; --tile-rotate: 4deg; animation-delay: -2.7s; }
.tile-handheld { bottom: 10%; right: 10%; --tile-rotate: -6deg; animation-delay: -4.5s; }

/* ---- App Store badge ---- */

.badge-row {
  position: relative;
  margin-top: -1rem;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 12px;
  background: black;
  color: white;
  padding: 0.5rem 1rem;
  box-shadow:
    0 10px 24px -12px rgb(0 0 0 / 0.4),
    0 2px 4px -2px rgb(0 0 0 / 0.2),
    inset 0 0 0 1px rgb(255 255 255 / 0.1);
  user-select: none;
}

.appstore-badge svg { width: 28px; height: 28px; }

.appstore-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.appstore-small { font-size: 9px; letter-spacing: -0.025em; }

.appstore-big {
  margin-top: 0.25rem;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.badge-caption {
  font-size: 12.5px;
  letter-spacing: -0.025em;
  color: var(--muted);
}

/* ---- Featured categories ---- */

.featured {
  margin: 0 auto;
  max-width: 72rem;
  padding: 4rem 2.5rem 5rem;
}

.featured-head {
  margin: 0 auto 3rem;
  max-width: 48rem;
  text-align: center;
}

.featured-head h2 {
  font-size: 44px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.featured-head p {
  margin: 1rem auto 0;
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.625;
  letter-spacing: -0.025em;
  color: var(--muted);
}

.grid { display: grid; gap: 1.25rem; }

.grid-lg { grid-template-columns: repeat(2, 1fr); }
.grid-md { grid-template-columns: repeat(4, 1fr); margin-top: 1.25rem; }

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px color-mix(in oklab, var(--fg) 6%, transparent);
}

.card-lg { min-height: 420px; }
.card-md { min-height: 320px; }

.card-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, var(--wash-from), var(--wash-via), transparent);
}

.card-illo {
  position: absolute;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}

.card-illo img { width: 100%; height: 100%; object-fit: contain; }

.card-gpu .card-illo { right: -3rem; bottom: -5rem; width: 23rem; height: 23rem; }
.card-trainers .card-illo { right: 2rem; bottom: 3rem; width: 21rem; height: 9.5rem; }

.card-md .card-illo {
  right: 50%;
  bottom: 4rem;
  width: 11.5rem;
  height: 5.25rem;
  transform: translateX(50%);
}

/* PS5 Pro asset is a detail crop: centered, rising out of the card's bottom
   edge; its cut top and right edges fade into the wash. */
.card-consoles .card-illo {
  right: 50%;
  bottom: 0;
  width: 6.75rem;
  height: 12.5rem;
  transform: translateX(50%);
  mask-image: linear-gradient(to left, transparent 0, black 14%);
  -webkit-mask-image: linear-gradient(to left, transparent 0, black 14%);
}

.card-consoles .card-illo img {
  object-position: center bottom;
  mask-image: linear-gradient(to top, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 78%, transparent 100%);
}

.card-fragrance .card-illo { width: 7rem; height: 9.5rem; bottom: 2.5rem; }

.card-body {
  position: relative;
  display: flex;
  height: 100%;
  min-height: inherit;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
}

.card-md .card-body { padding: 2rem; }

.card h3 {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.card-md h3 { font-size: 28px; line-height: 1.1; }

/* ---- Footer ---- */

.footer { border-top: 1px solid color-mix(in oklab, var(--border) 40%, transparent); }

.footer-inner {
  margin: 0 auto;
  max-width: 72rem;
  padding: 3rem 2.5rem;
  letter-spacing: -0.025em;
}

.footer-top {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-mark {
  font-family: 'Europa', 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.014em;
}

.footer-brand p {
  margin-top: 0.375rem;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 13.5px;
}

.footer-links a {
  color: color-mix(in oklab, var(--fg) 70%, transparent);
  text-decoration: none;
  transition: color 150ms ease;
}

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

.footer-disclosure {
  margin-top: 2rem;
  max-width: 60ch;
  font-size: 12.5px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--muted) 80%, transparent);
}

.footer-legal {
  margin-top: 0.75rem;
  font-size: 12.5px;
  color: color-mix(in oklab, var(--muted) 80%, transparent);
}

/* ---- Legal pages ---- */

.legal {
  margin: 0 auto;
  max-width: 42rem;
  padding: 4rem 2.5rem 5rem;
}

.legal h1 {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.legal .updated {
  margin-top: 0.75rem;
  font-size: 13px;
  color: var(--muted);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal p,
.legal li {
  margin-top: 0.75rem;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: color-mix(in oklab, var(--fg) 80%, transparent);
}

.legal ul { padding-left: 1.25rem; }

.legal a { color: var(--fg); }

/* ---- Animation ---- */

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.78); }
}

@keyframes tile-bob {
  0%, 100% { transform: rotate(var(--tile-rotate, 0deg)) translateY(0); }
  50% { transform: rotate(var(--tile-rotate, 0deg)) translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Responsive ---- */

@media (min-width: 640px) {
  .footer-top { flex-direction: row; }
}

@media (max-width: 1024px) {
  .grid-md { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0.625rem 1.25rem; }
  .hero { padding: 0 1.25rem; }
  .featured { padding: 3rem 1.25rem 4rem; }
  .footer-inner { padding: 2.5rem 1.25rem; }

  .hero-copy { padding-top: 3.5rem; }
  .hero-copy h1 { font-size: 44px; }
  .hero-copy p { font-size: 16px; }

  .showcase { height: 480px; }
  .phone { width: 210px; }
  .tile-lg { width: 76px; height: 76px; }
  .tile-md { width: 60px; height: 60px; }
  .tile-icon { width: 28px; height: 28px; }
  .tile-icon-lg { width: 36px; height: 36px; }
  .tile-memory, .tile-cpu { display: none; }

  .featured-head h2 { font-size: 32px; }
  .grid-lg, .grid-md { grid-template-columns: 1fr; }
  .card-lg { min-height: 360px; }

  .legal { padding: 3rem 1.25rem 4rem; }
  .legal h1 { font-size: 32px; }
}
