/* =====================================================================
   MoonSoul Stitches — shared styles
   Cozy handmade-craft brand. Cream canvas, navy ink, coral accents,
   sage + gold detailing, stitched seams and little quilt patches.
   ===================================================================== */

:root {
  --cream: #fbf6ee;
  --cream-2: #fffaf3;
  --navy: #17354a;
  --coral: #d86f58;
  --coral-dark: #c95d48;
  --sage: #7f8b68;
  --gold: #c6923c;
  --tan: #e8d8c4;
  --soft-border: #eadccc;

  --navy-soft: rgba(23, 53, 74, 0.7);
  --shadow-soft: 0 14px 34px -22px rgba(23, 53, 74, 0.45);
  --shadow-card: 0 18px 40px -28px rgba(23, 53, 74, 0.55);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --maxw: 1140px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--navy);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--coral-dark); text-decoration: none; }
a:hover { color: var(--coral); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* keyboard focus */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =====================================================================
   Eyebrow + stitched seam dividers (the signature device)
   ===================================================================== */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.script-accent {
  font-family: var(--font-script);
  color: var(--coral);
  font-weight: 700;
}

/* a running-stitch seam */
.seam {
  height: 0;
  border: none;
  border-top: 2.5px dashed var(--soft-border);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* seam with little quilt patches centered, used between sections */
.seam-patch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px auto;
  max-width: var(--maxw);
  padding-inline: 24px;
}
.seam-patch::before,
.seam-patch::after {
  content: "";
  flex: 1;
  border-top: 2.5px dashed var(--soft-border);
}
.patches { display: flex; gap: 7px; }
.patches span {
  width: 13px; height: 13px;
  border-radius: 4px;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55);
}
.patches span:nth-child(1) { background: var(--coral); }
.patches span:nth-child(2) { background: var(--sage); }
.patches span:nth-child(3) { background: var(--gold); }
.patches span:nth-child(4) { background: var(--navy); }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-coral {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(216, 111, 88, 0.8);
}
.btn-coral:hover {
  background: var(--coral-dark);
  color: #fff;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--soft-border);
}
.btn-ghost:hover {
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--sage);
  transform: translateY(-2px);
}

/* =====================================================================
   Header / navigation
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2.5px dashed var(--soft-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 52px; width: auto; }
.brand .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--navy);
  line-height: 1;
}
.brand .brand-name small {
  display: block;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--coral);
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy);
  padding: 0.5em 0.85em;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-links a:hover { background: var(--tan); color: var(--navy); }
.nav-links a.active {
  color: var(--coral-dark);
  background: rgba(216, 111, 88, 0.12);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 46px; height: 42px;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--soft-border);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--cream-2);
  text-align: center;
  padding-block: 84px 92px;
}
/* subtle tiled logo-moon pattern */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/moon-tile.png");
  background-repeat: repeat;
  background-size: 150px auto;
  opacity: 0.06;
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  max-width: 14ch;
  margin-inline: auto;
}
.hero .tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--navy-soft);
  max-width: 46ch;
  margin: 0.6em auto 1.8em;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stars {
  margin-top: 26px;
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--gold);
}

/* page banner (sub pages) */
.page-banner {
  position: relative;
  overflow: hidden;
  background: var(--cream-2);
  text-align: center;
  padding-block: 56px 60px;
}
.page-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/moon-tile.png");
  background-repeat: repeat;
  background-size: 130px auto;
  opacity: 0.05;
  pointer-events: none;
}
.page-banner .container { position: relative; }
.page-banner h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.page-banner p { color: var(--navy-soft); max-width: 52ch; margin-inline: auto; }

/* =====================================================================
   Sections
   ===================================================================== */
.section { padding-block: 72px; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--navy-soft); max-width: 50ch; margin-inline: auto; }

/* =====================================================================
   Cards / grids
   ===================================================================== */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* product card */
.product-card {
  background: var(--cream-2);
  border: 1.5px solid var(--soft-border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 2px dashed rgba(23, 53, 74, 0.18);
  background:
    radial-gradient(circle at 22% 26%, rgba(255,255,255,0.65), transparent 60%),
    var(--patch, var(--tan));
}
.thumb svg { width: 56%; height: 56%; }
.thumb .corner-patch {
  position: absolute;
  top: 12px; right: 12px;
  width: 18px; height: 18px;
  border-radius: 5px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.6);
}
.product-card h3 { font-size: 1.18rem; margin-bottom: 0.15em; }
.product-card .price {
  font-family: var(--font-body);
  font-weight: 800;
  color: var(--coral-dark);
  margin: 0;
}
.product-card .meta {
  font-size: 0.85rem;
  color: var(--navy-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.5em;
}

/* thumb tints rotate by nth so the grid reads like a quilt */
.thumb.t-coral { --patch: #f2d3c9; }
.thumb.t-sage  { --patch: #d8ddca; }
.thumb.t-gold  { --patch: #efdcb8; }
.thumb.t-tan   { --patch: var(--tan); }
.thumb.t-navy  { --patch: #cdd7dd; }

/* category card */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: var(--cream-2);
  border: 1.5px solid var(--soft-border);
  border-radius: var(--radius-lg);
  padding: 30px 18px;
  box-shadow: var(--shadow-soft);
  color: var(--navy);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--sage);
  color: var(--navy);
}
.category-card .cat-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: var(--tan);
  border: 2px dashed rgba(23,53,74,0.18);
}
.category-card .cat-icon svg { width: 60%; height: 60%; }
.category-card:nth-child(1) .cat-icon { background: #f2d3c9; }
.category-card:nth-child(2) .cat-icon { background: #d8ddca; }
.category-card:nth-child(3) .cat-icon { background: #efdcb8; }
.category-card:nth-child(4) .cat-icon { background: #cdd7dd; }
.category-card h3 { font-size: 1.2rem; margin: 0; }
.category-card span.cat-sub { font-size: 0.92rem; color: var(--navy-soft); }

/* =====================================================================
   Filter chips (products page)
   ===================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}
.chip {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--navy);
  background: var(--cream-2);
  border: 2px solid var(--soft-border);
  border-radius: 999px;
  padding: 0.55em 1.2em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.chip:hover { border-color: var(--sage); }
.chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream-2);
}

.product-card.is-hidden { display: none; }

.empty-note {
  text-align: center;
  color: var(--navy-soft);
  font-weight: 700;
  padding: 30px;
  display: none;
}

/* =====================================================================
   Forms
   ===================================================================== */
.form-wrap {
  max-width: 760px;
  margin-inline: auto;
  background: var(--cream-2);
  border: 1.5px solid var(--soft-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-soft);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: var(--cream);
  border: 1.5px solid var(--soft-border);
  border-radius: var(--radius-sm);
  padding: 0.7em 0.85em;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(127, 139, 104, 0.18);
}
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  background: rgba(127, 139, 104, 0.14);
  border: 1.5px dashed var(--sage);
  color: var(--navy);
  font-weight: 700;
  border-radius: var(--radius);
  padding: 14px 18px;
}
.form-success.show { display: flex; }
.form-success .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sage); color: #fff;
  display: grid; place-items: center; font-size: 0.8rem; flex: none;
}

/* contact email callout */
.email-card {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
  background: var(--cream-2);
  border: 1.5px dashed var(--coral);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.email-card .email-link {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--coral-dark);
  word-break: break-word;
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  margin-top: 20px;
  padding-block: 54px 30px;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gold); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 36ch; }
.footer-brand .brand img {
  height: 60px;
  background: var(--cream-2);
  border-radius: 14px;
  padding: 6px;
}
.footer-brand p { color: rgba(251, 246, 238, 0.72); margin: 0; }
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { font-weight: 700; }
.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 2.5px dashed rgba(251, 246, 238, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(251, 246, 238, 0.7);
  font-size: 0.92rem;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 920px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--cream-2);
    border-bottom: 2.5px dashed var(--soft-border);
    padding: 14px 24px 20px;
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }
  .nav-links.open {
    max-height: 360px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { padding: 0.7em 0.9em; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .section { padding-block: 52px; }
  .hero { padding-block: 58px 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wrap { padding: 24px; }
  .brand .brand-name { font-size: 1.15rem; }
  .brand img { height: 46px; }
  .footer-bottom { justify-content: flex-start; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
