/* Booom! The Magic Chemistry Kit — static rebuild of MatlScience Inc site */
:root {
  --yellow: #f3c510;
  --yellow-deep: #e0b40a;
  --blue: #1aa8df;
  --blue-deep: #1489b8;
  --green: #60ae41;
  --green-deep: #4f9335;
  --pink: #e91e63;
  --pink-deep: #c2185b;
  --ink: #1a1a1a;
  --muted: #4a4a4a;
  --paper: #ffffff;
  --cream: #fff8e7;
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --max: 1120px;
  --header-h: 78px;
  --radius: 6px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.05rem;
}

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

a {
  color: var(--blue-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h2 strong,
h3 strong {
  color: inherit;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--yellow);
  min-height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

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

.brand img {
  height: 56px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
}

.brand-text {
  display: none;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--ink);
  background: var(--yellow);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
}

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

.site-nav a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

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

.site-nav .nav-cta {
  background: var(--pink);
  color: #fff !important;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

.site-nav .nav-cta:hover {
  background: var(--pink-deep);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-white {
  background: #fff;
  color: var(--ink);
}

.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn-pink {
  background: var(--pink);
  color: #fff;
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  color: #fff;
  overflow: hidden;
  background: #0b3a52;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.9s ease, transform 6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 40, 60, 0.78) 0%, rgba(26, 168, 223, 0.35) 55%, rgba(243, 197, 16, 0.25) 100%),
    radial-gradient(circle at 80% 20%, rgba(233, 30, 99, 0.35), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: grid;
  align-content: center;
  padding: 4rem 0 5rem;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero h1 {
  max-width: 14ch;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 38ch;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero-dots button.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
}

/* Feature tiles under hero (original home cards) */
.feature-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: -3rem;
  position: relative;
  z-index: 3;
  padding-bottom: 2rem;
}

.feature-tile {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 280px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}

.feature-tile:hover {
  transform: translateY(-6px);
  text-decoration: none;
}

.feature-tile .tile-media {
  flex: 1;
  background-size: cover;
  background-position: center;
  min-height: 140px;
}

.feature-tile .tile-body {
  padding: 1rem 1.1rem 1.25rem;
  background: var(--cream);
}

.feature-tile h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.feature-tile p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.feature-tile .tile-link {
  font-weight: 800;
  color: var(--pink);
  font-size: 0.9rem;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-yellow {
  background: var(--yellow);
}

.section-pink {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.35)),
    url("../assets/images/pink-section-bg.jpg") center / cover no-repeat;
  color: var(--ink);
}

.section-science {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15)),
    url("../assets/images/bg1-new.jpg") center / cover no-repeat;
  color: #fff;
  min-height: 420px;
}

.section-blue {
  background: var(--blue);
  color: #fff;
}

.section-green {
  background: var(--green);
  color: #fff;
}

.section-training {
  background:
    linear-gradient(rgba(30, 20, 40, 0.45), rgba(30, 20, 40, 0.45)),
    url("../assets/images/bg2-new.jpg") center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.section-banner {
  background:
    linear-gradient(rgba(10, 40, 60, 0.55), rgba(10, 40, 60, 0.55)),
    var(--banner-image, url("../assets/images/Resources.jpg")) center / cover no-repeat;
  color: #fff;
  padding: 5.5rem 0;
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.yellow-line {
  width: 72px;
  height: 4px;
  background: var(--yellow);
  margin: 0 0 1.25rem;
}

.section-blue .yellow-line,
.section-green .yellow-line,
.section-training .yellow-line,
.section-science .yellow-line {
  background: #fff;
}

.kit-lists li {
  margin-bottom: 0.25rem;
}

.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.expertise-grid li {
  position: relative;
  padding-left: 1.2rem;
}

.expertise-grid li::before {
  content: "●";
  position: absolute;
  left: 0;
  color: var(--yellow);
  font-size: 0.7rem;
  top: 0.35rem;
}

/* Shop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  border: 2px solid #eee;
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow);
}

.product-card .price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pink);
  margin-top: auto;
}

.product-card .meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-bar button {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
}

.filter-bar button.is-active {
  background: var(--yellow);
}

/* Facts / articles */
.fact-list {
  display: grid;
  gap: 2rem;
}

.fact-card {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 1.5rem;
  align-items: start;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.fact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}

.fact-card .fact-body {
  padding: 1.25rem 1.25rem 1.5rem 0;
}

.fact-card:nth-child(even) {
  background: var(--blue);
  color: #fff;
}

.fact-card:nth-child(even) a {
  color: #fff;
}

.kids-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.kids-gallery img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Video embeds */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.video-frame {
  aspect-ratio: 16 / 9;
  border: 0;
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr 0.7fr;
  gap: 1.5rem;
  align-items: end;
}

.contact-panel {
  background: var(--pink);
  color: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  min-height: 180px;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 1.25rem;
  border-radius: var(--radius);
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: none;
  border-radius: 4px;
}

.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.form-note {
  font-size: 0.9rem;
  opacity: 0.95;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.social-row img {
  width: 36px;
  height: 36px;
}

/* Footer */
.site-footer {
  background:
    linear-gradient(rgba(20, 20, 20, 0.85), rgba(20, 20, 20, 0.9)),
    url("../assets/images/footer-bg2.jpg") center / cover no-repeat;
  color: #fff;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

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

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

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.page-prose {
  max-width: 720px;
}

.page-prose li {
  margin-bottom: 0.5rem;
}

.standards-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.pill-list {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

@media (max-width: 960px) {
  .feature-tiles,
  .product-grid,
  .kids-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .split,
  .contact-layout,
  .fact-card,
  .footer-grid,
  .video-grid,
  .standards-cols {
    grid-template-columns: 1fr;
  }

  .fact-card .fact-body {
    padding: 0 1.25rem 1.25rem;
  }
}

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

  .site-nav {
    display: none;
    width: 100%;
  }

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

  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 1rem;
  }

  .feature-tiles,
  .product-grid,
  .kids-gallery,
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }
}
