:root {
  --bg: #fff8f6;
  --panel: rgba(255, 255, 255, 0.86);
  --ink: #2e1f25;
  --muted: #705f67;
  --line: #edd9df;
  --accent: #b2406b;
  --accent-dark: #7f2a4a;
  --rose: #fff0f4;
  --cream: #fff7ef;
  --shadow: 0 18px 50px rgba(111, 42, 70, 0.10);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 210, 223, 0.45), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 237, 224, 0.55), transparent 24%),
    linear-gradient(180deg, #fffdfc 0%, var(--bg) 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; letter-spacing: -0.02em; }
h1 { font-size: clamp(3rem, 6vw, 5.25rem); line-height: 0.95; margin-bottom: 1rem; }
h2 { font-size: clamp(2.2rem, 4vw, 3.25rem); line-height: 1; margin-bottom: 0.85rem; }
h3 { font-size: 1.7rem; margin-bottom: 0.65rem; }

.hero-shell,
.page-shell,
.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-shell { padding: 1.2rem 0 1rem; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.brand {
  text-decoration: none;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}
.brand span { color: var(--accent); }
.top-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.top-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 1.25rem;
  align-items: center;
}
.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 62ch;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}
.hero-actions,
.button-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.hero-actions { margin: 1.5rem 0; }
.hero-points {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
}
.hero-points li {
  position: relative;
  padding-left: 1.25rem;
}
.hero-points li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.letter-card,
.panel,
.panel-soft,
.step-card,
.feature-card,
.cta-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.letter-card { padding: 1rem; }
.mini-letter {
  background: linear-gradient(180deg, #fffefb 0%, var(--cream) 100%);
  border: 1px solid #ecd7c6;
  border-radius: 24px;
  padding: 1.4rem;
  min-height: 320px;
}
.mini-label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.mini-letter p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.12;
}
.mini-signoff { color: var(--muted); }

.section { padding: 1.2rem 0 0; }
.section-heading { margin-bottom: 1.15rem; }
.section-heading.narrow { max-width: 720px; }
.steps-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.step-card,
.feature-card { padding: 1.25rem; }
.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  border-radius: 999px;
  background: #fde6ee;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.accent-section { padding-top: 2rem; }
.occasions-section { padding-top: 2rem; }
.occasion-pills {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.occasion-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #fff4f7;
  border: 1px solid #f1d7e0;
  color: var(--accent-dark);
  font-weight: 600;
}
.cta-section { padding: 2.25rem 0 3rem; }
.cta-panel {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.button {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  font: inherit;
  font-weight: 700;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(0.98); }
.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #cc5c86 100%);
  color: white;
}
.button-soft {
  background: #fff2f6;
  color: var(--accent-dark);
  border: 1px solid #f2d9e2;
}
.wide { width: 100%; }

.page-shell { padding: 1.35rem 0 2.5rem; }
.narrow-shell { width: min(900px, calc(100% - 2rem)); }
.panel,
.panel-soft { padding: 1.3rem; }
.panel-soft {
  background: #fff7fb;
  border-radius: 20px;
}
.form-hero { margin-bottom: 1rem; }
.stack-large > * + * { margin-top: 1rem; }
.notice {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #fff0f4;
  border: 1px solid #f1ccd8;
  color: var(--accent-dark);
}
.hidden { display: none !important; }

.crumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.crumbs a {
  text-decoration: none;
  color: var(--accent-dark);
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}
label span { font-size: 0.95rem; }
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdfd;
  color: var(--ink);
  padding: 0.92rem 1rem;
  font: inherit;
}
textarea { resize: vertical; }
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(178, 64, 107, 0.15);
  border-color: var(--accent);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.field-grid.thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.loading-panel { margin-top: 1rem; }
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #f4d8e2;
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  margin: 0.8rem 0 1rem;
}
.tip-card {
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, #fffefb 0%, #fff2f5 100%);
  border: 1px solid #f0d7df;
  color: var(--muted);
}
@keyframes spin { to { transform: rotate(360deg); } }

.two-column-panel {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 1rem;
}
.letter-preview-shell {
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid #ecdcc8;
  background: linear-gradient(180deg, #fffaf2 0%, #f9f0e5 100%);
}
.letter-preview-shell[data-paper="blush-rose"] {
  background: linear-gradient(180deg, #fff6f7 0%, #feecef 100%);
}
.letter-preview-shell[data-paper="moonlight-white"] {
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}
.letter-preview-shell[data-paper="vintage-cream"] {
  background: linear-gradient(180deg, #f9f1e2 0%, #f1e6d2 100%);
}
.preview-meta,
.preview-envelope,
.muted,
.small { color: var(--muted); }
.preview-meta,
.preview-envelope { font-size: 0.92rem; }
.preview-envelope { margin-top: 0.75rem; }
.letter-preview {
  white-space: pre-wrap;
  min-height: 340px;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(120, 90, 60, 0.08);
  padding: 1.35rem;
  line-height: 1.8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}
.letter-preview-shell[data-font="soft-script"] .letter-preview {
  font-family: "Snell Roundhand", "Segoe Script", cursive;
  font-size: 1.16rem;
}
.letter-preview-shell[data-font="modern-clean"] .letter-preview {
  font-family: "Inter", system-ui, sans-serif;
}
.letter-preview-shell[data-font="serif-elegant"] .letter-preview {
  font-family: Georgia, "Times New Roman", serif;
}

.beta-banner {
  margin-bottom: 1rem;
  color: var(--accent-dark);
}
.checkout-layout { align-items: start; }
.upsells {
  display: grid;
  gap: 0.65rem;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
}
.checkbox input { width: auto; }
.pricing-card,
.summary-card {
  background: #fff8fb;
  border: 1px solid #efd6df;
  border-radius: 22px;
  padding: 1rem;
}
.pricing-card > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.38rem 0;
}
.pricing-card .total {
  margin-top: 0.45rem;
  padding-top: 0.85rem;
  border-top: 1px solid #ecd2db;
  font-size: 1.05rem;
}
.summary-card ul,
.inline-summary ul {
  margin: 0;
  padding-left: 1rem;
}
.summary-card li,
.inline-summary li { margin-bottom: 0.45rem; }

.success-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
}
.success-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.inline-summary {
  text-align: left;
  margin: 1rem auto;
  max-width: 460px;
}
.centered-row { justify-content: center; }

@media (max-width: 940px) {
  .hero-grid,
  .steps-grid,
  .feature-grid,
  .two-column-panel,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .cta-panel { align-items: flex-start; }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
  .field-grid,
  .field-grid.thirds,
  .topbar {
    grid-template-columns: 1fr;
  }
  .topbar { align-items: flex-start; }
  .button-row,
  .hero-actions { flex-direction: column; }
  .button,
  .button-soft,
  .button-primary { width: 100%; text-align: center; }
}
