/* ==========================================================================
   Little Loop Club: handmade crochet bags from Pune
   Palette: cocoa, butter, blush, milk. Type: Fraunces (headings), Nunito (body),
   Caveat (handwritten notes only).
   ========================================================================== */

:root {
  --bg: #FFF4EE;          /* blush-tinted milk */
  --card: #FFFAF4;        /* cream for cards and inputs */
  --cocoa: #3F2321;       /* text, borders, dark sections */
  --cocoa-2: #4A2C2A;
  --butter: #FFD34E;      /* sunflower yellow */
  --butter-soft: #FFE9A8;
  --blush: #F6B8C6;
  --blush-soft: #FFE0E6;
  --berry: #E0537A;       /* active heart, handwritten notes */
  --focus: var(--cocoa);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --stick: 3px 3px 0 var(--cocoa);  /* hard "sticker" shadow, never blurred */
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cocoa);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

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

ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }

a { color: inherit; }

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--butter); color: var(--cocoa); font-weight: 800;
  padding: 0.6rem 1rem; border: 2px solid var(--cocoa); border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 800; line-height: 1.2; text-decoration: none; text-align: center;
  padding: 0.85rem 1.5rem;
  color: var(--cocoa); background: var(--card);
  border: 2px solid var(--cocoa); border-radius: 999px;
  box-shadow: var(--stick);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--cocoa); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--cocoa); }

.btn-primary { background: var(--butter); }
.btn-ghost { background: var(--card); }
.btn-butter { background: var(--butter); border-color: var(--butter); box-shadow: 3px 3px 0 var(--blush); }
.btn-butter:hover { box-shadow: 5px 5px 0 var(--blush); }
.btn-butter:active { box-shadow: 0 0 0 var(--blush); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; box-shadow: 2px 2px 0 var(--cocoa); }
.btn-small:hover { box-shadow: 4px 4px 0 var(--cocoa); }
.btn-block { width: 100%; }

.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
  background: var(--card); color: var(--cocoa);
  border: 2px solid var(--cocoa); border-radius: 50%; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Announcement + header ---------- */
.announce {
  background: var(--butter);
  color: var(--cocoa);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid var(--cocoa);
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 244, 238, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--cocoa);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.7rem; }

.logo { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; color: var(--butter);
  filter: drop-shadow(1.2px 0 0 var(--cocoa)) drop-shadow(-1.2px 0 0 var(--cocoa))
          drop-shadow(0 1.2px 0 var(--cocoa)) drop-shadow(0 -1.2px 0 var(--cocoa));
}
.logo-word {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  font-variation-settings: "SOFT" 100; letter-spacing: -0.02em; white-space: nowrap;
}
.logo-light { color: var(--card); }

.nav { display: flex; gap: 1.75rem; margin-inline: auto; }
.nav a { font-weight: 700; text-decoration: none; padding-block: 0.25rem; }
.nav a:hover {
  text-decoration: underline wavy var(--butter) 2px;
  text-underline-offset: 7px;
  text-decoration-skip-ink: none;
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.bag-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: var(--butter); color: var(--cocoa);
  border: 2px solid var(--cocoa); border-radius: 50%; box-shadow: 2px 2px 0 var(--cocoa);
  cursor: pointer; transition: transform 0.12s ease;
}
.bag-btn:hover { transform: translate(-1px, -1px); }
.bag-btn svg { width: 24px; height: 24px; }
.bag-count {
  position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--cocoa); color: var(--card);
  font-size: 0.75rem; font-weight: 800; border-radius: 999px;
}

.menu-btn {
  display: none; width: 44px; height: 44px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--card); border: 2px solid var(--cocoa); border-radius: 12px; cursor: pointer;
}
.menu-btn span { display: block; width: 20px; height: 2.5px; background: var(--cocoa); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6.5rem);
}

/* The running-stitch thread behind the hero. It draws itself once on load. */
.thread {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.thread-line {
  stroke: #E98FA3; stroke-width: 4; stroke-dasharray: 16 11;
}
.js .thread-reveal {
  stroke-dasharray: var(--len, 3000);
  stroke-dashoffset: var(--len, 3000);
  animation: stitch 2.8s 0.35s cubic-bezier(0.45, 0.1, 0.25, 1) forwards;
}
@keyframes stitch { to { stroke-dashoffset: 0; } }

.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.lede { margin-top: 1.25rem; max-width: 36ch; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

.note {
  display: inline-flex; align-items: flex-start; gap: 0.35rem;
  margin-top: 1.5rem;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.6rem; line-height: 1.1;
  color: var(--berry);
  transform: rotate(-2deg);
}
.note svg { width: 52px; height: 36px; margin-top: 0.6rem; }

.hero-art { position: relative; justify-self: center; width: min(100%, 440px); }
.arch {
  aspect-ratio: 4 / 5;
  border: 3px solid var(--cocoa);
  /* 50% / 40% gives a true semicircle on a 4:5 box without squashing the bottom corners */
  border-radius: 50% 50% var(--radius-lg) var(--radius-lg) / 40% 40% var(--radius-lg) var(--radius-lg);
  box-shadow: 12px 12px 0 var(--butter);
  overflow: hidden;
  background: var(--blush);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

.seal {
  position: absolute; left: -3.25rem; bottom: 9%;
  width: 128px; height: 128px;
  transform: rotate(-10deg);
}

/* ---------- Facts band ---------- */
.facts { background: var(--cocoa); color: var(--card); }
.facts-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2.25rem;
  padding-block: 1rem;
  font-weight: 700; font-size: 0.95rem;
}
.facts-list li { display: flex; align-items: center; gap: 0.5rem; }
.facts-list svg { width: 18px; height: 18px; color: var(--butter); flex: none; }

/* ---------- Section scaffolding ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.08; }
.section-head p { margin-top: 0.75rem; max-width: 52ch; font-size: 1.1rem; }
.section-head a { font-weight: 800; text-decoration: underline wavy var(--butter) 2px; text-underline-offset: 5px; }

/* ---------- Shop ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; }

.media {
  display: block;
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--blush-soft);
  border: 2px solid var(--cocoa);
  border-radius: var(--radius-md);
}
.card:nth-child(odd) .media { border-radius: 50% 50% var(--radius-md) var(--radius-md) / 40% 40% var(--radius-md) var(--radius-md); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .media img { transform: scale(1.04); }

.tag {
  position: absolute; left: 0.75rem; bottom: 0.75rem;
  padding: 0.2rem 0.75rem;
  background: var(--butter); border: 2px solid var(--cocoa); border-radius: 999px;
  font-size: 0.8rem; font-weight: 800;
}
.tag-new { background: var(--blush); }


.card h3 { margin-top: 1rem; font-size: 1.3rem; line-height: 1.2; }
.card .meta { margin-top: 0.2rem; font-size: 0.95rem; opacity: 0.8; }
.buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.85rem; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; font-variation-settings: "SOFT" 100; }

.charm-note { display: flex; align-items: center; gap: 0.5rem; margin-top: 2.75rem; font-weight: 600; }
.charm-note svg { width: 22px; height: 22px; color: var(--butter); flex: none;
  filter: drop-shadow(1px 0 0 var(--cocoa)) drop-shadow(-1px 0 0 var(--cocoa)) drop-shadow(0 1px 0 var(--cocoa)) drop-shadow(0 -1px 0 var(--cocoa)); }
.charm-note a { font-weight: 800; text-decoration: underline wavy var(--butter) 2px; text-underline-offset: 5px; }

/* ---------- How it's made ---------- */
.how { background: var(--butter-soft); border-block: 2px solid var(--cocoa); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 2rem; padding-bottom: 3rem; }
.steps li {
  position: relative;
  padding: 2.75rem 1.5rem 1.6rem;
  background: var(--card);
  border: 2px solid var(--cocoa); border-radius: var(--radius-md);
  box-shadow: 6px 6px 0 var(--blush);
}
/* A rising staircase: each step sits a little higher than the last. */
.steps li:nth-child(1) { margin-top: 4rem; }
.steps li:nth-child(2) { margin-top: 2rem; }
.steps li:nth-child(3) { margin-top: 0; }

.step-num {
  position: absolute; top: -1.6rem; left: 1.4rem;
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem;
  background: var(--cocoa); color: var(--butter);
  border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; font-variation-settings: "SOFT" 100;
}
.steps h3 { font-size: 1.4rem; line-height: 1.2; }
.steps p { margin-top: 0.5rem; max-width: 34ch; }

/* ---------- About ---------- */
.about { position: relative; background: var(--cocoa); color: var(--card); --focus: var(--butter); }
/* Scalloped edges, like the scalloped hem on a crochet bag */
.about::before, .about::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14px; z-index: 2;
  background-repeat: repeat-x; background-size: 28px 14px;
}
.about::before { top: -13px; background-image: radial-gradient(circle at 14px 14px, var(--cocoa) 13px, transparent 14px); }
.about::after { bottom: -13px; background-image: radial-gradient(circle at 14px 0, var(--cocoa) 13px, transparent 14px); }

.about-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center; gap: clamp(2.5rem, 6vw, 5rem);
}

.polaroid {
  justify-self: center; width: min(100%, 380px);
  padding: 14px 14px 12px;
  background: var(--card); color: var(--cocoa);
  border-radius: 6px;
  box-shadow: 10px 10px 0 var(--blush);
  transform: rotate(-3deg);
}
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid figcaption { margin-top: 0.5rem; text-align: center; font-family: var(--font-hand); font-weight: 700; font-size: 1.75rem; line-height: 1.2; }

.about-copy h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.08; color: var(--card); }
.about-copy p { margin-top: 1rem; max-width: 54ch; }
.about-copy h2 + p { margin-top: 1.25rem; font-size: 1.15rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.pills li { padding: 0.3rem 0.95rem; color: var(--butter); font-weight: 700; border: 2px solid var(--butter); border-radius: 999px; }

.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; margin-top: 2rem; }

.link-insta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--butter); font-weight: 800; text-decoration: underline wavy currentColor 2px; text-underline-offset: 6px;
}
.link-insta svg { width: 22px; height: 22px; }
.link-insta-dark { color: var(--cocoa); }

/* ---------- Love notes (placeholders) ---------- */
.love { padding-top: clamp(4rem, 9vw, 7rem); }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.note-card {
  position: relative;
  padding: 1.75rem 1.5rem 1.4rem;
  background: var(--card);
  border: 2px dashed var(--cocoa); border-radius: var(--radius-md);
}
.note-card:nth-child(1) { transform: rotate(-1deg); }
.note-card:nth-child(3) { transform: rotate(1deg); }
.placeholder-flag {
  position: absolute; top: -0.85rem; right: 1.1rem;
  padding: 0.1rem 0.7rem;
  background: var(--blush); border: 2px solid var(--cocoa); border-radius: 999px;
  font-size: 0.78rem; font-weight: 800;
}
.stars { display: flex; gap: 0.2rem; }
.stars svg { width: 20px; height: 20px; fill: var(--butter); stroke: var(--cocoa); stroke-width: 1.4; stroke-linejoin: round; }
.note-card p { margin-top: 0.8rem; }
.note-card .who { margin-top: 1rem; font-family: var(--font-hand); font-weight: 700; font-size: 1.4rem; line-height: 1.1; color: var(--berry); }

/* ---------- FAQ ---------- */
.faq { background: var(--blush-soft); border-block: 2px solid var(--cocoa); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq .section-head { margin-bottom: 0; }

.faq-list details {
  margin-bottom: 0.8rem;
  background: var(--card);
  border: 2px solid var(--cocoa); border-radius: 18px;
}
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 800; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--butter); border: 2px solid var(--cocoa); border-radius: 50%;
  font-size: 1.3rem; line-height: 1; font-weight: 800;
}
.faq-list details[open] summary::after { content: "\2212"; background: var(--blush); }
.faq-list summary:hover { background: var(--butter-soft); border-radius: 16px; }
.faq-list details[open] summary:hover { border-radius: 16px 16px 0 0; }
.faq-list details p { padding: 0.25rem 1.25rem 1.2rem; max-width: 60ch; }

/* ---------- Sign-up ---------- */
.signup { background: var(--butter); border-block: 2px solid var(--cocoa); padding-block: clamp(2.5rem, 6vw, 4rem); }
.signup-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center; }
.signup h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); line-height: 1.1; }
.signup p { margin-top: 0.5rem; max-width: 44ch; }
.signup-form { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.signup-form input {
  flex: 1 1 220px; min-width: 0;
  padding: 0.85rem 1.2rem;
  font: inherit; color: var(--cocoa); background: var(--card);
  border: 2px solid var(--cocoa); border-radius: 999px;
}
.signup-form input::placeholder { color: rgba(63, 35, 33, 0.55); }
.signup-form .btn-primary { background: var(--card); }
.signup-form .form-msg { flex-basis: 100%; min-height: 1.6em; margin-top: 0; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--cocoa); color: var(--card); padding-top: 3.5rem; --focus: var(--butter); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-blurb { margin-top: 0.75rem; max-width: 28ch; opacity: 0.85; }
.site-footer h3 { margin-bottom: 0.6rem; font-family: var(--font-body); font-size: 1rem; font-weight: 800; color: var(--butter); letter-spacing: 0; }
.site-footer nav a, .footer-grid div a:not(.logo) { display: block; width: fit-content; margin-bottom: 0.4rem; text-decoration: none; opacity: 0.92; }
.site-footer nav a:hover, .footer-grid div a:not(.logo):hover { text-decoration: underline wavy var(--butter) 2px; text-underline-offset: 5px; }
.legal { margin-top: 2.5rem; padding-block: 1.25rem; border-top: 1px solid rgba(255, 250, 244, 0.2); font-size: 0.9rem; opacity: 0.8; }

/* ---------- Floating chat link ---------- */
.chat-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  background: var(--butter); color: var(--cocoa);
  border: 2px solid var(--cocoa); border-radius: 999px; box-shadow: var(--stick);
  font-weight: 800; text-decoration: none;
  transition: transform 0.12s ease;
}
.chat-fab:hover { transform: translate(-1px, -1px); }
.chat-fab svg { width: 22px; height: 22px; }

/* ---------- Bag drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(63, 35, 33, 0.45); }

.drawer {
  position: fixed; top: 0; right: 0; z-index: 70;
  display: flex; flex-direction: column;
  width: min(92vw, 400px); height: 100vh; height: 100dvh;
  background: var(--card);
  border-left: 3px solid var(--cocoa);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}
.drawer.open { transform: none; visibility: visible; }
.drawer:focus { outline: none; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 2px solid var(--cocoa); }
.drawer-head h2 { font-size: 1.5rem; }

.drawer-list { flex: 1; overflow-y: auto; padding: 0.5rem 1.25rem; }
.drawer-list li { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 0.85rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px dashed rgba(63, 35, 33, 0.35); }
.drawer-list img { width: 60px; height: 75px; object-fit: cover; border: 2px solid var(--cocoa); border-radius: 12px; }
.drawer-list .item-name { font-weight: 800; line-height: 1.25; }
.drawer-list .item-meta { font-size: 0.9rem; opacity: 0.8; }
.qty { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.qty button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; background: var(--butter-soft); border: 2px solid var(--cocoa); border-radius: 50%; font: inherit; font-weight: 800; line-height: 1; cursor: pointer; }
.remove { background: none; border: 0; padding: 0.25rem; font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: underline; cursor: pointer; color: var(--cocoa); }

.drawer-empty { flex: 1; padding: 1.5rem 1.25rem; }
.drawer-foot { padding: 1.1rem 1.25rem 1.25rem; border-top: 2px solid var(--cocoa); }
.subtotal { display: flex; justify-content: space-between; margin-bottom: 0.9rem; font-size: 1.15rem; }
.fine { margin-top: 0.6rem; font-size: 0.85rem; opacity: 0.75; text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 5rem; z-index: 80;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.2rem;
  background: var(--cocoa); color: var(--card);
  border-radius: 999px; font-weight: 700; text-align: center;
  transform: translate(-50%, 200%); opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0.25rem; margin: 0; padding: 0.75rem clamp(1rem, 4vw, 2rem) 1rem;
    background: var(--bg); border-bottom: 2px solid var(--cocoa);
  }
  .nav a { padding: 0.6rem 0; font-size: 1.1rem; }
  .site-header.nav-open .nav { display: flex; }
  .header-actions { margin-left: auto; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(100%, 380px); }
  .seal { left: -1rem; width: 108px; height: 108px; }

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

  .steps { grid-template-columns: 1fr; gap: 3rem; padding-bottom: 0; }
  .steps li:nth-child(n) { margin-top: 0; }
  .steps p { max-width: none; }

  .about-grid, .faq-grid, .signup-inner { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
  .note-card:nth-child(n) { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .logo-word { font-size: 1.15rem; }
  .announce { font-size: 0.82rem; }
  .card h3 { font-size: 1.05rem; }
  .card .meta { font-size: 0.85rem; }
  .price { font-size: 1.1rem; }
  .btn-small { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
  .arch { box-shadow: 8px 8px 0 var(--butter); }
  .chat-fab { padding: 0.8rem; }
  .chat-fab span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .toast { bottom: 5.25rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .js .thread-reveal { animation: none; stroke-dashoffset: 0; }
  .card:hover .media img { transform: none; }
}


/* ==========================================================================
   Added for the PHP version: product page, checkout, order confirmation
   ========================================================================== */

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.card-link { text-decoration: none; }
.card-link:hover { text-decoration: underline wavy var(--butter) 2px; text-underline-offset: 6px; }
.tag-sold { background: var(--cocoa); color: var(--card); }
.tag-static { position: static; display: inline-block; margin-bottom: 0.75rem; }
.grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.about-grid.about-solo { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.note-photo { width: 100%; aspect-ratio: 1; object-fit: cover; margin-top: 0.8rem; border: 2px solid var(--cocoa); border-radius: 14px; }
.note-card { border-style: solid; }
.drawer-foot [aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* Messages */
.alert { margin-bottom: 1.5rem; padding: 1rem 1.25rem; border: 2px solid var(--cocoa); border-radius: 16px; font-weight: 600; }
.alert a { font-weight: 800; text-decoration: underline wavy var(--cocoa) 2px; text-underline-offset: 4px; }
.alert-info { background: var(--butter-soft); }
.alert-error { background: #FFE3E3; border-color: #9E1B38; color: #5C0D20; }

.narrow { max-width: 38rem; }
.notfound .narrow h1, .page-title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.notfound .narrow p { margin-top: 1rem; }
.page-title { margin-block: 1.75rem 1.5rem; }

/* Product page */
.pdp-wrap { padding-bottom: clamp(3rem, 7vw, 5rem); }
.crumbs { padding-block: 1.25rem; font-size: 0.95rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }
.crumbs a { text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { opacity: 0.75; }

.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.gallery { position: sticky; top: 6rem; }
.gallery-main {
  aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--blush-soft);
  border: 3px solid var(--cocoa); border-radius: var(--radius-lg);
  box-shadow: 10px 10px 0 var(--butter);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.thumbs button {
  display: block; width: 68px; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--blush-soft); border: 2px solid var(--cocoa); border-radius: 12px; opacity: 0.75;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.thumbs button img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 3px 3px 0 var(--butter); transform: translate(-1px, -1px); }

.pdp-info h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.05; letter-spacing: -0.02em; }
.pdp-price { margin-top: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; font-variation-settings: "SOFT" 100; }
.pdp-lede { margin-top: 0.75rem; max-width: 46ch; font-size: 1.1rem; }

.buybox { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.qty-picker { display: inline-flex; align-items: center; background: var(--card); border: 2px solid var(--cocoa); border-radius: 999px; }
.qty-picker button { width: 44px; height: 46px; padding: 0; background: none; border: 0; font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer; border-radius: 999px; }
.qty-picker button:hover { background: var(--butter-soft); }
.qty-picker input { width: 2.4rem; padding: 0; text-align: center; font: inherit; font-weight: 800; color: var(--cocoa); background: none; border: 0; }

.promise { display: grid; gap: 0.5rem; margin-top: 1.75rem; padding: 1.1rem 1.25rem; background: var(--butter-soft); border: 2px solid var(--cocoa); border-radius: 18px; font-weight: 700; }
.promise li { display: flex; align-items: flex-start; gap: 0.6rem; }
.promise svg { width: 20px; height: 20px; margin-top: 0.15rem; color: var(--butter); flex: none;
  filter: drop-shadow(1px 0 0 var(--cocoa)) drop-shadow(-1px 0 0 var(--cocoa)) drop-shadow(0 1px 0 var(--cocoa)) drop-shadow(0 -1px 0 var(--cocoa)); }

.pdp-desc { margin-top: 1.75rem; max-width: 56ch; }
.pdp-desc p + p { margin-top: 0.9rem; }
.specs { margin: 1.75rem 0 0; max-width: 34rem; }
.specs div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px dashed rgba(63, 35, 33, 0.4); }
.specs dt { font-weight: 800; }
.specs dd { margin: 0; }
.pdp-ask { margin-top: 1.5rem; }
.pdp-ask a { font-weight: 800; text-decoration: underline wavy var(--butter) 2px; text-underline-offset: 5px; }
.related { padding-top: 0; }

/* Checkout */
.checkout-wrap { padding-bottom: clamp(3rem, 7vw, 5rem); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(1.75rem, 5vw, 3.5rem); align-items: start; }
.checkout-form fieldset { margin: 0 0 1.75rem; padding: 0; border: 0; min-width: 0; }
.checkout-form legend { margin-bottom: 0.9rem; padding: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; font-variation-settings: "SOFT" 100; }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 800; font-size: 0.95rem; }
.field .opt { font-weight: 600; opacity: 0.7; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 1rem;
  font: inherit; color: var(--cocoa); background: var(--card);
  border: 2px solid var(--cocoa); border-radius: 14px;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 3px 3px 0 var(--butter); }
.field.has-error input, .field.has-error select { border-color: #9E1B38; background: #FFF5F5; }
.field-err { margin-top: 0.35rem; color: #9E1B38; font-size: 0.92rem; font-weight: 700; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.pay-options { display: grid; gap: 0.75rem; }
.pay-option { display: flex; align-items: flex-start; gap: 0.8rem; padding: 1rem 1.1rem; cursor: pointer; background: var(--card); border: 2px solid var(--cocoa); border-radius: 16px; }
.pay-option input { width: 1.2rem; height: 1.2rem; margin-top: 0.25rem; accent-color: var(--cocoa); flex: none; }
.pay-option:has(input:checked) { background: var(--butter-soft); box-shadow: 3px 3px 0 var(--cocoa); }
.pay-body { display: grid; gap: 0.15rem; }
.pay-body span { font-size: 0.95rem; opacity: 0.85; }

.btn-lg { padding: 1.05rem 1.5rem; font-size: 1.1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.checkout-form .fine { margin-top: 0.9rem; font-size: 0.9rem; opacity: 0.8; text-align: center; }

.summary { position: sticky; top: 6rem; padding: 1.5rem; background: var(--card); border: 2px solid var(--cocoa); border-radius: var(--radius-md); box-shadow: 6px 6px 0 var(--blush); }
.summary h2 { font-size: 1.5rem; }
.sum-items { margin-top: 1rem; }
.sum-items li { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 0.85rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px dashed rgba(63, 35, 33, 0.35); }
.sum-items img { width: 60px; height: 75px; object-fit: cover; border: 2px solid var(--cocoa); border-radius: 10px; }
.sum-name { font-weight: 800; line-height: 1.25; }
.sum-name a { text-decoration: none; }
.sum-qty { font-size: 0.9rem; opacity: 0.8; }
.sum-price { font-weight: 800; }
.sum-rows { margin: 0.75rem 0 0; }
.sum-rows div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }
.sum-rows dt { margin: 0; }
.sum-rows dd { margin: 0; font-weight: 700; }
.sum-rows .sum-total { margin-top: 0.5rem; padding-top: 0.8rem; border-top: 2px solid var(--cocoa); font-size: 1.25rem; font-weight: 800; }
.sum-edit { margin-top: 0.75rem; }
.linkish { padding: 0; background: none; border: 0; font: inherit; font-weight: 800; text-decoration: underline wavy var(--butter) 2px; text-underline-offset: 5px; cursor: pointer; color: var(--cocoa); }
.empty-state { max-width: 32rem; padding-block: 1rem 3rem; }
.empty-state p + p { margin-top: 1rem; }

/* Order confirmation */
.thanks-wrap { padding-block: clamp(2rem, 6vw, 4rem); }
.thanks-card { max-width: 44rem; margin-inline: auto; padding: clamp(1.5rem, 5vw, 3rem); background: var(--card); border: 3px solid var(--cocoa); border-radius: var(--radius-lg); box-shadow: 10px 10px 0 var(--butter); }
.thanks-flower { width: 64px; height: 64px; color: var(--butter); margin-bottom: 0.75rem;
  filter: drop-shadow(1.5px 0 0 var(--cocoa)) drop-shadow(-1.5px 0 0 var(--cocoa)) drop-shadow(0 1.5px 0 var(--cocoa)) drop-shadow(0 -1.5px 0 var(--cocoa)); }
.thanks-card h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; }
.thanks-card .lede { margin-top: 0.75rem; }
.pay-box { margin-block: 1.5rem; padding: 1.25rem 1.5rem; background: var(--butter-soft); border: 2px dashed var(--cocoa); border-radius: 18px; }
.pay-box h2 { font-size: 1.35rem; }
.pay-box p { margin-top: 0.6rem; }
.pay-box .fine { font-size: 0.9rem; opacity: 0.85; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; word-break: break-all; }
.thanks-h2 { margin-top: 1.75rem; font-size: 1.4rem; }
.next-steps { margin-top: 0.6rem; padding-left: 1.4rem; list-style: decimal; }
.next-steps li { padding-left: 0.3rem; margin-top: 0.35rem; }
.summary-flat { position: static; margin-top: 1.75rem; box-shadow: none; }
.sum-addr { margin-top: 1rem; line-height: 1.5; }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }

@media (max-width: 900px) {
  .pdp, .checkout-grid { grid-template-columns: 1fr; }
  .gallery, .summary { position: static; }
  .grid.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-main { box-shadow: 6px 6px 0 var(--butter); }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .specs div { grid-template-columns: 5.5rem 1fr; }
  .buybox .btn { flex: 1 1 8rem; }
}
