/* ==========================================================================
   Learn with Coca — v2 Design System (CocoWyo-inspired pastel)
   Palette sampled from cocowyo.com on 2026-07-08 + LwC logo accents:
     bg        #FFFAF7  (warm off-white — CocoWyo page bg)
     lavender  #F1EEF7  / deep #E7DDF3 (announce bar, cards)
     peach     #FEF4EB
     mint      #F3FBE6
     sky       #EDF4FC
     pink      #FBEEF2
     ink       #322F37  (CocoWyo's soft charcoal — headings/body, NOT red)
     coral     #E88D80  (pastelized from LwC logo — small accents + primary CTA)
     purple    #8B7BC7  (CocoWyo-style buy button)
   Font: Nunito everywhere (like CocoWyo).
   ========================================================================== */

:root {
  --bg: #FFFAF7;
  --lav: #F1EEF7;
  --lav-deep: #E7DDF3;
  --peach: #FEF4EB;
  --mint: #F3FBE6;
  --sky: #EDF4FC;
  --pink: #FBEEF2;
  --ink: #322F37;
  --ink-soft: #6E6A75;
  --red: #CB464E;        /* brand key color — logo wordmark red */
  --red-deep: #A83A41;
  --coral: #F7826D;      /* brand key color — logo crayon coral-pink */
  --coral-deep: #E06B56;
  --purple: #8B7BC7;     /* pastel support only */
  --purple-deep: #7A69B8;
  --white: #FFFFFF;
  --star: #F5B942;

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow: 0 6px 20px rgba(50, 47, 55, 0.07);

  --font: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}
p { line-height: 1.7; margin: 0 0 1em; color: var(--ink-soft); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Announcement bar (brand red) ---------- */
.announce-bar {
  background: var(--red);
  color: #FFF7F2;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  padding: 12px 16px;
}

/* ---------- Header: nav left, logo RIGHT ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid rgba(50,47,55,0.05);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.header-row .header-logo img { height: 64px; width: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.main-nav a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--red); border-color: var(--red); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.98rem;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-red    { background: var(--red);    color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-coral  { background: var(--coral);  color: var(--white); }
.btn-coral:hover { background: var(--coral-deep); }
.btn-purple { background: var(--purple); color: var(--white); }
.btn-purple:hover { background: var(--purple-deep); }
.btn-outline { background: var(--white); color: var(--ink); border-color: rgba(50,47,55,0.18); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #1f1d23; }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Hero: review → free book (front & center) ---------- */
.hero-offer {
  margin: 26px auto 0;
  max-width: 1160px;
  padding: 0 24px;
}
.hero-offer-card {
  background: linear-gradient(120deg, var(--pink) 0%, var(--lav) 55%, var(--sky) 100%);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  overflow: hidden;
}
.hero-offer-card h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  margin-bottom: 0.4em;
}
.hero-offer-card h1 .hl { color: var(--coral-deep); }
.hero-offer-card p.lede { font-size: 1.1rem; max-width: 48ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { max-height: 320px; width: auto; }
.hero-steps {
  display: flex;
  gap: 20px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero-steps span {
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  box-shadow: var(--shadow);
}

/* ---------- Sections ---------- */
.section { padding: 62px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 38px; }
.section-header h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.section-header .view-more {
  font-weight: 700;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  padding-bottom: 1px;
}
.section-header .view-more:hover { color: var(--purple-deep); border-color: var(--purple-deep); }

/* ---------- Hi Friend intro ---------- */
.hi-friend { text-align: center; padding: 56px 0 30px; }
.hi-friend img { height: 150px; margin: 0 auto 18px; }
.hi-friend h2 { font-size: 1.9rem; }
.hi-friend p { max-width: 62ch; margin: 0 auto; }

/* ---------- Book cards ---------- */
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.book-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.book-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
  position: relative;
}
.book-card:hover { transform: translateY(-4px); }
.book-cover { background: var(--peach); padding: 18px 18px 0; }
.book-cover img { border-radius: 8px; margin: 0 auto; }
.book-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--coral);
  color: var(--white);
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  z-index: 2;
}
.book-badge.badge-new { background: var(--purple); }
.book-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book-title { font-weight: 800; font-size: 1rem; margin: 0; }
.book-meta { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-soft); }
.book-meta .stars { color: var(--star); letter-spacing: 1px; }
.book-price { font-weight: 800; font-size: 1.1rem; color: var(--ink); margin-top: auto; }
.book-card .btn { margin-top: 8px; }

/* ---------- Review quotes (real Amazon comments) ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote-card {
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-card:nth-child(3n+1) { background: var(--lav); }
.quote-card:nth-child(3n+2) { background: var(--peach); }
.quote-card:nth-child(3n+3) { background: var(--mint); }
.quote-card .stars { color: var(--star); letter-spacing: 2px; font-size: 1rem; }
.quote-card h4 { margin: 0; font-size: 1rem; }
.quote-card p { font-size: 0.92rem; margin: 0; flex: 1; }
.quote-card .who { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }

/* ---------- Pastel banners (freebies / friends teasers) ---------- */
.banner {
  border-radius: var(--radius-lg);
  padding: 46px 44px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
}
.banner.mint { background: var(--mint); }
.banner.sky { background: var(--sky); }
.banner.pink { background: var(--pink); }
.banner.lav { background: var(--lav); }
.banner h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.banner p { max-width: 50ch; }

/* ---------- Friends gallery (polaroid frames) ---------- */
.friends-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.polaroid {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 14px 18px;
  transform: rotate(-1.2deg);
}
.polaroid:nth-child(2n) { transform: rotate(1.4deg); }
.polaroid:nth-child(3n) { transform: rotate(-0.6deg); }
.polaroid .frame {
  aspect-ratio: 1;
  background: var(--bg);
  border: 2px dashed rgba(50,47,55,0.18);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  padding: 14px;
}
.polaroid .frame img { border-radius: 6px; object-fit: cover; width: 100%; height: 100%; }
.polaroid .caption { text-align: center; font-weight: 700; font-size: 0.9rem; margin-top: 12px; color: var(--ink); }

/* ---------- Placeholder slots (photos / stickers Dieulinh will provide) ---------- */
.placeholder-slot {
  border: 2px dashed rgba(139,123,199,0.5);
  background: rgba(241,238,247,0.5);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
  padding: 20px;
  min-height: 260px;
  font-size: 0.92rem;
}

/* ---------- About page: alternating pastel cards (CocoWyo style) ---------- */
.about-card {
  border-radius: var(--radius-lg);
  padding: 54px 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 34px;
}
.about-card:nth-child(2n) .about-media { order: 2; }
.about-card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); text-align: center; }
.about-card p { text-align: center; font-size: 1.05rem; }
.about-card .about-media img { border-radius: var(--radius-md); box-shadow: var(--shadow); }

/* ---------- Product detail page ---------- */
.breadcrumb { font-size: 0.88rem; color: var(--ink-soft); padding: 22px 0 6px; }
.breadcrumb a:hover { color: var(--purple-deep); }
.product-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 20px 0 40px;
  align-items: start;
}
.product-gallery-main {
  background: var(--peach);
  border-radius: var(--radius-lg);
  padding: 34px;
}
.product-gallery-main img { border-radius: 10px; margin: 0 auto; }
.product-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.product-thumbs img {
  width: 74px; height: 74px; object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.product-thumbs img:hover, .product-thumbs img.active { border-color: var(--purple); }
.product-info h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.product-info .price { font-size: 1.5rem; font-weight: 800; margin: 6px 0 16px; }
.product-info .book-meta { margin-bottom: 12px; }
.product-info ul { color: var(--ink-soft); line-height: 1.8; padding-left: 20px; }
.ebook-soon {
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  border: 2px dashed rgba(50,47,55,0.18);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
}
.sample-pages { padding: 20px 0 30px; }
.sample-pages .sample-band {
  border-radius: var(--radius-lg);
  padding: 34px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.sample-pages .sample-band img { border-radius: 12px; box-shadow: var(--shadow); background: var(--white); }
.sample-band.b1 { background: var(--pink); }
.sample-band.b2 { background: var(--sky); }

/* ---------- Freebies ---------- */
.freebie-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.freebie-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.freebie-card .fc-top { background: var(--sky); padding: 22px; min-height: 190px; display:flex; align-items:center; justify-content:center; }
.freebie-card:nth-child(2) .fc-top { background: var(--mint); }
.freebie-card:nth-child(3) .fc-top { background: var(--pink); }
.freebie-card .fc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.freebie-card h4 { margin: 0; }
.freebie-card p { font-size: 0.9rem; flex: 1; margin: 0; }

/* ---------- Subscribe ---------- */
.subscribe-wrap {
  background: var(--lav);
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}
.subscribe-wrap h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.email-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.steps-list li {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-weight: 700;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: center;
}
.steps-list .num {
  background: var(--coral);
  color: var(--white);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Footer (light pastel, CocoWyo-like) ---------- */
.site-footer {
  background: var(--lav);
  color: var(--ink);
  padding: 56px 0 26px;
  margin-top: 48px;
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-brand img { height: 56px; margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; max-width: 32ch; }
.site-footer h5 {
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--purple-deep);
  margin: 0 0 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer li a { font-size: 0.94rem; font-weight: 600; color: var(--ink-soft); }
.site-footer li a:hover { color: var(--purple-deep); }
.footer-bottom {
  border-top: 1px solid rgba(50,47,55,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Page header ---------- */
.page-header { padding: 44px 0 30px; text-align: center; }
.page-header h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.page-header p { max-width: 56ch; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-offer-card, .banner, .subscribe-wrap, .product-top { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .book-grid.grid-3 { grid-template-columns: repeat(2, 1fr); }
  .quote-grid, .friends-grid, .freebie-grid { grid-template-columns: 1fr 1fr; }
  .about-card { grid-template-columns: 1fr; padding: 36px 28px; }
  .about-card:nth-child(2n) .about-media { order: 0; }
  .sample-pages .sample-band { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .main-nav { display: none; gap: 18px; }
  .main-nav.nav-open { display: flex; flex-direction: column; align-items: center; }
  .nav-toggle { display: block; }
  .quote-grid, .friends-grid, .freebie-grid, .book-grid, .book-grid.grid-3 { grid-template-columns: 1fr; }
  .hero-offer-card { padding: 36px 26px; }
  .sample-pages .sample-band { grid-template-columns: 1fr; }
}

/* ---------- Review-reward popup ---------- */
.lwc-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(50,47,55,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: lwcFade 0.25s ease;
}
.lwc-popup {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 430px;
  width: 100%;
  padding: 38px 34px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(50,47,55,0.25);
  animation: lwcPop 0.3s ease;
}
.lwc-popup img { height: 110px; margin: 0 auto 12px; }
.lwc-popup h3 { font-size: 1.35rem; margin-bottom: 8px; }
.lwc-popup h3 .hl { color: var(--red); }
.lwc-popup p { font-size: 0.95rem; margin-bottom: 18px; }
.lwc-popup .btn { width: 100%; }
.lwc-popup .later {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.lwc-popup .later:hover { border-color: var(--ink-soft); }
.lwc-popup .close-x {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--ink-soft); font-weight: 800;
}
@keyframes lwcFade { from { opacity: 0; } }
@keyframes lwcPop { from { transform: scale(0.92); opacity: 0; } }

/* ---------- Series / bundle packs ---------- */
.bundle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.bundle-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--white);
  position: relative;
}
.bundle-card .save-badge {
  position: absolute; top: -12px; right: 18px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.bundle-covers { display: flex; gap: 8px; justify-content: center; padding: 10px 0; }
.bundle-covers img {
  width: 88px; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(50,47,55,0.18);
}
.bundle-covers img:nth-child(2) { transform: translateY(-6px); }
.bundle-card h4 { margin: 0; font-size: 1.05rem; text-align: center; }
.bundle-card .bundle-price { text-align: center; font-weight: 800; font-size: 1.2rem; }
.bundle-card .bundle-price .was { text-decoration: line-through; color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; margin-right: 8px; }
.bundle-card p { font-size: 0.88rem; text-align: center; margin: 0; flex: 1; }
.bundle-card .ebook-soon { align-self: center; }

/* ---------- Hand-drawn steps chart ---------- */
.steps-chart { margin-top: 26px; }
.steps-chart svg { width: 100%; max-width: 640px; height: auto; display: block; }

@media (max-width: 960px) {
  .bundle-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .header-row { flex-direction: row-reverse; }
  .bundle-grid { grid-template-columns: 1fr; }
}
