/* ==========================================================================
   Chapters of Us — Editorial Keepsake Website Design System
   Zero generic SaaS tropes. Warm tactile paper, wax seals, linen & brass.
   ========================================================================== */

:root,
[data-theme='tichyPapier'] {
  --desk: #efe4d2;
  --paper: #faf5ec;
  --paper-muted: #f3e8d8;
  --card: #fffbf4;
  --card-glass: rgba(250, 245, 236, 0.86);
  --ink: #2c221e;
  --ink-soft: #3d2f28;
  --muted: #65544a;
  --subtle: #8a786a;
  --accent: #a65b46;
  --accent-deep: #7e3724;
  --accent-soft: #f4e3d6;
  --on-accent: #fffbf4;
  --gold: #b89558;
  --gold-bright: #dfb76c;
  --gold-ink: #7a5b26;
  --gold-soft: #f6efe0;
  --border: #dfd0bc;
  --border-subtle: rgba(184, 149, 88, 0.28);
  --dark-surface: #261c18;
  --dark-surface-2: #31241f;
  --dark-ink: #faf4ea;
  --dark-muted: #c9baab;
  --shadow-soft: 0 18px 46px rgba(45, 30, 18, 0.08);
  --shadow-lift: 0 28px 64px rgba(45, 30, 18, 0.14);
  --shadow-book: 0 34px 74px rgba(45, 30, 18, 0.22), 0 8px 20px rgba(45, 30, 18, 0.1);
}

[data-theme='lesnyMach'] {
  --desk: #efe2dc;
  --paper: #faf4f1;
  --paper-muted: #f4e8e3;
  --card: #fffbf9;
  --card-glass: rgba(250, 244, 241, 0.88);
  --ink: #2f2120;
  --ink-soft: #433130;
  --muted: #6c5754;
  --subtle: #8e7a77;
  --accent: #9b5660;
  --accent-deep: #733841;
  --accent-soft: #f4e2e5;
  --on-accent: #fffbf9;
  --gold: #c2a06b;
  --gold-bright: #deb992;
  --gold-ink: #7b5c32;
  --gold-soft: #f7f0e5;
  --border: #e2d0c8;
  --border-subtle: rgba(194, 160, 107, 0.3);
  --dark-surface: #281b1c;
  --dark-surface-2: #362426;
}

[data-theme='teplyLan'] {
  --desk: #eee3d0;
  --paper: #fbf6ee;
  --paper-muted: #f3e8d6;
  --card: #fffdf8;
  --card-glass: rgba(251, 246, 238, 0.88);
  --ink: #31241b;
  --ink-soft: #443428;
  --muted: #685647;
  --subtle: #8b7968;
  --accent: #9a6738;
  --accent-deep: #6e4522;
  --accent-soft: #f5e9d8;
  --on-accent: #fffdf8;
  --gold: #c09a56;
  --gold-bright: #dfbe7e;
  --gold-ink: #76561f;
  --gold-soft: #f8f0df;
  --border: #e0ceb6;
  --border-subtle: rgba(192, 154, 86, 0.32);
  --dark-surface: #271d14;
  --dark-surface-2: #34271b;
}

[data-theme='vecernyPergamen'] {
  --desk: #e7d9c9;
  --paper: #f5efe7;
  --paper-muted: #ece0d1;
  --card: #fbf6ef;
  --card-glass: rgba(245, 239, 231, 0.88);
  --ink: #2d201b;
  --ink-soft: #40302a;
  --muted: #66544c;
  --subtle: #8a766d;
  --accent: #7d473b;
  --accent-deep: #572e24;
  --accent-soft: #f0e2dc;
  --on-accent: #fbf6ef;
  --gold: #b6935a;
  --gold-bright: #d8ba8e;
  --gold-ink: #725525;
  --gold-soft: #f2e9d9;
  --border: #dac8b7;
  --border-subtle: rgba(182, 147, 90, 0.32);
  --dark-surface: #221713;
  --dark-surface-2: #2f201b;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
}

/* Subtle tactile cotton-paper grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Typography */
.font-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-hand {
  font-family: 'Caveat', cursive;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* Reading Progress Hairline */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  z-index: 120;
  transition: width 0.08s linear;
}

/* Layout Containers */
.container {
  width: min(1160px, calc(100% - 44px));
  margin-inline: auto;
}

.section {
  padding: clamp(76px, 10vw, 132px) 0;
  position: relative;
}

.section-desk {
  background: linear-gradient(180deg, var(--paper) 0%, var(--desk) 14%, var(--desk) 86%, var(--paper) 100%);
  transition: background 0.45s ease;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.scrolled {
  box-shadow: 0 8px 26px rgba(44, 34, 30, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(118, 49, 34, 0.24);
  border: 1px solid rgba(223, 183, 108, 0.35);
}

.brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--on-accent);
}

.header-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--card);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.header-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(118, 49, 34, 0.2);
}

/* ==========================================================================
   Hero — Editorial Book Composition
   ========================================================================== */
.hero {
  padding: clamp(44px, 6.5vw, 88px) 0 clamp(68px, 8vw, 112px);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.hero-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.85rem, 5.4vw, 4.55rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-deep);
}

.hero-lead {
  margin: 0;
  max-width: 49ch;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  color: var(--muted);
  line-height: 1.72;
}

/* Store Buttons */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 6px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(44, 34, 30, 0.14);
  background: var(--ink);
  color: var(--card);
  min-width: 196px;
  box-shadow: 0 14px 32px rgba(44, 34, 30, 0.16);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease,
    background-color 0.25s ease;
}

.store-btn:hover {
  transform: translateY(-2.5px);
  background: var(--accent-deep);
  box-shadow: 0 20px 42px rgba(118, 49, 34, 0.26);
}

.store-btn.secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(44, 34, 30, 0.06);
}

.store-btn.secondary:hover {
  background: var(--paper-muted);
  border-color: var(--gold);
  box-shadow: 0 16px 34px rgba(44, 34, 30, 0.11);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.store-btn-small {
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  opacity: 0.78;
}

.store-btn-big {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-reassurance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 0.82rem;
  color: var(--subtle);
  padding-top: 6px;
}

.hero-reassurance span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-reassurance span::before {
  content: '✦';
  color: var(--gold);
  font-size: 0.68rem;
}

/* Hero Visual Collage */
.hero-stage {
  position: relative;
  padding: 12px 0 24px 12px;
}

.hero-photo-frame {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: var(--desk);
  box-shadow: var(--shadow-book);
  border: 1px solid rgba(184, 149, 88, 0.34);
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.015);
}

.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 251, 244, 0.32);
  border-radius: 16px;
  pointer-events: none;
}

.hero-float-note {
  position: absolute;
  left: -18px;
  bottom: -6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 18px;
  max-width: 248px;
  box-shadow: var(--shadow-lift);
  transform: rotate(-2.2deg);
  transition: transform 0.35s ease;
}

.hero-float-note:hover {
  transform: rotate(0deg) translateY(-3px);
}

.hero-float-note .note-cap {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-float-note .note-hand {
  font-family: 'Caveat', cursive;
  font-size: 1.38rem;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}

.hero-float-seal {
  position: absolute;
  right: -12px;
  top: -16px;
  width: 82px;
  height: 82px;
  filter: drop-shadow(0 12px 20px rgba(45, 30, 18, 0.25));
  animation: gentleFloat 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-7px) rotate(2deg);
  }
}

/* Editorial Numbers Band */
.numbers-band {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--card);
  padding: 28px 0;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.number-item {
  text-align: center;
  padding: 6px 10px;
  position: relative;
}

.number-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: var(--border-subtle);
}

.number-val {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

.number-label {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Section Headers */
.section-head {
  max-width: 650px;
  margin-bottom: clamp(34px, 4.5vw, 54px);
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.section-head.centered .eyebrow {
  justify-content: center;
}

.section-head.centered .eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  margin: 12px 0 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.15rem, 3.8vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.section-desc {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.72;
}

/* ==========================================================================
   Section 1: Interactive Envelope Ritual
   ========================================================================== */
.ritual-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(30px, 5vw, 66px);
  align-items: center;
}

.mood-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.mood-pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.mood-pill:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.mood-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px rgba(166, 91, 70, 0.22);
}

.ritual-bullets {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 14px;
}

.ritual-bullets li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.ritual-bullets .num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-ink);
}

/* Interactive Envelope Stage */
.envelope-desk {
  position: relative;
  min-height: 455px;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 30%, var(--card) 0%, var(--desk) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 28px;
  overflow: hidden;
}

.envelope-stage {
  position: relative;
  width: min(370px, 100%);
  min-height: 325px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-closed-wrap {
  position: relative;
  width: 100%;
  text-align: center;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-closed-wrap.is-opened {
  opacity: 0;
  transform: translateY(34px) scale(0.92);
  pointer-events: none;
}

.envelope-img {
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  filter: drop-shadow(0 24px 36px rgba(45, 30, 18, 0.22));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-trigger {
  background: none;
  border: 0;
  padding: 0;
  position: relative;
  display: inline-block;
}

.envelope-trigger:hover .envelope-img {
  transform: translateY(-5px) rotate(-0.8deg);
}

.seal-hotspot {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.seal-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(223, 183, 108, 0.72);
  animation: sealBreath 2.6s ease-in-out infinite;
}

@keyframes sealBreath {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.16);
    opacity: 0.95;
  }
}

.envelope-hint {
  margin: 16px 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-deep);
}

/* Revealed Chapter Letter Card */
.letter-revealed {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.5s ease 0.14s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.letter-revealed.is-opened {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.letter-sheet {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-lift);
  position: relative;
}

.letter-sheet::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  pointer-events: none;
}

.letter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 8px;
}

.letter-title {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.72rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.letter-body {
  margin: 0 0 14px;
  font-size: 0.91rem;
  color: var(--muted);
  line-height: 1.62;
}

.letter-prompt {
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--paper);
  border-left: 2.5px solid var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.04rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.letter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-quiet {
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  transition: all 0.22s ease;
}

.btn-quiet:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ==========================================================================
   Section 2: Interactive 3D Open Memory Book
   ========================================================================== */
.book-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.book-frame {
  width: min(940px, 100%);
  perspective: 1800px;
}

.book-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-book);
  overflow: hidden;
  position: relative;
  min-height: 490px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.book-spread.turning {
  opacity: 0.35;
  transform: rotateY(-8deg) scale(0.988);
}

/* Realistic book spine shadow down the middle */
.book-spread::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    rgba(45, 30, 18, 0) 0%,
    rgba(45, 30, 18, 0.08) 44%,
    rgba(45, 30, 18, 0.16) 50%,
    rgba(45, 30, 18, 0.07) 58%,
    rgba(45, 30, 18, 0) 100%
  );
  pointer-events: none;
  z-index: 6;
}

.book-page {
  padding: clamp(24px, 3.6vw, 42px);
  position: relative;
  background: linear-gradient(135deg, #fffdf9 0%, #faf3e6 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-page-left {
  border-right: 1px solid rgba(184, 149, 88, 0.24);
}

.page-folio {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.polaroid {
  position: relative;
  background: #ffffff;
  padding: 12px 12px 34px;
  border-radius: 4px;
  box-shadow: 0 14px 32px rgba(45, 30, 18, 0.15);
  border: 1px solid rgba(223, 208, 188, 0.7);
  transform: rotate(-1.5deg);
  transition: transform 0.35s ease;
  margin: 6px auto 12px;
  max-width: 340px;
  width: 100%;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.015);
}

.polaroid img.photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

.polaroid-caption {
  font-family: 'Caveat', cursive;
  font-size: 1.32rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.1;
}

.washi-tape {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 112px;
  pointer-events: none;
  opacity: 0.92;
}

.page-sticker {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(45, 30, 18, 0.14));
}

.sticker-tr {
  top: 52px;
  right: 18px;
  width: 68px;
  transform: rotate(7deg);
}

.sticker-bl {
  bottom: 24px;
  left: 18px;
  width: 66px;
  transform: rotate(-8deg);
}

.sticker-euc {
  bottom: 16px;
  right: 16px;
  width: 58px;
  transform: rotate(10deg);
}

.journal-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 12px;
}

.journal-text {
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.76;
  margin: 0 0 18px;
}

.two-voices {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.voice-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(250, 245, 236, 0.85);
  border: 1px solid var(--border-subtle);
}

.voice-who {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.voice-line {
  font-family: 'Caveat', cursive;
  font-size: 1.28rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.22;
}

/* Print Specs Preview Spread */
.print-spec-grid {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.print-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}

.print-spec-row span:first-child {
  color: var(--muted);
}

.print-spec-row strong {
  color: var(--ink);
  font-weight: 600;
}

.book-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.book-tab-btn {
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.24s ease;
}

.book-tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--card);
}

.book-arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s ease;
}

.book-arrow-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.06);
}

/* ==========================================================================
   Section 3: Evening Cards (3D Flip) & Live Scratch-Off Secret Joker
   ========================================================================== */
.cards-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 44px);
  align-items: stretch;
}

.ritual-card-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.panel-heading {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.panel-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 38ch;
}

/* 3D Flip Playing Card */
.flip-scene {
  width: 264px;
  height: 344px;
  perspective: 1400px;
  cursor: pointer;
}

.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 22px 44px rgba(45, 30, 18, 0.2);
}

.flip-back {
  background: radial-gradient(circle at 50% 30%, #7d3626 0%, #562318 100%);
  border: 1.5px solid rgba(223, 183, 108, 0.52);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: #f9f1e2;
}

.flip-back::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(223, 183, 108, 0.42);
  border-radius: 13px;
  pointer-events: none;
}

.flip-back-emblem {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(223, 183, 108, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 1.9rem;
}

.flip-front {
  transform: rotateY(180deg);
  background: #fffcf6;
  border: 1.5px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.flip-front::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  pointer-events: none;
}

.card-corner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-question {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.48rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink);
  padding: 0 6px;
}

.card-divider {
  width: 28px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

/* Live Canvas Scratch-Off Joker Card */
.joker-card {
  width: 264px;
  height: 344px;
  border-radius: 20px;
  background: linear-gradient(160deg, #fffdf7 0%, #f8eedc 100%);
  border: 1.6px solid var(--gold);
  box-shadow: 0 22px 44px rgba(45, 30, 18, 0.16);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}

.joker-card::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(184, 149, 88, 0.48);
  border-radius: 13px;
  pointer-events: none;
}

.scratch-zone {
  position: relative;
  width: 100%;
  height: 178px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(250, 245, 236, 0.85);
  border: 1px solid rgba(184, 149, 88, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.joker-secret-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  transition: opacity 0.45s ease;
}

.scratch-canvas.cleared {
  opacity: 0;
  pointer-events: none;
}

.panel-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   Section 4: Time Capsule & Live 4-Theme Palette Switcher
   ========================================================================== */
.craft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(26px, 4.5vw, 54px);
  align-items: stretch;
}

.capsule-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(26px, 3.5vw, 38px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.capsule-stage {
  min-height: 200px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  position: relative;
}

.capsule-art {
  max-height: 132px;
  width: auto;
  filter: drop-shadow(0 12px 22px rgba(45, 30, 18, 0.16));
  transition: transform 0.35s ease;
}

.capsule-art:hover {
  transform: scale(1.03);
}

.capsule-letter-note {
  font-family: 'Caveat', cursive;
  font-size: 1.42rem;
  color: var(--ink);
  line-height: 1.28;
  max-width: 34ch;
  margin: 0;
}

.theme-showcase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(26px, 3.5vw, 38px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.theme-swatch-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  text-align: left;
  transition: all 0.25s ease;
}

.theme-swatch-btn:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.theme-swatch-btn.active {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(45, 30, 18, 0.08);
}

.swatch-dots {
  display: inline-flex;
  gap: 6px;
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(44, 34, 30, 0.16);
}

.swatch-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.24rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.swatch-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.lang-chip {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--paper-muted);
  color: var(--ink-soft);
}

/* ==========================================================================
   Section 5: Offline Privacy Manifesto (Warm Espresso Dark Band)
   ========================================================================== */
.privacy-band {
  background: radial-gradient(circle at 20% 20%, var(--dark-surface-2) 0%, var(--dark-surface) 100%);
  color: var(--dark-ink);
  padding: clamp(78px, 10vw, 128px) 0;
  position: relative;
  overflow: hidden;
}

.privacy-band .eyebrow {
  color: var(--gold-bright);
}

.privacy-band .section-title {
  color: var(--dark-ink);
}

.privacy-band .section-desc {
  color: var(--dark-muted);
}

.privacy-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 42px;
}

.privacy-pillar {
  padding: 28px 26px;
  border-radius: 20px;
  background: rgba(255, 251, 244, 0.04);
  border: 1px solid rgba(223, 183, 108, 0.22);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.privacy-pillar:hover {
  transform: translateY(-3px);
  border-color: rgba(223, 183, 108, 0.45);
}

.pillar-roman {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--gold-bright);
  margin-bottom: 10px;
}

.privacy-pillar h3 {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--dark-ink);
  line-height: 1.18;
}

.privacy-pillar p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--dark-muted);
  line-height: 1.68;
}

/* ==========================================================================
   Section 6: Final Download CTA & Footer
   ========================================================================== */
.final-cta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: clamp(38px, 6vw, 68px) clamp(24px, 5vw, 56px);
  box-shadow: var(--shadow-lift);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta-card::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  pointer-events: none;
}

.cta-icon {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  margin: 0 auto 20px;
  box-shadow: 0 16px 34px rgba(118, 49, 34, 0.26);
  border: 1px solid rgba(223, 183, 108, 0.4);
}

.final-cta-card .store-row {
  justify-content: center;
  margin-top: 26px;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 34px 0 46px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* Store Release Modal (when store URLs are not yet published) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 21, 16, 0.56);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px 28px;
  box-shadow: var(--shadow-book);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0) scale(1);
}

.modal-title {
  margin: 10px 0 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
}

.modal-body {
  margin: 0 0 22px;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.65;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .hero-grid,
  .ritual-layout,
  .cards-duo,
  .craft-grid {
    grid-template-columns: 1fr;
  }
  .hero-stage {
    padding: 8px 0 16px;
  }
  .hero-float-note {
    left: 12px;
    bottom: -10px;
  }
  .hero-float-seal {
    right: 6px;
    top: -12px;
    width: 68px;
    height: 68px;
  }
  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .number-item:nth-child(2)::after {
    display: none;
  }
  .book-spread {
    grid-template-columns: 1fr;
  }
  .book-spread::after {
    display: none;
  }
  .book-page-left {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .privacy-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 30px);
  }
  .header-cta {
    display: none;
  }
  .store-btn {
    width: 100%;
    justify-content: center;
  }
  .theme-grid {
    grid-template-columns: 1fr;
  }
  .flip-scene,
  .joker-card {
    width: 252px;
    height: 332px;
  }
}

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