/* =========================================================================
   FLOWLOCAL — design tokens
   Purple carries the brand (per your note). Gold is kept, but only for the
   literal star glyphs in the tap animation — that's just what stars look
   like, so it stays separate from the brand accent.
   ========================================================================= */
:root {
  --ink: #0b0b0d;
  --ink-2: #16161a;
  --ink-3: #232329;
  --line: #2b2b31;

  --paper: #f7f5ef;
  --paper-dim: #b6b3ab;
  --paper-faint: #706e68;

  --violet: #8b5cf6;
  --violet-2: #6d3fd1;
  --violet-deep: #4b2c8f;
  --violet-soft: rgba(139, 92, 246, 0.18);

  --star: #e8b441;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================================
   Reset
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  display: inline-block;
}

/* =========================================================================
   Ambient background — soft drifting glow, sits behind everything
   ========================================================================= */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
}
.ambient-bg span:nth-child(1) {
  width: 46vw; height: 46vw;
  max-width: 520px; max-height: 520px;
  background: var(--violet);
  top: -12%; left: -12%;
  animation: driftA 28s ease-in-out infinite alternate;
}
.ambient-bg span:nth-child(2) {
  width: 40vw; height: 40vw;
  max-width: 460px; max-height: 460px;
  background: var(--violet-deep);
  bottom: -14%; right: -10%;
  animation: driftB 34s ease-in-out infinite alternate;
}
.ambient-bg span:nth-child(3) {
  width: 26vw; height: 26vw;
  max-width: 320px; max-height: 320px;
  background: var(--violet-2);
  top: 38%; left: 60%;
  opacity: 0.18;
  animation: driftA 40s ease-in-out infinite alternate-reverse;
}
@keyframes driftA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5vw, 4vh) scale(1.18); }
}
@keyframes driftB {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4vw, -5vh) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-bg span { animation: none; }
}

/* =========================================================================
   Nav
   ========================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 12px 3px var(--violet-soft);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 0.92rem;
  color: var(--paper-dim);
}
.nav__links a:hover { color: var(--paper); }
.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--violet);
  color: var(--paper);
  font-weight: 600;
}
.nav__cta:hover { background: var(--violet-2); }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--violet); color: var(--paper); }
.btn-primary:hover { background: var(--violet-2); }
.btn-ghost { border-color: var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper-dim); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.text-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--paper-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.text-link:hover { color: var(--violet); border-color: var(--violet); }

/* =========================================================================
   Hero + signature tap animation
   ========================================================================= */
.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(60% 60% at 50% 0%, var(--violet-soft), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  margin: 18px 0 22px;
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--violet);
}
.hero p.lede {
  font-size: 1.08rem;
  color: var(--paper-dim);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* --- The tap scene: the one signature element on the page --- */
.tap-scene {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  will-change: transform;
}
.tap-scene__card {
  position: absolute;
  left: 8%;
  bottom: 12%;
  width: 62%;
  height: 68%;
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.tap-scene__card::after {
  content: '';
  position: absolute;
  inset: 14%;
  border: 1px dashed var(--violet-soft);
  border-radius: var(--radius-md);
}
.tap-scene__phone {
  position: absolute;
  right: 6%;
  top: 6%;
  width: 34%;
  height: 56%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.7);
  transform-origin: bottom center;
}
.tap-scene__phone::before {
  content: '';
  position: absolute;
  inset: 8% 12%;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--violet-soft), transparent 60%);
}
.tap-scene__ring {
  position: absolute;
  left: 30%;
  bottom: 30%;
  width: 26%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 1.5px solid var(--violet);
  opacity: 0;
  transform: scale(0.4);
}
.tap-scene__stars {
  position: absolute;
  left: 14%;
  bottom: 6%;
  display: flex;
  gap: 6px;
}
.tap-scene__stars .star {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--paper-faint);
  transform: scale(0.85);
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .tap-scene__phone { animation: phoneTap 6s var(--ease) infinite; }
  .tap-scene__ring { animation: ringPulse 6s var(--ease) infinite; }
  .tap-scene__stars .star {
    animation: starIgnite 6s var(--ease) infinite;
    animation-delay: calc(var(--i) * 0.16s);
  }
}
/* Reduced-motion / static fallback: settle in the "lit" state */
@media (prefers-reduced-motion: reduce) {
  .tap-scene__phone { transform: translateY(18px) rotate(-2deg); }
  .tap-scene__stars .star { color: var(--star); -webkit-text-stroke: 1px var(--star); transform: scale(1); }
}

@keyframes phoneTap {
  0%, 42% { transform: translateY(0) rotate(-6deg); }
  55%, 68% { transform: translateY(20px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(-6deg); }
}
@keyframes ringPulse {
  0%, 52% { opacity: 0; transform: scale(0.4); }
  60% { opacity: 0.7; transform: scale(0.7); }
  88% { opacity: 0; transform: scale(1.7); }
  100% { opacity: 0; transform: scale(1.7); }
}
@keyframes starIgnite {
  0%, 58% { color: transparent; -webkit-text-stroke: 1px var(--paper-faint); transform: scale(0.85); }
  68%, 90% { color: var(--star); -webkit-text-stroke: 1px var(--star); transform: scale(1); }
  100% { color: transparent; -webkit-text-stroke: 1px var(--paper-faint); transform: scale(0.85); }
}

/* =========================================================================
   Scroll reveal — 3D tilt-up entrance (the "immersive as you scroll" bit)
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: perspective(1200px) rotateX(10deg) translateY(26px);
  transform-origin: 50% 100%;
}
.reveal.is-visible {
  opacity: 1;
  transform: perspective(1200px) rotateX(0deg) translateY(0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   Section scaffolding
   ========================================================================= */
.section { padding: clamp(56px, 9vw, 104px) 0; position: relative; }
.section-head { max-width: 56ch; margin-bottom: clamp(36px, 6vw, 56px); }
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin: 14px 0 12px;
  line-height: 1.15;
}
.section-head p { color: var(--paper-dim); font-size: 1.02rem; }
.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

/* =========================================================================
   How it works (numbered — genuine sequence)
   ========================================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  background: linear-gradient(180deg, var(--ink-2), transparent);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.step__num {
  font-family: var(--font-mono);
  color: var(--violet);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: block;
}
.step h3 { font-size: 1.15rem; margin-bottom: 10px; }
.step p { color: var(--paper-dim); font-size: 0.95rem; }

/* =========================================================================
   Benefit grid
   ========================================================================= */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.benefit {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.25s ease, transform 0.2s var(--ease);
}
.benefit:hover { border-color: var(--violet-2); }
.benefit h3 { font-size: 1.05rem; margin-bottom: 8px; }
.benefit p { color: var(--paper-dim); font-size: 0.94rem; }
.benefit__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--violet-soft);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* =========================================================================
   Stat callout
   ========================================================================= */
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  background: linear-gradient(120deg, var(--ink-2), var(--ink));
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 5.2rem);
  color: var(--violet);
  line-height: 1;
}
.stat__copy p { color: var(--paper-dim); max-width: 52ch; }
.stat__copy p + p { margin-top: 10px; }

/* =========================================================================
   Trust / compliance strip
   ========================================================================= */
.trust {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.trust__mark {
  font-family: var(--font-mono);
  color: var(--violet);
  font-size: 1.4rem;
  line-height: 1;
}
.trust h3 { font-size: 1rem; margin-bottom: 6px; }
.trust p { color: var(--paper-dim); font-size: 0.94rem; }

/* =========================================================================
   CTA banner
   ========================================================================= */
.cta-banner {
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: clamp(40px, 8vw, 72px) clamp(20px, 6vw, 40px);
  background: radial-gradient(60% 100% at 50% 0%, var(--violet-soft), transparent 70%);
}
.cta-banner h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); max-width: 20ch; margin: 0 auto 26px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  position: relative;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer p {
  color: var(--paper-faint);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

/* =========================================================================
   Product page
   ========================================================================= */
.product-hero {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vw, 88px) 0;
}
.product-hero__frame {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 30px);
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
}
.product-hero__frame img {
  border-radius: var(--radius-md);
  width: 100%;
}
.product-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 16px 0 18px; }
.product-hero p.lede { color: var(--paper-dim); font-size: 1.04rem; max-width: 48ch; margin-bottom: 26px; }
.feature-list { display: flex; flex-direction: column; gap: 12px; }
.feature-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--paper-dim);
  font-size: 0.96rem;
}
.feature-list li::before {
  content: '—';
  color: var(--violet);
  flex-shrink: 0;
}

.swatches {
  display: flex;
  gap: 10px;
  margin: 22px 0 24px;
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.swatch:hover { color: var(--paper); }
.swatch__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.swatch__dot--black { background: #111114; }
.swatch__dot--white { background: #f7f5ef; }
.swatch.is-active {
  border-color: var(--violet);
  color: var(--paper);
  background: var(--violet-soft);
}
.swatch.is-active .swatch__dot { box-shadow: 0 0 0 2px var(--violet-soft); }
.swatch--text { padding: 9px 18px; }

.colour-note,
.platform-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--paper-faint);
  margin-top: 10px;
}
.colour-note span,
.platform-note span { color: var(--violet); font-weight: 600; }

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.pricing--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  margin-inline: auto;
}
.price-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.price-card--featured {
  border-color: var(--violet);
  background: linear-gradient(180deg, var(--violet-soft), var(--ink-2) 40%);
}
.price-card__badge {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--violet);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.price-card__qty { font-size: 1.05rem; color: var(--paper-dim); margin-bottom: 6px; }
.price-card__amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  margin-bottom: 4px;
}
.price-card__per {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--violet);
  margin-bottom: 22px;
}
.price-card hr.divider { margin: 20px 0; }
.price-card label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--paper-faint);
  display: block;
  margin-bottom: 6px;
}
.price-card input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--paper);
  font-size: 0.9rem;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}
.price-card input:focus { border-color: var(--violet); outline: none; }
.price-card input::placeholder { color: var(--paper-faint); }
.price-card .btn { margin-top: auto; }
.price-card__note {
  font-size: 0.78rem;
  color: var(--paper-faint);
  margin-top: 10px;
  text-align: center;
}
.price-card__error {
  font-size: 0.8rem;
  color: #e88a6a;
  margin-top: 10px;
  min-height: 1em;
}

.checkout-trust {
  text-align: center;
  margin-top: 40px;
  color: var(--paper-faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* =========================================================================
   Menu card mockup (used in place of a photo until a real one exists)
   ========================================================================= */
.menu-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 28px);
}
.menu-mock__card {
  width: min(100%, 300px);
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px;
  text-align: center;
}
.menu-mock__name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  border: 1px dashed var(--violet);
  border-radius: 999px;
  padding: 8px 16px;
}
.menu-mock__cta {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--paper);
}
.menu-mock__row {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--violet);
}
.menu-mock__row em { color: var(--paper-faint); font-style: normal; }

/* =========================================================================
   Simple status pages (success / cancel)
   ========================================================================= */
.status-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--gutter);
  position: relative;
}
.status-card { max-width: 480px; }
.status-card .mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--violet);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: var(--font-mono);
  font-size: 1.4rem;
}
.status-card h1 { font-size: 1.8rem; margin-bottom: 14px; }
.status-card p { color: var(--paper-dim); margin-bottom: 28px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .tap-scene { order: -1; width: min(70%, 300px); }
  .steps, .benefits, .pricing { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 1fr; text-align: left; }
  .product-hero { grid-template-columns: 1fr; }
  .trust { flex-direction: column; }
  .nav__links { gap: 14px; }
}
@media (max-width: 560px) {
  .nav__links span.sep { display: none; }
}
