/* ==========================================================================
   The Puzzl Co — brand stylesheet (light, kindergarten-style layout)
   Palette from brand guidelines:
   Blue (Pigment) #32409A · Light Medium Orchid #DC94C0 · Mikado Yellow #FFC20E
   Emerald #5DBC68 · Halloween Orange #F26529 — used mostly as light tints.
   ========================================================================== */

:root {
  --blue: #32409a;
  --blue-dark: #26317a;
  --blue-light: #7f8ad4;
  --blue-tint: #eef0fb;
  --orchid: #dc94c0;
  --orchid-tint: #fceff6;
  --yellow: #ffc20e;
  --yellow-tint: #fff8e2;
  --emerald: #5dbc68;
  --emerald-tint: #eef9ef;
  --orange: #f26529;
  --orange-tint: #fff0e9;

  --bg: #ffffff;
  --bg-soft: #f7f8fd;
  --ink: #232848;
  --muted: #61688a;
  --white: #ffffff;
  --border: #ebedf7;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 18px 40px -26px rgba(50, 64, 154, 0.35);
  --shadow-lg: 0 26px 60px -30px rgba(50, 64, 154, 0.4);

  --header-h: 72px;

  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.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;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 48px); }
.center-text { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -26px rgba(50, 64, 154, 0.6);
}
.site-header:not(.is-stuck) .brand img { filter: brightness(0) invert(1); }
.site-header:not(.is-stuck) .nav a:not(.btn) { color: #fff; }
.site-header:not(.is-stuck) .nav a:not(.btn):hover { color: var(--yellow); }
.site-header:not(.is-stuck) .btn-nav { background: var(--yellow); color: #3a2c00; }
.site-header:not(.is-stuck) .nav-toggle .bar { background: #fff; }
.site-header.is-stuck .btn-nav, .site-header.is-stuck .nav a.btn-nav { background: var(--blue); color: #fff; }
.site-header.is-stuck .btn-nav:hover, .site-header.is-stuck .nav a.btn-nav:hover { background: var(--blue-dark); color: #fff; }
.site-header:not(.is-stuck) .nav a.btn-nav { color: #3a2c00; }
.header-inner {
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 0;
}
.brand img { height: 32px; width: auto; }

.nav { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; min-width: 0; }
.nav > * { flex: 0 0 auto; }
.nav a {
  font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap;
  position: relative; padding: 4px 0; text-decoration: none;
  transition: color 0.2s ease;
}
.nav a:not(.btn):hover { color: var(--blue); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 3px; border-radius: 3px; background: var(--yellow);
  transition: right 0.28s ease;
}
.nav a:not(.btn):hover::after { right: 0; }

.nav-toggle {
  display: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px; gap: 5px; flex-direction: column;
}
.nav-toggle .bar {
  display: block; width: 24px; height: 2px; background: var(--blue);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons (pill, template style) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  letter-spacing: 0.01em;
  padding: 13px 30px; border-radius: 999px; text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 12px 24px -16px rgba(50, 64, 154, 0.9); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-nav, .nav a.btn-nav { padding: 9px 18px; font-size: 14px; line-height: 1.2; border-radius: 8px; margin-left: 6px; }
.btn-ghost { background: var(--white); color: var(--blue); border: 2px solid var(--blue-tint); }
.btn-ghost:hover { border-color: var(--blue-light); }
.btn-amazon { background: var(--yellow); color: #3a2c00; box-shadow: 0 12px 24px -16px rgba(255, 194, 14, 0.9); }
.btn-amazon:hover { background: #ffcf3d; }

/* ---------- Puzzle-piece decorations (soft) ---------- */
.piece {
  position: absolute; width: 84px; height: 84px; opacity: 0.16;
  background-color: var(--blue-light);
  -webkit-mask: var(--puzzle-mask) center/contain no-repeat;
  mask: var(--puzzle-mask) center/contain no-repeat;
  --puzzle-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M35 8h13a7 7 0 1 1 14 0h13v13a7 7 0 1 0 0 14v13H62a7 7 0 1 0-14 0H35V35a7 7 0 1 1 0-14z' fill='black'/></svg>");
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}
.piece-1 { top: 18%; left: 5%; background-color: var(--orchid); opacity: 0.38; }
.piece-2 { top: 22%; right: 6%; width: 96px; height: 96px; background-color: var(--yellow); opacity: 0.42; animation-delay: -3s; }
.piece-3 { bottom: 14%; left: 12%; width: 56px; height: 56px; background-color: var(--emerald); opacity: 0.35; animation-delay: -5s; }
.piece-4 { top: 16%; left: 7%; background-color: var(--white); opacity: 0.5; }
.piece-5 { bottom: 12%; right: 7%; width: 104px; height: 104px; background-color: var(--white); opacity: 0.42; animation-delay: -4s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate; z-index: 3;
  min-height: 640px;
  display: flex; align-items: center;
  padding: clamp(96px, 9vw, 120px) 0 clamp(110px, 10vw, 140px);
  margin-top: calc(-1 * var(--header-h));
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: -2;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(50, 64, 154, 0.86) 0%, rgba(50, 64, 154, 0.66) 55%, rgba(50, 64, 154, 0.74) 100%);
}
.hero-curve {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; height: clamp(48px, 6vw, 88px);
  background: var(--bg-soft);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='M0 100 C 360 0 1080 0 1440 100 Z' fill='black'/></svg>") bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='M0 100 C 360 0 1080 0 1440 100 Z' fill='black'/></svg>") bottom/100% 100% no-repeat;
}
.hero-inner { position: relative; text-align: center; width: min(1180px, 100% - 48px); }
.eyebrow {
  font-family: var(--font-body); font-weight: 800; letter-spacing: 0.3em;
  text-transform: uppercase; font-size: 12px; color: var(--yellow); margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.7rem, 6.6vw, 4.8rem); line-height: 1.05; margin: 0;
  color: #fff; letter-spacing: -0.02em; text-shadow: 0 8px 30px rgba(20, 26, 70, 0.35);
}
.lede {
  max-width: 660px; margin: 20px auto 0; font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }
.hero-actions .btn-primary { background: var(--yellow); color: #3a2c00; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.55); }
.hero-actions .btn-primary:hover { background: #ffcf3d; }
.hero-actions .btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.7); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 7vw, 96px) 0; }
.section-soft { background: var(--bg-soft); }

.section-head { margin-bottom: 8px; }
.kicker {
  font-family: var(--font-body); font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; font-size: 11.5px; color: var(--orchid);
  margin: 0 0 8px; text-align: center;
}
.about-copy .kicker { text-align: left; }
.section-title {
  font-family: var(--font-display); font-weight: 800; color: var(--blue);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.25; margin: 0;
  letter-spacing: -0.01em;
}
.section-title.center { text-align: center; }

.section p { color: var(--muted); }
.section p strong { color: var(--blue); }

/* ---------- Products (overlapping card row) ---------- */
.products-section { position: relative; z-index: 2; }
#who-we-are { padding-top: 0; margin-top: clamp(-90px, -6vw, -60px); position: relative; z-index: 2; }
#who-we-are .about-grid { padding-top: clamp(60px, 7vw, 90px); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px; margin-top: 34px;
}
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { padding: 16px; }
.card-media img {
  border-radius: 16px; width: 100%; height: auto;
  aspect-ratio: 4 / 3; object-fit: cover;
}
.tint-yellow { background: var(--yellow-tint); }
.tint-orchid { background: var(--orchid-tint); }
.tint-emerald { background: var(--emerald-tint); }

.card-body { padding: 6px 26px 30px; }
.card-body h3 {
  font-family: var(--font-display); font-weight: 800; color: var(--blue);
  font-size: 1.4rem; margin: 0 0 8px;
}
.card-body p { margin: 0; color: var(--muted); font-size: 0.99rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4 / 3.2; max-height: 460px;
  object-fit: cover; box-shadow: var(--shadow);
}
.about-badge {
  position: absolute; left: -14px; bottom: 22px;
  background: var(--yellow); color: #3a2c00; font-weight: 800;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow);
}
.about-copy .section-title { margin-bottom: 14px; }

/* ---------- Why us ---------- */
.why-grid {
  list-style: none; margin: 36px auto 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 18px;
}
.why-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius); padding: 26px 24px 24px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.55;
  color: #1d2333;
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  box-shadow: 0 14px 30px -22px rgba(20, 28, 70, 0.55);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: 0 20px 38px -22px rgba(20, 28, 70, 0.6); }
.why-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  color: #fff; background: var(--blue);
}
.why-ico svg { width: 24px; height: 24px; }
.why-text { display: block; }
.c-blue { border-top-color: var(--blue); } .c-blue .why-ico { background: var(--blue); }
.c-orchid { border-top-color: var(--orchid); } .c-orchid .why-ico { background: #c76aa6; }
.c-yellow { border-top-color: var(--yellow); } .c-yellow .why-ico { background: #b8860a; }
.c-emerald { border-top-color: var(--emerald); } .c-emerald .why-ico { background: #3f9c4c; }
.c-orange { border-top-color: var(--orange); } .c-orange .why-ico { background: var(--orange); }


/* ---------- Testimonials ---------- */
.quotes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px; margin-top: 36px;
}
.quote {
  margin: 0; background: var(--white); border-radius: var(--radius-lg);
  padding: 30px 28px 24px; border: 1px solid var(--border);
  box-shadow: var(--shadow); position: relative;
}
.quote::before {
  content: "“"; display: block; font-family: var(--font-display);
  font-size: 3.4rem; line-height: 0.8; color: var(--orchid); margin-bottom: 10px;
}
.quote blockquote { margin: 0 0 16px; font-size: 1rem; color: var(--ink); }
.quote figcaption { font-family: var(--font-body); font-weight: 800; font-size: 0.93rem; color: var(--blue); }

/* ---------- Shop ---------- */
.shop {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(72px, 9vw, 108px) 0;
  background:
    radial-gradient(760px 340px at 15% 10%, rgba(255, 255, 255, 0.14) 0%, transparent 60%),
    radial-gradient(620px 320px at 88% 90%, rgba(220, 148, 192, 0.35) 0%, transparent 62%),
    linear-gradient(125deg, var(--blue-dark) 0%, var(--blue) 55%, #3b4bb4 100%);
}
.shop::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, var(--yellow) 0 25%, var(--emerald) 25% 50%, var(--orange) 50% 75%, var(--orchid) 75% 100%);
}
.shop h2 {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin: 0 0 14px;
}
.shop p { color: rgba(255, 255, 255, 0.82); max-width: 560px; margin: 0 auto 28px; }
.shop .wrap { position: relative; z-index: 1; }
.shop .piece { background-color: #fff; opacity: 0.09; }
.shop .btn-amazon { box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.6); }

/* ---------- Contact ---------- */
#contact { background: var(--bg-soft); }
#why-us {
  background: linear-gradient(180deg, var(--blue-tint) 0%, #f3f1fb 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.contact-card {
  margin-top: 36px; background: var(--white); border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px; box-shadow: var(--shadow-lg);
}
.contact-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--blue); margin: 0;
}
.contact-sub { font-family: var(--font-body); font-weight: 700; margin: 2px 0 12px; color: var(--ink); }
.contact-card address { font-style: normal; color: var(--ink); line-height: 1.8; }
.contact-block + .contact-block {
  padding-left: 28px; border-left: 1px solid var(--border);
}
.contact-label {
  font-family: var(--font-body); font-weight: 800; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--blue-light);
  margin: 0 0 2px;
}
.contact-block p + .contact-label { margin-top: 16px; }
.contact-block a { font-weight: 800; color: var(--blue); }
.contact-block a:hover { color: var(--orange); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-tint); color: var(--ink); padding: 40px 0 34px; border-top: 1px solid var(--border); }
.footer-inner { text-align: center; }
.footer-logo { height: 28px; width: auto; margin: 0 auto 12px; }
.footer-tag {
  font-family: var(--font-body); font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; font-size: 11px; margin: 0 0 6px; color: var(--orchid);
}
.footer-copy { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .nav { gap: 13px; }
  .nav a { font-size: 13.5px; }
  .btn-nav, .nav a.btn-nav { padding: 8px 15px; margin-left: 4px; }
  .wrap { width: min(1180px, 100% - 36px); }
}

@media (max-width: 1080px) {
  .nav { gap: 12px; }
  .nav a { font-size: 13px; }
  .btn-nav, .nav a.btn-nav { padding: 8px 13px; font-size: 13px; margin-left: 2px; }
}

@media (max-width: 900px) {
  .hero { min-height: 64vh; padding: 120px 0 130px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .site-header:not(.is-stuck) .nav { background: var(--white); }
  .site-header:not(.is-stuck) .nav a:not(.btn) { color: var(--ink); }
  .about-grid { grid-template-columns: 1fr; }
  #who-we-are { margin-top: -48px; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 8px 22px 22px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--border); }
  .nav a:not(.btn)::after { display: none; }
  .nav a.btn-nav { margin: 14px 0 0; border-bottom: 0; padding: 12px 22px; text-align: center; }
  /* inside the white dropdown the CTA must stay brand blue, not the hero yellow */
  .site-header .btn-nav,
  .site-header:not(.is-stuck) .btn-nav { background: var(--blue); color: #fff; }
  .site-header .btn-nav:hover,
  .site-header:not(.is-stuck) .btn-nav:hover { background: var(--blue-dark); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
  .contact-block + .contact-block { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: 22px; }
}
