/*
Theme Name: RELIEQ
Description: Private legacy editions — StoryTerrace-inspired structure.
Version: 3.0.0
*/

/* ============================================================
   DESIGN TOKENS
   StoryTerrace uses a clean white/cream palette with dark text.
   RELIEQ adapts this with warm editorial tones.
   ============================================================ */
:root {
  --bg:        #FAFAF7;
  --bg-white:  #FFFFFF;
  --bg-dark:   #1A1A1A;
  --bg-warm:   #F5F0E8;
  --text:      #1A1A1A;
  --text-mid:  #4A4A4A;
  --text-light:#7A7A7A;
  --accent:    #2D5A8E;
  --accent-hover:#1E4070;
  --red:       #8F2F24;
  --gold:      #A88A5A;
  --line:      #E5E5E0;
  --line-light:#F0F0EC;
  --serif:     "Cormorant Garamond", Georgia, serif;
  --sans:      Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --max:       1200px;
  --radius:    8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --ease:      cubic-bezier(.22,1,.36,1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body{background:var(--bg);color:var(--text);font-family:var(--sans);font-size:16px;line-height:1.7}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
ul{list-style:none}
.container{width:min(var(--max),calc(100% - 48px));margin:0 auto}.section-index{font-size:13px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:var(--text-light);display:inline-block;margin-bottom:16px}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
st-eyebrow, .st-eyebrow-dark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  display: inline-block;
  margin-bottom: 16px;
}
.st-eyebrow-dark { color: var(--text-mid); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); margin-bottom: 20px; }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); margin-bottom: 12px; }
h4 { font-size: 0.9375rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
p { color: var(--text-mid); margin-bottom: 16px; line-height: 1.75; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   BUTTONS (StoryTerrace style: clean, rounded)
   ============================================================ */
.st-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.st-btn-primary {
  background: var(--accent);
  color: #fff;
}
.st-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.st-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.st-btn-outline:hover {
  background: var(--accent);
  color: #fff;
}
.st-btn-dark {
  background: var(--bg-dark);
  color: #fff;
}
.st-btn-dark:hover {
  background: #333;
}
.st-btn-ghost {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.st-btn-ghost:hover { color: var(--text); }

/* ============================================================
   SECTION HEAD (reusable)
   ============================================================ */
.st-section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.st-section-head h2 { margin-bottom: 16px; }
.st-section-head p { color: var(--text-mid); font-size: 1.0625rem; }

/* ============================================================
   HEADER (StoryTerrace: clean, white bg, simple links + CTA)
   ============================================================ */
.st-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.st-header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.st-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--text);
}
.st-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.st-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.st-nav a:hover { color: var(--text); }
.st-nav-cta {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.st-nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.st-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.st-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}
.st-mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
.st-mobile-nav.is-open { display: block; }
.st-mobile-inner {
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  gap: 16px;
}
.st-mobile-inner a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-mid);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-light);
}
.st-mobile-inner a:last-child { border-bottom: none; }

@media (max-width: 900px) {
  .st-nav, .st-header-inner > .st-nav-cta { display: none; }
  .st-mobile-toggle { display: flex; }
}

/* ============================================================
   SECTION 1 — HERO (StoryTerrace: full-width bg, centered copy)
   ============================================================ */
.st-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
.st-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) saturate(0.8);
}
.st-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.4) 100%);
}
.st-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
}
.st-hero-title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.st-hero-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.st-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.st-hero-actions .st-btn-ghost { color: rgba(255,255,255,0.7); }
.st-hero-actions .st-btn-ghost:hover { color: #fff; }

@media (max-width: 640px) {
  .st-hero { min-height: 80vh; padding: 100px 0 60px; }
  .st-hero-actions { flex-direction: column; }
}

/* ============================================================
   SECTION 2 — WHO IS RELIEQ (StoryTerrace: two-col + stats bar)
   ============================================================ */
.st-who {
  padding: 100px 0 0;
}
.st-who-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px 56px;
  align-items: start;
  margin-bottom: 64px;
}
.st-who-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 20px;
}
.st-who-copy p { font-size: 1rem; }
.st-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.st-stat {
  text-align: center;
}
.st-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 8px;
}
.st-stat span {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .st-who { padding: 72px 0 0; }
  .st-who-grid { grid-template-columns: 1fr; gap: 12px; }
  .st-stats-row { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

/* ============================================================
   SECTION 3 — EVERY STORY DESERVES A LEGACY (StoryTerrace topic grid)
   ============================================================ */
.st-topics {
  padding: 100px 0;
  background: var(--bg-white);
}
.st-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.st-topic-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.3s var(--ease);
}
.st-topic-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.st-topic-icon {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.st-topic-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}
.st-topic-card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .st-topics { padding: 72px 0; }
  .st-topic-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION 4 — HOW IT WORKS (StoryTerrace: 3-step cards)
   ============================================================ */
.st-how {
  padding: 100px 0;
}
.st-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.st-step-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
}
.st-step-num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}
.st-step-card h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}
.st-step-card p {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .st-how { padding: 72px 0; }
  .st-steps-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION 5 — PRICING (StoryTerrace: pricing cards grid)
   ============================================================ */
.st-pricing {
  padding: 100px 0;
  background: var(--bg-white);
}
.st-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.st-pricing-grid .st-price-card:nth-child(n+4) {
  /* 4th and 5th cards on second row, centered */
}
.st-price-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease);
}
.st-price-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.st-price-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.st-price-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 4px;
}
.st-price-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
}
.st-price-amount {
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.st-price-currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
}
.st-price-amount strong {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.st-price-desc {
  font-size: 0.9375rem;
  color: var(--text-mid);
  margin-bottom: 20px;
  line-height: 1.65;
}
.st-price-features {
  margin-bottom: 24px;
  flex-grow: 1;
}
.st-price-features li {
  font-size: 0.875rem;
  color: var(--text-mid);
  padding: 6px 0;
  border-bottom: 1px solid var(--line-light);
  padding-left: 20px;
  position: relative;
}
.st-price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8125rem;
}
.st-price-features li:last-child { border-bottom: none; }
.st-price-card .st-btn { width: 100%; justify-content: center; }
.st-pricing-footer {
  text-align: center;
  margin-top: 20px;
}
.st-pricing-footer p {
  font-size: 0.9375rem;
  color: var(--text-light);
}
.st-pricing-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Second row: 2 cards centered */
@media (min-width: 769px) {
  .st-pricing-row2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: calc(var(--max) * 0.68);
    margin: 24px auto 0;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .st-pricing { padding: 72px 0; }
  .st-pricing-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION 6 — TESTIMONIALS (StoryTerrace: carousel)
   ============================================================ */
.st-testimonials {
  padding: 100px 0;
  overflow: hidden;
}
.st-testimonials-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s var(--ease);
}
.st-testimonial-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.st-testimonial-text {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 24px;
  flex-grow: 1;
}
.st-testimonial-author strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.st-testimonial-author span {
  font-size: 0.8125rem;
  color: var(--text-light);
}
.st-testimonials-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
}
.st-testi-prev, .st-testi-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-white);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.st-testi-prev:hover, .st-testi-next:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.st-testi-dots {
  display: flex;
  gap: 8px;
}
.st-testi-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: all 0.2s;
}
.st-testi-dots .dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .st-testimonial-card { flex: 0 0 calc(50% - 12px); min-height: 240px; }
}
@media (max-width: 600px) {
  .st-testimonial-card { flex: 0 0 calc(100% - 0px); }
  .st-testimonials { padding: 72px 0; }
}

/* ============================================================
   SECTION 7 — BOOKS FOR EVERY OCCASION (StoryTerrace: card + image)
   ============================================================ */
.st-occasions {
  padding: 100px 0;
  background: var(--bg-warm);
}
.st-occasion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.st-occasion-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.st-occasion-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.st-occasion-img {
  height: 240px;
  background-size: cover;
  background-position: center;
}
.st-occasion-info {
  padding: 24px 24px 28px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.st-occasion-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.st-occasion-info h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.st-occasion-info p {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex-grow: 1;
}
.st-occasion-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 768px) {
  .st-occasions { padding: 72px 0; }
  .st-occasion-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION 8 — TAKE A LOOK INSIDE (StoryTerrace: book library)
   ============================================================ */
.st-inside {
  padding: 100px 0;
}
.st-inside-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
.st-inside-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--ease);
}
.st-inside-card:hover {
  box-shadow: var(--shadow-md);
}
.st-inside-img {
  min-height: 280px;
  background-size: cover;
  background-position: center;
}
.st-inside-info {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}
.st-inside-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.st-inside-tags span {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(45,90,142,0.08);
  padding: 3px 10px;
  border-radius: 3px;
}
.st-inside-info h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}
.st-inside-info p {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 16px;
}
.st-inside-info a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.st-inside-cta {
  text-align: center;
}
.st-inside-cta a {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .st-inside { padding: 72px 0; }
  .st-inside-grid { grid-template-columns: 1fr; }
  .st-inside-card { grid-template-columns: 1fr; }
  .st-inside-img { min-height: 200px; }
}

/* ============================================================
   SECTION 9 — THE FOUNDER (StoryTerrace: writer profile cards)
   ============================================================ */
.st-founder {
  padding: 100px 0;
  background: var(--bg-warm);
}
.st-founder-grid {
  display: flex;
  justify-content: center;
}
.st-founder-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  width: 100%;
}
.st-founder-photo {
  background: var(--line-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.st-founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.st-founder-info {
  padding: 40px 36px;
  position: relative;
}
.st-founder-flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(45,90,142,0.08);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.st-founder-info h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.st-founder-info p {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 12px;
}
.st-founder-info a {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 768px) {
  .st-founder { padding: 72px 0; }
  .st-founder-card { grid-template-columns: 1fr; }
  .st-founder-photo { padding: 16px; max-height: 300px; }
  .st-founder-info { padding: 28px 24px; }
}

/* ============================================================
   SECTION 10 — CTA BANNER (StoryTerrace: "Now Is The Time")
   ============================================================ */
.st-cta-banner {
  padding: 80px 0;
  background: var(--bg-dark);
}
.st-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.st-cta-copy h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 12px;
}
.st-cta-copy p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  max-width: 520px;
}
.st-cta-actions .st-btn-primary {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .st-cta-inner { flex-direction: column; text-align: center; }
  .st-cta-copy p { margin-left: auto; margin-right: auto; }
}

/* ============================================================
   SECTION 11 — NEWSLETTER (StoryTerrace: email subscribe)
   ============================================================ */
.st-newsletter {
  padding: 56px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.st-newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.st-newsletter-copy {
  max-width: 400px;
}
.st-newsletter-copy p {
  font-size: 0.875rem;
  color: var(--text-light);
}
.st-newsletter-form {
  display: flex;
  gap: 12px;
  flex: 1;
  max-width: 440px;
}
.st-newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.875rem;
  background: var(--bg-white);
  outline: none;
  transition: border-color 0.2s;
}
.st-newsletter-form input:focus {
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .st-newsletter-inner { flex-direction: column; align-items: stretch; }
  .st-newsletter-form { max-width: 100%; }
  .st-newsletter-copy { max-width: 100%; }
}

/* ============================================================
   FOOTER (StoryTerrace: multi-column)
   ============================================================ */
.st-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}
.st-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.st-footer-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  display: block;
  margin-bottom: 12px;
}
.st-footer-tagline {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
}
.st-footer-col h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.st-footer-col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  padding: 5px 0;
  transition: color 0.2s;
}
.st-footer-col a:hover { color: #fff; }
.st-footer-col p {
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.st-footer-col p a { display: inline; padding: 0; }
.st-footer-note {
  font-size: 0.8125rem !important;
  color: rgba(255,255,255,0.4) !important;
  margin-top: 8px !important;
}
.st-footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.st-footer-legal span {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}
.st-footer-legal a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  margin-left: 24px;
  transition: color 0.2s;
}
.st-footer-legal a:hover { color: #fff; }

@media (max-width: 768px) {
  .st-footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .st-footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .st-footer-top { grid-template-columns: 1fr; }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.st-page [class*="st-"] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.st-page [class*="st-"].is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Exclude hero from animation */
.st-hero, .st-hero * { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ============================================================
   BACKGROUND IMAGES (fallback backgrounds)
   ============================================================ */
.st-hero-bg,
.st-book-life,
.st-book-love,
.st-book-family,
.st-book-founder,
.st-book-institution,
.st-inside-book,
.st-edition-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================================
   INNER PAGE TEMPLATES
   ============================================================ */
.inner-hero {
  padding: 140px 0 56px;
  background: var(--bg-warm);
  text-align: center;
}
.inner-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 12px;
}
.inner-hero .inner-lede {
  font-size: 1rem;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
}

/* Page template (About, etc.) */
.page-template {
  padding: 100px 0 80px;
}
.container-narrow { max-width: 680px; }
.page-heading {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 40px;
  text-align: center;
}
.page-body > div { margin-bottom: 48px; }
.page-body h2 {
  font-size: 1.375rem;
  margin-bottom: 12px;
}
.page-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-mid);
}
.about-portrait {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.pronunciation {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--accent);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

/* Pricing page */
.pricing-page { padding: 80px 0; }
.pricing-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.pricing-card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.3s var(--ease);
}
.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.price-type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.pricing-card h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.price-big {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.price-lead {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 20px;
}
.pricing-card ul {
  margin-bottom: 0;
}
.pricing-card li {
  font-size: 0.875rem;
  color: var(--text-mid);
  padding: 7px 0;
  border-bottom: 1px solid var(--line-light);
  padding-left: 20px;
  position: relative;
}
.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8125rem;
}
.pricing-card li:last-child { border-bottom: none; }
.pricing-note {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-warm);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.pricing-note strong { color: var(--text); }

/* Contact page */
.contact-page { padding: 80px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.contact-card, .contact-address {
  padding: 36px;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-card h2, .contact-address h2 {
  font-size: 1.375rem;
  margin-bottom: 24px;
}
.contact-line {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-light);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-line:last-child { border-bottom: none; }
.contact-line small {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
}
.contact-line strong {
  font-size: 1rem;
  color: var(--text);
}
.contact-line:hover strong { color: var(--accent); }
.contact-address p {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 16px;
}
.contact-address a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* FAQ page */
.faq-page { padding: 80px 0; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.faq-list summary {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--text-light);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: all 0.2s;
}
.faq-list details[open] summary::after {
  content: "−";
}
.faq-list p {
  padding-top: 16px;
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.75;
}

/* Stories / Library page */
.stories-page { padding: 80px 0; }
.stories-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}
.stories-page-grid article {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 20px;
  transition: all 0.3s var(--ease);
}
.stories-page-grid article:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.story-page-img {
  border-radius: 4px;
  overflow: hidden;
  height: 200px;
}
.story-page-img img { width: 100%; height: 100%; object-fit: cover; }
.stories-page-grid article h2 { font-size: 1.125rem; margin-bottom: 6px; }
.stories-page-grid article p { font-size: 0.875rem; color: var(--text-mid); line-height: 1.65; margin-bottom: 12px; }
.stories-page-grid article a { font-size: 0.875rem; font-weight: 600; color: var(--accent); }

/* How it works page */
.how-page { padding: 80px 0; }
.how-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.how-row span {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.how-row h2 { font-size: 1.125rem; margin-bottom: 8px; }
.how-row p { font-size: 0.9375rem; color: var(--text-mid); line-height: 1.7; }

/* Privacy page */
.privacy-page { padding: 80px 0; }
.privacy-body { max-width: 760px; margin: 0 auto; }
.privacy-body h2 { font-size: 1.375rem; margin: 40px 0 12px; }
.privacy-body p { font-size: 0.9375rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 16px; }
.privacy-body ul { margin: 0 0 16px 20px; }
.privacy-body li { font-size: 0.9375rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 6px; list-style: disc; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .how-row { grid-template-columns: 1fr; }
  .stories-page-grid { grid-template-columns: 1fr; }
  .stories-page-grid article { grid-template-columns: 1fr; }
  .story-page-img { height: 220px; }
  .inner-hero { padding: 120px 0 40px; }
  .page-template { padding: 72px 0 60px; }
}

/* ============================================================
   SCROLL ANIMATIONS (INNER PAGES)
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
