/* ============================================================
   boop. — clean fintech direction
   Ink #0A0F1E · Electric blue #2563EB · Cyan #22D3EE · Paper #F8FAFC
   Space Grotesk (headings) + Inter (body)
   ============================================================ */

:root {
  --ink: #0A0F1E;
  --ink-soft: #101a30;
  --blue: #2563EB;
  --blue-dark: #1d4fc4;
  --cyan: #22D3EE;
  --paper: #F8FAFC;
  --white: #ffffff;
  --muted: #5b6472;
  --muted-dark: #a6b0c3;
  --line: #e4e9f0;
  --line-dark: #1e2a44;
  --radius: 16px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --cycle: 4.2s; /* hero animation loop length — keep in sync across keyframes */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; }

h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.section { padding: 5.5rem 0; }
.section-paper { background: var(--paper); }
.section-sub { color: var(--muted); max-width: 34rem; margin-top: 0.75rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(166, 176, 195, 0.4);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}
.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--cyan); }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  color: var(--muted-dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60rem 30rem at 80% -10%, rgba(37, 99, 235, 0.28), transparent 60%),
    radial-gradient(40rem 24rem at 10% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--ink);
  color: var(--white);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  padding: 5rem 0 6rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.hero .sub {
  color: var(--muted-dark);
  font-size: 1.1rem;
  max-width: 30rem;
  margin-bottom: 2rem;
}
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.25rem; font-size: 0.8rem; color: #6b7689; }

/* ---------- Hero stage (animated demo) ---------- */
.hero-stage { display: flex; justify-content: center; }
.stage { position: relative; width: 360px; height: 460px; }

.phone {
  position: absolute;
  left: 44px;
  top: 24px;
  width: 200px;
  height: 408px;
  border-radius: 34px;
  background: #0d1526;
  border: 3px solid var(--line-dark);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 16px;
  border-radius: 999px;
  background: #05080f;
  z-index: 3;
}
.phone-screen {
  position: absolute;
  inset: 8px;
  border-radius: 26px;
  background: linear-gradient(165deg, #14203a, #0b1222 70%);
  overflow: hidden;
}
.screen-idle {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  padding-top: 3rem;
}
.idle-time {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Scenes inside the phone screen */
.scene {
  position: absolute;
  inset: 0;
  padding: 2.6rem 0.9rem 0.9rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}
.scene.active { display: flex; }

.pop {
  opacity: 0;
  animation: popIn var(--cycle) ease infinite;
}
.pop:nth-child(2) { animation-delay: 0.07s; }
.pop:nth-child(3) { animation-delay: 0.14s; }
.pop:nth-child(4) { animation-delay: 0.21s; }
.pop:nth-child(5) { animation-delay: 0.28s; }

@keyframes popIn {
  0%, 30%  { opacity: 0; transform: translateY(16px) scale(0.96); }
  37%      { opacity: 1; transform: translateY(-2px) scale(1.01); }
  41%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(4px); }
}

.mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mini-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--white);
}
.mini-chip {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
}
.mini-chip-blue { background: rgba(37, 99, 235, 0.12); color: var(--blue); }

.menu-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #cdd5e1;
  padding: 0.45rem 0.1rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.menu-row .price { color: var(--cyan); font-weight: 600; }

/* Pay scene */
.pay-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}
.pay-label { font-size: 0.7rem; color: var(--muted-dark); }
.pay-amount {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.pay-btn {
  position: relative;
  width: 82%;
  height: 38px;
  border-radius: 10px;
  background: var(--blue);
  overflow: hidden;
}
.pay-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
}
.pay-state-a { animation: payA var(--cycle) ease infinite; }
.pay-state-b { opacity: 0; animation: payB var(--cycle) ease infinite; }
@keyframes payA {
  0%, 55%  { opacity: 1; }
  60%, 100% { opacity: 0; }
}
@keyframes payB {
  0%, 58%  { opacity: 0; transform: scale(0.9); }
  64%, 86% { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; }
}

/* Contact scene */
.contact-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  margin-bottom: 0.3rem;
}
.contact-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}
.contact-role { font-size: 0.68rem; color: var(--muted-dark); }
.contact-actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.mini-btn {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cdd5e1;
}
.mini-btn-solid { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* The boop tag */
.tag {
  position: absolute;
  right: 0;
  top: 96px;
  width: 118px;
  height: 118px;
  z-index: 4;
  animation: cardTap var(--cycle) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.45));
}
@keyframes cardTap {
  0%       { transform: translate(76px, -36px) rotate(14deg); opacity: 0; }
  12%      { opacity: 1; }
  24%, 80% { transform: translate(-16px, 2px) rotate(5deg); opacity: 1; }
  94%, 100% { transform: translate(76px, -36px) rotate(14deg); opacity: 0; }
}
.tag-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: var(--white);
  padding: 12px;
}
.tag-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.tag-logo .logo-dot { color: var(--blue); }
.tag-nfc {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 26px;
  height: 26px;
  color: var(--blue);
}
.tag-qr {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  color: var(--ink);
}

/* NFC pulse rings at the contact point */
.pulse {
  position: absolute;
  left: 226px;
  top: 148px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  opacity: 0;
  z-index: 5;
  animation: pulseRing var(--cycle) ease-out infinite;
}
.pulse.p2 { animation-delay: 0.18s; }
.pulse.p3 { animation-delay: 0.36s; }
@keyframes pulseRing {
  0%, 24% { transform: scale(0.3); opacity: 0; }
  27%     { opacity: 0.9; }
  55%     { transform: scale(4.5); opacity: 0; }
  100%    { opacity: 0; }
}

/* ---------- Use cases ---------- */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.uc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.uc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(10, 15, 30, 0.08);
}
.uc-card h3 { font-size: 1.2rem; margin: 1.25rem 0 0.5rem; }
.uc-card p { color: var(--muted); font-size: 0.92rem; }
.uc-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.uc-visual {
  height: 170px;
  border-radius: 12px;
  background: linear-gradient(165deg, #eef3fb, var(--paper));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Menu demo */
.demo-menu {
  width: 78%;
  background: var(--white);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  box-shadow: 0 8px 24px rgba(10, 15, 30, 0.08);
}
.demo-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.3rem;
}
.demo-menu-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.32rem 0;
  opacity: 0;
  transform: translateX(-10px);
}
.visible .demo-menu-row { animation: rowIn 0.5s ease both; }
.visible .demo-menu-row:nth-child(2) { animation-delay: 0.15s; }
.visible .demo-menu-row:nth-child(3) { animation-delay: 0.3s; }
.visible .demo-menu-row:nth-child(4) { animation-delay: 0.45s; }
@keyframes rowIn {
  to { opacity: 1; transform: none; }
}

/* Pay demo */
.demo-pay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.demo-pay-label { font-size: 0.7rem; color: var(--muted); }
.demo-pay-amount {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.demo-pay-btn {
  position: relative;
  width: 130px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue);
  overflow: hidden;
  margin-top: 0.3rem;
}
.demo-pay-a, .demo-pay-b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white);
}
.demo-pay-b { opacity: 0; }
.visible .demo-pay-a { animation: demoPayA 0.4s ease 1s both; }
.visible .demo-pay-b { animation: demoPayB 0.4s ease 1.2s both; }
@keyframes demoPayA { to { opacity: 0; } }
@keyframes demoPayB {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Contact demo */
.demo-contact {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--white);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 8px 24px rgba(10, 15, 30, 0.08);
}
.demo-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  flex-shrink: 0;
  transform: scale(0);
}
.visible .demo-avatar { animation: avatarPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both; }
@keyframes avatarPop { to { transform: scale(1); } }
.demo-contact-lines { display: flex; flex-direction: column; gap: 0.15rem; }
.demo-line {
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-8px);
}
.demo-line-name { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.demo-line-link { color: var(--blue); font-weight: 600; }
.visible .demo-line { animation: rowIn 0.45s ease both 0.25s; }
.visible .demo-line:nth-child(2) { animation-delay: 0.4s; }
.visible .demo-line:nth-child(3) { animation-delay: 0.55s; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.step {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Social proof ---------- */
#proof { text-align: center; }
.proof-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.logo-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.logo-chip {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: #9aa4b5;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
}
.quote {
  max-width: 38rem;
  margin: 2.5rem auto 0;
}
.quote p {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.quote cite {
  display: block;
  margin-top: 0.8rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: start;
}
.price-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.price-card-featured {
  border-color: var(--blue);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.12);
}
.badge {
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: var(--cyan);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.1rem; }
.price { color: var(--muted); font-size: 0.85rem; }
.price-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-right: 0.3rem;
}
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.price-card li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1.4rem;
  position: relative;
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}
.price-card .btn, .price-card .btn-outline { text-align: center; margin-top: 0.5rem; }

/* ---------- CTA ---------- */
.cta {
  background:
    radial-gradient(50rem 26rem at 50% 130%, rgba(37, 99, 235, 0.35), transparent 65%),
    var(--ink);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
}
.cta p { color: var(--muted-dark); max-width: 28rem; margin: 1rem auto 2rem; }
.cta-form {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-form input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  width: min(320px, 100%);
  outline: none;
  transition: border-color 0.2s ease;
}
.cta-form input::placeholder { color: #6b7689; }
.cta-form input:focus { border-color: var(--cyan); }
.form-msg { margin-top: 1rem; font-size: 0.9rem; color: var(--cyan); min-height: 1.4em; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--muted-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 0;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo-footer { font-size: 1.1rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted-dark); text-decoration: none; }
.footer-links a:hover { color: var(--white); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   Customize page (design studio)
   ============================================================ */

.nav-links .nav-active { color: var(--white); }

.customize-hero {
  background:
    radial-gradient(50rem 24rem at 85% -20%, rgba(37, 99, 235, 0.3), transparent 60%),
    var(--ink);
  color: var(--white);
  padding: 4rem 0 4.5rem;
}
.customize-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.customize-hero .sub {
  color: var(--muted-dark);
  font-size: 1.05rem;
  max-width: 32rem;
}

/* ---------- Template gallery ---------- */
.templates { background: var(--paper); padding: 3.5rem 0 0.5rem; }
.tpl-group-title {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-top: 2.25rem;
}
.tpl-group-note {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.4rem;
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.tpl-card {
  font-family: var(--font-body);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tpl-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(10, 15, 30, 0.08);
}
.tpl-card[aria-pressed="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 16px 36px rgba(37, 99, 235, 0.12);
}
.tpl-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  overflow: hidden;
  pointer-events: none;
  perspective: 1200px;
}
.tpl-thumb .preview-tag {
  transform: scale(0.5);
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(10, 15, 30, 0.22);
}
/* Two-sided template thumbs flip to their back on hover/focus */
.tpl-flip { display: flex; align-items: center; justify-content: center; }
.tpl-flip .flip-face {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tpl-card:hover .tpl-flip,
.tpl-card:focus-visible .tpl-flip { transform: rotateY(180deg); }
.tpl-badge {
  position: absolute;
  top: 10px;
  right: 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.tpl-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}
.tpl-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.45;
}

.customizer { padding: 4rem 0 5.5rem; background: var(--paper); }
.customizer-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

/* ---------- Live preview ---------- */
.preview-panel { position: sticky; top: 6rem; }

.pv-tabs { display: flex; justify-content: center; gap: 0.4rem; margin-bottom: 0.9rem; }
.pv-tab {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pv-tab:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pv-tab-active, .pv-tab-active:hover:not(:disabled) {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.pv-tab:disabled { opacity: 0.45; cursor: not-allowed; }

/* 3D flip between front and back faces */
.flip-scene { perspective: 1400px; }
.flip-inner, .tpl-flip {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.flip-inner.flipped { transform: rotateY(180deg); }
.flip-face {
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Back-of-tag layout */
.preview-tag.pv-back {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
}
.pv-qr-big { width: 84px; height: 84px; }
.format-sticker.pv-back .pv-qr-big { width: 76px; height: 76px; }
.pv-back-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 0.9;
}
.pv-back-callout {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.7;
}
.pv-back.back-qr .pv-back-name,
.pv-back.back-qr .pv-back-callout { display: none; }
.pv-back.back-blank .pv-back-name,
.pv-back.back-blank .pv-qr-big,
.pv-back.back-blank .pv-back-callout { display: none; }
.preview-stage {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.preview-caption {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.preview-tag {
  --pv-bg: #ffffff;
  --pv-fg: #0a0f1e;
  position: relative;
  background: var(--pv-bg);
  color: var(--pv-fg);
  border: 1px solid rgba(10, 15, 30, 0.08);
  box-shadow: 0 24px 56px rgba(10, 15, 30, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  transition: background 0.25s ease, color 0.25s ease, border-radius 0.3s ease,
    width 0.3s ease, height 0.3s ease;
}
.preview-tag.format-card { width: 320px; height: 200px; border-radius: 18px; }
.preview-tag.format-sticker {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  align-items: center;
  text-align: center;
  padding: 30px;
}
.preview-tag.format-tent {
  width: 290px;
  height: 210px;
  border-radius: 14px 14px 4px 4px;
  margin-bottom: 18px;
}
/* 5×7 counter card — rendered at 44px per inch (220×308), with a
   to-scale 2″×2″ (88px) drop zone for the boop QR sticker */
.preview-tag.format-five7 {
  width: 220px;
  height: 308px;
  border-radius: 14px;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
}
.format-five7 .pv-brand { flex-direction: column; gap: 0.35rem; }
.format-five7 .pv-callout {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-transform: none;
  opacity: 1;
}
.format-five7.style-band .pv-callout {
  align-self: center;
  border-radius: 12px;
  padding: 0.45rem 0.9rem;
}
.pv-sticker-wrap { display: none; }
.format-five7 .pv-sticker-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.pv-sticker-zone {
  width: 88px;
  height: 88px;
  border: 1.5px dashed currentColor;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.pv-qr-ghost { width: 58px; height: 58px; opacity: 0.3; }
.pv-zone-label {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}
.format-five7 .pv-bottom .pv-qr { display: none; }
.format-five7 .pv-bottom { justify-content: center; }
.format-five7.style-split .pv-bottom {
  margin: 0 -16px -20px;
  padding: 10px 16px 12px;
  border-radius: 0 0 13px 13px;
}
.preview-tag.format-tent::after {
  content: "";
  position: absolute;
  left: 6%;
  bottom: -16px;
  width: 88%;
  height: 16px;
  border-radius: 0 0 10px 10px;
  background: color-mix(in srgb, var(--pv-bg), #000 28%);
}

.pv-brand { display: flex; align-items: center; gap: 0.6rem; min-height: 38px; }
.format-sticker .pv-brand { flex-direction: column; gap: 0.35rem; }
#pv-logo {
  max-height: 36px;
  max-width: 90px;
  border-radius: 6px;
  object-fit: contain;
}
.pv-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.pv-callout {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.8;
}
.pv-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.format-sticker .pv-bottom { justify-content: center; gap: 0.9rem; align-items: center; }

/* Tag style variants (used by templates and the Style control) */
.preview-tag.style-band .pv-callout {
  background: var(--pv-accent, var(--blue));
  color: var(--pv-accent-fg, #fff);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  align-self: flex-start;
  opacity: 1;
}
.format-sticker.style-band .pv-callout { align-self: center; }

.preview-tag.style-frame::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px solid var(--pv-accent, var(--blue));
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.85;
}
.preview-tag.style-frame { padding: 26px; }

.preview-tag.style-split .pv-bottom {
  /* re-scoping --pv-bg makes the QR "holes" match the accent strip */
  --pv-bg: var(--pv-accent, var(--blue));
  background: var(--pv-accent, var(--blue));
  color: var(--pv-accent-fg, #fff);
  margin: 0 -20px -20px;
  padding: 12px 20px 14px;
}
.format-card.style-split .pv-bottom { border-radius: 0 0 17px 17px; }
.format-tent.style-split .pv-bottom { border-radius: 0 0 3px 3px; }
.format-sticker.style-split .pv-bottom {
  margin: 0;
  padding: 0.55rem 1rem;
  border-radius: 999px;
}
.pv-qr { width: 54px; height: 54px; }
.pv-qr .qr-hole { fill: var(--pv-bg); }
.pv-nfc { width: 26px; height: 26px; }

/* ---------- Options ---------- */
.options-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.opt-group { margin-bottom: 2.25rem; }
.opt-group:last-child { margin-bottom: 0; }
.opt-title {
  font-size: 1rem;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}
.opt-note { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.opt-sub { margin-top: 0.9rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--white);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.pill:hover { border-color: var(--blue); color: var(--blue); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.pill:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.swatch {
  position: relative;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid rgba(10, 15, 30, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swatch:hover { transform: scale(1.1); }
.swatch input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input[type="radio"]:checked) {
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--blue);
}
.swatch:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 4px; }
.swatch-custom {
  background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #22d3ee, #7c3aed, #f43f5e);
  overflow: hidden;
}
.swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1rem 0 0.4rem;
}
.opt-group .field-label:first-of-type { margin-top: 0; }
.options-panel input[type="text"],
.options-panel input[type="email"] {
  font-family: var(--font-body);
  font-size: 0.92rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
}
.options-panel input[type="text"]:focus,
.options-panel input[type="email"]:focus { border-color: var(--blue); }

.upload-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.upload-btn {
  cursor: pointer;
  display: inline-flex;
  padding: 0.55rem 1.1rem;
  border-radius: 12px;
  border: 1px dashed var(--blue);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}
.upload-btn:hover { background: rgba(37, 99, 235, 0.06); }
.upload-clear {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: #b42318;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
}
.upload-hint { font-size: 0.78rem; color: var(--muted); }

.opt-group-submit {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}
.order-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.order-row input { flex: 1; min-width: 200px; width: auto; }
.form-msg-light { color: var(--blue); }
.btn-wide { width: 100%; text-align: center; }

/* Blank canvas quick-start bar */
.tpl-blank-bar {
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.tpl-blank-bar:hover { background: rgba(37, 99, 235, 0.05); transform: translateY(-2px); }
.tpl-blank-bar strong { color: var(--ink); font-family: var(--font-head); }
.tpl-blank-plus {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
}

/* ============================================================
   Checkout page
   ============================================================ */
.checkout { background: var(--paper); padding: 3.5rem 0 5.5rem; min-height: 60vh; }
.co-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.co-empty {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}
.co-empty p { color: var(--muted); margin-bottom: 1.25rem; }

.co-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}
.co-summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  position: sticky;
  top: 6rem;
}
.co-summary h2 { font-size: 1.2rem; margin-bottom: 1.5rem; }
.co-faces {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.co-face { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.co-face-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.co-face .preview-tag { box-shadow: 0 18px 40px rgba(10, 15, 30, 0.16); }
.co-logo { max-height: 36px; max-width: 90px; border-radius: 6px; object-fit: contain; }

.spec-list { border-top: 1px solid var(--line); margin: 0; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.co-edit {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.co-edit:hover { text-decoration: underline; }

/* Quantity + totals */
.qty-row { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.qty-btn:hover { border-color: var(--blue); color: var(--blue); }
.options-panel input[type="number"]#qty {
  width: 72px;
  text-align: center;
  padding: 0.55rem 0.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.qty-unit { font-size: 0.88rem; color: var(--muted); margin-left: 0.3rem; }
.qty-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }

.price-lines { display: flex; flex-direction: column; gap: 0.45rem; }
.price-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--muted);
}
.price-line-total {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
  margin-top: 0.3rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}
.price-free { color: var(--blue); font-weight: 600; }

.field-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.demo-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #92600a;
  background: #fdf3df;
  border: 1px solid #f3dfb3;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}

/* Success state */
.co-success { text-align: center; padding: 1rem 0; }
.co-success-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.co-success h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.co-success-id {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.co-success p { color: var(--muted); font-size: 0.92rem; max-width: 26rem; margin: 0 auto 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 3.5rem 0 4rem; text-align: center; }
  .hero .sub { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .hero-stage { margin-top: 2.5rem; }
  .stage { transform: scale(0.88); transform-origin: top center; height: 420px; }
  .uc-grid, .steps, .price-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .customizer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .preview-panel { position: static; }
  .preview-stage { min-height: 320px; }
  .options-panel { padding: 1.5rem; }
  .co-grid { grid-template-columns: 1fr; gap: 2rem; }
  .co-summary { position: static; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag, .pulse, .pop, .pay-state-a, .pay-state-b { animation: none !important; }
  .tag { transform: translate(-16px, 2px) rotate(5deg); opacity: 1; }
  .pop { opacity: 1; }
  .pay-state-b { opacity: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .visible .demo-menu-row, .visible .demo-line, .visible .demo-avatar,
  .visible .demo-pay-a, .visible .demo-pay-b { animation: none !important; }
  .demo-menu-row, .demo-line { opacity: 1; transform: none; }
  .demo-avatar { transform: scale(1); }
  .uc-card:hover { transform: none; }
  .flip-inner, .tpl-flip { transition: none; }
}
