/* ============================================================
   Storefront Design System & Styles
   ============================================================ */

/* --- Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --color-primary: #2C2C2C;
  --color-secondary: #8B9D83;
  --color-warm: #C4A882;
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-muted: #9B9590;
  --color-border: #E8E4DF;
  --color-error: #C47070;
  --color-success: #6B7D63;

  /* Dark palette */
  --color-dark-bg: #0f0d0b;
  --color-dark-surface: #1a1714;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --font-accent: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-primary);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--color-warm);
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.section-sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto var(--space-3xl);
  text-align: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--color-secondary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-success);
  color: #fff;
}

.btn-warm {
  background: var(--color-warm);
  color: #fff;
}
.btn-warm:hover {
  background: #b89a74;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-primary);
}
.btn-outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Header / Nav --- */
.site-header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav a:not(.btn) {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-nav a:not(.btn):hover {
  color: var(--color-primary);
}

/* ============================================================
   FRAME MOCKUP – CSS-rendered matted frame
   ============================================================ */

.frame-mockup {
  --frame-width: 14px;
  --mat-padding: 16px;
  --panel-gap: 2px;
  border-radius: 2px;
  transition: transform 0.3s;
  position: relative;
}

/* Glass reflection */
.frame-mockup::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  border-radius: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 30%,
    transparent 55%,
    transparent 80%,
    rgba(255, 255, 255, 0.015) 100%
  );
}

.frame-mockup .frame-border {
  background: linear-gradient(145deg, #232323, #2e2e2e 15%, #101010 40%, #1c1c1c 70%, #0a0a0a);
  padding: var(--frame-width);
  border-radius: 2px;
  position: relative;
  box-shadow:
    0 10px 45px rgba(0, 0, 0, 0.55),
    0 3px 15px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 1px 0 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    inset -1px 0 0 rgba(0, 0, 0, 0.2);
}

/* The print inside: light cream paper — the same palette the customizer
   preview and print pipeline produce (tributeRenderer PAPER_PALETTE).
   The frame stays elegant dark; the paper is what the customer receives. */
.frame-mockup .mat-board {
  background: #FAF7F2;
  padding: var(--mat-padding);
  border: 1px solid #EFE9DF;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.18),
    inset 0 -1px 2px rgba(0, 0, 0, 0.06);
}

.mockup-panels {
  display: flex;
  gap: var(--panel-gap);
  position: relative;
  background: #FAF7F2;
}

.mockup-photo {
  flex: 1;
  aspect-ratio: 4 / 5;
  background: #EFEBE4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Single mat-opening bevel – one continuous cut around the entire print,
   softened for the light paper */
.mockup-panels::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-top: 3px solid rgba(0, 0, 0, 0.14);
  border-left: 3px solid rgba(0, 0, 0, 0.09);
  border-bottom: 3px solid rgba(255, 255, 255, 0.6);
  border-right: 3px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 6px 12px -4px rgba(0, 0, 0, 0.12),
    inset 5px 0 8px -4px rgba(0, 0, 0, 0.07),
    inset 0 -5px 8px -4px rgba(255, 255, 255, 0.3),
    inset -4px 0 6px -4px rgba(255, 255, 255, 0.2);
}

.mockup-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  position: relative;
  z-index: 0;
}

.mockup-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(0, 0, 0, 0.22);
  font-family: var(--font-body);
  font-size: 0.75rem;
}

.mockup-photo-fill {
  width: 100%;
  height: 100%;
}
.mockup-photo-fill.dark {
  background: radial-gradient(ellipse at 40% 40%, #4a3f36, #252220);
}
.mockup-photo-fill.warm {
  background: radial-gradient(ellipse at 40% 40%, #8a7560, #4a3f36);
}
.mockup-photo-fill.light {
  background: radial-gradient(ellipse at 40% 40%, #b0a898, #706860);
}

.mockup-tribute {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  text-align: center;
  position: relative;
}

.mockup-tribute-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: #332C26;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.mockup-tribute-dates {
  font-family: var(--font-display);
  font-size: 0.55rem;
  color: #57514b;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.mockup-tribute-divider {
  width: 30px;
  height: 1px;
  background: var(--color-warm);
  margin: 6px 0;
  opacity: 0.6;
}

.mockup-tribute-poem {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.55rem;
  line-height: 1.6;
  color: #332C26;
  opacity: 0.9;
  max-width: 90%;
}

.mockup-tribute-poem.small-poem {
  font-size: 0.5rem;
}

.mockup-tribute-nickname {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.5rem;
  color: #57514b;
  margin-top: 4px;
}

.mockup-tribute-family {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.45rem;
  color: #6b655f;
  opacity: 0.85;
  margin-top: 2px;
}

/* The mockup is a miniature of the printed landscape piece, so it must scale
   like one: type, spacing, frame and mat all derive from the frame's width.
   Without this, the fixed-px type above makes the poem pane grow TALLER as
   the frame gets narrower, flipping the sample into a portrait shape we don't
   sell (and stretching the hero spotlight with it). Container-query units
   keep the composition self-similar at every width; the px sizes above remain
   as the fallback for browsers without cqw support. Reference design width:
   440px (the desktop hero), so 1cqw = 4.4px there. */
@supports (font-size: 1cqw) {
  .frame-mockup {
    container-type: inline-size;
    /* Containment strips the contents' intrinsic width, so the frame must
       take its width from its parent (max-widths per context still cap it) —
       otherwise content-sized parents (e.g. the centered mobile hero column)
       collapse it to zero. */
    width: 100%;
    --frame-width: 3.2cqw;
    --mat-padding: 3.6cqw;
    --panel-gap: 0.45cqw;
  }
  .hero-mockup { width: 100%; }
  .mockup-tribute { padding: 2.7cqw 2.3cqw; }
  .mockup-tribute-name { font-size: 4cqw; margin-bottom: 0.45cqw; }
  .mockup-tribute-dates { font-size: 2cqw; margin-bottom: 1.4cqw; }
  .mockup-tribute-divider { width: 6.8cqw; margin: 1.4cqw 0; }
  .mockup-tribute-poem { font-size: 2cqw; }
  .mockup-tribute-poem.small-poem { font-size: 1.8cqw; }
  .mockup-tribute-nickname { font-size: 1.8cqw; margin-top: 0.9cqw; }
  .mockup-tribute-family { font-size: 1.65cqw; margin-top: 0.45cqw; }
}

/* Theme: Warm Natural */
.frame-mockup.theme-warm .frame-border {
  background: linear-gradient(145deg, #b8956a, #c9a87c 15%, #a0804f 40%, #c4a06d 70%, #96783f);
  box-shadow:
    0 10px 45px rgba(0, 0, 0, 0.3),
    0 3px 15px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 1px 0 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    inset -1px 0 0 rgba(0, 0, 0, 0.1);
}
.frame-mockup.theme-warm .mat-board {
  background: #F5EDE0;
  border-color: #E0D8CC;
}
.frame-mockup.theme-warm .mockup-panels {
  background: #E8DDD0;
}
.frame-mockup.theme-warm .mockup-photo {
  background: #E8DDD0;
}
.frame-mockup.theme-warm .mockup-tribute {
  background: #F5EDE0;
}
/* Warm mat-opening bevel – cream mat with white core */
.frame-mockup.theme-warm .mockup-panels::before {
  border-top-color: rgba(0, 0, 0, 0.12);
  border-left-color: rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.55);
  border-right-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 6px 12px -4px rgba(0, 0, 0, 0.1),
    inset 5px 0 10px -4px rgba(0, 0, 0, 0.05),
    inset 0 -5px 10px -4px rgba(255, 255, 255, 0.35),
    inset -4px 0 8px -4px rgba(255, 255, 255, 0.18);
}
.frame-mockup.theme-warm .mockup-tribute-name { color: #2C2420; }
.frame-mockup.theme-warm .mockup-tribute-dates { color: #6B5D52; }
.frame-mockup.theme-warm .mockup-tribute-poem { color: #4A3F36; }
.frame-mockup.theme-warm .mockup-tribute-nickname { color: #6B5D52; }
.frame-mockup.theme-warm .mockup-tribute-family { color: #6B5D52; }

/* Theme: Soft Light */
.frame-mockup.theme-light .frame-border {
  background: linear-gradient(145deg, #e8e4e0, #f0ece8 15%, #d8d4d0 40%, #ece8e4 70%, #d0ccc8);
  box-shadow:
    0 10px 45px rgba(0, 0, 0, 0.14),
    0 3px 15px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 1px 0 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    inset -1px 0 0 rgba(0, 0, 0, 0.04);
}
.frame-mockup.theme-light .mat-board {
  background: #FFFFFF;
  border-color: #ebe8e4;
}
.frame-mockup.theme-light .mockup-panels {
  background: #EDEBE8;
}
.frame-mockup.theme-light .mockup-photo {
  background: #f0ede8;
}
.frame-mockup.theme-light .mockup-tribute {
  background: #FFFFFF;
}
/* Light mat-opening bevel – white mat, ultra-subtle */
.frame-mockup.theme-light .mockup-panels::before {
  border-top-color: rgba(0, 0, 0, 0.07);
  border-left-color: rgba(0, 0, 0, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.7);
  border-right-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 6px 12px -4px rgba(0, 0, 0, 0.05),
    inset 5px 0 10px -4px rgba(0, 0, 0, 0.025),
    inset 0 -5px 10px -4px rgba(255, 255, 255, 0.4),
    inset -4px 0 8px -4px rgba(255, 255, 255, 0.2);
}
.frame-mockup.theme-light .mockup-tribute-name { color: #3a3a3a; }
.frame-mockup.theme-light .mockup-tribute-dates { color: #8a8a8a; }
.frame-mockup.theme-light .mockup-tribute-divider { background: #c0b8a8; }
.frame-mockup.theme-light .mockup-tribute-poem { color: #5a5a5a; }
.frame-mockup.theme-light .mockup-tribute-nickname { color: #8a8a8a; }
.frame-mockup.theme-light .mockup-tribute-family { color: #8a8a8a; }

/* Small variant for showcase */
.frame-mockup.small {
  --frame-width: 10px;
  --mat-padding: 10px;
}
.frame-mockup.small .mockup-tribute-name { font-size: 0.85rem; }
.frame-mockup.small .mockup-tribute-dates { font-size: 0.5rem; }
.frame-mockup.small .mockup-tribute-poem { font-size: 0.45rem; }

/* ============================================================
   SECTION 1: CINEMATIC HERO
   ============================================================ */

.hero {
  background:
    radial-gradient(ellipse at 30% 80%, rgba(196, 168, 130, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-dark-bg) 0%, var(--color-dark-surface) 100%);
  padding: var(--space-4xl) 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-content {
  color: #FAF8F5;
}

.hero h1 {
  font-weight: 300;
  color: #FAF8F5;
  margin-bottom: var(--space-lg);
  line-height: 1.15;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-warm);
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #9B9590;
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #9B9590;
  letter-spacing: 0.02em;
}

.trust-item svg {
  color: var(--color-warm);
  opacity: 0.7;
  flex-shrink: 0;
}

/* Hero mockup */
.hero-mockup {
  display: flex;
  justify-content: center;
  position: relative;
}

/* Gallery spotlight behind the frame so the black molding reads against the
   dark hero wall (the text side stays dark for legible white type). */
.hero-mockup::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 144%;
  height: 138%;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(144, 128, 110, 0.58) 0%,
    rgba(110, 97, 82, 0.30) 46%,
    transparent 76%);
}

.hero-mockup .frame-mockup {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  /* Wall texture behind */
  filter: drop-shadow(0 8px 40px rgba(0,0,0,0.4));
}

/* ============================================================
   SECTION 2: COLLECTIONS
   ============================================================ */

.collections {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
  text-align: center;
}

.collections h2 {
  margin-bottom: var(--space-md);
}

.collection-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 800px;
  margin: var(--space-2xl) auto 0;
}

.collection-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: var(--space-2xl);
  padding: var(--space-2xl);
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-primary);
  transition: transform 0.3s, box-shadow 0.3s;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--color-primary);
}

.collection-card-mockup .frame-mockup {
  max-width: 100%;
}

.collection-card-text {
  text-align: left;
}

.collection-card-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}

.collection-card-text p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.collection-card-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-warm);
  margin-top: var(--space-sm);
}

.collection-card:hover .collection-card-cta {
  color: #b89a74;
}

.collection-sublinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: calc(-1 * var(--space-sm));
  padding-bottom: var(--space-sm);
}

.collection-sublinks span {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-muted);
}

.collection-sublinks a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-warm);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}

.collection-sublinks a:hover {
  color: #b89a74;
  border-bottom-color: #b89a74;
}

/* ============================================================
   SECTION 3: STYLE SHOWCASE
   ============================================================ */

.showcase {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
  text-align: center;
}

.showcase h2 {
  margin-bottom: var(--space-md);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

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

.showcase-item .frame-mockup {
  max-width: 280px;
  margin: 0 auto var(--space-lg);
  transition: transform 0.3s;
}

.showcase-item:hover .frame-mockup {
  transform: translateY(-4px);
}

.showcase-item h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.showcase-item p {
  color: var(--color-muted);
  font-size: 0.9rem;
  max-width: 240px;
  margin: 0 auto;
}

/* ============================================================
   TRANSFORMATION (How It Works, reframed)
   ============================================================ */

.transformation {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

.transformation h2 {
  text-align: center;
  margin-bottom: var(--space-md);
}

.transformation-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 640px;
  margin: 0 auto;
}

.transformation-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.transformation-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-warm);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  flex-shrink: 0;
}

.transformation-content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
}

.transformation-content p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   BENEFITS (Emotional outcomes)
   ============================================================ */

.benefits {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
}

.benefits h2 {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

.benefit-card {
  text-align: center;
  padding: var(--space-xl);
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-warm);
  margin-bottom: var(--space-lg);
}

.benefit-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.benefit-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   FEATURES (How we deliver)
   ============================================================ */

.features {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
  text-align: center;
}

.features h2 {
  margin-bottom: var(--space-md);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.feature-item {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-warm);
  margin-bottom: var(--space-md);
}

.feature-item h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.feature-item p {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.styles-row {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.styles-row-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: var(--space-lg);
}

/* ============================================================
   COMPARE (Why us vs alternatives)
   ============================================================ */

.compare {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
}

.compare h2 {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.compare-card {
  border-radius: var(--radius);
  padding: var(--space-2xl);
}

.compare-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.compare-others {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.compare-others svg {
  color: var(--color-error);
  flex-shrink: 0;
}

.compare-ours {
  background: var(--color-surface);
  border: 2px solid var(--color-warm);
  box-shadow: var(--shadow);
}

.compare-ours svg {
  color: var(--color-success);
  flex-shrink: 0;
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.95rem;
  line-height: 1.5;
}

.compare-list li span {
  color: var(--color-primary);
}

.compare-list li strong {
  font-weight: 600;
}

.compare-footer {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-warm);
  margin-top: var(--space-2xl);
}

/* ============================================================
   FAQ (Objections)
   ============================================================ */

.faq {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

.faq h2 {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  padding: var(--space-lg);
}

.faq-item h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.faq-item p {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   SECTION 4: SOCIAL PROOF
   ============================================================ */

.social-proof {
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(196, 168, 130, 0.06) 0%, transparent 60%),
    var(--color-bg);
}

.proof-count {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.02em;
}

.proof-subline {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-bottom: var(--space-3xl);
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.testimonial {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.stars {
  color: var(--color-warm);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}

.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.testimonial cite {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: normal;
}

/* ============================================================
   FOUNDER STORY
   ============================================================ */

.founder-story {
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(196, 168, 130, 0.06) 0%, transparent 60%),
    var(--color-bg);
}

.founder-inner {
  max-width: 640px;
  margin: 0 auto;
}

.founder-story h2 {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.founder-text p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.founder-text p:nth-child(3) {
  font-weight: 500;
  font-size: 1.2rem;
}

.founder-sign {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-warm);
  margin-top: var(--space-xl);
}

/* ============================================================
   FINAL CTA
   ============================================================ */

.final-cta {
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(196, 168, 130, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-dark-bg) 0%, var(--color-dark-surface) 100%);
  text-align: center;
}

.final-cta h2 {
  color: #FAF8F5;
  margin-bottom: var(--space-sm);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.final-cta-sub {
  color: #9B9590;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: var(--space-2xl);
}

/* ============================================================
   SECTION 7: FOOTER
   ============================================================ */

.site-footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand .brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-muted);
}
.footer-links a:hover {
  color: var(--color-primary);
}

.footer-contact p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.footer-contact a {
  font-size: 0.9rem;
  color: var(--color-warm);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-lg);
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.footer-legal a:hover {
  color: var(--color-primary);
}

/* ============================================================
   TRUST BADGES
   ============================================================ */

.trust-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}

.trust-badge svg {
  color: var(--color-warm);
  opacity: 0.8;
}

.trust-badge-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   EMAIL CAPTURE POPUP
   ============================================================ */

.email-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.email-popup-overlay.active {
  display: flex;
}

.email-popup {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-3xl);
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.email-popup-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-muted);
  cursor: pointer;
  line-height: 1;
  padding: var(--space-xs);
}

.email-popup-close:hover {
  color: var(--color-primary);
}

.email-popup h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.email-popup p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.email-popup-form {
  display: flex;
  gap: var(--space-sm);
}

.email-popup-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
}

.email-popup-form input[type="email"]:focus {
  border-color: var(--color-warm);
  outline: none;
}

.email-popup-form button {
  white-space: nowrap;
}

.email-popup-success {
  color: var(--color-success);
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: var(--space-lg) 0;
}

/* Footer email signup */
.footer-signup {
  margin-top: var(--space-lg);
}

.footer-signup p {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.footer-signup-form {
  display: flex;
  gap: var(--space-xs);
  max-width: 320px;
}

.footer-signup-form input[type="email"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.footer-signup-form input[type="email"]:focus {
  border-color: var(--color-warm);
  outline: none;
}

.footer-signup-form button {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  /* Lead with the product on mobile: the framed tribute IS the pitch, so show
     it first (headline sits right below it) instead of pushing it under a full
     screen of text and below the fold. */
  .hero-inner {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: var(--space-xl);
  }

  .hero-mockup {
    order: -1;
  }

  .hero-mockup .frame-mockup {
    max-width: 320px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .compare-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .collection-card {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

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

  .showcase-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    gap: var(--space-3xl);
  }

  .testimonials {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-signup-form {
    margin: 0 auto;
  }

  .footer-contact {
    grid-column: 1 / -1;
    text-align: center;
  }

  .trust-badges {
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-2xl) 0;
  }

  .trust-bar {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .site-nav a:not(.btn) {
    display: none;
  }

  .email-popup {
    padding: var(--space-xl);
  }

  .email-popup-form {
    flex-direction: column;
  }
}

/* ============================================================
   MID-PAGE CTA + HERO PROOF LINE
   ============================================================ */

.section-cta {
  text-align: center;
  padding: var(--space-2xl) 0 0;
}

.hero-proof {
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: rgba(196, 168, 130, 0.8);
  letter-spacing: 0.02em;
}

/* Secondary gift/sympathy entry path — deliberately quieter than the primary
   self-purchase CTA above it. */
.hero-secondary {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #9B9590;
}

.hero-secondary a {
  color: var(--color-warm);
  border-bottom: 1px solid rgba(196, 168, 130, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}

.hero-secondary a:hover {
  color: #d8bd93;
  border-bottom-color: #d8bd93;
}

/* Honest counter-signal near the "Our promise" CTA — we build trust by NOT
   faking reviews. Reuses the muted, centered subline treatment. */
.honesty-note {
  max-width: 640px;
  margin: var(--space-2xl) auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.honesty-note a {
  color: var(--color-warm);
  border-bottom: 1px solid rgba(196, 168, 130, 0.4);
  padding-bottom: 1px;
  white-space: nowrap;
}

.honesty-note a:hover {
  color: #b89a74;
  border-bottom-color: #b89a74;
}

/* Reversal trust strip under the final CTA — same trust-item treatment as the
   hero, centered on the dark band. */
.trust-bar-center {
  justify-content: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.final-cta .trust-bar {
  margin-top: var(--space-2xl);
}

/* ============================================================
   BLOG – Index page and article pages
   ============================================================ */

/* --- Blog Hero (index page) --- */
.blog-hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.blog-hero h1 {
  margin-bottom: var(--space-sm);
}

/* --- Blog Listing Grid (index page) --- */
.blog-listing {
  padding: var(--space-3xl) 0 var(--space-4xl);
  background: var(--color-bg);
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 720px;
  margin: 0 auto;
}

.blog-card {
  display: block;
  padding: var(--space-2xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-primary);
  transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--color-primary);
}

.blog-card-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.blog-card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.blog-card-excerpt {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.blog-card-cta {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-warm);
}

.blog-card:hover .blog-card-cta {
  color: #b89a74;
}

/* --- Blog Breadcrumb --- */
.blog-breadcrumb {
  padding: var(--space-md) 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.blog-breadcrumb a {
  color: var(--color-muted);
}

.blog-breadcrumb a:hover {
  color: var(--color-warm);
}

/* --- Blog Article --- */
.blog-article {
  padding: var(--space-3xl) 0 var(--space-4xl);
  background: var(--color-bg);
}

.blog-article .container {
  max-width: 680px;
}

.blog-article-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.blog-article-header time {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.blog-article-header h1 {
  margin-bottom: var(--space-md);
}

.blog-article-lede {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--color-muted);
  line-height: 1.6;
}

/* --- Article Body --- */
.blog-article-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: var(--space-3xl) 0 var(--space-md);
}

.blog-article-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  margin: var(--space-2xl) 0 var(--space-sm);
}

.blog-article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 var(--space-lg) var(--space-xl);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-primary);
}

.blog-article-body li {
  margin-bottom: var(--space-sm);
}

.blog-article-body blockquote {
  border-left: 3px solid var(--color-warm);
  margin: var(--space-2xl) 0;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.blog-article-body a {
  color: var(--color-warm);
  text-decoration: underline;
  text-decoration-color: rgba(196, 168, 130, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.blog-article-body a:hover {
  text-decoration-color: var(--color-warm);
}

.blog-article-body strong {
  font-weight: 600;
}

/* --- Blog CTA (end of article) --- */
.blog-cta {
  padding: var(--space-3xl) 0;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(196, 168, 130, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-dark-bg) 0%, var(--color-dark-surface) 100%);
}

.blog-cta h2 {
  color: #FAF8F5;
  margin-bottom: var(--space-sm);
}

.blog-cta p {
  color: #9B9590;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: var(--space-2xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Blog responsive --- */
@media (max-width: 768px) {
  .blog-article-body blockquote {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ============================================================
   Sympathy Message Helper Tool
   ============================================================ */

.sympathy-tool {
  padding: var(--space-3xl) 0;
  background: var(--color-bg);
}

.sympathy-tool form {
  max-width: 540px;
  margin: 0 auto;
}

.sympathy-form-group {
  margin-bottom: var(--space-lg);
}

.sympathy-form-group label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.sympathy-form-group .optional {
  font-weight: 400;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.sympathy-form-group select,
.sympathy-form-group input,
.sympathy-form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-primary);
  transition: border-color 0.2s ease;
}

.sympathy-form-group select:focus,
.sympathy-form-group input:focus,
.sympathy-form-group textarea:focus {
  outline: none;
  border-color: var(--color-warm);
}

.sympathy-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.sympathy-tool .btn {
  display: block;
  width: 100%;
  margin-top: var(--space-xl);
}

.sympathy-loading {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.sympathy-loading p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-muted);
  font-style: italic;
}

.sympathy-results {
  max-width: 640px;
  margin: var(--space-2xl) auto 0;
}

.message-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
}

.message-card-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-warm);
  margin-bottom: var(--space-sm);
}

.message-card-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-primary);
  white-space: pre-wrap;
}

.message-card-copy {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sympathy-tool form {
    max-width: 100%;
  }
  .sympathy-results {
    max-width: 100%;
  }
}

/* ── Pet Memorial Poem Generator ─────────────────────────────── */
.poem-format-toggle {
  display: flex;
  gap: var(--space-md);
}

.poem-format-option {
  flex: 1;
  display: block;
  cursor: pointer;
  margin-bottom: 0 !important;
}

.poem-format-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.poem-format-option span {
  display: block;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-primary);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.poem-format-option span small {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.poem-format-option input:checked + span {
  border-color: var(--color-warm);
  background: rgba(196, 168, 130, 0.12);
}

.poem-format-option input:focus-visible + span {
  outline: 2px solid var(--color-warm);
  outline-offset: 2px;
}

.poem-results {
  max-width: 640px;
  margin: var(--space-2xl) auto 0;
}

.poem-result-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.poem-result-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.85;
  color: var(--color-primary);
  white-space: pre-wrap;
  margin: 0 0 var(--space-xl);
}

.poem-result-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.poem-result-actions .btn {
  display: inline-block;
  width: auto;
  margin-top: 0;
  cursor: pointer;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

.poem-result-cta {
  text-align: center;
  margin-top: var(--space-2xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.poem-result-cta h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.poem-result-cta p {
  color: var(--color-muted);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.poem-result-downsell {
  margin: var(--space-md) auto 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.poem-result-downsell a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.poem-result-downsell a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .poem-results {
    max-width: 100%;
  }
}

/* ============================================================
   The Writing — showcase styles (used on the homepage section
   and the /the-writing page). Namespaced .tw-* to avoid collisions.
   ============================================================ */
.tw-eyebrow{font-family:var(--font-body);font-size:.75rem;font-weight:600;letter-spacing:.22em;
  text-transform:uppercase;color:var(--color-warm);margin:0}
.tw-h{font-family:var(--font-display);font-weight:400;line-height:1.08;color:var(--color-primary);
  text-wrap:balance;letter-spacing:.005em}
.tw-lede{font-size:1.15rem;color:#6a635a;max-width:60ch;text-wrap:pretty}
.tw-section{padding:clamp(64px,9vw,120px) 0}
.tw-rule{width:52px;height:1px;background:var(--color-warm);border:0;margin:0 0 28px;opacity:.8}
.tw-piece{margin:0;filter:drop-shadow(0 22px 40px rgba(44,36,24,.20))}
.tw-piece img{width:100%;height:auto;border-radius:3px}
.tw-piece figcaption{margin-top:16px;font-size:.92rem;color:#8a8177;max-width:46ch;line-height:1.55}
.tw-piece figcaption b{color:#575047;font-weight:600}
.tw-tl{transform:rotate(-1.4deg)}
.tw-tr{transform:rotate(1.3deg)}
.tw-hero{padding:clamp(56px,8vw,96px) 0 clamp(32px,5vw,56px);text-align:center}
.tw-hero .tw-h{font-size:clamp(2.4rem,6vw,4.6rem);margin:.3em auto 0;max-width:16ch}
.tw-hero .tw-lede{margin:26px auto 0;text-align:center}
.tw-hero .tw-piece{max-width:500px;margin:clamp(40px,6vw,68px) auto 0}
.tw-hero .tw-piece figcaption{text-align:center;margin-inline:auto}
.tw-split{display:grid;grid-template-columns:1fr 1fr;gap:clamp(28px,5vw,64px);align-items:center}
.tw-split .tw-txt{max-width:34rem}
.tw-split .tw-h{font-size:clamp(1.75rem,3.6vw,2.7rem);margin:0 0 .5em}
.tw-split.tw-rev .tw-txt{order:2}
@media (max-width:768px){.tw-split{grid-template-columns:1fr;gap:32px}.tw-split.tw-rev .tw-txt{order:0}}
.tw-quotes{border-top:1px solid var(--color-border);margin-top:8px}
.tw-pq{padding:28px 0;border-bottom:1px solid var(--color-border);display:grid;
  grid-template-columns:1fr auto;gap:10px 28px;align-items:baseline}
.tw-pq q{font-family:var(--font-display);font-weight:500;font-size:clamp(1.5rem,3.3vw,2.3rem);
  line-height:1.22;color:var(--color-primary);quotes:"\201C" "\201D";text-wrap:balance}
.tw-pq .who{font-family:var(--font-body);font-size:.78rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--color-warm);white-space:nowrap;padding-top:.5em}
.tw-humor{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:36px}
@media (max-width:720px){.tw-humor{grid-template-columns:1fr}}
.tw-hcard{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);
  padding:28px 26px;display:flex;flex-direction:column;gap:14px}
.tw-hcard .line{font-family:var(--font-display);font-weight:500;font-size:1.55rem;line-height:1.3;color:var(--color-primary)}
.tw-hcard .who{font-family:var(--font-body);font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;color:var(--color-warm)}
.tw-gallery{columns:3;column-gap:clamp(16px,2.2vw,26px)}
@media (max-width:900px){.tw-gallery{columns:2}}
@media (max-width:560px){.tw-gallery{columns:1}}
.tw-gallery .tw-piece{break-inside:avoid;margin:0 0 clamp(16px,2.2vw,26px);transform:none;
  filter:drop-shadow(0 16px 30px rgba(44,36,24,.18))}
.tw-voices{display:grid;grid-template-columns:1fr 1fr;gap:clamp(20px,3vw,32px)}
@media (max-width:768px){.tw-voices{grid-template-columns:1fr}}
.tw-vcard{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);
  padding:clamp(28px,3.4vw,40px);margin:0;display:flex;flex-direction:column;gap:22px}
.tw-vcard blockquote{margin:0;font-family:var(--font-display);font-weight:500;
  font-size:clamp(1.3rem,2.2vw,1.55rem);line-height:1.44;color:var(--color-primary);text-wrap:pretty}
.tw-attrib{display:flex;align-items:center;gap:16px;margin-top:auto;padding-top:20px;border-top:1px solid var(--color-border)}
.tw-attrib img{width:70px;height:86px;object-fit:cover;object-position:top;border-radius:3px;
  box-shadow:0 6px 16px rgba(44,36,24,.2);flex:none}
.tw-attrib .nm{display:block;font-family:var(--font-body);font-weight:600;color:var(--color-primary);font-size:.95rem;line-height:1.3}
.tw-attrib .pet{display:block;font-family:var(--font-body);font-size:.73rem;letter-spacing:.14em;text-transform:uppercase;color:var(--color-warm);margin-top:5px;line-height:1.3}
.tw-kicker{font-family:var(--font-display);font-style:italic;font-weight:400;color:var(--color-warm);
  font-size:1.5rem;line-height:1.35;margin:0}
.tw-close{text-align:center}
.tw-close .tw-h{font-size:clamp(2rem,4.4vw,3.1rem);margin:0 auto .5em;max-width:18ch}
.tw-close .tw-lede{margin:0 auto}
.tw-sig{font-family:var(--font-display);font-style:italic;color:var(--color-warm);font-size:1.35rem;margin:30px 0 34px}
.tw-cta-row{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
/* Tinted bands must START and END on their neighbours' colours, or the edge
   reads as a hard-edged rectangle sitting on the page. */
.tw-band{background:linear-gradient(180deg,
  var(--color-bg) 0%, #F4EFE8 18%, #F4EFE8 62%, var(--color-bg) 100%)}
/* Homepage "The Writing" section wrapper */
/* Sits between .features (white) above and .compare (--color-bg) below, so it
   opens on white and closes on --color-bg: no visible seam at either edge. */
.writing-showcase{background:linear-gradient(180deg,
  var(--color-surface) 0%, #F7F2EB 22%, #F4EEE6 62%, var(--color-bg) 100%);
  padding:clamp(64px,9vw,120px) 0}
.writing-showcase .subhead{max-width:40rem;margin:clamp(52px,7vw,96px) 0 34px}
.writing-showcase .subhead.first{margin-top:clamp(44px,6vw,80px)}
.writing-showcase .tw-h.sub{font-size:clamp(1.6rem,3.2vw,2.4rem);margin-bottom:.4em}

/* ============================================================
   REAL CUSTOMER WORDS
   Two clusters on the homepage: a full wall inside .social-proof
   (right where doubt peaks, directly above the mid-page CTA) and a
   three-line strip on the dark band above the final CTA.
   Deliberately no star, score, or badge treatment exists here: no
   rating data was ever collected, so none can be rendered.
   ============================================================ */

.reviews {
  margin-top: clamp(48px, 7vw, 88px);
}

.reviews-head {
  max-width: 40rem;
  margin: 0 auto clamp(28px, 4vw, 44px);
  text-align: center;
}

/* .tw-rule is left-aligned by default; centre it under this heading. */
.reviews-rule {
  margin: 0 auto 24px;
}

.reviews-title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin: 0 0 .4em;
}

.reviews-lede {
  margin: 0 auto;
  max-width: 46ch;
  text-wrap: pretty;
}

/* States the rating, then immediately subordinates it to the quotes. The
   number is what earns the click in search results; the words are what
   actually sell. Deliberately quiet — a large star badge would be the one
   tonally wrong note on a memorial page, and it is the least differentiated
   thing we could show. */
.reviews-rating {
  margin: var(--space-md) auto 0;
  max-width: 46ch;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-muted);
  text-wrap: pretty;
}

/* Multi-column wall rather than a grid: quotes are wildly different
   lengths, and columns pack them without leaving dead rows. Matches the
   .tw-gallery pattern already used in "The Writing". */
.reviews-wall {
  columns: 3;
  column-gap: clamp(16px, 2vw, 24px);
}

@media (max-width: 900px) { .reviews-wall { columns: 2; } }
@media (max-width: 620px) { .reviews-wall { columns: 1; } }

.review-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 clamp(16px, 2vw, 24px);
  padding: clamp(22px, 2.6vw, 30px) clamp(20px, 2.4vw, 28px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(44, 36, 24, 0.04);
  position: relative;
}

/* Decorative opening quote, kept faint so it never competes with the words. */
.review-card::before {
  content: "\201C";
  position: absolute;
  top: 4px;
  right: 14px;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--color-warm);
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.review-card blockquote {
  margin: 0;
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.12rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  color: var(--color-primary);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* The one- and two-line quotes carry more weight when they are set larger;
   it also keeps the wall from reading as one flat block of text. */
.review-card.is-short blockquote {
  font-weight: 500;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.34;
  text-wrap: balance;
}

.review-attrib {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #6a635a;
  overflow-wrap: break-word;
}

/* --- Dark strip above the final CTA --- */

.reviews-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  max-width: 980px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: left;
}

@media (max-width: 820px) {
  .reviews-strip {
    grid-template-columns: 1fr;
    max-width: 32rem;
    gap: var(--space-xl);
  }
}

.review-line {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(196, 168, 130, 0.35);
}

.review-line blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 1.45;
  color: #EDE7DF;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Names are set as written, not upper-cased: an attribution is a person,
   not a label. */
.review-line figcaption {
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-warm);
  overflow-wrap: break-word;
}

/* ============================================================
   TRIBUTE LIGHTBOX (.tl-*)
   Clicking a framed tribute opens it larger, with the poem set
   again as real text — a 1100px JPEG is never readable on a
   phone, and the poem is the thing people came to read.
   Namespaced .tl-* so it cannot collide with .tw-* or the
   email popup. Paired with /js/tribute-lightbox.js.
   ============================================================ */

/* --- The trigger images ------------------------------------ */
.tl-trigger {
  cursor: zoom-in;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.tw-piece .tl-trigger:hover,
.tw-piece .tl-trigger:focus-visible {
  transform: scale(1.012);
}
.tl-trigger:focus-visible {
  outline: 2px solid var(--color-warm);
  outline-offset: 4px;
}
.tw-attrib .tl-trigger:hover,
.tw-attrib .tl-trigger:focus-visible {
  filter: brightness(1.06);
}

/* The JS also sets these inline (and restores the previous values on close);
   the class keeps the lock declarative and is a hook for anything else that
   needs to know a modal is up. */
body.tl-open { overflow: hidden; }

/* --- Backdrop ---------------------------------------------- */
.tl-root {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.4vw, 40px);
  /* A softly-lit gallery, not a black box: the light falls where the
     tribute hangs. */
  background:
    radial-gradient(120% 90% at 50% 32%, rgba(66, 56, 44, 0.55) 0%, rgba(15, 13, 11, 0.94) 62%),
    rgba(15, 13, 11, 0.96);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.tl-root.is-open { opacity: 1; }
.tl-root[hidden] { display: none; }

/* --- Dialog shell ------------------------------------------ */
.tl-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1140px;
  max-height: 100%;
  outline: none;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tl-root.is-open .tl-dialog { transform: none; }
.tl-dialog:focus { outline: none; }
.tl-dialog:focus-visible {
  outline: 2px solid rgba(196, 168, 130, 0.6);
  outline-offset: 6px;
  border-radius: var(--radius);
}

/* --- Close ------------------------------------------------- */
.tl-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 17, 14, 0.7);
  border: 1px solid rgba(196, 168, 130, 0.32);
  border-radius: 50%;
  color: #EDE7DF;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tl-close:hover {
  background: rgba(196, 168, 130, 0.18);
  border-color: rgba(196, 168, 130, 0.65);
  color: #fff;
}
.tl-close:focus-visible {
  outline: 2px solid var(--color-warm);
  outline-offset: 3px;
}
.tl-close .tl-x {
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1;
  margin-top: -2px;
}

/* --- Content area ------------------------------------------ */
/* One stretched row, so the image and the poem column both get a definite
   height to constrain themselves against: the image scales down to fit and
   the poem scrolls on its own rather than pushing the dialog off-screen. */
.tl-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(24px, 3.6vw, 56px);
  align-items: stretch;
  overflow: hidden;
  padding: var(--space-sm) 0;
}

.tl-media {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tl-img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.tl-body {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Clear of the close button, which sits in the dialog's top-right. */
  padding-right: 56px;
}

.tl-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-warm);
  margin: 0;
}
.tl-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: #F4EFE8;
  margin: 0.28em 0 0;
}
.tl-years {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 10px 0 0;
}
.tl-years[hidden], .tl-family[hidden] { display: none; }

/* The poem is set like the tribute itself: display serif, generous
   leading, measure kept short enough to read in one breath. */
.tl-poem {
  margin-top: clamp(20px, 2.6vw, 30px);
  padding-top: clamp(20px, 2.6vw, 30px);
  border-top: 1px solid rgba(196, 168, 130, 0.28);
}
.tl-stanza {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.14rem, 1.5vw, 1.42rem);
  line-height: 1.75;
  color: #EDE7DF;
  max-width: 38ch;
  margin: 0 0 1.15em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.tl-stanza:last-child { margin-bottom: 0; }

.tl-family {
  margin: clamp(22px, 2.6vw, 30px) 0 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-warm);
}

/* --- Prev / next bar --------------------------------------- */
.tl-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(196, 168, 130, 0.22);
}
/* A page with a single tribute has nothing to page through. display:none
   (not visibility:hidden) so the arrows leave the tab order too. */
.tl-bar-solo { display: none; }

.tl-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid rgba(196, 168, 130, 0.38);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E4DCD1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tl-nav:hover {
  background: rgba(196, 168, 130, 0.16);
  border-color: rgba(196, 168, 130, 0.72);
  color: #fff;
}
.tl-nav:focus-visible {
  outline: 2px solid var(--color-warm);
  outline-offset: 3px;
}
.tl-nav .tl-arrow { font-size: 1rem; line-height: 1; }

.tl-count {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

/* Screen-reader-only announcement when navigating between tributes. */
.tl-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Stacked layout: phones and short windows --------------- */
@media (max-width: 860px), (max-height: 560px) {
  .tl-scroll {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--space-xs);
  }
  .tl-media {
    display: block;
    margin: 0 auto;
    max-width: 420px;
  }
  .tl-img {
    width: 100%;
    max-height: none;
  }
  .tl-body {
    overflow: visible;
    max-height: none;
    margin-top: clamp(22px, 5vw, 34px);
    padding-right: 0;
  }
  /* Full-width column now, but a poem still needs a measure. */
  .tl-stanza { max-width: 42ch; }
  .tl-nav { padding: 9px 14px; }
}

/* Very narrow phones: keep the poem the priority, trim the chrome. */
@media (max-width: 430px) {
  .tl-media { max-width: 300px; }
  .tl-close { top: -2px; right: -2px; width: 40px; height: 40px; }
  .tl-nav .tl-navtext { display: none; }
  .tl-nav { padding: 10px 16px; }
  .tl-stanza { font-size: 1.14rem; line-height: 1.72; }
}

/* --- Reduced motion: appear, don't animate ------------------ */
@media (prefers-reduced-motion: reduce) {
  .tl-root,
  .tl-dialog,
  .tl-trigger,
  .tl-nav,
  .tl-close {
    transition: none !important;
  }
  .tl-root { opacity: 1; }
  .tl-dialog { transform: none !important; }
  .tw-piece .tl-trigger:hover,
  .tw-piece .tl-trigger:focus-visible { transform: none; }
}
