/* Wonder Spectrum House — first-draft site styles
   UI palette is sampled from the Toby's Foundation image (cream, sage, mustard, dusty blue, lavender, coral, charcoal).
   Emotion swatch colors on The Book page stay as book facts. */

:root {
  /* Book emotion colors — The Book page swatches only; do not use for UI chrome. */
  --yellow: #f5c518;
  --red: #d63b3b;
  --pink: #e56a9a;
  --blue: #1e4a8c;
  --green: #3d9a68;
  --orange: #e8782a;
  --gray: #7a7a7a;
  --brown: #6d4328;
  /* Toby's Foundation palette (sampled; sage/blue darkened for WCAG AA text/buttons). */
  --sage: #788365;
  --sage-mid: #838c6f;
  --sage-light: #8f987b;
  --sage-deep: #5c6749;
  --mustard: #e6b55b;
  --coral: #df8565;
  --dusty: #6f87a1;
  --lavender: #9a7c9e;
  --paper: #f4efea;
  --paper-deep: #eee8e2;
  --ink: #51524b;
  --ink-soft: #5d5e57;
  --white: #faf7f4;
  --focus: #5c6749;
  --link: #536b85;
  --footer: #3c4232;
  --footer-muted: #c8cdb4;
  --placeholder: #5c6749;
  --placeholder-bg: #f3ead4;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --shadow: 0 12px 32px rgba(81, 82, 75, 0.10);
  --shadow-soft: 0 4px 16px rgba(81, 82, 75, 0.07);
  --font-display: "Fraunces", "Palatino Linotype", Palatino, "Iowan Old Style", serif;
  --font-body: "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --space: clamp(3rem, 8vw, 6.5rem);
  --content: 70rem;
  --text: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 0% -10%, rgba(223, 133, 101, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(111, 135, 161, 0.12), transparent 45%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(154, 124, 158, 0.10), transparent 50%);
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sage-deep);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Spectrum bar */
.spectrum-bar {
  display: flex;
  height: 8px;
  width: 100%;
}

.spectrum-bar span {
  flex: 1;
  display: block;
}

.spectrum-bar span:nth-child(1) { background: var(--coral); }
.spectrum-bar span:nth-child(2) { background: var(--mustard); }
.spectrum-bar span:nth-child(3) { background: var(--sage-light); }
.spectrum-bar span:nth-child(4) { background: var(--sage); }
.spectrum-bar span:nth-child(5) { background: var(--dusty); }
.spectrum-bar span:nth-child(6) { background: var(--lavender); }
.spectrum-bar span:nth-child(7) { background: var(--coral); }
.spectrum-bar span:nth-child(8) { background: var(--sage-deep); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 239, 234, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(120, 131, 101, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.wordmark img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wordmark-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.wordmark-tag {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--sage);
  border-radius: 0.7rem;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--coral);
}

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  background: var(--sage-deep);
  color: var(--white) !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 999px;
  box-shadow: none !important;
}

.nav-cta:hover {
  background: var(--footer);
  color: var(--white) !important;
}

/* Layout */
main {
  display: block;
}

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: var(--space) 0;
}

.section-header {
  max-width: var(--text);
  margin-bottom: 2rem;
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin: 0 0 0.6rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-wrap: pretty;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

h3 {
  font-size: 1.25rem;
}

.lede,
.hero-copy p {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 38rem;
  text-wrap: pretty;
}

p {
  margin: 0 0 1rem;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn-primary {
  background: var(--sage-deep);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--footer);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--sage-deep);
  border-color: var(--sage);
}

.btn-secondary:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--paper-deep);
  color: var(--ink-soft);
  border-color: rgba(120, 131, 101, 0.28);
  cursor: not-allowed;
}

/* Placeholder flag */
.placeholder-flag {
  display: inline-block;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--placeholder);
  background: var(--placeholder-bg);
  border: 1px dashed var(--placeholder);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  vertical-align: middle;
}

.placeholder-box {
  background: repeating-linear-gradient(
    -45deg,
    rgba(230, 181, 91, 0.35),
    rgba(230, 181, 91, 0.35) 12px,
    rgba(255, 252, 251, 0.7) 12px,
    rgba(255, 252, 251, 0.7) 24px
  );
  border: 2px dashed var(--placeholder);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  color: var(--ink);
}

.placeholder-box > :last-child {
  margin-bottom: 0;
}

.draft-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 var(--space);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-art {
  position: relative;
}

.hero-art img {
  width: 100%;
  border-radius: 2rem;
  box-shadow: var(--shadow);
}

.coming-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--white);
  border: 1px solid rgba(120, 131, 101, 0.20);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
}

.coming-badge::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--mustard);
}

/* Cards and grids */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  padding: 1.5rem;
}

.mission-grid,
.split,
.book-layout,
.about-layout {
  display: grid;
  gap: 2rem;
}

.mission-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}

.mission-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.mission-points li {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  border-left: 6px solid var(--sage);
  box-shadow: var(--shadow-soft);
}

.mission-points li:nth-child(2) { border-left-color: var(--dusty); }
.mission-points li:nth-child(3) { border-left-color: var(--lavender); }

.mission-points strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

/* Book teaser */
.book-teaser {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 2rem;
  align-items: center;
}

.cover-frame {
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-deep);
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Color guide */
.color-guide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 700px) {
  .color-guide {
    grid-template-columns: repeat(4, 1fr);
  }
}

.swatch {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  display: flex;
  flex-direction: column;
}

.swatch-color {
  height: 0.55rem;
  flex-shrink: 0;
}

.swatch-art {
  background: transparent;
  padding: 0.75rem 0.75rem 0;
}

.swatch-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: transparent;
}

.swatch-body {
  padding: 0.9rem 1rem 1.1rem;
}

.swatch-body h3 {
  margin-bottom: 0.15rem;
}

.swatch-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.swatch-book-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.swatch-caption {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.swatch-happy .swatch-color { background: var(--yellow); }
.swatch-angry .swatch-color { background: var(--red); }
.swatch-love .swatch-color { background: var(--pink); }
.swatch-sad .swatch-color { background: var(--blue); }
.swatch-calm .swatch-color { background: var(--green); }
.swatch-brave .swatch-color { background: var(--orange); }
.swatch-anxious .swatch-color { background: var(--gray); }
.swatch-brown .swatch-color { background: var(--brown); }

.color-guide-note {
  margin-top: 1.5rem;
  max-width: 40rem;
}

/* Coming soon purchase block */
.purchase-block {
  margin-top: 2.5rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 2px dashed var(--sage);
  box-shadow: var(--shadow-soft);
}

.purchase-block h2,
.purchase-block h3 {
  margin-top: 0.5rem;
}

.buy-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.buy-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3.25rem;
  padding: 0.75rem;
  border-radius: 999px;
  border: 2px dashed var(--placeholder);
  background: var(--placeholder-bg);
  color: var(--placeholder);
  font-weight: 800;
  font-size: 0.9rem;
}

/* Signup */
.signup-section {
  background: linear-gradient(180deg, rgba(120, 131, 101, 0.12), rgba(111, 135, 161, 0.14), rgba(154, 124, 158, 0.10));
}

.signup-card {
  max-width: 36rem;
  margin: 0 auto;
  background: var(--white);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-weight: 800;
  font-size: 0.95rem;
}

.optional {
  font-weight: 600;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid rgba(120, 131, 101, 0.35);
  border-radius: 0.7rem;
  padding: 0.7rem 0.85rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
  background: var(--white);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-status {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 0.7rem;
  background: var(--placeholder-bg);
  border: 1px solid var(--placeholder);
  color: var(--ink);
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-help {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0.75rem 0 0;
}

/* About */
.about-layout {
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  align-items: start;
  gap: 2.5rem;
}

.author-photo {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-deep);
  border: 1px solid var(--sage-light);
}

.author-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: top center;
}

.fact-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.fact-list li {
  padding-left: 1.5rem;
  position: relative;
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--mustard);
}

.fact-list li:nth-child(2)::before { background: var(--dusty); }
.fact-list li:nth-child(3)::before { background: var(--lavender); }
.fact-list li:nth-child(4)::before { background: var(--coral); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-address {
  font-weight: 800;
  font-size: 1.2rem;
  margin: 1.25rem 0 1rem;
}

.contact-address a {
  color: var(--sage-deep);
  word-break: break-word;
}

.contact-aside p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: var(--paper);
  margin-top: 2rem;
}

.site-footer a {
  color: var(--mustard);
}

.site-footer a:hover {
  color: #fff;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.footer-col h2 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--footer-muted);
  margin-bottom: 0.7rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  max-width: var(--content);
  margin: 0 auto;
  padding: 1rem 1.25rem 1.75rem;
  border-top: 1px solid rgba(244, 239, 234, 0.15);
  font-size: 0.9rem;
  color: var(--footer-muted);
}

/* Page intro for inner pages */
.page-intro {
  padding: clamp(2rem, 5vw, 3.5rem) 0 0;
}

.page-intro + .section {
  padding-top: 2rem;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 800px) {
  .hero-grid,
  .mission-grid,
  .book-teaser,
  .about-layout,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
    max-width: 26rem;
  }

  .book-teaser .cover-frame {
    max-width: 18rem;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid rgba(120, 131, 101, 0.18);
    box-shadow: var(--shadow);
    padding: 0.75rem 1.25rem 1.25rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .site-nav a {
    display: block;
    padding: 0.65rem 0.2rem;
  }

  .nav-cta {
    justify-content: center;
    margin-top: 0.35rem;
  }

  .wordmark-tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.cover-frame-lg {
  max-width: 24rem;
  width: 100%;
}

@media (min-width: 801px) {
  .book-page-layout {
    grid-template-columns: minmax(16rem, 24rem) 1fr;
    align-items: start;
  }
}

@media (max-width: 400px) {
  .wordmark img {
    width: 40px;
    height: 40px;
  }
  .wordmark-name {
    font-size: 0.95rem;
  }
}


/* Founding Story on the About page */
.founding-story-section {
  padding-top: 0;
}

.founding-story {
  max-width: var(--text);
}

.founding-story p {
  margin: 0 0 1.2rem;
}

.founding-story p:last-child {
  margin-bottom: 0;
}

.founding-story .story-pull {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 1.85rem 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid var(--lavender);
  text-wrap: pretty;
}

/* Instagram social link */
.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  text-decoration: none;
}

.instagram-link svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  display: block;
}


/* Toby's Foundation section (About) and home teaser */
.foundation-section {
  background: linear-gradient(180deg, rgba(111, 135, 161, 0.10), rgba(154, 124, 158, 0.08), rgba(120, 131, 101, 0.10));
  scroll-margin-top: 5.5rem;
}

.foundation-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) 1fr;
  gap: 2.5rem;
  align-items: center;
}

.foundation-logo {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  border: 1px solid rgba(120, 131, 101, 0.14);
}

.foundation-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.foundation-copy {
  max-width: 36rem;
}

.foundation-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--sage-deep);
  margin: 1.25rem 0 0.85rem;
  text-wrap: pretty;
}

.foundation-mission {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 1.35rem;
  text-wrap: pretty;
}

.foundation-values {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.foundation-values li {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--white);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.14);
  border-left-width: 6px;
}

.foundation-values li:nth-child(1) { border-left-color: var(--sage); }
.foundation-values li:nth-child(2) { border-left-color: var(--dusty); }
.foundation-values li:nth-child(3) { border-left-color: var(--lavender); }
.foundation-values li:nth-child(4) { border-left-color: var(--mustard); }
.foundation-values li:nth-child(5) { border-left-color: var(--coral); }

.foundation-close {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}

.foundation-teaser {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr;
  gap: 2rem;
  align-items: center;
}

.foundation-teaser-logo {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--white);
  border: 1px solid rgba(120, 131, 101, 0.12);
}

.foundation-teaser-logo img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 800px) {
  .foundation-layout,
  .foundation-teaser {
    grid-template-columns: 1fr;
  }

  .foundation-logo,
  .foundation-teaser-logo {
    max-width: 22rem;
    margin: 0 auto;
  }
}

/* Foundation section: slightly roomier copy column so value pills can sit on one row */
.foundation-layout {
  grid-template-columns: minmax(16rem, 22rem) 1fr;
}

.foundation-copy {
  max-width: none;
}

.foundation-values li {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.7rem;
}

/* Restore stacked Foundation layout on small screens (must follow the desktop column override) */
@media (max-width: 800px) {
  .foundation-layout,
  .foundation-teaser {
    grid-template-columns: 1fr;
  }
}

/* Book synopsis */
.book-synopsis { font-size: 1.12rem; line-height: 1.6; }

/* Cover tagline band */
.tagline-band { padding: 2.25rem 0; background: #fbf8f4; border-top: 1px solid rgba(120,131,101,.18); border-bottom: 1px solid rgba(120,131,101,.18); }
.tagline-quote { margin: 0; text-align: center; font-family: inherit; font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.6rem); line-height: 1.5; color: #51524b; }
.tagline-quote span { color: #536b85; }


/* Mid-width nav: six links plus the launch CTA */
@media (max-width: 1180px) and (min-width: 768px) {
  .site-nav ul {
    gap: 0.2rem 0.85rem;
  }
  .site-nav a {
    font-size: 0.88rem;
  }
}

/* Merchandise and Learning Tools */
.idea-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.idea-grid > .idea-card {
  flex: 1 1 100%;
  max-width: 26rem;
}

@media (min-width: 600px) {
  .idea-grid > .idea-card {
    flex: 1 1 calc(50% - 1.25rem);
    max-width: calc(50% - 0.63rem);
  }
}

@media (min-width: 800px) {
  .idea-grid > .idea-card {
    flex: 1 1 calc(33.333% - 1.25rem);
    max-width: calc(33.333% - 0.84rem);
  }
}

.idea-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.idea-card-art {
  background: var(--paper-deep);
  padding: 1.25rem 1.25rem 0.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 11rem;
}

.idea-card-art img {
  width: auto;
  max-width: 100%;
  height: 10.5rem;
  object-fit: contain;
}

.idea-stickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.35rem;
  width: 100%;
}

.idea-stickers img {
  height: 4.6rem;
  width: auto;
  max-width: 30%;
}

.idea-card-body {
  padding: 1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.idea-card-body h3 {
  margin-bottom: 0.35rem;
}

.idea-card-body p {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.idea-card-body .coming-badge {
  margin: auto 0 0;
  align-self: flex-start;
}

.merch-note {
  margin-top: 1.5rem;
  max-width: 44rem;
}

/* Feeling check-in */
.checkin {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.checkin-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

@media (min-width: 600px) {
  .checkin-choices {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feeling-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.7rem 0.5rem 0.85rem;
  background: var(--paper);
  border: 2px solid rgba(120, 131, 101, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: center;
}

.feeling-btn img {
  width: 4.75rem;
  height: 4.75rem;
  object-fit: contain;
}

.feeling-btn .feeling-name {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
}

.feeling-btn .feeling-color {
  display: block;
  width: 2.25rem;
  height: 0.4rem;
  border-radius: 999px;
}

.feeling-btn[data-feeling="happy"] .feeling-color { background: var(--yellow); }
.feeling-btn[data-feeling="angry"] .feeling-color { background: var(--red); }
.feeling-btn[data-feeling="love"] .feeling-color { background: var(--pink); }
.feeling-btn[data-feeling="sad"] .feeling-color { background: var(--blue); }
.feeling-btn[data-feeling="calm"] .feeling-color { background: var(--green); }
.feeling-btn[data-feeling="brave"] .feeling-color { background: var(--orange); }
.feeling-btn[data-feeling="anxious"] .feeling-color { background: var(--gray); }
.feeling-btn[data-feeling="brown"] .feeling-color { background: var(--brown); }

.feeling-btn:hover {
  border-color: var(--sage);
  background: var(--white);
}

.feeling-btn[aria-pressed="true"] {
  border-color: var(--sage-deep);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(92, 103, 73, 0.22);
}

.feeling-prompt {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  border-left: 6px solid var(--sage);
  min-height: 6.5rem;
}

.feeling-prompt h3 {
  margin-bottom: 0.35rem;
  font-size: 1.2rem;
}

.feeling-prompt p {
  margin: 0;
  color: var(--ink-soft);
}

.feeling-prompt[data-tone="happy"] { border-left-color: var(--yellow); }
.feeling-prompt[data-tone="angry"] { border-left-color: var(--red); }
.feeling-prompt[data-tone="love"] { border-left-color: var(--pink); }
.feeling-prompt[data-tone="sad"] { border-left-color: var(--blue); }
.feeling-prompt[data-tone="calm"] { border-left-color: var(--green); }
.feeling-prompt[data-tone="brave"] { border-left-color: var(--orange); }
.feeling-prompt[data-tone="anxious"] { border-left-color: var(--gray); }
.feeling-prompt[data-tone="brown"] { border-left-color: var(--brown); }

/* Discussion questions and calming ideas */
.question-list,
.calm-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.question-list li,
.calm-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  border-left: 6px solid var(--sage);
}

.question-list li:nth-child(2),
.calm-grid li:nth-child(2) { border-left-color: var(--dusty); }
.question-list li:nth-child(3),
.calm-grid li:nth-child(3) { border-left-color: var(--lavender); }
.question-list li:nth-child(4),
.calm-grid li:nth-child(4) { border-left-color: var(--mustard); }
.question-list li:nth-child(5),
.calm-grid li:nth-child(5) { border-left-color: var(--coral); }
.question-list li:nth-child(6),
.calm-grid li:nth-child(6) { border-left-color: var(--sage); }

.calm-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .calm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.calm-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.materials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .materials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .materials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.material-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  padding: 1.25rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
}

.material-card h3 {
  margin-bottom: 0.4rem;
}

.material-desc {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  flex: 1;
}

.material-actions {
  margin-top: auto;
}

.material-price {
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.material-price.is-pending {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.material-actions .btn {
  width: 100%;
}

.material-actions .btn:disabled,
.material-actions .btn[aria-disabled="true"] {
  cursor: not-allowed;
}

.tools-note {
  max-width: 44rem;
  margin-top: 1.5rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.chart-caption {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}


.materials-group {
  margin-top: 2.25rem;
}

.materials-group-header {
  max-width: var(--text);
  margin-bottom: 1.25rem;
}

.materials-group-header h3 {
  margin-bottom: 0.45rem;
}

.material-card h3,
.material-card h4 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
}

.material-actions .btn {
  width: 100%;
  white-space: normal;
  text-wrap: pretty;
  line-height: 1.3;
}


/* Emotion Color Wheel */
#color-wheel {
  scroll-margin-top: 5.5rem;
}

.wheel-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 2rem;
  align-items: center;
}

.emotion-wheel {
  width: 100%;
  max-width: 26rem;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.emotion-wheel .wheel-slice,
.emotion-wheel .wheel-center {
  cursor: pointer;
  stroke: var(--paper);
  stroke-width: 2;
  outline: none;
  transition: filter 0.15s ease, stroke-width 0.15s ease;
}

.emotion-wheel .wheel-center {
  stroke: #f4efea;
  stroke-width: 3;
}

.emotion-wheel .wheel-slice:hover,
.emotion-wheel .wheel-center:hover {
  filter: brightness(1.06);
}

.emotion-wheel .wheel-slice:focus-visible,
.emotion-wheel .wheel-center:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  stroke: var(--ink);
  stroke-width: 3;
}

.emotion-wheel .wheel-slice[aria-pressed="true"],
.emotion-wheel .wheel-center[aria-pressed="true"] {
  stroke: var(--ink);
  stroke-width: 4;
  filter: brightness(1.04);
}

.emotion-wheel .wheel-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  fill: var(--ink);
  pointer-events: none;
}

.emotion-wheel .wheel-center-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  fill: #f4efea;
  pointer-events: none;
}

.wheel-howto {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  padding: 1.25rem 1.4rem 1.4rem;
}

.wheel-howto h3 {
  margin-bottom: 0.7rem;
}

.wheel-howto ol {
  margin: 0;
  padding: 0 0 0 1.2rem;
}

.wheel-howto li {
  margin: 0 0 0.65rem;
}

.wheel-howto li:last-child {
  margin-bottom: 0;
}

.wheel-tool .feeling-prompt {
  margin-top: 1.25rem;
}

@media (max-width: 800px) {
  .wheel-layout {
    grid-template-columns: 1fr;
  }
}


/* Coloring Pages gallery */
#coloring-pages {
  scroll-margin-top: 5.5rem;
}

.coloring-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .coloring-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.coloring-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 131, 101, 0.12);
  border-top: 6px solid var(--coloring-accent, var(--sage));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.coloring-card h3 {
  margin: 0.95rem 1.15rem 0.35rem;
  font-size: 1.25rem;
}

.coloring-card p {
  margin: 0 1.15rem 1.2rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.coloring-thumb {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper-deep);
  cursor: zoom-in;
  line-height: 0;
}

.coloring-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 607;
  object-fit: cover;
  object-position: center;
}

.coloring-thumb:hover img {
  filter: brightness(0.98);
}

.coloring-thumb:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.coloring-soon {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60, 66, 50, 0.82);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(72rem, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.lightbox-image {
  max-width: 96vw;
  max-height: calc(92vh - 3rem);
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.lightbox-close {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  background: transparent;
  border: 0;
  padding: 0.2rem 0.15rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.lightbox-close:hover {
  color: var(--mustard);
}
