/* ============================================================
   Sew Lilleyque — stylesheet
   A palette pulled from quilting cotton and embroidery thread:
   linen ground, indigo denim, berry calico, sage, and a little gold.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Karla:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Colour */
  --linen: #F1ECDD;
  --linen-light: #FAF7EF;
  --ink: #2B2620;
  --ink-soft: #5B5449;
  --indigo: #26415A;
  --indigo-dark: #1B2F42;
  --berry: #8C3B4A;
  --berry-dark: #6E2E3A;
  --sage: #5B6B4F;
  --sage-dark: #47543D;
  --gold: #C68A2E;
  --line: rgba(43, 38, 32, 0.14);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", "Segoe UI", sans-serif;

  /* Layout */
  --content-width: 1120px;
  --radius: 6px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.5em; line-height: 1.15; color: var(--ink); }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul { padding: 0; margin: 0; list-style: none; }
button { font-family: var(--font-body); cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

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

.eyebrow-none { /* placeholder to remind: no all-caps eyebrows used in this design */ }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--indigo);
  color: var(--linen-light);
}
.btn-primary:hover { background: var(--indigo-dark); }
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--linen-light); }
.btn-buy {
  width: 100%;
  justify-content: center;
  background: var(--ink);
  color: var(--linen-light);
  border: none;
  font-size: 0.95rem;
  padding: 0.8em 1em;
}
.btn-buy:hover { background: var(--indigo-dark); }

.paypal-note {
  display: block;
  margin-top: 0.5em;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--linen);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.wordmark span { color: var(--indigo); font-style: normal; }

.main-nav ul { display: flex; gap: 2.2rem; }
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--indigo);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.nav-toggle svg { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--linen-light);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 16px 24px; border-bottom: 1px solid var(--line); }
  .site-header .container { position: relative; }
}

/* ---------- Hero (patchwork) ---------- */
.hero {
  padding: 72px 0 88px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  max-width: 14ch;
}
.hero-copy p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.quilt {
  --cell: 62px;
  display: grid;
  grid-template-columns: repeat(5, var(--cell));
  grid-auto-rows: var(--cell);
  gap: 6px;
  justify-content: end;
}
.quilt .patch {
  border-radius: 3px;
  opacity: 0;
  transform: scale(0.6);
  animation: patch-in 0.5s ease forwards;
}
.quilt .patch.solid { background: var(--sq-color, var(--indigo)); }
.quilt .patch.split {
  background:
    linear-gradient(to bottom right, var(--sq-color, var(--berry)) 49.5%, transparent 50.5%),
    var(--sq-color-b, var(--linen-light));
}
.quilt .patch.plus {
  background: var(--sq-color-b, var(--linen-light));
  position: relative;
}
.quilt .patch.plus::after {
  content: "";
  position: absolute;
  inset: 26%;
  background: var(--sq-color, var(--gold));
  border-radius: 2px;
}

@keyframes patch-in {
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .quilt .patch { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .quilt { justify-content: start; --cell: 15.5vw; max-width: 340px; }
}

/* ---------- Stitched frame (used for photo placeholders) ---------- */
.stitched-frame {
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  padding: 6px;
}
.stitched-frame > .frame-inner {
  border-radius: 3px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Section spacing / headings ---------- */
section { padding: 64px 0; }
.section-head {
  max-width: 60ch;
  margin-bottom: 2.4rem;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* ---------- Category tiles ---------- */
.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.category-tile {
  display: block;
  text-decoration: none;
  color: var(--linen-light);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
.category-tile h3 { color: var(--linen-light); font-size: 1.5rem; }
.category-tile p { color: rgba(250, 247, 239, 0.85); margin-bottom: 0; }
.category-tile[data-cat="bags"] { background: var(--indigo); }
.category-tile[data-cat="toys"] { background: var(--berry); }
.category-tile[data-cat="quilts"] { background: var(--sage); }
.category-tile .icon { width: 34px; height: 34px; margin-bottom: 1rem; }

@media (max-width: 760px) {
  .categories { grid-template-columns: 1fr; }
}

/* ---------- Product grid & cards ---------- */
.filter-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}
.filter-chip {
  background: var(--linen-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1.2em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.filter-chip.is-active {
  color: var(--linen-light);
  border-color: transparent;
}
.filter-chip[data-filter="all"].is-active { background: var(--ink); }
.filter-chip[data-filter="bags"].is-active { background: var(--indigo); }
.filter-chip[data-filter="toys"].is-active { background: var(--berry); }
.filter-chip[data-filter="quilts"].is-active { background: var(--sage); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .product-grid { grid-template-columns: 1fr; }
}

.product-card {
  background: var(--linen-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-swatch {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-swatch svg { width: 30%; height: 30%; }
.product-swatch img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex-grow: 1; }
.product-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  color: var(--linen-light);
}
.product-tag.bags { background: var(--indigo); }
.product-tag.toys { background: var(--berry); }
.product-tag.quilts { background: var(--sage); }
.product-card h3 { font-size: 1.2rem; margin-bottom: 0; }
.product-card h3 a,
a.product-link { color: inherit; text-decoration: none; }
.product-card h3 a:hover { text-decoration: underline; }
a.product-link { display: block; }
.product-card .desc { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0; flex-grow: 1; }
.product-price { font-family: var(--font-display); font-size: 1.3rem; margin: 0.2rem 0; }

/* ---------- Product detail page ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  padding: 0;
  background-color: var(--linen-light);
}
.gallery-thumb.is-active { border-color: var(--indigo); }
.product-detail-info .product-price { font-size: 1.7rem; }
.product-detail-info .buy-form { max-width: 320px; }
.back-link {
  display: inline-block;
  margin-top: 1.4rem;
  font-weight: 600;
  text-decoration: underline;
}
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Process steps (about page — genuine sequence) ---------- */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
.process li { counter-increment: step; }
.process .step-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--indigo);
  margin-bottom: 0.4rem;
}
@media (max-width: 760px) { .process { grid-template-columns: 1fr; } }

/* ---------- Split content rows ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Contact ---------- */
.contact-card {
  background: var(--linen-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem;
}
.field { margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--linen);
  color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }

/* Honeypot — present in the DOM for bots to fill in, invisible to people */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.form-status {
  padding: 0.9em 1.1em;
  border-radius: var(--radius);
  margin-bottom: 1.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.form-status.is-success { background: rgba(91, 107, 79, 0.15); color: var(--sage-dark); }
.form-status.is-error { background: rgba(140, 59, 74, 0.12); color: var(--berry-dark); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.site-footer .wordmark { display: inline-block; margin-bottom: 0.6rem; }
.site-footer nav ul { display: flex; gap: 1.6rem; }
.site-footer nav a { text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.footer-fine { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2rem; }
