/* Metrikya — mobile-first styles */
:root {
  --orange: #FF5A1F;
  --orange-dark: #E44A12;
  --black: #0B0B0F;
  --ink: #1A1A20;
  --offwhite: #FAF7F4;
  --sand: #F1ECE6;
  --muted: #5E5A57;
  --muted-on-dark: #B9B4AF;
  --line: #E4DED7;
  --line-dark: #26262E;
  --radius: 14px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 620px; }
.accent { color: var(--orange); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); }
.btn--ghost { border-color: rgba(250,247,244,.35); color: var(--offwhite); }
.btn--ghost:hover { border-color: var(--offwhite); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,11,15,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand img { height: 26px; width: auto; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--black); color: var(--offwhite);
  padding: 52px 0 72px;
}
.hero__dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(250,247,244,.09) 2px, transparent 2.5px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero__dots::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--orange); opacity: .18; filter: blur(60px);
}
.hero__inner { position: relative; }
.hero__title { font-size: clamp(40px, 11vw, 76px); font-weight: 700; }
.hero__sub { margin-top: 20px; font-size: 18px; color: var(--muted-on-dark); max-width: 34em; }
.hero__actions { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }

/* Sections */
.section { padding: 64px 0; scroll-margin-top: 48px; }
.section--alt { background: var(--sand); }
.section--dark { background: var(--black); color: var(--offwhite); }
.section__title { font-size: clamp(30px, 8vw, 44px); font-weight: 700; margin-bottom: 28px; }
.note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* Glow backdrop for the glass sections */
.section--glow { position: relative; overflow: hidden; isolation: isolate; }
.section--glow::before, .section--glow::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(70px); pointer-events: none;
}
.section--glow::before {
  width: 460px; height: 460px; left: 4%; top: 34%;
  background: radial-gradient(circle, rgba(255,90,31,.75), rgba(255,90,31,0) 68%);
  filter: blur(40px);
}
.section--glow::after {
  width: 420px; height: 420px; right: 6%; top: 20%;
  background: radial-gradient(circle, rgba(255,184,120,.85), rgba(255,184,120,0) 68%);
  filter: blur(40px);
}
.section--glow-alt::before { left: 30%; top: 30%; width: 520px; }
.section--glow-alt::after { right: -4%; top: 40%; background: radial-gradient(circle, rgba(255,120,60,.6), rgba(255,120,60,0) 68%); }

/* Frosted glass surface */
.card, .step {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.26));
  -webkit-backdrop-filter: blur(24px) saturate(170%);
          backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 20px 40px -18px rgba(120,50,10,.22),
    0 2px 6px rgba(11,11,15,.04);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
@media (hover: hover) {
  .card:hover, .step:hover {
    transform: translateY(-4px);
    box-shadow:
      0 1px 0 rgba(255,255,255,.9) inset,
      0 28px 50px -18px rgba(120,50,10,.30),
      0 2px 6px rgba(11,11,15,.05);
  }
}

/* Who it's for */
.cards { display: grid; gap: 16px; }
.card { padding: 28px; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(140deg, #FF7A45, #FF5A1F 55%, #E0430C);
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(255,90,31,.6), inset 0 1px 0 rgba(255,255,255,.35);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card h3 { font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--muted); }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step { display: flex; gap: 18px; align-items: flex-start; padding: 24px; }
.step__num {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(145deg, #23232B, var(--black));
  color: var(--orange);
  box-shadow: 0 8px 18px -8px rgba(11,11,15,.6), inset 0 1px 0 rgba(255,255,255,.12);
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
  display: grid; place-items: center;
}
.step h3 { font-size: 20px; margin-bottom: 4px; }
.step p { color: var(--muted); }

/* Browsers without blur: fall back to a solid card */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .step { background: rgba(255,255,255,.92); }
}

/* Form */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 15px; }
.optional { color: var(--muted-on-dark); font-weight: 400; font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  color: var(--offwhite); background: #16161C;
  border: 1px solid var(--line-dark); border-radius: 10px;
  padding: 14px 14px; min-height: 52px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FAF7F4' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 44px;
}
.field select:invalid { color: var(--muted-on-dark); }
.field input[type="file"] { padding: 12px; min-height: 0; color: var(--muted-on-dark); }
.field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 12px;
  border: 0; border-radius: 999px; padding: 8px 14px;
  background: var(--offwhite); color: var(--black); cursor: pointer;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,90,31,.25);
}
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #FF8A65; }
.field__error { color: #FF8A65; font-size: 13px; }
.form__privacy { font-size: 13px; color: var(--muted-on-dark); text-align: center; margin-top: -6px; }
.form__status { font-size: 14px; color: #FF8A65; text-align: center; min-height: 1em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.thanks {
  text-align: center; padding: 40px 24px;
  border: 1px solid var(--line-dark); border-radius: var(--radius); background: #16161C;
}
.thanks h3 { font-size: 28px; color: var(--orange); margin-bottom: 8px; }
.thanks p { font-size: 18px; }
.thanks:focus { outline: none; }

/* ---------- Showcase: "See it in action" ---------- */
.showcase { background: var(--black); color: var(--offwhite); overflow: clip; scroll-margin-top: 0; }
.showcase__stage { padding: 72px 0 64px; }
.showcase__title {
  font-size: clamp(48px, 14vw, 128px); font-weight: 700; letter-spacing: -0.04em;
  text-align: center; padding: 0 var(--gutter); margin-bottom: 36px; line-height: 1;
}
.showcase__title .w { display: inline-block; }

.phones {
  --pw: min(72vw, 300px);
  display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 12px calc(50% - var(--pw) / 2) 8px;
  -webkit-overflow-scrolling: touch;
}
.phones::-webkit-scrollbar { display: none; }
.phone {
  flex: 0 0 var(--pw); margin: 0;
  scroll-snap-align: center;
  transform-origin: 50% 60%;
  will-change: transform, opacity;
}
.phone__screen {
  position: relative; aspect-ratio: 9 / 16;
  border-radius: 38px; overflow: hidden;
  background: #000;
  border: 7px solid #1D1D24;
  box-shadow:
    0 0 0 1px #34343E,
    0 30px 60px -20px rgba(0,0,0,.8),
    0 0 80px -10px rgba(255,90,31,.18);
}
.phone__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.phone__play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0; background: #000; cursor: pointer; display: block;
}
.phone__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .6s; }
.phone__play:hover img { transform: scale(1.04); filter: brightness(1.08); }
.phone__play::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 40%);
}
.phone__icon {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%;
  background: rgba(250,247,244,.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(250,247,244,.35);
  display: grid; place-items: center;
  transition: transform .3s, background .3s;
}
.phone__icon::before {
  content: ""; margin-left: 5px;
  border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.phone__play:hover .phone__icon { transform: scale(1.08); background: var(--orange); border-color: var(--orange); }
.phone__play:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.phone figcaption {
  margin-top: 16px; text-align: center;
  font-family: var(--font-head); font-weight: 500; font-size: 16px; color: var(--offwhite);
}

.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: #3A3A44; transition: background .3s, width .3s; }
.dots span.is-on { background: var(--orange); width: 22px; border-radius: 4px; }

.showcase__foot { margin-top: 28px; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 0 var(--gutter); }
.showcase .note { color: var(--muted-on-dark); margin: 0; }
.more-link { color: var(--orange); font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* Phone-size intro animation (desktop uses scroll-linked motion from main.js) */
.js .showcase .w, .js .showcase .phone { opacity: 0; transform: translateY(40px); }
.js .showcase.in .w, .js .showcase.in .phone {
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1);
}
.js .showcase.in .w:nth-child(2) { transition-delay: .04s; }
.js .showcase.in .w:nth-child(3) { transition-delay: .08s; }
.js .showcase.in .w:nth-child(4) { transition-delay: .12s; }
.js .showcase.in .phone:nth-child(1) { transition-delay: .18s; }
.js .showcase.in .phone:nth-child(2) { transition-delay: .1s; }
.js .showcase.in .phone:nth-child(3) { transition-delay: .24s; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: var(--muted-on-dark); padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-dark); }
.footer a { text-decoration: none; }
.footer__top { display: grid; gap: 28px; }
.footer__logo { height: 24px; width: auto; }
.footer__tagline { margin-top: 12px; font-family: var(--font-head); font-size: 17px; color: var(--offwhite); }
.footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__contact a { color: var(--offwhite); display: inline-block; padding: 4px 0; }
.footer__contact a:hover { color: var(--orange); }
.footer__hint { font-size: 13px; color: var(--muted-on-dark); margin-left: 6px; }
.footer__hint a { color: #25D366; font-weight: 600; padding: 0; }
.footer__hint a:hover { color: #4BE584; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.social a {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--offwhite); border: 1px solid var(--line-dark); background: #15151B;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.social a:hover { background: var(--orange); border-color: var(--orange); color: #fff; transform: translateY(-2px); }
.social a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.footer__bottom {
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line-dark);
  display: grid; gap: 12px; font-size: 13px;
}
.footer__legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__legal a { color: var(--offwhite); padding: 4px 0; display: inline-block; }
.footer__legal a:hover, .footer__powered a:hover { color: var(--orange); }
.footer__powered a { color: var(--offwhite); font-weight: 500; }

/* Larger screens */
@media (min-width: 640px) {
  .hero__actions { flex-direction: row; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero { padding: 88px 0 120px; }
  .hero__sub { font-size: 20px; }
  .section { padding: 96px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step { flex-direction: column; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards .card:last-child:nth-child(odd) { grid-column: auto; }

  /* Scroll-linked showcase: sticky stage, phones fan out as you scroll */
  .showcase__track { height: 160vh; }
  .showcase__stage {
    position: sticky; top: 0; height: 100vh; padding: 76px 0 24px;
    display: flex; flex-direction: column; justify-content: center;
  }
  .showcase__title { margin-bottom: 4vh; font-size: clamp(64px, 8.5vw, 128px); }
  .phones {
    --pw: min(280px, calc((100vh - 360px) * 9 / 16));
    overflow: visible; justify-content: center; gap: 48px; padding: 0;
  }
  .phone--center { position: relative; z-index: 2; }
  .dots { display: none; }
  .footer__top { grid-template-columns: 1.4fr 1fr auto; align-items: start; }
  .footer__bottom { grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; }
  .js .showcase .w, .js .showcase .phone { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .showcase .w, .js .showcase .phone { opacity: 1 !important; transform: none !important; transition: none !important; }
  .showcase__track { height: auto !important; }
  .showcase__stage { position: static !important; height: auto !important; }
}
