/* Sage & Thread — shared styles */
:root {
  --bg: #EEF2EA;
  --surface: #F7F9F4;
  --sage-soft: #D5E0CF;
  --sage: #A8BBA0;
  --accent: #5F7C58;
  --accent-hover: #4C6847;
  --ink: #2F3F2C;
  --text: #3E5139;
  --muted: #5B6E55;
  --line: #C9D6C2;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;

  --radius: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.9rem;
  display: block;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 242, 234, 0.6);
  border-bottom: 1px solid transparent;
  transition: background-color 250ms ease, border-color 250ms ease;
}
.site-header.scrolled {
  background: rgba(213, 224, 207, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.logo span { color: var(--accent); font-style: italic; font-weight: 500; }
.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color 200ms ease, color 200ms ease;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--sage); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--sage-soft);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #F7F9F4;
  text-decoration: none;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background-color 200ms ease, transform 200ms var(--ease-out);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--sage);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-ghost:hover { background: var(--sage-soft); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(88vh - 64px);
  display: grid;
  align-items: center;
  padding: 4rem 0 5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 80% 30%, #C3D3BB 0%, transparent 70%),
    radial-gradient(50% 60% at 10% 90%, #D5E0CF 0%, transparent 70%),
    var(--bg);
  z-index: -1;
}
.hero-thread {
  position: absolute;
  right: -4%;
  top: 8%;
  width: min(56vw, 620px);
  opacity: 0.55;
  z-index: -1;
}
.hero h1 { max-width: 12ch; }
.hero h1 .line { display: block; }
.hero h1 em { color: var(--accent); font-weight: 400; }
.hero p.lead { font-size: 1.2rem; max-width: 46ch; margin-bottom: 2rem; }

/* ---------- Page heading (inner pages) ---------- */
.page-head {
  padding: 4.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}
.page-head p { font-size: 1.15rem; }

/* ---------- Collection link cards (home) ---------- */
.section { padding: 4.5rem 0; }
.collections {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}
.collection-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}
.collection-card:nth-child(1) { grid-column: span 2; background: var(--sage-soft); }
@media (max-width: 600px) { .collection-card:nth-child(1) { grid-column: auto; } }
.collection-card h3 { margin-bottom: 0.4rem; }
.collection-card p { margin: 0; color: var(--muted); }
.collection-card .arrow { margin-top: 1.5rem; color: var(--accent); font-weight: 500; }
.collection-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(47, 63, 44, 0.45); }

.intro-split {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 860px) { .intro-split { grid-template-columns: 1fr 1.2fr; } }

/* ---------- Product cards ---------- */
.products {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding-bottom: 5rem;
}
.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}
.product:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(47, 63, 44, 0.5); }
.photo {
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #C3D3BB, #A8BBA0);
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 1rem;
  overflow: hidden;
}
.photo:has(img) { padding: 0; display: block; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.product:hover .photo img { transform: scale(1.04); }
.photo span {
  background: rgba(247, 249, 244, 0.75);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}
.product-body { padding: 1.4rem 1.5rem 1.6rem; }
.product-body h3 { font-size: 1.55rem; margin-bottom: 0.35rem; }
.product-body p { font-size: 0.98rem; margin-bottom: 1.1rem; }

/* Fabric tag — stitched garment label */
.fabric-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1.5px dashed var(--sage);
  outline: 4px solid var(--bg);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: var(--ink);
}
.fabric-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  flex: none;
}
.fabric-tag b { font-weight: 500; color: var(--muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.12em; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 860px) { .about-grid { grid-template-columns: 0.8fr 1.2fr; } }
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  position: sticky;
  top: 90px;
}
@media (max-width: 859px) { .portrait { position: static; max-width: 420px; } }
.goals { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: goal; }
.goals li {
  counter-increment: goal;
  padding: 1.4rem 0 1.4rem 3.4rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.goals li::before {
  content: counter(goal, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.3rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--accent);
}
.goals h3 { font-size: 1.45rem; margin-bottom: 0.3rem; }
.goals p { margin: 0; }
.values {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 2rem 0 5rem;
}
.value {
  background: var(--sage-soft);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.value h3 { font-size: 1.4rem; }
.value p { margin: 0; font-size: 0.97rem; }
blockquote {
  margin: 2rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--sage);
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--ink);
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #D5E0CF;
  padding: 3.5rem 0 2.5rem;
}
.site-footer .logo { color: #EEF2EA; }
.site-footer .logo span { color: var(--sage); }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.footer-links a { color: #D5E0CF; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(213,224,207,0.2); font-size: 0.88rem; color: #B9C8B2; }

/* ---------- Motion (only when the user allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
    transition-delay: var(--delay, 0ms);
  }
  .js .reveal.in { opacity: 1; transform: none; }

  .hero-bg { animation: slow-zoom 10s var(--ease-out) forwards; }
  @keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.05); } }

  .hero h1 .line, .hero .lead, .hero .actions {
    animation: rise 800ms var(--ease-out) both;
  }
  .hero h1 .line:nth-child(2) { animation-delay: 120ms; }
  .hero h1 .line:nth-child(3) { animation-delay: 240ms; }
  .hero .lead { animation-delay: 360ms; }
  .hero .actions { animation-delay: 460ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  .hero-thread { animation: drift 9s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-10px) rotate(-1.5deg); } }
}
