/*
Theme Name: Menthol Elf
Theme URI: https://example.com/menthol-elf
Author: Menthol Elf Project
Description: A gentle WordPress theme for the Menthol Elf children's emotional learning book series.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: menthol-elf
Tags: custom-logo, custom-menu, featured-images, block-styles, children, education
*/

:root {
  --me-mint: #87d6b6;
  --me-leaf: #3f8f70;
  --me-fern: #1f5f4d;
  --me-creek: #6fb8c9;
  --me-sky: #d9f1f0;
  --me-gold: #f4c86a;
  --me-bark: #7c5940;
  --me-berry: #a86b76;
  --me-ink: #25443d;
  --me-muted: #5d756e;
  --me-cream: #fffaf0;
  --me-mist: #f2fbf7;
  --me-white: #ffffff;
  --me-shadow: 0 18px 48px rgba(31, 95, 77, 0.14);
  --me-radius: 8px;
  --me-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--me-ink);
  background: var(--me-cream);
  font-family: "Nunito", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 12%, rgba(135, 214, 182, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(217, 241, 240, 0.7), rgba(255, 250, 240, 0.94) 42%, rgba(242, 251, 247, 0.9));
}

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

a:hover,
a:focus {
  color: var(--me-bark);
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(63, 143, 112, 0.16);
  background: rgba(255, 250, 240, 0.92);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.site-footer__inner,
.wrap {
  width: min(var(--me-max), calc(100% - 40px));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 180px;
}

.brand img {
  display: block;
  width: 190px;
  max-height: 64px;
  object-fit: contain;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--me-ink);
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav .current-menu-item > a {
  background: rgba(135, 214, 182, 0.25);
  color: var(--me-fern);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(63, 143, 112, 0.26);
  border-radius: 999px;
  background: var(--me-white);
  color: var(--me-fern);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: clamp(620px, 84vh, 780px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.95), rgba(255, 250, 240, 0.64) 46%, rgba(255, 250, 240, 0.14)),
    linear-gradient(0deg, rgba(255, 250, 240, 0.95), transparent 38%);
}

.hero__content {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto 84px;
  padding-right: min(16vw, 160px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--me-fern);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--me-gold);
  box-shadow: 0 0 0 5px rgba(244, 200, 106, 0.22);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--me-fern);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(3rem, 4.8rem, 4.8rem);
}

h2 {
  font-size: clamp(2rem, 3rem, 3rem);
}

h3 {
  font-size: 1.45rem;
}

.hero__content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #2f554d;
  font-size: 1.22rem;
  font-weight: 650;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.wp-block-button__link,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--me-fern);
  color: var(--me-white);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(31, 95, 77, 0.2);
  cursor: pointer;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  background: var(--me-bark);
  color: var(--me-white);
  transform: translateY(-1px);
}

.button--secondary {
  background: var(--me-white);
  color: var(--me-fern);
  box-shadow: inset 0 0 0 1px rgba(63, 143, 112, 0.24), 0 10px 20px rgba(31, 95, 77, 0.1);
}

.button--secondary:hover,
.button--secondary:focus {
  background: var(--me-mist);
  color: var(--me-bark);
}

.section {
  padding: 78px 0;
}

.section--mist {
  background: rgba(242, 251, 247, 0.74);
}

.section--creek {
  background: linear-gradient(180deg, rgba(217, 241, 240, 0.86), rgba(255, 250, 240, 0.9));
}

.section__intro {
  max-width: 760px;
  margin-bottom: 36px;
}

.section__intro p {
  margin: 0;
  color: var(--me-muted);
  font-size: 1.08rem;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-height: 100%;
  padding: 26px;
  border: 1px solid rgba(63, 143, 112, 0.16);
  border-radius: var(--me-radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(31, 95, 77, 0.08);
}

.card p {
  margin: 0;
  color: var(--me-muted);
}

.book-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  align-items: start;
}

.book-card__mark {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--me-radius);
  background: linear-gradient(160deg, rgba(135, 214, 182, 0.36), rgba(244, 200, 106, 0.22));
}

.book-card__mark img {
  width: 70%;
}

.book-card__meta {
  margin: 0 0 8px;
  color: var(--me-berry);
  font-size: 0.86rem;
  font-weight: 850;
}

.pathway {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  counter-reset: step;
}

.pathway__step {
  position: relative;
  padding: 24px;
  border-radius: var(--me-radius);
  background: var(--me-white);
  box-shadow: 0 12px 26px rgba(31, 95, 77, 0.08);
}

.pathway__step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--me-gold);
  color: var(--me-ink);
  font-weight: 900;
}

.calm-moment {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  align-items: center;
  padding: 34px;
  border-radius: var(--me-radius);
  background: var(--me-white);
  box-shadow: var(--me-shadow);
  overflow: hidden;
}

.calm-moment__bubble {
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.94), transparent 24%),
    radial-gradient(circle, rgba(135, 214, 182, 0.54), rgba(111, 184, 201, 0.28));
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.58), 0 18px 46px rgba(111, 184, 201, 0.24);
  animation: me-breathe 6s ease-in-out infinite;
}

@keyframes me-breathe {
  0%,
  100% {
    transform: scale(0.82);
  }
  50% {
    transform: scale(1);
  }
}

.sparkle-field {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sparkle-field i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 200, 106, 0.86);
  animation: me-float 7s linear infinite;
}

@keyframes me-float {
  from {
    transform: translateY(22px);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  to {
    transform: translateY(-150px);
    opacity: 0;
  }
}

.entry-content {
  width: min(820px, calc(100% - 40px));
  margin: 54px auto 80px;
}

.entry-content > * {
  max-width: 820px;
}

.entry-content .alignwide {
  max-width: var(--me-max);
  margin-inline: calc((820px - min(var(--me-max), 100vw - 40px)) / 2);
}

.page-hero {
  padding: 72px 0 50px;
  background: linear-gradient(180deg, rgba(217, 241, 240, 0.72), rgba(255, 250, 240, 0));
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--me-muted);
  font-size: 1.16rem;
}

.post-list {
  display: grid;
  gap: 24px;
}

.post-list article {
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(63, 143, 112, 0.16);
}

.site-footer {
  padding: 54px 0 36px;
  background: var(--me-fern);
  color: rgba(255, 255, 255, 0.86);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
}

.site-footer img {
  width: 84px;
  margin-bottom: 14px;
}

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

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 860px) {
  .site-header__inner {
    min-height: 74px;
  }

  .brand img {
    width: 150px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    display: none;
    padding: 12px;
    border: 1px solid rgba(63, 143, 112, 0.18);
    border-radius: var(--me-radius);
    background: var(--me-white);
    box-shadow: var(--me-shadow);
  }

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

  .site-nav ul {
    display: grid;
    gap: 2px;
  }

  .site-nav a {
    border-radius: var(--me-radius);
  }

  .hero {
    min-height: 680px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 250, 240, 0.52), rgba(255, 250, 240, 0.95) 66%),
      linear-gradient(90deg, rgba(255, 250, 240, 0.86), rgba(255, 250, 240, 0.48));
  }

  .hero__content {
    margin-bottom: 58px;
    padding-right: 0;
  }

  h1 {
    font-size: 3rem;
  }

  .grid--3,
  .grid--2,
  .pathway,
  .calm-moment,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .calm-moment__bubble {
    width: min(190px, 100%);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-header__inner,
  .site-footer__inner,
  .wrap,
  .entry-content,
  .hero__content {
    width: min(100% - 28px, var(--me-max));
  }

  .section {
    padding: 54px 0;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 2rem;
  }

  .book-card {
    grid-template-columns: 78px 1fr;
  }
}
