@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --paper: #f7f3eb;
  --ink: #252921;
  --muted: #77796f;
  --green: #334d3e;
  --orange: #d76d4a;
  --yellow: #edc75e;
  --line: #e7e0d4;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.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;
}

.announcement {
  padding: 10px 18px;
  background: var(--green);
  color: #fff;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(32px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: #f7f3ebed;
  backdrop-filter: blur(12px);
}

.logo {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -1.2px;
}

.logo-dot {
  color: var(--orange);
}

.main-nav {
  display: flex;
  gap: 32px;
  color: #55594f;
  font-size: 12px;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--orange);
}

.bag-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.bag-count {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 10px;
}

.menu-toggle {
  display: none;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 64px;
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
  padding: 68px 0 86px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.6;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 600;
  letter-spacing: -3px;
  line-height: 1.02;
}

.hero h1 span {
  color: var(--green);
  font-style: italic;
}

.hero-description {
  max-width: 390px;
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border: 0;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-dark {
  background: var(--green);
  color: #fff;
}

.button-dark:hover {
  background: #263d30;
}

.button-light {
  background: var(--paper);
  color: var(--ink);
}

.button-light:hover {
  background: #fff;
}

.hero-footnote {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.hero-picture {
  position: relative;
  display: grid;
  min-height: 410px;
  overflow: hidden;
  place-items: center;
  background: #e9dfcc;
  isolation: isolate;
}

.hero-picture::before {
  position: absolute;
  z-index: -1;
  right: -30px;
  bottom: -90px;
  width: 360px;
  height: 260px;
  border-radius: 50%;
  background: #c5b38f;
  content: '';
}

.hero-sun {
  position: absolute;
  z-index: -1;
  top: 44px;
  right: 70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--yellow);
}

.hero-toy {
  z-index: 1;
  font-size: clamp(130px, 18vw, 220px);
  filter: drop-shadow(0 22px 13px #342b222b);
  transform: rotate(-7deg);
}

.orbit {
  position: absolute;
  z-index: 0;
  width: 280px;
  height: 115px;
  border: 1px solid #fff9;
  border-radius: 50%;
  transform: rotate(-22deg);
}

.orbit-two {
  width: 340px;
  height: 150px;
  transform: rotate(25deg);
}

.picture-note {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 9px 11px;
  background: var(--paper);
  font-size: 9px;
  letter-spacing: 0.1em;
}

/* Categories and section headings */

.category-section,
.shop-section,
.about-section {
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
}

.category-section {
  padding: 38px 0 82px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2,
.gift-copy h2,
.about-copy h2,
.newsletter-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.12;
}

.section-intro {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.category-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 18px;
  border: 0;
  text-align: left;
  transition: transform 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-build {
  background: #e7dfca;
}

.category-makebelieve {
  background: #eedbd0;
}

.category-puzzles {
  background: #dfe6d9;
}

.category-sensory {
  background: #e9e1c8;
}

.category-emoji {
  align-self: center;
  margin: auto;
  font-size: 65px;
  filter: drop-shadow(0 10px 6px #28241d19);
}

.category-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.category-caption {
  margin-top: 6px;
  color: #707166;
  font-size: 10px;
}

/* Shop */

.shop-section {
  padding: 72px 0 76px;
  border-top: 1px solid var(--line);
}

.shop-heading {
  margin-bottom: 18px;
}

.search-box input {
  width: 220px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: #fcfaf6;
  font-size: 11px;
}

.search-box input:focus,
.newsletter-form input:focus {
  border-color: var(--green);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-button {
  padding: 8px 12px;
  border: 1px solid #d9d2c6;
  border-radius: 30px;
  background: transparent;
  color: #55594f;
  font-size: 10px;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  padding-bottom: 14px;
  background: #fcfaf6;
}

.product-image {
  display: grid;
  height: 210px;
  place-items: center;
  background: var(--product-bg, #e9dfcc);
}

.product-emoji {
  font-size: 86px;
  filter: drop-shadow(0 12px 8px #342b2225);
  transition: transform 180ms ease;
}

.product-card:hover .product-emoji {
  transform: translateY(-5px) rotate(-4deg);
}

.product-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 7px 8px;
  background: #f7f3eb;
  color: var(--green);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.product-details {
  padding: 12px 12px 0;
}

.product-type {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-name {
  margin: 6px 0 11px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-size: 11px;
  font-weight: 700;
}

.add-to-bag {
  padding: 7px 9px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: 9px;
}

.add-to-bag:hover {
  background: var(--green);
  color: #fff;
}

.no-products {
  grid-column: 1 / -1;
  padding: 40px 10px;
  color: var(--muted);
  text-align: center;
}

.sample-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 9px;
}

/* Gift and about */

.gift-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1160px, calc(100% - 64px));
  min-height: 305px;
  margin: 0 auto 82px;
  background: #e7c768;
}

.gift-copy {
  align-self: center;
  padding: 42px 50px;
}

.gift-copy .eyebrow {
  color: #8a543c;
}

.gift-copy p:not(.eyebrow) {
  max-width: 340px;
  margin: 15px 0 20px;
  color: #565746;
  font-size: 11px;
  line-height: 1.8;
}

.gift-art {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: #dfbb5c;
}

.gift-art::before {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid #ffffff85;
  border-radius: 50%;
  content: '';
}

.gift-art > span:first-child {
  font-size: 110px;
  filter: drop-shadow(0 15px 9px #352b212c);
  transform: rotate(-8deg);
}

.gift-art .gift-spark {
  position: absolute;
  top: 27px;
  right: 31px;
  color: #fff8e8;
  font-size: 32px;
}

/* About */

.about-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 70px;
  padding: 0 0 82px;
}

.about-doodle {
  position: relative;
  display: grid;
  min-height: 300px;
  overflow: hidden;
  place-items: center;
  background: #dfe6d9;
}

.about-doodle::before {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: #f0dfc4;
  content: '';
}

.about-doodle span:first-child {
  z-index: 1;
  color: #d48753;
  font-size: 120px;
}

.about-doodle span:nth-child(2) {
  position: absolute;
  top: 38px;
  right: 57px;
  color: var(--green);
  font-size: 35px;
}

.about-doodle span:nth-child(3) {
  position: absolute;
  bottom: 32px;
  left: 42px;
  color: #78907c;
  font-size: 40px;
}

.about-copy h2 {
  margin-bottom: 16px;
}

.about-copy > p:not(.eyebrow) {
  max-width: 460px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

/* Newsletter and footer */

.newsletter-section {
  padding: 48px 20px 54px;
  background: #ebe5d9;
  text-align: center;
}

.newsletter-section .eyebrow {
  margin-bottom: 8px;
}

.newsletter-section h2 {
  font-size: 30px;
}

.newsletter-section > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 10px;
}

.newsletter-form {
  display: flex;
  width: min(390px, 100%);
  margin: 18px auto 0;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8d0c3;
  outline: none;
  background: var(--paper);
  font-size: 10px;
}

.newsletter-form .button {
  flex-shrink: 0;
}

.site-footer {
  padding: 43px max(32px, calc((100vw - 1160px) / 2)) 20px;
  background: #304a3c;
  color: #f7f3eb;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 40px;
}

.footer-logo .logo-dot {
  color: #edc75e;
}

.footer-main > div:first-child p {
  max-width: 290px;
  color: #d3dbd1;
  font-size: 10px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: #dce2da;
  font-size: 10px;
}

.footer-links h2 {
  margin: 4px 0 3px;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 32px;
  padding-top: 15px;
  border-top: 1px solid #ffffff2b;
  color: #c7d0c7;
  font-size: 8px;
}

/* Cart drawer and messages */

.cart-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #172019a8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  z-index: 21;
  top: 0;
  right: 0;
  display: flex;
  width: min(390px, 100%);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  padding: 22px;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform 250ms ease;
}

.cart-panel.is-open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
}

.close-cart {
  border: 0;
  background: transparent;
  font-size: 27px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
}

.empty-cart {
  margin: auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.cart-line {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line-emoji {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  background: #e9dfcc;
  font-size: 26px;
}

.cart-line-name {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.cart-line-price {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.remove-item {
  border: 0;
  background: transparent;
  color: #9b5846;
  font-size: 9px;
}

.cart-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  font-size: 12px;
  font-weight: 700;
}

.cart-footer .button {
  width: 100%;
}

.cart-disclaimer {
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.toast-message {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smaller screens */

@media (max-width: 850px) {
  .hero {
    gap: 32px;
  }

  .hero-picture {
    min-height: 340px;
  }

  .category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-image {
    height: 230px;
  }

  .about-section {
    gap: 35px;
  }
}

@media (max-width: 600px) {
  .announcement {
    font-size: 9px;
  }

  .site-header {
    min-height: 66px;
    padding: 0 18px;
  }

  .logo {
    font-size: 22px;
  }

  .menu-toggle {
    display: flex;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    order: -1;
    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    width: 19px;
    height: 1px;
    background: var(--ink);
  }

  .main-nav {
    position: absolute;
    top: 65px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    width: calc(100% - 36px);
    padding: 43px 0 57px;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero-description {
    font-size: 12px;
  }

  .hero-picture {
    min-height: 300px;
  }

  .category-section,
  .shop-section,
  .about-section {
    width: calc(100% - 36px);
  }

  .category-section {
    padding: 20px 0 57px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .section-heading h2,
  .gift-copy h2,
  .about-copy h2 {
    font-size: 33px;
  }

  .category-card {
    min-height: 175px;
    padding: 13px;
  }

  .category-emoji {
    font-size: 55px;
  }

  .category-name {
    font-size: 15px;
  }

  .category-caption {
    font-size: 9px;
  }

  .shop-section {
    padding: 55px 0;
  }

  .shop-heading {
    gap: 16px;
  }

  .search-box,
  .search-box input {
    width: 100%;
  }

  .product-grid {
    gap: 11px;
  }

  .product-image {
    height: 165px;
  }

  .product-emoji {
    font-size: 69px;
  }

  .product-details {
    padding: 10px 9px 0;
  }

  .product-name {
    font-size: 13px;
  }

  .add-to-bag {
    padding: 7px;
    font-size: 8px;
  }

  .gift-section {
    grid-template-columns: 1fr;
    width: calc(100% - 36px);
    margin-bottom: 57px;
  }

  .gift-copy {
    padding: 34px 25px;
  }

  .gift-art {
    min-height: 210px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 27px;
    padding-bottom: 57px;
  }

  .about-doodle {
    min-height: 250px;
  }

  .newsletter-section {
    padding: 42px 18px;
  }

  .newsletter-section h2 {
    font-size: 27px;
  }

  .newsletter-form {
    flex-direction: column;
    gap: 8px;
  }

  .site-footer {
    padding: 35px 18px 18px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 26px 18px;
  }

  .footer-main > div:first-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}