@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --purple: #65508f;
  --deep-purple: #342544;
  --lavender: #cbb6e8;
  --pink: #f08aae;
  --soft-pink: #ffe0eb;
  --mint: #9bd8d1;
  --soft-mint: #def5f1;
  --yellow: #f7d77a;
  --cream: #fffaf4;
  --paper: #fffdf9;
  --ink: #332b3d;
  --muted: #766b7c;
  --shadow: 0 16px 35px rgba(67, 45, 80, .13);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

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

/* Desktop header: solid black navigation bar */
@media (min-width: 901px) {
  .site-header {
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px clamp(18px, 4vw, 55px);
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.brand { justify-self: start; }
.brand img { width: 86px; }
.main-nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
}
.main-nav a {
  text-decoration: none;
  font-weight: 800;
  color: #fff;
  font-size: .92rem;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--pink); }

.header-tiktok {
  grid-column: 3;
  justify-self: end;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 155px;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  background: var(--pink) !important;
  border: 2px solid #e978a0 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: .88rem !important;
  font-weight: 900 !important;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.header-tiktok:hover {
  color: #fff !important;
  background: #e978a0 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(67,45,80,.28);
}

.menu-toggle {
  display: none;
  grid-column: 3;
  justify-self: end;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) {
  display: block;
  width: 27px;
  height: 3px;
  margin: 5px 0;
  border-radius: 99px;
  background: #fff;
}

.section {
  position: relative;
  padding: 100px clamp(20px, 7vw, 100px);
}
.hero {
  height: clamp(500px, 33.854vw, 650px);
  min-height: 500px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(rgba(20, 8, 25, .10), rgba(20, 8, 25, .10)),
    url("images/top-background.png") center center / 100% 100% no-repeat;
  background-color: #190b1d;
}

.hero { position: relative; z-index: 1; }

.hero::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -1px;
  height: 115px;
  background: #fff;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: translateY(55%);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 700px) {
  .hero::after {
    height: 90px;
    transform: translateY(55%);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 92vw);
  margin-left: 0;
  text-align: center;
}

.eyebrow, .section-kicker {
  display: inline-block;
  color: var(--purple);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
}

.hero .eyebrow {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}

.hero-logo {
  width: min(520px, 76vw);
  margin: 8px auto 10px;
  transform: translate(-75%, -25%);
  filter: drop-shadow(0 7px 14px rgba(0,0,0,.5));
}

.hero-subtitle {
  max-width: 700px;
  margin: 20px auto 16px;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 9px rgba(0,0,0,.75);
}

.hero-copy {
  max-width: 690px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.75);
}

.hero-decoration,
.hero-doodle { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  padding: 14px 24px;
  text-decoration: none;
  font-weight: 900;
  border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(67,45,80,.15); }
.button-primary { background: var(--pink); color: #fff; border-color: #e978a0; }
.button-secondary { background: var(--deep-purple); color: #fff; margin-top: 28px; }

.paper-section {
  background: var(--paper);
  padding-top: 125px;
  margin-top: 0;
}
.paper-section::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -58px;
  left: 0;
  width: 100%;
  height: 78px;
  background: var(--paper);
  clip-path: polygon(
    0 30%, 4% 42%, 9% 48%, 14% 39%, 20% 54%,
    27% 46%, 34% 61%, 41% 49%, 48% 58%, 55% 43%,
    62% 53%, 69% 38%, 76% 51%, 83% 43%, 90% 56%,
    96% 45%, 100% 51%, 100% 100%, 0 100%
  );
  pointer-events: none;
}
.paper-section > * { position: relative; z-index: 2; }

/* Intro moved below the Section 1 / Section 2 break */
.hero-intro-below {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.hero-intro-below p {
  margin: 0 auto 24px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.7;
  text-shadow: none;
}

.hero-intro-below .button {
  display: inline-flex;
}
.section-heading { max-width: 850px; margin: 0 auto 48px; text-align: center; }
.section-heading.left { margin-left: 0; text-align: left; }
.section-heading h2 {
  margin: 5px 0 10px;
  color: var(--deep-purple);
  font-family: "Baloo 2", cursive;
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  line-height: 1;
}
.section-intro { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }
.underline { width: 95px; height: 8px; margin: 15px auto 0; border-radius: 50%; transform: rotate(-2deg); }
.section-heading.left .underline { margin-left: 0; }
.underline.pink { background: var(--pink); }
.underline.lavender { background: var(--lavender); }

.two-column {
  max-width: 1050px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 55px;
  align-items: center;
}
.intro-grid p { font-size: 1.12rem; }
.note-card {
  position: relative;
  padding: 35px;
  border-radius: 8px 26px 22px 30px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
.mint-note { background: var(--soft-mint); }
.note-pin { position: absolute; top: -16px; right: 24px; color: var(--pink); font-size: 2rem; }
.note-card strong { color: var(--purple); }

.puzzle-section {
  background: #fff8f3;
  overflow: hidden;
}
.puzzle-heading { margin-bottom: 38px; }
.puzzle-heading h2 { font-size: clamp(3rem, 6vw, 4.8rem); }
.puzzle-grid {
  max-width: 1250px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.5vw, 22px);
  align-items: stretch;
}
.puzzle-card-image {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(67, 45, 80, .13);
  transform: translateY(0) rotate(0deg);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  position: relative;
}
.puzzle-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid transparent;
  border-radius: 28px;
  transition: border-color .25s ease, box-shadow .25s ease;
  pointer-events: none;
}
.puzzle-card-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .3s ease, filter .25s ease;
}
.puzzle-card-image:hover,
.puzzle-card-image:focus-visible {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 0 22px 38px rgba(67, 45, 80, .22);
}
.puzzle-card-image:nth-child(even):hover,
.puzzle-card-image:nth-child(even):focus-visible {
  transform: translateY(-10px) rotate(1deg);
}
.puzzle-card-image:hover img,
.puzzle-card-image:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1.08);
}
.puzzle-card-image:focus-visible {
  outline: 4px solid var(--pink);
  outline-offset: 5px;
}
.puzzle-card-image:active { transform: translateY(-4px) scale(.985); }

.puzzle-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 11, 29, .72);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.puzzle-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.puzzle-modal-card {
  position: relative;
  width: min(620px, 94vw);
  padding: clamp(28px, 5vw, 48px);
  background: var(--paper);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0,0,0,.3);
  transform: translateY(15px) scale(.97);
  transition: transform .25s ease;
}
.puzzle-modal.open .puzzle-modal-card { transform: translateY(0) scale(1); }
.puzzle-modal-card h3 {
  margin: 0 45px 12px 0;
  color: var(--deep-purple);
  font-family: "Baloo 2", cursive;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}
.puzzle-modal-card p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.puzzle-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--soft-pink);
  color: var(--deep-purple);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.puzzle-modal-close:hover { background: var(--pink); color: #fff; }

.about-section { background: #dff2ef; }
.about-paper {
  max-width: 920px;
  margin: auto;
  padding: clamp(30px, 6vw, 70px);
  background: #fffdf8;
  box-shadow: var(--shadow);
  border-radius: 5px 28px 12px 24px;
  transform: rotate(-.5deg);
  position: relative;
}
.about-paper::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 2px dashed rgba(101,80,143,.22);
  border-radius: 3px 22px 8px 18px;
  pointer-events: none;
}
.about-paper > * { position: relative; }
.about-paper p { font-size: 1.05rem; }
.about-paper h3 {
  font-family: "Baloo 2", cursive;
  color: var(--purple);
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.about-divider { height: 2px; border-top: 3px dashed rgba(240,138,174,.45); margin: 40px 0; }
.big-quote {
  font-family: "Baloo 2", cursive;
  font-size: 2.5rem !important;
  color: var(--pink);
  font-weight: 800;
  margin: 8px 0 !important;
}
.challenge-line { font-weight: 900; color: var(--purple); font-size: 1.2rem; }
.interest-line { color: var(--purple); }

/* Section 4 - Bethany cartoon companions */
.about-cartoon {
  width: min(170px, 22%);
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(67,45,80,.16));
}

.about-cartoon-auggie {
  float: left;
  margin: 18px 28px 10px -8px;
  transform: rotate(-5deg);
}

.about-cartoon-rucca {
  float: left;
  margin: 18px 28px 10px -8px;
  transform: rotate(5deg);
}

@media (max-width: 700px) {
  .about-cartoon {
    width: min(145px, 28%);
  }

  .about-cartoon-auggie,
  .about-cartoon-rucca {
    margin-left: -2px;
    margin-right: 20px;
  }
}

@media (max-width: 500px) {
  .about-cartoon {
    width: min(155px, 48%);
    float: none;
    display: block;
    margin: 0 auto 18px;
    transform: none;
  }
}

/* Section 4 - Bethany photos */
.about-feature {
  display: flow-root;
  margin: 0;
}

.about-feature-text {
  position: relative;
  z-index: 2;
}

.about-photo {
  width: min(360px, 42%);
  height: 300px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(67,45,80,.18);
  border: 8px solid #fff;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.about-photo-right {
  float: right;
  margin: 0 -12px 22px 32px;
  transform: rotate(1.2deg);
}

.about-photo-left {
  float: left;
  margin: 0 32px 22px -12px;
  transform: rotate(-1.2deg);
}

.about-feature-meet .about-photo {
  height: 360px;
}

.about-feature-why .about-photo {
  height: 330px;
}

.about-feature-more .about-photo {
  height: 300px;
}

.about-clear {
  clear: both;
}

@media (max-width: 700px) {
  .about-photo {
    width: min(300px, 48%);
    height: 260px;
  }

  .about-feature-meet .about-photo,
  .about-feature-why .about-photo {
    height: 280px;
  }

  .about-feature-more .about-photo {
    height: 260px;
  }

  .about-photo-right {
    margin-right: -4px;
    margin-left: 22px;
  }

  .about-photo-left {
    margin-right: 22px;
    margin-left: -4px;
  }
}

@media (max-width: 500px) {
  .about-photo {
    float: none;
    width: min(330px, 92%);
    height: auto !important;
    margin: 0 auto 24px;
    transform: none;
  }
}

.latest-section { background: #fff8f3; }
.latest-grid {
  max-width: 1150px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.latest-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.latest-placeholder {
  min-height: 190px;
  display: grid;
  place-items: center;
  font-family: "Baloo 2", cursive;
  font-size: 2rem;
  font-weight: 800;
  color: var(--deep-purple);
}
.pink-placeholder { background: #ffdce8; }
.mint-placeholder { background: #d9f2ed; }
.lavender-placeholder { background: #e7dcf5; }
.latest-content { padding: 25px; }
.tag {
  color: var(--purple);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.latest-content h3 { font-family: "Baloo 2", cursive; font-size: 1.8rem; line-height: 1.05; margin: 6px 0; }
.text-link { color: var(--purple); font-weight: 900; text-decoration: none; }

.contact-section {
  background:
    radial-gradient(circle at 10% 20%, rgba(240,138,174,.25), transparent 25%),
    radial-gradient(circle at 90% 70%, rgba(155,216,209,.3), transparent 28%),
    #f0e7fa;
}
.contact-card {
  max-width: 850px;
  margin: auto;
  padding: clamp(30px, 6vw, 70px);
  background: #fffdf9;
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 7px; font-weight: 900; color: var(--deep-purple); }
.contact-form label span { font-weight: 600; color: var(--muted); font-size: .88rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 2px solid #e2d9e7;
  border-radius: 16px;
  padding: 13px 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(240,138,174,.13); }
.form-status { min-height: 1.5em; font-weight: 800; color: var(--purple); }

.site-footer {
  padding: 45px 20px;
  text-align: center;
  background: var(--deep-purple);
  color: #fff;
}
.footer-logo { width: 150px; margin: 0 auto 15px; }
.footer-small { opacity: .65; font-size: .85rem; }

@media (max-width: 900px) {
  /* Mobile: no black header bar */
  .site-header {
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    padding-inline: 18px;
    padding-block: 2px;
    min-height: 45px;
    height: 45px;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
  }
  .brand {
    grid-column: 1;
    justify-self: start;
  }
  /* Mobile: fixed TikTok button in the bottom-left corner */
  .header-tiktok {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 30;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 9px 14px !important;
    font-size: .72rem !important;
    gap: 5px;
    transform: none;
    box-shadow: 0 5px 14px rgba(0,0,0,.28);
  }
  .menu-toggle {
    display: block;
    grid-column: 3;
    justify-self: end;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px 18px;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 5px; color: #fff; }
  .two-column, .latest-grid { grid-template-columns: 1fr; }
  .puzzle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 620px;
  }
}

@media (max-width: 600px) {
  .section { padding: 72px 18px; }
  .hero {
    height: 560px;
    min-height: 560px;
    background:
      linear-gradient(rgba(20, 8, 25, .10), rgba(20, 8, 25, .10)),
      url("images/top-background-mobile.png") center center / cover no-repeat;
    background-color: #190b1d;
  }
  .hero-content {
    width: min(92vw, 600px);
  }

  /* Mobile hero: the background image carries the visual identity,
     so the large logo and subtitle are intentionally removed. */
  .hero-logo,
  .hero-subtitle {
    display: none;
  }

  .puzzle-games-title { width: min(620px, 94vw); }
  .puzzle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: 260px;
  }
  .puzzle-card-image {
    border-radius: 20px;
  }
  .puzzle-card-image::after {
    border-radius: 20px;
  }
  .puzzle-card-image:nth-child(5) {
    grid-column: 1 / -1;
    width: calc(50% - 4px);
    justify-self: center;
  }
  .about-paper { padding: 28px 22px; }
  .about-paper::before { inset: 10px; }
}

/* Center the Explore the Puzzles button */
#what-bethany-does > .button-secondary {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
