/* =========================================================
   QR Code Scanner — Promotional Website Stylesheet
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --primary-navy: #0D172B;
  --primary-blue: #159FE3;
  --primary-blue-dark: #087DB8;
  --primary-blue-light: #DFF3FF;

  --page-background: #FFFFFF;
  --surface-primary: #F3F6FA;
  --surface-secondary: #EAF0F7;
  --surface-selected: #E7F5FD;

  --text-primary: #0D172B;
  --text-secondary: #858A93;
  --text-muted: #A8ADB5;

  --border-color: #DDE4EC;
  --divider-color: #E8ECF1;

  --favorite-yellow: #FFD400;
  --danger-red: #E9202A;
  --white: #FFFFFF;

  --shadow-sm: 0 1px 3px rgba(13, 23, 43, 0.06), 0 1px 2px rgba(13, 23, 43, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 23, 43, 0.10);
  --shadow-lg: 0 24px 60px rgba(13, 23, 43, 0.16);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container-max: 1200px;
  --header-height: 76px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-height) + 12px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; }
img { display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; }

html, body { overflow-x: hidden; width: 100%; max-width: 100%; }

body {
  background: var(--page-background);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

section { padding: clamp(64px, 9vw, 120px) 0; }

h1, h2, h3, h4 { color: var(--text-primary); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.3; }
p { color: var(--text-secondary); }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}
.section-header.align-left { text-align: left; margin-left: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-blue);
  background: var(--primary-blue-light);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.section-desc { font-size: 1.05rem; margin-top: 14px; }

.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #16233f 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); background: linear-gradient(135deg, #142443 0%, #1c2c4d 100%); }
.btn-secondary {
  background: transparent;
  color: var(--primary-navy);
  border-color: var(--border-color);
}
.btn-secondary:hover { border-color: var(--primary-blue); color: var(--primary-blue); transform: translateY(-3px); }

/* Google Play badge button — used wherever the site links straight to the store listing */
.btn-playstore {
  background: linear-gradient(135deg, #223759 0%, #2c4570 100%);
  color: var(--white);
  gap: 12px;
  padding: 10px 24px 10px 16px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.btn-playstore:hover {
  background: linear-gradient(135deg, #2a4066 0%, #35507e 100%);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.btn-playstore:hover svg.btn-playstore-icon { transform: none; }
.btn-playstore-icon { width: 26px; height: 26px; flex-shrink: 0; }
.btn-playstore-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn-playstore-eyebrow {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.72);
}
.btn-playstore-brand { font-size: 1.05rem; font-weight: 700; color: var(--white); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Cascade the first row of each card grid instead of popping in together */
.highlights-grid > .reveal:nth-child(1),
.steps-grid > .reveal:nth-child(1),
.features-grid > .reveal:nth-child(1),
.code-types-grid > .reveal:nth-child(1) { transition-delay: 0s; }
.highlights-grid > .reveal:nth-child(2),
.steps-grid > .reveal:nth-child(2),
.features-grid > .reveal:nth-child(2),
.code-types-grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.highlights-grid > .reveal:nth-child(3),
.steps-grid > .reveal:nth-child(3),
.features-grid > .reveal:nth-child(3),
.code-types-grid > .reveal:nth-child(3) { transition-delay: 0.16s; }
.features-grid > .reveal:nth-child(4),
.code-types-grid > .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- QR grid decorative background ---------- */
.qr-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 65% 65% at 65% 40%, #000 40%, transparent 80%);
  mask-image: radial-gradient(ellipse 65% 65% at 65% 40%, #000 40%, transparent 80%);
  opacity: 0.6;
  pointer-events: none;
}

.glow-blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-blue-light) 0%, rgba(223,243,255,0) 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Phone mockup ----------
   Height is intentionally never set — the screenshot's own intrinsic
   aspect ratio (via width:100%; height:auto) determines the frame's
   height. Screenshots already contain their own status bar, so the
   bezel is a thin decorative border with a small camera dot, not a
   large fake notch that would eat into the image. */
.phone-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  background: var(--primary-navy);
  border-radius: 32px;
  padding: 8px;
  box-sizing: border-box;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}
.phone-frame::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  z-index: 2;
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 25px;
  background: var(--white);
}
.phone-screen img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}
.phone-frame--sm { border-radius: 26px; padding: 6px; }
.phone-frame--sm::after { width: 4px; height: 4px; top: 3px; }
.phone-frame--sm .phone-screen { border-radius: 20px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card {
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--radius-lg);
  right: var(--radius-lg);
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--primary-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-blue-light);
}
.card:hover::before { transform: scaleX(1); }

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-blue-light);
  color: var(--primary-blue-dark);
  margin-bottom: 20px;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.icon-circle svg { width: 28px; height: 28px; }
.card:hover .icon-circle { transform: scale(1.08) rotate(-4deg); }

/* Color-coded icon variants — reserved for favorite / destructive contexts only */
.icon-circle--favorite { background: #FFF6D6; color: var(--favorite-yellow); }
.icon-circle--danger { background: #FDEAEB; color: var(--danger-red); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(13,23,43,0.08); border-bottom-color: var(--border-color); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-height);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--primary-navy); flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; }

/* Real app-logo.png, when present, replaces the SVG mark it sits next to.
   Hidden until it loads successfully so a missing file never breaks layout. */
.brand-logo-img {
  display: none;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  padding: 5px;
  box-sizing: border-box;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.main-nav a:hover { color: var(--primary-blue); background: var(--surface-primary); }
.main-nav a.active { color: var(--primary-blue-dark); background: var(--primary-blue-light); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions .btn-primary { padding: 12px 24px; font-size: 0.92rem; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--primary-navy);
}
.menu-toggle:hover { background: var(--surface-primary); }
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-panel {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 190;
  padding: 24px clamp(20px, 5vw, 40px) 40px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel a {
  display: block;
  padding: 16px 4px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-navy);
  border-bottom: 1px solid var(--divider-color);
}
.mobile-panel a.active { color: var(--primary-blue-dark); }
.mobile-panel .btn { margin-top: 24px; }

@media (max-width: 960px) {
  .main-nav, .header-actions .btn-primary { display: none; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 380px) {
  .brand { font-size: 0.98rem; gap: 8px; }
  .brand-mark { width: 36px; height: 36px; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; padding-top: clamp(56px, 8vw, 96px); }
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 20px; }
.hero-copy h1 .accent { color: var(--primary-blue); }
.hero-sub { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 700; color: var(--text-primary); margin-bottom: 14px; }
.hero-desc { font-size: 1.05rem; max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 36px; }

.trust-chips { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.trust-chip { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.trust-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-blue);
  box-shadow: 0 2px 6px rgba(21, 159, 227, 0.35);
  flex-shrink: 0;
}
.trust-chip-badge svg { width: 11px; height: 11px; color: var(--white); }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; padding: 0 12px; }
.hero-phone-main { width: min(280px, 78%); max-width: 100%; position: relative; z-index: 2; animation: floatSlow 6s ease-in-out infinite; }
.hero-phone-secondary {
  width: 150px;
  max-width: 40%;
  position: absolute;
  right: -6px;
  bottom: -18px;
  z-index: 3;
  animation: floatSlow 6s ease-in-out infinite;
  animation-delay: -3s;
}
.hero-visual .glow-blob { width: 460px; height: 460px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.hero-visual .qr-grid-bg { z-index: 0; }

/* Decorative app-icon badge pinned to the primary mockup — desktop/tablet only */
.hero-logo-badge {
  position: absolute;
  top: 6%;
  left: 4%;
  width: 48px;
  height: 48px;
  padding: 8px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 4;
}
.hero-logo-badge .brand-mark { width: 100%; height: 100%; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }

  /* Stack trust chips as a left-aligned column so every checkmark lines
     up at the same x-position, while the whole block stays centered. */
  .trust-chips {
    flex-direction: column;
    align-items: flex-start;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    gap: 12px;
  }
}

/* True mobile: stack the paired hero mockups, no overlap, no rotation */
@media (max-width: 640px) {
  .hero-visual {
    flex-direction: column;
    gap: 28px;
    min-height: 0;
    padding: 0;
  }
  .hero-phone-main {
    width: min(82vw, 300px);
    animation: none;
  }
  .hero-phone-secondary {
    position: static;
    width: min(70vw, 240px);
    max-width: 100%;
    margin: 0 auto;
    animation: none;
  }
  .hero-logo-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone-main, .hero-phone-secondary { animation: none; }
}

/* =========================================================
   Highlights
   ========================================================= */
.highlights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.highlight-card { text-align: left; }
.highlight-card .icon-circle { width: 64px; height: 64px; }
.highlight-card .icon-circle svg { width: 32px; height: 32px; }
@media (max-width: 860px) { .highlights-grid { grid-template-columns: 1fr; } }

/* =========================================================
   How it works
   ========================================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
}
.steps-grid::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--primary-blue-light) 0 10px, transparent 10px 18px);
  z-index: 0;
}
.step-card { position: relative; z-index: 1; background: var(--white); }
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--primary-navy);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}
.step-card h3 { margin-bottom: 10px; }
@media (max-width: 860px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
}

/* =========================================================
   Scanning modes showcase (slider)
   ========================================================= */
.mode-slider { max-width: 920px; margin: 0 auto; position: relative; }
.mode-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.mode-tab {
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--white);
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease);
}
.mode-tab.active { background: var(--primary-navy); border-color: var(--primary-navy); color: var(--white); }
.mode-tab:hover:not(.active) { border-color: var(--primary-blue); color: var(--primary-blue); }

.mode-panel {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(20px, 3vw, 32px);
}
.mode-viewport { overflow: hidden; border-radius: var(--radius-md); touch-action: pan-y; user-select: none; }
.mode-viewport img { -webkit-user-drag: none; user-drag: none; }
.mode-track { display: flex; transition: transform 0.5s var(--ease); }
.mode-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 44px;
  align-items: center;
  padding: 16px 12px;
}
.mode-slide-visual { position: relative; max-width: 270px; margin: 0 auto; }
.mode-slide-visual .glow-blob { width: 300px; height: 300px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.mode-slide-title { margin-bottom: 12px; }
.mode-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-selected);
  color: var(--primary-blue-dark);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  margin-top: 18px;
}
.mode-feature-tag svg { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 3; }

.mode-controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 34px; }
.mode-arrow, .carousel-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-navy);
  transition: all 0.25s var(--ease);
  flex-shrink: 0;
}
.mode-arrow:hover, .carousel-arrow:hover { background: var(--primary-navy); color: var(--white); border-color: var(--primary-navy); }
.mode-arrow svg, .carousel-arrow svg { width: 20px; height: 20px; }
.mode-dots { display: flex; gap: 8px; }
.mode-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-color); transition: all 0.25s var(--ease); }
.mode-dot.active { background: var(--primary-blue); width: 26px; border-radius: var(--radius-pill); }

@media (max-width: 720px) {
  .mode-slide { grid-template-columns: 1fr; text-align: center; }
  .mode-slide-visual { width: 200px; }
}

/* =========================================================
   Features grid
   ========================================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.feature-card { text-align: left; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feature-card p { font-size: 0.92rem; }

/* =========================================================
   Result experience
   ========================================================= */
.result-section .container { position: relative; }
.result-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.result-visual { position: relative; display: flex; justify-content: center; align-items: center; padding: 20px 0; }
.result-phone-back { width: 210px; max-width: 44vw; position: relative; z-index: 1; transform: translateX(-46px) rotate(-6deg); opacity: 0.94; }
.result-phone-front { width: 230px; max-width: 48vw; position: relative; z-index: 2; transform: translateX(30px) rotate(4deg); }

.action-list { display: flex; flex-direction: column; gap: 18px; }
.action-item { display: flex; gap: 16px; align-items: flex-start; }
.action-item .icon-circle { margin-bottom: 0; width: 44px; height: 44px; flex-shrink: 0; }
.action-item .icon-circle svg { width: 22px; height: 22px; }
.action-item h4 { font-size: 1rem; color: var(--text-primary); font-weight: 700; margin-bottom: 4px; }
.action-item p { font-size: 0.92rem; margin: 0; }

@media (max-width: 860px) {
  .result-grid { grid-template-columns: 1fr; }
  .result-visual { margin-bottom: 8px; }
}

/* True mobile: stack result mockups, remove rotation/overlap entirely */
@media (max-width: 640px) {
  .result-visual { flex-direction: column; gap: 24px; }
  .result-phone-back, .result-phone-front {
    width: min(80vw, 280px);
    max-width: 100%;
    transform: none;
    opacity: 1;
    margin: 0 auto;
  }
}

/* =========================================================
   Create useful codes
   ========================================================= */
.create-codes-section { position: relative; overflow: hidden; }
.create-codes-section .qr-grid-bg {
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 30%, transparent 78%);
}
.create-codes-section .container { position: relative; z-index: 1; }

.code-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
}
.code-type-card { text-align: center; }
.code-type-card .icon-circle { margin: 0 auto 18px; width: 68px; height: 68px; }
.code-type-card .icon-circle svg { width: 34px; height: 34px; }
.code-type-card h3 { font-size: 1rem; margin-bottom: 6px; }
.code-type-card p { font-size: 0.85rem; margin: 0; }

/* =========================================================
   Two-column media sections (history, personalization)
   ========================================================= */
.split-section .split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}
.split-section .split-grid.reverse .split-visual { order: 2; }
.split-section .split-grid.reverse .split-copy { order: 1; }

.split-visual { display: flex; justify-content: center; align-items: flex-start; gap: 24px; position: relative; }
.split-visual .phone-frame-wrap { width: 190px; max-width: 44vw; text-align: center; }
.split-visual .phone-frame-wrap:nth-child(2) { margin-top: 44px; }
.split-visual .mockup-label {
  display: block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.detail-list { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.detail-item { display: flex; gap: 14px; align-items: flex-start; }
.detail-item svg { width: 22px; height: 22px; color: var(--primary-blue); flex-shrink: 0; margin-top: 2px; }
.detail-item--favorite svg { color: var(--favorite-yellow); }
.detail-item--danger svg { color: var(--danger-red); }
.detail-item h4 { font-size: 0.98rem; font-weight: 700; margin-bottom: 3px; }
.detail-item p { font-size: 0.9rem; margin: 0; }

@media (max-width: 860px) {
  .split-section .split-grid,
  .split-section .split-grid.reverse { grid-template-columns: 1fr; }
  .split-section .split-grid.reverse .split-visual,
  .split-section .split-grid.reverse .split-copy { order: initial; }
  .split-visual .phone-frame-wrap { width: 180px; max-width: 46vw; }
}

/* True mobile: stack paired mockups vertically, fully visible, centered */
@media (max-width: 560px) {
  .split-visual { flex-direction: column; align-items: center; gap: 28px; }
  .split-visual .phone-frame-wrap { width: min(78vw, 290px); max-width: 100%; }
  .split-visual .phone-frame-wrap:nth-child(2) { margin-top: 0; }
}

/* =========================================================
   Screenshot carousel
   ========================================================= */
.carousel-section { background: var(--surface-primary); }
.carousel { position: relative; max-width: 1080px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; touch-action: pan-y; user-select: none; }
.carousel-viewport img { -webkit-user-drag: none; user-drag: none; }
.carousel-track { display: flex; align-items: flex-start; transition: transform 0.5s var(--ease); }
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.carousel-slide .phone-frame { width: 100%; max-width: 280px; cursor: zoom-in; }
.carousel-slide .phone-frame:focus-visible { outline: 3px solid var(--primary-blue); outline-offset: 4px; }
.carousel-caption {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.carousel-controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 34px; }
.carousel-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 360px; }
.carousel-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-color); transition: all 0.25s var(--ease); border: none; padding: 0; }
.carousel-dot.active { background: var(--primary-blue); width: 26px; border-radius: var(--radius-pill); }

/* One screenshot at a time, centered, at every screen size — matches
   the auto-swipe flow: the visitor watches the middle, one leaves and
   the next arrives, never a confusing multi-item scroll. */

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 23, 43, 0.86);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-content { position: relative; max-width: 380px; width: 100%; }
.lightbox-content .phone-frame { width: 100%; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--primary-blue); border-color: var(--primary-blue); }
.lightbox-close { top: -60px; right: 0; }
.lightbox-prev { left: -60px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -60px; top: 50%; transform: translateY(-50%); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 22px; height: 22px; }
@media (max-width: 680px) {
  .lightbox-close { top: -54px; right: 0; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

/* =========================================================
   Privacy CTA (in-page section)
   ========================================================= */
.privacy-cta { background: var(--surface-secondary); border-radius: var(--radius-lg); padding: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.privacy-cta ul { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.privacy-cta li { display: flex; gap: 10px; font-size: 0.95rem; color: var(--text-secondary); }
.privacy-cta li svg { width: 20px; height: 20px; color: var(--primary-blue); flex-shrink: 0; margin-top: 1px; }
@media (max-width: 720px) { .privacy-cta { grid-template-columns: 1fr; text-align: left; } }

/* =========================================================
   FAQ accordion
   ========================================================= */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--white); overflow: hidden; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.faq-question .faq-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-blue-light);
  color: var(--primary-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.faq-question .faq-icon svg { width: 16px; height: 16px; }
.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); background: var(--primary-navy); color: var(--white); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-answer-inner { padding: 0 24px 22px; font-size: 0.95rem; color: var(--text-secondary); }

/* =========================================================
   Final CTA
   ========================================================= */
.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--primary-navy);
  border-radius: var(--radius-lg);
  padding: clamp(56px, 8vw, 96px) clamp(24px, 6vw, 64px);
  text-align: center;
}
.final-cta .qr-grid-bg {
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%);
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  opacity: 1;
}
.final-cta-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.final-cta-mark { width: 64px; height: 64px; margin: 0 auto 28px; color: var(--primary-blue); }
.final-cta h2 { color: var(--white); margin-bottom: 16px; }
.final-cta p { color: rgba(255,255,255,0.72); font-size: 1.05rem; margin-bottom: 36px; }
.final-cta-actions { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: 16px; }
.final-cta-actions .btn { min-height: 62px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--surface-primary); border-top: 1px solid var(--border-color); padding: clamp(56px, 7vw, 80px) 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--divider-color);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 320px; font-size: 0.92rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.93rem; color: var(--text-secondary); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--primary-blue); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Back to top
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: none;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease), background 0.3s var(--ease);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-blue); }
.back-to-top svg { width: 22px; height: 22px; }

/* =========================================================
   Toast (used for the "Play Store link coming soon" message)
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  background: var(--primary-navy);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease);
  z-index: 700;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* =========================================================
   Inner pages (privacy / contact)
   ========================================================= */
.page-hero { padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 60px); text-align: center; }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero p { max-width: 620px; margin: 16px auto 0; }

.legal-content { max-width: 820px; margin: 0 auto; padding-bottom: clamp(60px, 8vw, 100px); }
.legal-block { padding: 30px 0; border-bottom: 1px solid var(--divider-color); }
.legal-block:last-child { border-bottom: none; }
.legal-block h2 { font-size: 1.3rem; margin-bottom: 12px; }
.legal-block p { margin-bottom: 12px; font-size: 0.98rem; }
.legal-block ul { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.legal-block li { font-size: 0.95rem; color: var(--text-secondary); padding-left: 20px; position: relative; }
.legal-block li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-blue); }

.legal-toc {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 8px;
}
.legal-toc h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.legal-toc ol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
  counter-reset: toc;
  list-style: none;
  padding: 0;
  margin: 0;
}
.legal-toc li { counter-increment: toc; font-size: 0.92rem; }
.legal-toc li::before {
  content: counter(toc) ".";
  color: var(--primary-blue);
  font-weight: 700;
  margin-right: 6px;
}
.legal-toc a { color: var(--text-primary); font-weight: 600; }
.legal-toc a:hover { color: var(--primary-blue); text-decoration: underline; }

@media (max-width: 560px) {
  .legal-toc ol { grid-template-columns: 1fr; }
}

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; max-width: 1080px; margin: 0 auto; padding-bottom: clamp(60px, 8vw, 100px); }
.contact-info-card { background: var(--surface-primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: clamp(28px, 3vw, 36px); }
.contact-info-card h3 { margin-bottom: 14px; }
.contact-info-row { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; }
.contact-info-row .icon-circle { margin-bottom: 0; width: 44px; height: 44px; flex-shrink: 0; }
.contact-info-row .icon-circle svg { width: 22px; height: 22px; }
.contact-info-row h4 { font-size: 0.95rem; margin-bottom: 3px; }
.contact-info-row p { font-size: 0.9rem; margin: 0; }

.contact-form { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: clamp(28px, 3.5vw, 40px); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-primary); }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-primary);
  color: var(--text-primary);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: var(--white);
}
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--danger-red); }
.form-error {
  display: none;
  color: var(--danger-red);
  font-size: 0.82rem;
  margin-top: 6px;
  font-weight: 600;
}
.form-group.has-error .form-error { display: block; }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-status {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--surface-selected);
  color: var(--primary-blue-dark);
  border: 1px solid var(--primary-blue-light);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.form-status.visible { display: flex; }
.form-status svg { width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}
