:root {
  color-scheme: light dark;

  /* Light theme tokens (from AppThemeColorMapping.md) */
  --bg: #FFF8F2;
  --surface: #FFFFFF;
  --surface-low: #FFF0E0;
  --surface-high: #FFD8B0;
  --primary: #D0600A;
  --primary-bright: #F08030;
  --on-primary: #FFFFFF;
  --text: #3A1F00;
  --text-muted: #7A5030;
  --outline: #D9A070;
  --outline-soft: rgba(217, 160, 112, 0.4);
  --success: #1B8E5A;
  --warning: #D97706;
  --shadow-card: 0 18px 48px rgba(51, 31, 18, 0.08);
  --shadow-card-hover: 0 24px 64px rgba(51, 31, 18, 0.14);
  --pill-bg: rgba(255, 255, 255, 0.7);
  --pill-active-bg: var(--surface);
  --topbar-bg: rgba(255, 248, 242, 0.85);
  --topbar-border: rgba(217, 160, 112, 0.25);
  --mock-card-bg: #FFFFFF;
  --mock-bar-bg: #FFE5C9;
  --footer-bg: #FFF0E0;
  --accent-deep: #5C2E00;
  --accent-deeper: #3A1F00;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E0D00;
    --surface: #2A1400;
    --surface-low: #2A1400;
    --surface-high: #472400;
    --primary: #F08030;
    --primary-bright: #D0600A;
    --on-primary: #1A0800;
    --text: #FFEDD8;
    --text-muted: #FFBF85;
    --outline: #7A5030;
    --outline-soft: rgba(122, 80, 48, 0.5);
    --success: #4FD28A;
    --warning: #F59E0B;
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.45);
    --shadow-card-hover: 0 24px 64px rgba(0, 0, 0, 0.6);
    --pill-bg: rgba(42, 20, 0, 0.7);
    --pill-active-bg: var(--surface-high);
    --topbar-bg: rgba(30, 13, 0, 0.85);
    --topbar-border: rgba(122, 80, 48, 0.4);
    --mock-card-bg: #2A1400;
    --mock-bar-bg: #472400;
    --footer-bg: #160600;
    --accent-deep: #472400;
    --accent-deeper: #2A1400;
  }
}

:root[data-theme="dark"] {
  --bg: #1E0D00;
  --surface: #2A1400;
  --surface-low: #2A1400;
  --surface-high: #472400;
  --primary: #F08030;
  --primary-bright: #D0600A;
  --on-primary: #1A0800;
  --text: #FFEDD8;
  --text-muted: #FFBF85;
  --outline: #7A5030;
  --outline-soft: rgba(122, 80, 48, 0.5);
  --success: #4FD28A;
  --warning: #F59E0B;
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 24px 64px rgba(0, 0, 0, 0.6);
  --pill-bg: rgba(42, 20, 0, 0.7);
  --pill-active-bg: var(--surface-high);
  --topbar-bg: rgba(30, 13, 0, 0.85);
  --topbar-border: rgba(122, 80, 48, 0.4);
  --mock-card-bg: #2A1400;
  --mock-bar-bg: #472400;
  --footer-bg: #160600;
  --accent-deep: #472400;
  --accent-deeper: #2A1400;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  transition: background-color 200ms ease, color 200ms ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0;
  color: var(--text-muted);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ----- Top bar ----- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  transition: background-color 200ms ease, border-color 200ms ease;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--outline-soft);
}

.pill button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, color 150ms ease;
}

.pill button:hover {
  color: var(--text);
}

.pill button[aria-pressed="true"] {
  background: var(--pill-active-bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pill.theme-pill button {
  padding: 6px 10px;
  font-size: 1rem;
}

.pill.theme-pill button svg {
  width: 16px;
  height: 16px;
}

/* ----- Hero ----- */
.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
  }
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary), var(--primary-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 540px;
  color: var(--text-muted);
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  min-height: 56px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid #000;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

:root[data-theme="dark"] .store-badge,
:root:not([data-theme="light"]) .store-badge {
  border-color: rgba(255, 255, 255, 0.15);
}

.store-badge svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.store-badge .store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.store-badge .store-label small {
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: 500;
}

.store-badge .store-label strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Hero mock cards */
.hero-mock {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mock::before {
  content: "";
  position: absolute;
  inset: -10% -10% -10% -10%;
  background: radial-gradient(60% 60% at 50% 50%, rgba(240, 128, 48, 0.10), transparent 70%);
  z-index: 0;
  filter: blur(8px);
}

.mock-stack {
  position: relative;
  width: min(360px, 100%);
  height: 380px;
  z-index: 1;
}

.mock-card {
  position: absolute;
  left: 50%;
  width: 88%;
  background: var(--mock-card-bg);
  border: 1px solid var(--outline-soft);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 350ms ease;
}

.mock-card-1 {
  top: 0;
  transform: translateX(-58%) rotate(-6deg);
}

.mock-card-2 {
  top: 110px;
  transform: translateX(-42%) rotate(3deg);
}

.mock-card-3 {
  top: 220px;
  transform: translateX(-50%) rotate(-2deg);
}

.hero-mock:hover .mock-card-1 {
  transform: translateX(-62%) rotate(-8deg);
}

.hero-mock:hover .mock-card-3 {
  transform: translateX(-50%) rotate(-3deg) translateY(-4px);
}

.mock-card .mock-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mock-card .mock-emoji {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-bright));
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.mock-card .mock-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.mock-card .mock-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.mock-card .mock-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--mock-bar-bg);
  margin-top: 8px;
  overflow: hidden;
  position: relative;
}

.mock-card .mock-bar.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  border-radius: 999px;
  animation: pulseBar 1.8s ease-in-out infinite;
}

.mock-card .mock-bar.full::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--success);
  border-radius: 999px;
}

.mock-card .mock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(27, 142, 90, 0.12);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
}

:root[data-theme="dark"] .mock-card .mock-status,
:root:not([data-theme="light"]) .mock-card .mock-status {
  background: rgba(79, 210, 138, 0.16);
}

@keyframes pulseBar {
  0% { width: 15%; opacity: 0.7; }
  50% { width: 75%; opacity: 1; }
  100% { width: 15%; opacity: 0.7; }
}

/* ----- Section common ----- */
section.block {
  padding: clamp(48px, 7vw, 96px) 0;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  margin: 0 auto;
  max-width: 720px;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----- Steps ----- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 720px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

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

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-bright));
  color: var(--on-primary);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(208, 96, 10, 0.35);
}

.step-card h3 {
  margin-bottom: 8px;
}

/* ----- Features ----- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-bright);
}

.feature-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-low);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.feature-card h3 {
  margin-bottom: 6px;
}

/* ----- Photo tips ----- */
.tips-card {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 40px);
  box-shadow: var(--shadow-card);
}

.tips-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .tips-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-low);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.tips-list li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--success);
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

/* ----- Pro tip ----- */
.pro-tip-card {
  background: linear-gradient(135deg, var(--accent-deeper), var(--accent-deep));
  color: #FFEDD8;
  border-radius: 24px;
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 20px 48px rgba(51, 31, 18, 0.2);
}

.pro-tip-card .pro-tip-emoji {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-bright));
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 8px 20px rgba(208, 96, 10, 0.35);
}

.pro-tip-card .pro-tip-label {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 4px;
}

.pro-tip-card .pro-tip-body {
  margin: 0;
  color: #FFEDD8;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ----- Final CTA ----- */
.final-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-deeper) 0%, var(--accent-deep) 60%, var(--primary) 130%);
  color: #FFEDD8;
  border-radius: 32px;
  padding: clamp(48px, 8vw, 80px) 24px;
  margin: clamp(48px, 7vw, 96px) 0;
  box-shadow: 0 28px 64px rgba(51, 31, 18, 0.25);
}

.final-cta::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 160%;
  background: radial-gradient(closest-side, rgba(240, 128, 48, 0.35), transparent 70%);
  pointer-events: none;
}

.final-cta > * {
  position: relative;
}

.final-cta h2 {
  color: #FFEDD8;
}

.final-cta p {
  color: #FFEDD8;
  opacity: 0.85;
  margin-top: 12px;
  font-size: 1.1rem;
}

.final-cta .hero-cta {
  justify-content: center;
}

/* ----- Footer ----- */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--outline-soft);
  padding: 32px 0 24px;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto 1fr;
  }
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
  font-weight: 600;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: right;
}

@media (max-width: 719px) {
  .footer-meta {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
