/* Pebble & Pip Press — Global Flagship Stylesheet (Zero External Dependencies) */
@font-face {
  font-family: 'Fredoka';
  src: url('/assets/fonts/Fredoka-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Quicksand';
  src: url('/assets/fonts/Quicksand-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/Nunito-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/Nunito-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #145C63;
  --teal-dark: #0D4247;
  --coral: #F26444;
  --marigold: #F9B233;
  --cream: #FFF8EE;
  --cream-deep: #F6EBDA;
  --sage: #5CA47B;
  --indigo: #2E5EAA;
  --aqua: #1B8A99;
  --berry: #A63A50;
  --ink: #1F2933;
  --muted: #52606D;
  --white: #FFFFFF;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 16px 40px rgba(20, 92, 99, 0.10);
  --shadow-card: 0 8px 22px rgba(31, 41, 51, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* Sticky Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 92, 99, 0.97);
  color: var(--white);
  border-bottom: 3px solid var(--marigold);
  box-shadow: 0 6px 20px rgba(13, 66, 71, 0.16);
}
.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand-icon {
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav-links a {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--marigold); }
.safe-pill-top {
  background: var(--marigold);
  color: var(--ink);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Containers & Sections */
.container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}
.page-main { flex: 1; }
.section { padding: 64px 0; }
.section-alt {
  background: var(--white);
  border-top: 1px solid rgba(20, 92, 99, 0.08);
  border-bottom: 1px solid rgba(20, 92, 99, 0.08);
}
.eyebrow {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--coral);
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.75rem, 3.6vw, 2.55rem);
  color: var(--teal);
  line-height: 1.15;
  margin-bottom: 12px;
}
.section-lead {
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 700px;
  margin-bottom: 32px;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(20, 92, 99, 0.25);
}
.btn-primary:hover { background: var(--teal-dark); }
.btn-marigold {
  background: var(--marigold);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(249, 178, 51, 0.35);
}
.btn-coral {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(242, 100, 68, 0.3);
}
.btn-outline {
  background: var(--white);
  color: var(--teal);
  border-color: var(--teal);
}
.btn-sm {
  font-size: 0.9rem;
  padding: 9px 16px;
}

/* HERO SECTION */
.hero {
  padding: 54px 0 64px;
  background:
    radial-gradient(circle at 88% 18%, rgba(249, 178, 51, 0.22), transparent 40%),
    radial-gradient(circle at 8% 82%, rgba(92, 164, 123, 0.18), transparent 44%),
    var(--cream);
  border-bottom: 1px solid rgba(20, 92, 99, 0.08);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 44px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--cream-deep);
  border: 1.5px solid rgba(20, 92, 99, 0.18);
  color: var(--teal-dark);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  color: var(--teal);
  line-height: 1.08;
  margin-bottom: 14px;
}
.hero h1 .accent { color: var(--coral); }
.hero-sub {
  font-size: 1.08rem;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.trust-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.trust-chip {
  background: var(--white);
  border: 1px solid rgba(20, 92, 99, 0.14);
  color: var(--teal-dark);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

.hero-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cover-frame {
  position: relative;
  width: 100%;
  max-width: 390px;
  border-radius: 10px 22px 22px 10px;
  overflow: hidden;
  box-shadow: -14px 20px 42px rgba(13, 66, 71, 0.25);
  border: 4px solid var(--white);
}
.mascot-float {
  position: absolute;
  bottom: -18px;
  right: -12px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  border: 5px solid var(--white);
  background: var(--cream);
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.18);
  overflow: hidden;
}

/* 4 Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--cream);
  border: 1.5px solid rgba(20, 92, 99, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
}
.feature-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 14px;
}
.bg-sage { background: var(--sage); }
.bg-teal { background: var(--teal); }
.bg-coral { background: var(--coral); }
.bg-marigold { background: var(--marigold); color: var(--ink); }
.feature-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.16rem;
  color: var(--teal);
  margin-bottom: 8px;
  line-height: 1.25;
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Interactive 3-Level Before / After Studio */
.ba-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.ba-tab {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid rgba(20, 92, 99, 0.22);
  background: var(--white);
  color: var(--teal);
  cursor: pointer;
}
.ba-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.ba-studio {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 2px solid rgba(20, 92, 99, 0.14);
  box-shadow: var(--shadow-soft);
}
.ba-stage {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--teal);
  background: var(--white);
  user-select: none;
}
.ba-img-base,
.ba-img-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
  border-right: 4px solid var(--marigold);
}
.ba-clip img {
  position: absolute;
  top: 0;
  left: 0;
  width: 540px;
  max-width: none;
  height: 100%;
  object-fit: cover;
}
.ba-label {
  position: absolute;
  top: 12px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 4;
}
.ba-label-left { left: 12px; background: var(--teal); color: var(--white); }
.ba-label-right { right: 12px; background: var(--marigold); color: var(--ink); }
.ba-controls {
  max-width: 540px;
  margin: 18px auto 0;
  text-align: center;
}
.ba-slider {
  width: 100%;
  accent-color: var(--coral);
  cursor: pointer;
  margin-bottom: 12px;
}
.ba-quick-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.ba-caption {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

/* Meet Pebble & Pip Story Section */
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}
.mascot-card {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 2px solid rgba(20, 92, 99, 0.12);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.mascot-portraits {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}
.mascot-photo {
  border-radius: 18px;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-card);
  width: 100%;
  background: var(--white);
}
.story-points {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.story-point {
  background: var(--cream);
  border-left: 5px solid var(--coral);
  border-radius: 12px;
  padding: 14px 16px;
}
.story-point.teal-bar { border-left-color: var(--teal); }
.story-point strong {
  display: block;
  font-family: 'Fredoka', sans-serif;
  color: var(--teal);
  font-size: 1.05rem;
  margin-bottom: 3px;
}
.story-point span { font-size: 0.93rem; color: var(--muted); }

/* 40-Page Color Guides Grid */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid rgba(20, 92, 99, 0.2);
  background: var(--white);
  color: var(--teal);
  cursor: pointer;
}
.filter-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.grid-40 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 16px;
}
.page-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(20, 92, 99, 0.12);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.page-card.is-hidden { display: none; }
.nav-row.nav-single { display: flex; justify-content: center; }
.page-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(20, 92, 99, 0.15);
}
.page-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--white);
}
.page-card-meta {
  padding: 10px 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.page-num {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.94rem;
  color: var(--teal);
}
.lvl-tag {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--white);
}
.lvl-1 { background: var(--sage); }
.lvl-2 { background: var(--marigold); color: var(--ink); }
.lvl-3 { background: var(--coral); }
.page-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

/* 4-Book Series Roadmap */
.series-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.series-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(20, 92, 99, 0.12);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.series-top {
  padding: 18px;
  color: var(--white);
}
.series-top.b1 { background: var(--teal); }
.series-top.b2 { background: var(--indigo); }
.series-top.b3 { background: var(--aqua); }
.series-top.b4 { background: var(--berry); }
.series-status {
  display: inline-block;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.22);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.series-top h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.18rem;
  line-height: 1.22;
}
.series-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.series-body p { font-size: 0.9rem; color: var(--muted); }
.series-spec {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-dark);
  border-top: 1px dashed rgba(31, 41, 51, 0.15);
  padding-top: 10px;
}

/* Founder Section */
.founder-card {
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}
.founder-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  color: var(--marigold);
  margin-bottom: 10px;
}
.founder-card p {
  color: var(--cream);
  max-width: 680px;
  font-size: 0.98rem;
}

/* Single QR Guide Page (/b1/XX/) */
.guide-wrap { padding: 28px 20px 54px; }
.guide-shell { max-width: 780px; margin: 0 auto; }
.guide-header { text-align: center; margin-bottom: 18px; }
.guide-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}
.guide-header h1 {
  font-family: 'Fredoka', sans-serif;
  color: var(--teal);
  font-size: clamp(1.6rem, 3.8vw, 2.3rem);
  line-height: 1.15;
  margin-bottom: 8px;
}
.guide-lead { color: var(--muted); font-size: 0.98rem; }
.art-stage {
  position: relative;
  background: var(--white);
  border-radius: 22px;
  padding: 12px;
  border: 3px solid var(--teal);
  box-shadow: var(--shadow-soft);
}
.art-frame {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
}
.art-frame img { width: 100%; height: auto; cursor: zoom-in; }

/* Pip Glowing Hint Ring */
.pip-ring {
  position: absolute;
  width: 12%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 4px solid var(--coral);
  background: rgba(249, 178, 51, 0.25);
  box-shadow: 0 0 0 6px rgba(249, 178, 51, 0.45), 0 0 24px rgba(242, 100, 68, 0.85);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  animation: pipPulse 1.4s ease-in-out infinite;
}
.pip-ring.visible { opacity: 1; }
@keyframes pipPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.95); }
  50% { transform: translate(-50%, -50%) scale(1.14); }
}

.hint-box {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--cream-deep);
  color: var(--teal-dark);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  display: none;
}
.hint-box.visible { display: block; }

.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.nav-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin-top: 22px;
  align-items: center;
}
.nav-row .left { justify-self: start; }
.nav-row .center { justify-self: center; }
.nav-row .right { justify-self: end; }

/* Fullscreen Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 66, 71, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999;
}
.modal.open { display: flex; }
.modal img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.modal-close {
  position: fixed;
  top: 16px;
  right: 18px;
  background: var(--marigold);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  padding: 8px 18px;
  cursor: pointer;
}

/* 404 Shell */
.notfound-shell {
  text-align: center;
  padding: 64px 20px;
  max-width: 620px;
  margin: 0 auto;
}
.notfound-shell h1 {
  font-family: 'Fredoka', sans-serif;
  color: var(--teal);
  font-size: 2rem;
  margin-bottom: 12px;
}
.notfound-shell p { color: var(--muted); margin-bottom: 22px; }

/* Footer */
footer {
  background: var(--teal-dark);
  color: var(--cream);
  text-align: center;
  padding: 26px 20px;
  font-size: 0.88rem;
}
footer a { color: var(--marigold); font-weight: 700; text-decoration: underline; }
.footer-sub { margin-top: 6px; font-size: 0.8rem; opacity: 0.85; }

@media (max-width: 960px) {
  .hero-grid, .story-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .trust-chips { justify-content: center; }
  .features-grid, .series-grid { grid-template-columns: repeat(2, 1fr); }
  .founder-card { grid-template-columns: 1fr; text-align: center; }
  .founder-card p { margin: 0 auto; }
}
@media (max-width: 580px) {
  .features-grid, .series-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-row { grid-template-columns: 1fr 1fr; }
  .nav-row .center { grid-column: 1 / -1; order: 3; }
}
