/* ============================================
   Timeline Scan — "Warm Heirloom Album" Design
   Aesthetic: warm, intimate, textured, timeless
   Audience: older generation, family photo owners
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  --bg-primary: #FAF3E8;
  --bg-secondary: #FFFDF8;
  --bg-warm: #F4EBDC;
  --bg-accent: #EDE4D3;
  --text-primary: #3D2B1F;
  --text-secondary: #6B5B4D;
  --text-muted: #9C8E80;
  --accent: #B8860B;
  --accent-hover: #9A7209;
  --accent-light: #F8F0DC;
  --accent-glow: rgba(184, 134, 11, 0.12);
  --green: #5E8A65;
  --green-light: #EAF2EB;
  --red: #B94A3E;
  --red-light: #FAEAE8;
  --border: #DDD4C4;
  --border-light: #EBE4D8;
  --shadow-sm: 0 1px 3px rgba(61, 43, 31, 0.06);
  --shadow-md: 0 4px 16px rgba(61, 43, 31, 0.08);
  --shadow-lg: 0 8px 32px rgba(61, 43, 31, 0.1);
  --shadow-warm: 0 4px 20px rgba(184, 134, 11, 0.08);
  --card-bg: #FFFDF8;
  --nav-bg: rgba(250, 243, 232, 0.92);
  --photo-bg: #F0E8D8;
  --photo-border: #D8CDB8;
  --film-strip: #3D2B1F;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: 'DM Sans', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-primary: #1C1917;
  --bg-secondary: #231F1C;
  --bg-warm: #292421;
  --bg-accent: #302A25;
  --text-primary: #F5F0E8;
  --text-secondary: #B8AFA4;
  --text-muted: #7A7268;
  --accent: #D4A843;
  --accent-hover: #E0BA5A;
  --accent-light: #2E2718;
  --accent-glow: rgba(212, 168, 67, 0.15);
  --green: #7DA882;
  --green-light: #1E2A1F;
  --red: #D4644A;
  --red-light: #2E1F1A;
  --border: #3D3630;
  --border-light: #332D28;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-warm: 0 4px 20px rgba(212, 168, 67, 0.1);
  --card-bg: #262220;
  --nav-bg: rgba(28, 25, 23, 0.92);
  --photo-bg: #2A2520;
  --photo-border: #3D3630;
  --film-strip: #F5F0E8;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.85;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: clip;
}

html { overflow-x: clip; }

/* Subtle paper texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

[data-theme="dark"] body::before {
  opacity: 0.04;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.9rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* ---------- Layout ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section--warm {
  background-color: var(--bg-warm);
}

.section--accent {
  background-color: var(--bg-accent);
}

/* ---------- Decorative Line Ornament ---------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.ornament::before,
.ornament::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.ornament__symbol {
  color: var(--accent);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
  transition: background-color 0.4s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: color 0.25s;
}

.nav__logo:hover {
  color: var(--accent);
}

.nav__logo-icon {
  display: block;
  height: 2.4rem;
  aspect-ratio: 92 / 64;
  background: url("../images/logo/light_nav@2x.png") center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  flex-shrink: 0;
}
[data-theme="dark"] .nav__logo-icon {
  background-image: url("../images/logo/dark_nav@2x.png");
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin-left: auto;
}

.nav__link {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background-color 0.2s;
}

.nav__link:hover {
  color: var(--accent);
  background-color: var(--accent-glow);
}

.nav__link--active {
  color: var(--accent);
  background-color: var(--accent-glow);
  font-weight: 600;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  order: 2;
  margin-left: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-primary);
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.08);
}

/* Mobile nav */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
  position: relative;
  width: 36px;
  height: 36px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  position: absolute;
  left: 6px;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger span:nth-child(1) { top: 9px; }
.nav__hamburger span:nth-child(2) { top: 17px; }
.nav__hamburger span:nth-child(3) { top: 25px; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

/* Warm radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__tagline {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.hero__tagline::before,
.hero__tagline::after {
  content: '';
  width: 24px;
  height: 1px;
  background-color: var(--accent);
  opacity: 0.5;
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  font-size: 3rem;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  max-width: 580px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.hero__slogan {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 2.8rem;
  font-weight: 600;
}

.hero__buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #FFFDF8;
}

.btn--primary:hover {
  color: #FFFDF8;
  box-shadow: var(--shadow-warm);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: none;
}

.btn--outline:hover {
  background: var(--accent-light);
  color: var(--accent);
  box-shadow: none;
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ---------- How It Works / Features ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  position: relative;
  counter-increment: step;
}

.step__icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  display: block;
}

.step__icon-img {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 0.6rem;
}

.step__number {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  display: block;
}

.step__title {
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
}

.step p {
  font-size: 0.95rem;
  line-height: 1.75;
}

/* 4-step variant */
.steps--four {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.steps--four .step {
  padding: 1.75rem 1.25rem 1.5rem;
}

.steps--four .step__icon {
  font-size: 1.75rem;
  margin-bottom: 0.2rem;
}

.steps--four .step__number {
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.steps--four .step__title {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.steps--four .step p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

@media (min-width: 769px) {
  .steps--four .step:not(:last-child)::after {
    content: '›';
    position: absolute;
    right: -0.85rem;
    top: 3.1rem;
    font-size: 2.2rem;
    color: var(--accent);
    opacity: 0.35;
    font-family: var(--font-display);
    line-height: 1;
    z-index: 2;
    pointer-events: none;
  }
}

/* ---------- Demo Section ---------- */
.demo {
  padding: 2rem 0;
}

.demo__intro {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2.5rem;
}

/* Problem visualization */
.demo__problem {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.demo__problem-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}


.demo__problem-note {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
  transition: color 0.3s ease;
}

/* ── Interactive problem bar ── */
.demo__hbar {
  position: relative;
  padding-top: 42px; /* room for clump label above tiles */
  margin: 0.85rem 0 0.65rem;
  cursor: pointer;
}

.demo__hbar-clump-label {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: max-content;
  max-width: 230px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--red);
  text-align: center;
  text-wrap: balance;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 20;
  letter-spacing: 0.02em;
}

.demo__hbar-clump-arrow {
  flex: 0 0 auto;
}

.demo__hbar-clump-label span:last-child {
  min-width: 0;
}

.demo__hbar-tiles {
  position: relative;
  height: 60px;
  overflow: visible;
  transform-origin: center center;
  -webkit-transition: -webkit-clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  transition: clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Small polaroid tile */
.demo__hbar-tile {
  position: absolute;
  left: 0;
  top: 1px;
  width: 48px;
  height: 56px;
  border-radius: 2px;
  background: var(--card-bg);
  border: 1px solid var(--photo-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 4px 12px;
  will-change: transform;
  transition: transform 0.58s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.24s ease;
}

.demo__hbar-tile-frame {
  width: 100%;
  flex: 1;
  background: var(--photo-bg);
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo__hbar-tile-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.15s ease;
}

.demo__hbar-tile--digital .demo__hbar-tile-icon {
  font-size: 1.0rem;
}

.demo__hbar-tile-label {
  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;
  font-size: 0.43rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  transition: opacity 0.2s ease;
}

.demo__hbar-tile--wrong {
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(185, 74, 62, 0.22), 0 0 0 0.5px var(--red);
}

.demo__hbar-tile--fixed {
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow), 0 0 0 0.5px var(--accent);
}

/* Axis line */
.demo__hbar-axis {
  position: relative;
  height: 26px;
  margin-top: 3px;
  border-top: 1.5px solid var(--border);
  transform-origin: center center;
  -webkit-transition: -webkit-clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  transition: clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo__hbar-axis-tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 5px;
  background: var(--border);
  transform: translateX(-50%);
}

.demo__hbar-axis-label {
  position: absolute;
  top: 6px;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  color: var(--text-muted);
  transform: translateX(-50%);
  white-space: nowrap;
}

.demo__hbar-axis-label--scan {
  color: var(--red);
  font-weight: 700;
}

.demo__hbar-axis-gap {
  position: absolute;
  top: 3px;
  font-size: 0.72rem;
  font-family: var(--font-ui);
  color: var(--text-muted);
  letter-spacing: 3px;
  transform: translateX(-50%);
  opacity: 0.6;
}

/* Button */
.demo__hbar-controls {
  text-align: center;
  margin: 0.85rem 0 0.5rem;
}

.demo__hbar-btn {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  padding: 0.38rem 1.1rem;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.12s ease;
  letter-spacing: 0.01em;
}

.demo__hbar-btn:hover {
  background: var(--accent);
  color: var(--bg-secondary);
}

.demo__hbar-btn:active {
  transform: scale(0.97);
}

/* Hbar tile emoji hover/animation effects */
.demo__hbar-tile:not(.anim-playing):hover .demo__hbar-tile-icon {
  transform: scale(1.12);
}

.demo__hbar-tile.anim-playing .demo__hbar-tile-icon {
  transition: none;
}

/* Door: transform-origin anchored to left so it swings open */
[data-anim="door"] .demo__hbar-tile-icon {
  transform-origin: left center;
}

/* Fly — airplane swoops off right, reappears from left */
.demo__hbar-tile.anim-playing[data-anim="fly"] .demo__hbar-tile-icon {
  animation: anim-fly 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes anim-fly {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  38%  { transform: translate(48px,-28px) rotate(-18deg) scale(1.1); opacity: 0; }
  39%  { transform: translate(-48px,28px) rotate(-18deg) scale(1.1); opacity: 0; }
  100% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
}

/* Toss — graduation cap launched upward */
.demo__hbar-tile.anim-playing[data-anim="toss"] .demo__hbar-tile-icon {
  animation: anim-toss 0.7s ease-out forwards;
}
@keyframes anim-toss {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  35%  { transform: translateY(-30px) rotate(-28deg) scale(1.2); }
  65%  { transform: translateY(-12px) rotate(14deg) scale(1.1); }
  82%  { transform: translateY(-3px) rotate(-4deg); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

/* Spin — wedding ring 3D flip */
.demo__hbar-tile.anim-playing[data-anim="spin"] .demo__hbar-tile-icon {
  animation: anim-spin 0.65s ease-in-out forwards;
}
@keyframes anim-spin {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.3); }
  100% { transform: rotateY(360deg) scale(1); }
}

/* Bounce — baseball spins and arcs upward */
.demo__hbar-tile.anim-playing[data-anim="bounce"] .demo__hbar-tile-icon {
  animation: anim-bounce 0.6s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}
@keyframes anim-bounce {
  0%   { transform: translateY(0) rotate(0deg); }
  30%  { transform: translateY(-24px) rotate(120deg); }
  60%  { transform: translateY(-8px) rotate(240deg); }
  80%  { transform: translateY(-2px) rotate(330deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

/* Shake — microphone vibrates like feedback */
.demo__hbar-tile.anim-playing[data-anim="shake"] .demo__hbar-tile-icon {
  animation: anim-shake 0.55s ease forwards;
}
@keyframes anim-shake {
  0%   { transform: translateX(0) rotate(0deg); }
  15%  { transform: translateX(-7px) rotate(-8deg); }
  30%  { transform: translateX(7px) rotate(8deg); }
  45%  { transform: translateX(-5px) rotate(-5deg); }
  60%  { transform: translateX(5px) rotate(5deg); }
  78%  { transform: translateX(-2px) rotate(-2deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

/* Flash — phone camera shutter */
.demo__hbar-tile.anim-playing[data-anim="flash"] .demo__hbar-tile-icon {
  animation: anim-flash 0.55s ease forwards;
}
@keyframes anim-flash {
  0%   { filter: brightness(1); transform: scale(1); }
  18%  { filter: brightness(3.5) saturate(0); transform: scale(1.08); }
  36%  { filter: brightness(1); transform: scale(1); }
  54%  { filter: brightness(2) saturate(0); transform: scale(1.04); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* Sparkle — Christmas tree glows and shimmers */
.demo__hbar-tile.anim-playing[data-anim="sparkle"] .demo__hbar-tile-icon {
  animation: anim-sparkle 0.8s ease forwards;
}
@keyframes anim-sparkle {
  0%   { transform: scale(1) rotate(0deg); filter: brightness(1); }
  25%  { transform: scale(1.18) rotate(-5deg); filter: brightness(1.7) hue-rotate(25deg); }
  55%  { transform: scale(1.25) rotate(5deg); filter: brightness(2.1) hue-rotate(50deg); }
  80%  { transform: scale(1.1) rotate(-2deg); filter: brightness(1.4) hue-rotate(20deg); }
  100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}

/* Candle — birthday cake flame flickers */
.demo__hbar-tile.anim-playing[data-anim="candle"] .demo__hbar-tile-icon {
  animation: anim-candle 0.8s ease forwards;
}
@keyframes anim-candle {
  0%   { transform: scale(1) skewX(0deg) translateY(0); filter: brightness(1); }
  15%  { transform: scale(1.06) skewX(-3deg) translateY(-3px); filter: brightness(1.35); }
  35%  { transform: scale(0.96) skewX(4deg) translateY(1px); filter: brightness(0.82); }
  55%  { transform: scale(1.05) skewX(-2deg) translateY(-2px); filter: brightness(1.2); }
  75%  { transform: scale(0.99) skewX(2deg) translateY(0); filter: brightness(0.93); }
  100% { transform: scale(1) skewX(0deg) translateY(0); filter: brightness(1); }
}

/* Door — house emoji swings open on left hinge */
.demo__hbar-tile.anim-playing[data-anim="door"] .demo__hbar-tile-icon {
  animation: anim-door 0.7s ease-in-out forwards;
}
@keyframes anim-door {
  0%   { transform: perspective(260px) rotateY(0deg) scaleX(1); }
  42%  { transform: perspective(260px) rotateY(-42deg) scaleX(0.82); }
  72%  { transform: perspective(260px) rotateY(-16deg) scaleX(0.94); }
  100% { transform: perspective(260px) rotateY(0deg) scaleX(1); }
}

/* Wobble — family/baby/vacation side-to-side */
.demo__hbar-tile.anim-playing[data-anim="wobble"] .demo__hbar-tile-icon {
  animation: anim-wobble 0.55s ease forwards;
}
@keyframes anim-wobble {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-13deg) scale(1.1); }
  40%  { transform: rotate(11deg) scale(1.05); }
  60%  { transform: rotate(-6deg); }
  80%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Pulse — summer sunrise glows warmly */
.demo__hbar-tile.anim-playing[data-anim="pulse"] .demo__hbar-tile-icon {
  animation: anim-pulse 0.55s ease forwards;
}
@keyframes anim-pulse {
  0%   { transform: scale(1); filter: brightness(1); }
  35%  { transform: scale(1.28); filter: brightness(1.5); }
  65%  { transform: scale(1.12); filter: brightness(1.2); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* ---------- Pricing ---------- */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 2.5rem auto 0;
}

.pricing-card {
  text-align: center;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Decorative corner flourish on featured card */
.pricing-card--featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-warm);
}

.pricing-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.pricing-card__badge {
  position: absolute;
  top: 16px;
  right: -47px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #FFFDF8;
  padding: 0.3rem 2.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(45deg);
}

.pricing-card__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.pricing-card__amount {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.2rem;
  line-height: 1;
}

.pricing-card__unit {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.pricing-card__details {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
  font-size: 0.92rem;
}

.pricing-card__details li {
  padding: 0.55rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pricing-card__details li:last-child {
  border-bottom: none;
}

.pricing-card__details li::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pricing__note {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Included in every plan */
.pricing__included {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding: 1.75rem 2rem;
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.pricing__included::before,
.pricing__included::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
}

.pricing__included::before {
  left: 0;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.pricing__included::after {
  right: 0;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pricing__included-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pricing__included-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border));
}

.pricing__included-rule--right {
  background: linear-gradient(to left, transparent, var(--border));
}

.pricing__included-title {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.pricing__included-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.pricing__included-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1.25rem;
  gap: 0.4rem;
}

.pricing__included-item + .pricing__included-item {
  border-left: 1px solid var(--border-light);
}

.pricing__included-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.pricing__included-img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 0.5rem;
}

.pricing__included-name {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pricing__included-desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 680px) {
  .pricing__included-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 0;
  }

  .pricing__included-item {
    padding: 0 1rem;
  }

  .pricing__included-item:nth-child(odd) {
    border-left: none;
  }

  .pricing__included-item:nth-child(n+3) {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
  }
}

/* 4-column pricing grid */
.pricing__grid--4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Capacity line (photo count) */
.pricing-card__capacity {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

/* Per-photo rate comparison */
.pricing-card__rate {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Savings badge */
.pricing-card__savings {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

/* Push button to bottom when no savings badge */
.pricing-card__spacer {
  flex: 1;
  min-height: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Bulk card */
.pricing-card--bulk {
  border-style: dashed;
  border-color: var(--border);
}

.pricing-card__bulk-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.3rem;
}

/* Rate-style amount (for bulk $0.048 display) */
.pricing-card__amount--rate {
  font-size: 2.4rem;
}

.pricing__estimator-cta {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-accent);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pricing__estimator-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.pricing__estimator-cta a:hover {
  text-decoration: underline;
}

/* ---------- Waitlist Button ---------- */
.btn--waitlist {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  position: relative;
}

.btn--waitlist:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  box-shadow: none;
}

.btn__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  margin-left: 0.15rem;
}

.btn--waitlist:hover .btn__arrow,
.btn--primary:hover .btn__arrow {
  transform: translateX(4px);
}

/* ---------- Early Access ---------- */
.early-access {
  margin: 3.5rem auto 0;
  max-width: 560px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem 2rem;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-warm);
  position: relative;
  overflow: hidden;
}

.early-access::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.early-access__ornament {
  font-size: 1.1rem;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 0.9rem;
}

.early-access__badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 100px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1.1rem;
}

.early-access__title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.early-access__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.6rem;
}

.early-access__form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.early-access__input {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.early-access__input::placeholder {
  color: var(--text-muted);
}

.early-access__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.early-access__input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.early-access__submit {
  white-space: nowrap;
}

.early-access__submit:disabled {
  opacity: 0.75;
  cursor: default;
  background: var(--green);
  pointer-events: none;
}

.early-access__note {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ---------- Features Grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.feature {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature__title {
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.92rem;
}

/* ---------- Scanning Tips ---------- */
.tips {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.tip {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.75rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}

.tip:first-child {
  border-top: 1px solid var(--border-light);
}

.tip__number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.4;
  line-height: 1.15;
  letter-spacing: -0.02em;
  padding-top: 0.1rem;
}

.tip__title {
  margin-bottom: 0.5rem;
}

.tip__lead {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tip__callout {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.tip__callout-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.tip__compare {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 0.75rem;
}

.tip__compare-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.tip__compare-row:last-child {
  border-bottom: none;
}

.tip__compare-row--rec {
  background: var(--accent-light);
}

.tip__compare-key {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.tip__compare-desc {
  color: var(--text-secondary);
  line-height: 1.4;
}

.tip__compare-badge {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--bg-accent);
  color: var(--text-muted);
  white-space: nowrap;
  border: 1px solid var(--border);
}

.tip__compare-badge--rec {
  background: var(--green-light);
  color: var(--green);
  border-color: transparent;
}

.tip__note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0;
}

/* ---------- FAQ ---------- */
.faq__list {
  max-width: 780px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--border-light);
}

.faq__item:first-child {
  border-top: 1px solid var(--border-light);
}

.faq__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 1.4rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  line-height: 1.4;
  transition: color 0.2s;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question:hover {
  color: var(--accent);
}

.faq__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 300;
  transition: transform 0.35s ease, background-color 0.25s;
  font-family: var(--font-ui);
}

details.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  background-color: var(--accent);
  color: #FFFDF8;
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

details.faq__item[open] .faq__answer {
  max-height: 600px;
  padding-bottom: 1.5rem;
}

.faq__answer p {
  font-size: 1rem;
  line-height: 1.85;
}

/* ---------- About ---------- */
.about__content {
  max-width: 720px;
  margin: 0 auto;
}

.about__story {
  font-size: 1.05rem;
  line-height: 2;
}

.about__story p {
  margin-bottom: 1.5rem;
}

.about__pullquote {
  position: relative;
  padding: 1.5rem 2rem 1.5rem 2.5rem;
  margin: 2.5rem 0;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.7;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
}

.about__pullquote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.2;
  font-family: var(--font-display);
  line-height: 1;
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

/* ---------- Footer ---------- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 2rem;
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.footer__links a {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 0 auto 1rem;
}

.footer__copy {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Page Header ---------- */
.page-header {
  text-align: center;
  padding: 4rem 0 2rem;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header__subtitle {
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }

/* ---------- Animations ---------- */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .fade-in--visible {
    opacity: 1;
    transform: translateY(0);
  }

  .stagger-1 { transition-delay: 0.1s; }
  .stagger-2 { transition-delay: 0.2s; }
  .stagger-3 { transition-delay: 0.3s; }
  .stagger-4 { transition-delay: 0.4s; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .pricing__grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  html { font-size: 16px; }

  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.65rem; }
  .hero h1 { font-size: 2.2rem; }

  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3.5rem 0; }
  .page-header { padding: 3rem 0 1.5rem; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
  }

  .nav__links--open { display: flex; }

  .nav__link {
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
  }

  .nav__hamburger { display: block; }

  .steps, .features { grid-template-columns: 1fr; gap: 1rem; }
  .steps--four { grid-template-columns: repeat(2, 1fr); }
  .pricing__grid { grid-template-columns: 1fr; }
  .pricing__grid--4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-card--featured { border-width: 2px; }

  .hero__buttons { flex-direction: column; align-items: center; }
  .btn--large { padding: 0.9rem 2rem; font-size: 0.95rem; width: 100%; max-width: 300px; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .pricing__grid--4 { grid-template-columns: 1fr; }
  .steps--four { grid-template-columns: 1fr; }

  .hero h1 { font-size: 1.85rem; }

  .about__pullquote { padding: 1.2rem 1.5rem 1.2rem 1.8rem; font-size: 1.05rem; }
}

/* ---------- Mobile overflow fixes ---------- */
@media (max-width: 640px) {
  /* Scanning best practices: collapse the number-gutter layout so the
     tip body can use the full column width, and let compare rows stack
     so the badge no longer pushes content off-screen. */
  .tip {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.75rem 0;
  }
  .tip__number {
    font-size: 1.35rem;
    opacity: 0.5;
    padding-top: 0;
  }
  .tip__compare-row {
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.85rem;
    padding: 0.7rem 0.85rem;
  }
  .tip__compare-key { grid-column: 1; grid-row: 1; }
  .tip__compare-badge {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .tip__compare-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.85rem;
  }

  /* Pricing ribbon: keep the rotated badge inside the card on narrow
     widths so it isn't clipped or pushed past the viewport. */
  .pricing-card__badge {
    top: 12px;
    right: -42px;
    padding: 0.25rem 2.2rem;
    font-size: 0.65rem;
  }

  /* Footer links wrap cleanly instead of overflowing on a single row. */
  .footer__links {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0 1.2rem;
  }

}

/* ---------- Quote Tool ---------- */
.quote-tool {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem 2rem;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-warm);
  position: relative;
  overflow: hidden;
}

.quote-tool::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.quote-tool__ornament {
  font-size: 1.1rem;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 0.9rem;
}

.quote-tool__title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.quote-tool__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.6rem;
}

.quote-tool__convention {
  margin-bottom: 1.5rem;
  position: relative;
}

.quote-tool__label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.quote-tool__suffix-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.quote-tool__suffix-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.quote-tool__suffix-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quote-tool__input {
  width: 100px;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quote-tool__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.quote-tool__example {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.quote-tool__example code {
  font-size: 0.8rem;
  background: var(--bg-accent);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  color: var(--text-secondary);
}

.quote-tool__picker {
  margin-bottom: 1.5rem;
  position: relative;
}

.quote-tool__browse {
  cursor: pointer;
  display: inline-flex;
}

.quote-tool__folder-name {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.quote-tool__loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 0 1.5rem;
}

.quote-tool__loading.is-visible {
  display: flex;
}

@keyframes ts-spin {
  to { transform: rotate(360deg); }
}

.quote-tool__spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ts-spin 0.75s linear infinite;
}

.quote-tool__loading-text {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.quote-tool__results {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  position: relative;
}

.quote-tool__stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.quote-tool__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quote-tool__stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.quote-tool__stat--highlight .quote-tool__stat-value {
  color: var(--accent);
  font-size: 1.8rem;
}

.quote-tool__stat-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.2rem;
}

.quote-tool__price {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.quote-tool__price-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.quote-tool__price-amount {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.quote-tool__price-breakdown {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.quote-tool__error {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.quote-tool__error a {
  font-weight: 600;
}

.quote-tool__cta {
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .quote-tool {
    padding: 1.5rem 1.2rem 1.2rem;
  }

  .quote-tool__stats {
    gap: 1rem;
  }

  .quote-tool__stat-value {
    font-size: 1.3rem;
  }

  .quote-tool__stat--highlight .quote-tool__stat-value {
    font-size: 1.5rem;
  }

  .quote-tool__price-amount {
    font-size: 2.2rem;
  }

  .quote-tool__suffix-row {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
}

/* ============================================
   Scanning Service Page
   Local Utah County drop-off scan-and-date service.
   Reuses the warm-heirloom palette; adds compact
   composition pieces specific to this single page.
   ============================================ */

.scan-hero {
  text-align: center;
  padding: 4.5rem 0 1rem;
  position: relative;
  overflow: hidden;
}

.scan-hero::before {
  content: '';
  position: absolute;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.scan-hero .container { position: relative; z-index: 1; }

.scan-hero__locale {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 100px;
  padding: 0.3rem 0.95rem;
  margin-bottom: 1.4rem;
}

.scan-hero__locale-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.scan-hero h1 {
  max-width: 720px;
  margin: 0 auto 1rem;
}

.scan-hero__sub {
  font-family: var(--font-body);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
}

/* Hero price card — receipt/ticket motif */
.scan-ticket {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.4rem 2.4rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-warm);
  position: relative;
}

/* Punched edge decoration */
.scan-ticket::before,
.scan-ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: var(--bg-primary);
  border-radius: 50%;
  border: 1px solid var(--border);
  transform: translateY(-50%);
}
.scan-ticket::before { left: -8px; }
.scan-ticket::after  { right: -8px; }

.scan-ticket__price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.scan-ticket__unit {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scan-ticket__sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.15rem;
}

/* "What's included" 4-up strip */
.scan-included {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.scan-included__item {
  text-align: center;
  padding: 1.4rem 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scan-included__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.scan-included__icon-img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 0.65rem;
  background: var(--accent-light);
  box-shadow: 0 1px 3px rgba(61, 43, 31, 0.08);
}

[data-theme="dark"] .scan-included__icon-img {
  /* Subtle warm border so the cream-bg illustrations sit comfortably on the dark card */
  box-shadow: 0 0 0 1px rgba(212, 168, 67, 0.18), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.scan-included__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.scan-included__desc {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Two-up "How we keep it fair" cards */
.scan-fairness {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.scan-fair-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.85rem;
  position: relative;
  overflow: hidden;
}

.scan-fair-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}

.scan-fair-card__eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.scan-fair-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.scan-fair-card__body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* Comparison strip */
.scan-compare {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
}

.scan-compare__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.scan-compare__title {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
}

.scan-compare__caveat {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.scan-compare__lede {
  max-width: 580px;
  margin: 0 auto;
  text-wrap: balance;
}

.scan-compare__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.scan-compare__row:last-child { border-bottom: none; }

.scan-compare__row--us {
  background: var(--bg-secondary);
}

.scan-compare__name {
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.scan-compare__name--us {
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}

.scan-compare__note {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: italic;
}

.scan-compare__price {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  min-width: 110px;
}

.scan-compare__price--us {
  color: var(--accent);
  font-size: 1.1rem;
}

.scan-compare__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  overflow: hidden;
}

.scan-compare__bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--text-muted), var(--text-secondary));
  border-radius: 3px;
}

.scan-compare__bar-fill--us {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

/* Specs + requirements: two-column on wide, stack on mobile */
.scan-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.scan-spec-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.85rem;
}

.scan-spec-block__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.scan-spec-block__title-mark {
  color: var(--accent);
  font-size: 0.85em;
}

.scan-spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.scan-spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-top: 1px dashed var(--border-light);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.scan-spec-list li:first-child { border-top: none; }

.scan-spec-list--yes li::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.scan-spec-list--no li::before {
  content: '\2715';
  color: var(--red);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* Process steps — compact horizontal flow */
.scan-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.scan-process__step {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.25rem 1.25rem;
  text-align: center;
}

.scan-process__step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -0.55rem;
  width: 0;
  height: 0;
  border-left: 7px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateY(-50%);
  opacity: 0.35;
}

.scan-process__step:last-child::after { display: none; }

.scan-process__num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

.scan-process__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.3rem;
}

.scan-process__desc {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Contact form */
.scan-contact {
  max-width: 620px;
  margin: 2.5rem auto 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-warm);
  position: relative;
  overflow: hidden;
}

.scan-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.scan-contact > * { position: relative; }

.scan-contact__lede {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.scan-contact__lede a {
  color: var(--accent);
  font-weight: 600;
}

.scan-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.scan-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.scan-form__field--full { grid-column: 1 / -1; }

.scan-form__label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.scan-form__input,
.scan-form__textarea {
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.scan-form__textarea { min-height: 88px; line-height: 1.55; }

.scan-form__input:focus,
.scan-form__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.scan-form__input:disabled,
.scan-form__textarea:disabled { opacity: 0.6; cursor: not-allowed; }

.scan-form__submit-row {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.scan-form__submit:disabled {
  opacity: 0.85;
  cursor: default;
  background: var(--green);
  pointer-events: none;
}

.scan-form__small {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Closed-state notice (when SCANNING_ENABLED is false) */
.scan-closed {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-warm);
}

.scan-closed__badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 100px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1rem;
}

/* Hide the live page when feature flag is off (toggled by inline script).
   The state attribute is set on <html> before paint to avoid flicker. */
[data-scan-state="closed"] .scan-live { display: none; }
[data-scan-state="open"] .scan-closed-section { display: none; }

@media (max-width: 880px) {
  .scan-included { grid-template-columns: repeat(2, 1fr); }
  .scan-fairness { grid-template-columns: 1fr; }
  .scan-specs { grid-template-columns: 1fr; }
  .scan-process { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .scan-process__step::after { display: none; }
  .scan-compare__row {
    grid-template-columns: 1fr auto;
    row-gap: 0.45rem;
  }
  .scan-compare__bar { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .scan-included { grid-template-columns: 1fr; }
  .scan-process { grid-template-columns: 1fr; }
  .scan-form { grid-template-columns: 1fr; }
  .scan-contact { padding: 1.6rem 1.25rem; }
  .scan-ticket { padding: 1.2rem 1.8rem 1.3rem; }
  .scan-ticket__price { font-size: 2.2rem; }
}

/* ---------- Auto dark mode from OS ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #1C1917;
    --bg-secondary: #231F1C;
    --bg-warm: #292421;
    --bg-accent: #302A25;
    --text-primary: #F5F0E8;
    --text-secondary: #B8AFA4;
    --text-muted: #7A7268;
    --accent: #D4A843;
    --accent-hover: #E0BA5A;
    --accent-light: #2E2718;
    --accent-glow: rgba(212, 168, 67, 0.15);
    --green: #7DA882;
    --green-light: #1E2A1F;
    --red: #D4644A;
    --red-light: #2E1F1A;
    --border: #3D3630;
    --border-light: #332D28;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-warm: 0 4px 20px rgba(212, 168, 67, 0.1);
    --card-bg: #262220;
    --nav-bg: rgba(28, 25, 23, 0.92);
    --photo-bg: #2A2520;
    --photo-border: #3D3630;
    --film-strip: #F5F0E8;
  }
}
