/* ── TOKENS ── */
:root {
  --cream: #f0ebe3;
  --cream2: #e8e0d6;
  --white: #ffffff;
  --forest: #1c4a35;
  --forest2: #2a6349;
  --moss: #3d7a58;
  --sage: #7aab8a;
  --ink: #1a1f1c;
  --ink2: #3a4a3f;
  --muted: #7a8c80;
  --gold: #b8860b;
  --gold2: #d4a017;
  --radius: 14px;
  --radius-lg: 22px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 64px;
  height: 62px;
  background: var(--cream);
  border-bottom: 1px solid rgba(28, 74, 53, .1);
  position: sticky;
  top: 0;
  z-index: 99;
  backdrop-filter: blur(8px);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: -.3px;
}

/* Your logo image */
.nav-logo-img {
  height: 200px;
  /* ← change this to resize the LOGO only (the bar height is set on .nav) */
  width: auto;
  display: block;
}

/* Text fallback — only shows if the logo image is missing */
.nav-logo-text {
  display: none;
}

.nav-logo em {
  font-style: italic;
  color: var(--moss);
}

/* ── HERO ── */
.hero {
  position: relative;
  background: var(--cream);
  padding: 22px 64px 44px;
  overflow: hidden;
  border-bottom: 1px solid rgba(28, 74, 53, .08);
}

.hero-bg-blur {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  padding: 20px;
  pointer-events: none;
  z-index: 0;
  filter: blur(18px);
  opacity: 0.18;
  user-select: none;
}

.hero-headline-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 20px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  background: rgba(28, 74, 53, .08);
  border: 1px solid rgba(28, 74, 53, .16);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 10px;
  letter-spacing: .3px;
}

.hero-headline {
  font-family: 'Lora', serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -.5px;
}

.hero-headline em {
  font-style: italic;
  color: var(--forest);
}

/* Two-column layout — top-aligned so the copy sits up near the headline */
.hero-cols {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 6px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

/* LEFT: visual card */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-free-badge {
  position: absolute;
  top: -28px;
  left: -26px;
  z-index: 2;
  background: var(--forest);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(28, 74, 53, .25));
  transform: rotate(-12deg);
  clip-path: polygon(50% 0%, 60.9% 9.4%, 75% 6.7%, 79.7% 20.3%, 93.3% 25%, 90.6% 39.1%, 100% 50%, 90.6% 60.9%, 93.3% 75%, 79.7% 79.7%, 75% 93.3%, 60.9% 90.6%, 50% 100%, 39.1% 90.6%, 25% 93.3%, 20.3% 79.7%, 6.7% 75%, 9.4% 60.9%, 0% 50%, 9.4% 39.1%, 6.7% 25%, 20.3% 20.3%, 25% 6.7%, 39.1% 9.4%);
}

.hero-free-badge::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--white);
  clip-path: polygon(50% 0%, 60.9% 9.4%, 75% 6.7%, 79.7% 20.3%, 93.3% 25%, 90.6% 39.1%, 100% 50%, 90.6% 60.9%, 93.3% 75%, 79.7% 79.7%, 75% 93.3%, 60.9% 90.6%, 50% 100%, 39.1% 90.6%, 25% 93.3%, 20.3% 79.7%, 6.7% 75%, 9.4% 60.9%, 0% 50%, 9.4% 39.1%, 6.7% 25%, 20.3% 20.3%, 25% 6.7%, 39.1% 9.4%);
}

.hero-free-badge span {
  position: relative;
  z-index: 1;
}

/* ── HERO SLIDESHOW ── */
.hero-card-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--cream2);
  aspect-ratio: 4/3;
  box-shadow: 0 20px 56px rgba(28, 74, 53, .18), 0 4px 12px rgba(0, 0, 0, .08);
  border: 2px solid rgba(28, 74, 53, .1);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-card-fallback {
  background: linear-gradient(135deg, #c8dfc0, #7aab8a);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, .88);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transition: background .18s, transform .18s;
  color: var(--forest);
  font-weight: 700;
}

.slider-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.slider-prev {
  left: 10px;
}

.slider-next {
  right: 10px;
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.slider-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.hero-card-label {
  background: var(--white);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid rgba(28, 74, 53, .14);
  letter-spacing: .2px;
  box-shadow: 0 2px 8px rgba(28, 74, 53, .08);
}

/* RIGHT: copy */
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding-top: 54px;
}

.hero-body {
  font-family: 'Lora', serif;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 18px;
  letter-spacing: 0.1px;
}

/* Offer pill above the form */
.hero-offer-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  background: rgba(28, 74, 53, .08);
  border: 1px solid rgba(28, 74, 53, .16);
  border-radius: 100px;
  padding: 7px 16px;
  margin: 0 0 16px;
  /* ↑ first number = gap above the pill, last = gap below (before the form) */
  letter-spacing: .2px;
}

.hero-form {
  width: 100%;
}

.form-row {
  display: flex;
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  transition: box-shadow .2s;
}

.form-row:focus-within {
  box-shadow: 0 0 0 3px rgba(28, 74, 53, .16);
}

.form-input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  min-width: 0;
}

.form-input::placeholder {
  color: #9aaa9f;
}

.form-btn {
  padding: 15px 28px;
  background: var(--forest);
  color: #fff;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s;
  letter-spacing: .2px;
}

.form-btn:hover {
  background: var(--forest2);
}

.form-fine {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .2px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(28, 74, 53, .12);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-n {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
}

.stat-l {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.stat-div {
  width: 1px;
  height: 28px;
  background: rgba(28, 74, 53, .15);
}

/* ── WHAT'S INSIDE ── */
.inside {
  background: var(--white);
  padding: 24px 0 44px;
  border-top: 1px solid rgba(28, 74, 53, .08);
}

.inside-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 64px;
  text-align: center;
}

.inside-h2 {
  font-family: 'Lora', serif;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  margin-bottom: 24px;
  line-height: 1.2;
}

/* ── RECIPE CARDS ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.recipe-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s, box-shadow .22s;
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(28, 74, 53, .16);
}

.rc-photo {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--cream2);
}

.rc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.recipe-card:hover .rc-photo img {
  transform: scale(1.05);
}

.rc-photo-fallback {
  background: linear-gradient(135deg, #c8dfc0, #a8c898);
}

.rc-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(4px);
  color: var(--forest);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(28, 74, 53, .14);
  z-index: 2;
}

.rc-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(28, 74, 53, .85) 0%, transparent 100%);
  padding: 28px 12px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 2;
}

.rc-name {
  font-family: 'Lora', serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  flex: 1;
  padding-right: 8px;
}

/* ── RECIPE MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 14, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--sage) var(--cream);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .08);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, .15);
}

.modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
}

.modal-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: var(--cream2);
}

.modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-photo-fallback {
  background: linear-gradient(135deg, #c8dfc0, #7aab8a);
}

.modal-content {
  padding: 36px 36px 36px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  letter-spacing: .3px;
}

.modal-title {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  line-height: 1.2;
  margin-bottom: 24px;
}

.modal-section {
  margin-bottom: 22px;
}

.modal-section h4 {
  font-family: 'Lora', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(28, 74, 53, .12);
}

.modal-section ul,
.modal-section ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.modal-section li {
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.6;
}

/* ── REVIEWS ── */
.reviews {
  background: var(--cream);
  padding: 36px 0 32px;
  border-top: 1px solid rgba(28, 74, 53, .08);
}

.reviews-wrap {
  max-width: 100%;
  padding: 0 64px;
}

/* Reviews header — title centered, score right */
.reviews-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 24px;
}

.reviews-h2 {
  flex: 1;
  text-align: center;
}

.reviews-h2 {
  font-family: 'Lora', serif;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  line-height: 1.2;
}

.reviews-score {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.rs-num {
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
}

.rs-stars {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 2px;
}

.rs-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── CHANGE 3: Review cards — more rectangular (taller, wider, less radius) ── */
.rev-marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.rev-track {
  display: flex;
  width: max-content;
  padding: 4px 0;
  animation: revMarquee 36s linear infinite;
}

@keyframes revMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.rev-card {
  background: var(--white);
  border: 1px solid rgba(28, 74, 53, .1);
  border-radius: 8px;
  padding: 16px 28px;
  width: 380px;
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
  text-align: center;
  align-items: center;
  justify-content: center;
}

.rev-top {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.rev-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.rev-date {
  font-size: 10px;
  color: var(--muted);
}

.rev-stars {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
}

.rev-card p {
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.6;
  font-style: italic;
}

/* ── FOOTER ── */
.foot {
  background: var(--cream);
  border-top: 1px solid rgba(28, 74, 53, .1);
  padding: 0 64px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--forest);
}

/* Your logo image in the footer */
.foot-logo-img {
  height: 60px;
  /* ← resize the footer logo here */
  width: auto;
  display: block;
}

/* Text fallback — only shows if the logo image is missing */
.foot-logo-text {
  display: none;
}

.foot-logo-text-only {
  display: inline-flex;
  align-items: center;
}

.foot-logo em {
  font-style: italic;
  color: var(--moss);
}

.foot-copy {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  text-align: center;
}

.foot-links {
  display: flex;
  gap: 20px;
}

.foot-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s;
}

.foot-links a:hover {
  color: var(--forest);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav {
    padding: 0 24px;
    height: 56px;
  }

  .hero {
    padding: 18px 24px 24px;
  }

  .hero-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-visual {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .inside-wrap,
  .reviews-wrap {
    padding: 0 24px;
  }

  .inside {
    padding: 20px 0 36px;
  }

  .recipe-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reviews {
    padding: 28px 0 24px;
  }

  .foot {
    padding: 16px 24px;
    height: auto;
    flex-direction: column;
    text-align: center;
  }

  .foot-copy {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-headline {
    font-size: 28px;
  }

  .hero-body {
    font-size: 16px;
  }

  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    border-radius: var(--radius);
  }

  .form-input {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .form-btn {
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 14px;
  }

  .modal-inner {
    grid-template-columns: 1fr;
  }

  .modal-photo {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    height: 200px;
  }

  .modal-photo img {
    height: 200px;
  }

  .modal-content {
    padding: 24px 20px;
  }

  .modal-title {
    font-size: 18px;
  }

  .rev-card {
    width: 260px;
    height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rev-track {
    animation: none;
  }
}

/* ── MOBILE REORDER & ALIGNMENT FIXES ── */
@media (max-width: 900px) {
  .hero-cols {
    gap: 0;
  }

  .hero-visual {
    order: 1;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
  }

  .hero-form {
    order: 2;
    margin-top: 20px;
  }

  .hero-body {
    order: 3;
    margin-top: 16px;
    margin-bottom: 0;
  }

  .hero-stats {
    order: 4;
  }

  /* Shift "Loved by dog parents" right to align with recipe cards */
  .reviews-header {
    padding-left: 8%;
  }
}

/* ── SWAP: form above body text on mobile ── */
@media (max-width: 900px) {
  .hero-form {
    order: 1;
    margin-top: 20px;
  }

  .hero-body {
    order: 2;
    margin-top: 16px;
    margin-bottom: 0;
  }

  .hero-stats {
    order: 3;
  }
}

/* ── FORM AS GRID CHILD ── */

/* Desktop: form spans right column, placed on row 1 inside copy area */
.hero-form-grid {
  display: none;
  /* hidden on desktop — form is inside hero-copy via original HTML */
}

/* On mobile: show the grid-child form, hide the one inside hero-copy */
@media (max-width: 900px) {

  /* Hide desktop form (inside hero-copy) */
  .hero-copy .hero-form {
    display: none;
  }

  /* Show mobile grid form below visual */
  .hero-form-grid {
    display: block;
    order: 2;
    grid-column: 1 / -1;
    margin-top: 20px;
  }

  .hero-visual {
    order: 1;
  }

  .hero-copy {
    order: 3;
  }

  .hero-stats {
    order: 4;
  }
}

/* ── FORM SHOW/HIDE PER BREAKPOINT ── */
.hero-form-grid {
  display: none;
}

@media (max-width: 900px) {

  /* Hide desktop form */
  .hero-form-desktop {
    display: none;
  }

  /* Show mobile form right below the visual pill */
  .hero-form-grid {
    display: block;
    order: 2;
    grid-column: 1 / -1;
    margin-top: 20px;
  }

  .hero-visual {
    order: 1;
  }

  .hero-copy {
    order: 3;
  }
}

/* ── BOOK COVER (hero) ──
   Upright, book-sized cover: the photo shows clearly, a soft dark
   gradient sits at the bottom, and the title is bold and bottom-left.
   Page block on the right, spine on the left. */
.hero-book {
  width: 100%;
  display: flex;
  justify-content: center;
  perspective: 1600px;
}

/* The cover — portrait book proportions, sized like a real book */
.hero-card-img.book-cover {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 4;
  overflow: visible;
  border: none;
  background: transparent;
  border-radius: 4px 9px 9px 4px;
  transform: rotateY(-5deg);
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
  box-shadow:
    16px 24px 44px rgba(28, 74, 53, .26),
    5px 8px 16px rgba(0, 0, 0, .12);
}

.hero-book:hover .hero-card-img.book-cover {
  transform: rotateY(-2deg);
}

/* Page block on the right (fore-edge) */
.book-cover::after {
  content: '';
  position: absolute;
  top: 7px;
  bottom: 7px;
  right: -8px;
  width: 9px;
  border-radius: 1px 7px 7px 1px;
  background:
    repeating-linear-gradient(to right, rgba(150, 138, 118, .22) 0 1px, transparent 1px 3px),
    linear-gradient(to right, #f3ede3, #ddd5c6);
  box-shadow: 1px 2px 5px rgba(0, 0, 0, .14);
  z-index: 1;
}

/* Spine on the left edge */
.book-cover::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 11px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(to right, rgba(0, 0, 0, .32), rgba(0, 0, 0, .06) 55%, transparent);
  z-index: 2;
  pointer-events: none;
}

/* Background photo — shown clearly, no blur or colour tint */
.book-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: var(--cream2);
}

.book-bg.hero-card-fallback {
  background: linear-gradient(135deg, #c8dfc0, #7aab8a);
}

/* All cover images fill the book and sit stacked on top of each other */
.book-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: none;
}

/* Three cover images cross-fade in order, each shown for a third of the loop.
   Sequence: game.png → game2.png → game3.png → game.png … (12s total) */
.book-slide {
  opacity: 0;
  animation: bookFade 12s ease-in-out infinite;
}

.book-slide:nth-of-type(1) {
  animation-delay: 0s;
  /* game.png */
}

.book-slide:nth-of-type(2) {
  animation-delay: 4s;
  /* game2.png */
}

.book-slide:nth-of-type(3) {
  animation-delay: 8s;
  /* game3.png */
}

@keyframes bookFade {
  0% {
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  /* fade in */
  33% {
    opacity: 1;
  }

  /* hold */
  41% {
    opacity: 0;
  }

  /* fade out as the next one fades in */
  100% {
    opacity: 0;
  }
}

/* No motion for users who prefer it — just show the first image */
@media (prefers-reduced-motion: reduce) {
  .book-slide {
    animation: none;
    opacity: 0;
  }

  .book-slide:nth-of-type(1) {
    opacity: 1;
  }
}

/* Soft darkening at the bottom only — keeps the photo visible up top
   while keeping the title readable */
.book-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top,
      rgba(0, 0, 0, .74) 0%,
      rgba(0, 0, 0, .42) 30%,
      rgba(0, 0, 0, .08) 58%,
      transparent 78%);
  z-index: 2;
}

/* Title block — anchored bottom-left like the reference */
.book-text {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  text-align: left;
  padding: 24px 20px 22px;
}

.book-rule {
  width: 52px;
  height: 1.5px;
  background: rgba(255, 255, 255, .55);
}

.book-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 4.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -.2px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}

.book-byline {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .82);
  margin-top: 4px;
}

/* Gentler tilt on smaller screens */
@media (max-width: 900px) {
  .hero-card-img.book-cover {
    transform: rotateY(-4deg);
  }
}

/* ── THANK-YOU PAGE ── */
.ty-page {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--cream);
}

@media (max-width: 900px) {
  .ty-page {
    min-height: calc(100vh - 56px);
  }
}

.ty-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cream);
  border: 1px solid rgba(28, 74, 53, .12);
  border-radius: var(--radius-lg);
  padding: 40px 34px 34px;
  box-shadow: 0 30px 80px rgba(12, 28, 20, .4);
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: var(--sage) var(--cream);
}

.ty-celebrate {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 8px;
}

.ty-title {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 34px);
  color: var(--ink);
  letter-spacing: -.4px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.ty-sub {
  font-family: 'Lora', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 6px;
}

.ty-welcome {
  font-size: 13.5px;
  color: var(--ink2);
  margin-bottom: 22px;
}

.ty-guide {
  background: var(--white);
  border: 1px solid rgba(28, 74, 53, .1);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  text-align: center;
}

.ty-guide h3 {
  font-family: 'Lora', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.ty-guide>p {
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.ty-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.ty-badges span {
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  background: rgba(28, 74, 53, .07);
  border: 1px solid rgba(28, 74, 53, .14);
  border-radius: 100px;
  padding: 6px 12px;
}

.ty-download {
  display: inline-block;
  width: 100%;
  background: var(--forest);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: var(--radius);
  letter-spacing: .2px;
  transition: background .18s;
}

.ty-download:hover {
  background: var(--forest2);
}

.ty-next {
  text-align: left;
}

.ty-next h3 {
  font-family: 'Lora', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
}

.ty-next ol {
  list-style: none;
  counter-reset: ty;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ty-next li {
  position: relative;
  counter-increment: ty;
  padding-left: 38px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.55;
}

.ty-next li::before {
  content: counter(ty);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ty-next li strong {
  color: var(--ink);
}

@media (max-width: 600px) {
  .ty-card {
    padding: 32px 20px 26px;
  }
}

/* ── WELCOME POPUP ── */
.wp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 23, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 20px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.wp-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wp-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s ease;
}

.wp-overlay.active .wp-card {
  transform: translateY(0) scale(1);
}

.wp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 5;
}

.wp-close:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.wp-step {
  display: none;
}

.wp-step.active {
  display: block;
  animation: wpStepIn 0.3s ease;
}

@keyframes wpStepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wp-title {
  font-family: 'Lora', serif;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  margin: -40px -36px 20px;
  padding: 28px 32px 20px;
  background: linear-gradient(135deg, #1c4a35 0%, #2a6349 55%, #3d7a58 100%);
  border-radius: 12px 12px 0 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.wp-title::before {
  content: '🐾 ';
}

.wp-divider {
  display: none;
}

.wp-sub {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #5a5346;
  line-height: 1.5;
  margin: 0 0 18px;
  text-align: left;
}

.wp-options {
  display: flex;
  flex-direction: column;
}

.wp-option {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
  padding: 13px 18px;
  border: 1.5px solid #1c4a35;
  border-radius: 100px;
  background: #fff;
  color: #1c4a35;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 10px;
  width: 100%;
}

.wp-option::after {
  content: none;
}

.wp-option:hover {
  background: linear-gradient(135deg, #1c4a35, #2a6349);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(28, 74, 53, 0.28);
}

.wp-option-ghost {
  border: none;
  background: transparent;
  color: #8a8378;
  font-weight: 600;
  width: auto;
  padding: 6px 14px;
  margin: 2px auto 0;
  align-self: center;
}

.wp-option-ghost:hover {
  background: transparent;
  color: #5a5346;
  transform: none;
  box-shadow: none;
}

.wp-field {
  position: relative;
  margin-bottom: 14px;
}

.wp-field-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(184, 134, 11, 0.14);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.wp-name-input {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  padding: 12px 14px 12px 42px;
  border-radius: 8px;
  border: 1px solid rgba(28, 74, 53, 0.2);
  background: #fff;
  color: #1c4a35;
  outline: none;
  transition: border-color 0.2s ease;
}

.wp-name-input:focus {
  border-color: #b8860b;
}

.wp-name-input::placeholder {
  color: #a39c8e;
}

.wp-email-label {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #1c4a35;
  margin: 0 0 10px;
}

.wp-fine {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: #9b9388;
  text-align: center;
  margin: 14px 0 0;
}

@media (max-width: 480px) {
  .wp-overlay {
    padding: 28px 16px 16px;
  }

  .wp-card {
    padding: 30px 22px 24px;
  }

  .wp-title {
    font-size: 18px;
    margin: -30px -22px 16px;
    padding: 22px 22px 16px;
  }
}