/* Found at Home - site styles. Brand: assets/brand/BRAND_GUIDE.md */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 400 650;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dmsans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --oat: #f6efe6;
  --oat-light: #fbf7f1;
  --espresso: #2f2622;
  --espresso-soft: #5e504a;
  --terracotta: #c65d3b;
  --terracotta-dark: #a94a2c;
  --sage: #8da287;
  --sage-tint: #e3e8dc;
  --linen: #e6dacb;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 12px;
  --gutter: 16px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--oat);
  color: var(--espresso);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

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

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

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header (the one memorable moment: the roof line draws in) ---------- */
.masthead {
  text-align: center;
  padding: 40px 0 8px;
}
.masthead a.home { text-decoration: none; display: inline-block; }
.mark { width: 76px; height: 76px; margin: 0 auto 10px; }
.mark .house {
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 76;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.mark .spark { fill: var(--terracotta); transform-origin: 500px 620px; }

@media (prefers-reduced-motion: no-preference) {
  .mark .house {
    stroke-dasharray: 2300;
    stroke-dashoffset: 2300;
    animation: draw 1100ms cubic-bezier(.6, .1, .3, 1) 120ms forwards;
  }
  .mark .spark {
    transform: scale(0) rotate(-45deg);
    animation: twinkle 520ms cubic-bezier(.3, 1.6, .5, 1) 1050ms forwards;
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes twinkle { to { transform: scale(1) rotate(0deg); } }

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
.tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 24;
  font-size: clamp(1.125rem, 3.6vw, 1.375rem);
  line-height: 1.35;
  color: var(--espresso-soft);
  margin: 10px auto 0;
  max-width: 26ch;
}
.disclosure-top {
  display: inline-block;
  margin: 18px 0 0;
  padding: 6px 14px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--espresso);
  background: var(--oat-light);
  border: 1px solid var(--linen);
  border-radius: 999px;
}

/* ---------- Category chips ---------- */
.chips {
  display: none; /* shown only when JS runs (they filter client-side) */
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 4px;
  padding: 0;
  list-style: none;
}
.js .chips { display: flex; }
.chips[hidden] { display: none !important; }
.chip {
  font: 500 0.9375rem/1 var(--sans);
  color: var(--espresso);
  background: transparent;
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.chip:hover { background: var(--sage-tint); }
.chip[aria-pressed="true"] {
  background: var(--sage);
  color: var(--espresso);
  font-weight: 700;
}

/* ---------- Product list ---------- */
.finds { padding: 20px 0 8px; }
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--oat-light);
  border: 1px solid var(--linen);
  border-radius: var(--radius);
  padding: 12px;
  scroll-margin-top: 16px;
}
.card[hidden] { display: none; }
.card:target { border-color: var(--terracotta); }
.card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  background: var(--linen);
}
.card-body { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.card-cat {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4f6249; /* sage darkened for text contrast */
}
.card-name {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 36;
  font-size: 1.1875rem;
  line-height: 1.2;
  margin: 0 0 6px;
}
.card-note {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--espresso-soft);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  min-height: 44px;
  padding: 11px 18px;
  font: 700 0.9375rem/1.1 var(--sans);
  color: #fff;
  background: var(--terracotta);
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  transition: background-color 150ms ease;
}
.btn:hover { background: var(--terracotta-dark); }
.card-ad {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--espresso-soft);
  text-align: center;
}
.filter-empty {
  text-align: center;
  color: var(--espresso-soft);
  margin: 24px 0;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .card { grid-template-columns: 1fr; padding: 12px 12px 14px; gap: 12px; }
  .card-body { padding: 0 4px; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Empty state ---------- */
.soon {
  max-width: 520px;
  margin: 24px auto 0;
  text-align: center;
  padding: 32px 20px 28px;
  border: 1.5px dashed var(--sage);
  border-radius: var(--radius);
  background: var(--oat-light);
}
.soon[hidden] { display: none; }
.soon h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  font-size: clamp(1.5rem, 5.5vw, 1.875rem);
  line-height: 1.2;
  margin: 0 0 8px;
}
.soon p { margin: 0 auto 20px; max-width: 34ch; color: var(--espresso-soft); }

/* ---------- Social buttons ---------- */
.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  font: 500 0.9375rem/1 var(--sans);
  text-decoration: none;
  color: var(--espresso);
  background: var(--oat);
  border: 1.5px solid var(--espresso);
  border-radius: 999px;
  transition: background-color 150ms ease, color 150ms ease;
}
.social:hover { background: var(--espresso); color: var(--oat); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--linen);
  text-align: center;
  font-size: 0.875rem;
  color: var(--espresso-soft);
}
.footer-links {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  font-weight: 500;
}
.footer-links a {
  display: inline-block;
  padding: 8px 2px;
  color: var(--espresso);
  text-underline-offset: 4px;
}
.disclosure-full { max-width: 62ch; margin: 0 auto 16px; line-height: 1.6; }
.footer-meta { margin: 0; }
.footer-meta a { color: var(--espresso); text-underline-offset: 3px; }

/* ---------- Text pages (about, 404) ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 8px 0 0; }
.page h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  margin: 24px 0 16px;
}
.page h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 48;
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 32px 0 8px;
}
.page p, .page li { font-size: 1.0625rem; line-height: 1.65; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 6px; }
.page a { color: var(--terracotta-dark); text-underline-offset: 3px; }
.page .btn { color: #fff; margin-top: 8px; }
.masthead.small { padding-top: 28px; }
.masthead.small .mark { width: 52px; height: 52px; margin-bottom: 6px; }
.masthead.small .brand { font-size: 1.75rem; }
.masthead.small .brand { display: block; }
.page-center { text-align: center; }

/* ---------- Card links (hub) ---------- */
.card-imglink { display: block; position: relative; }
.proof-badge {
  position: absolute; top: 6px; left: 6px; max-width: calc(100% - 12px);
  padding: 3px 7px; font-size: 0.6875rem; font-weight: 700; line-height: 1.2;
  color: #fff; background: rgba(47, 38, 34, 0.88); border-radius: 10px;
}
.card-name a { text-decoration: none; }
.card-name a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Product page ---------- */
.pp { padding-bottom: 8px; }
.crumbs { margin: 8px 0 14px; font-size: 0.8125rem; color: var(--espresso-soft); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--linen); }
.crumbs a { color: var(--espresso); text-underline-offset: 3px; padding: 6px 0; display: inline-block; }
.crumbs [aria-current] { color: var(--espresso-soft); }
.pp-grid { display: block; }
.pp-media { max-width: 440px; margin: 0 auto 18px; }
.hero-img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--linen); }
.hero-video { position: relative; }
.yt-play {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 10px 18px;
  background: rgba(47, 38, 34, 0.9); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 0.9375rem;
}
.yt-frame { width: 100%; aspect-ratio: 9 / 16; max-height: 80vh; border: 0; border-radius: var(--radius); background: #000; }
.pp-title {
  font-family: var(--serif); font-weight: 600; font-variation-settings: "opsz" 96;
  font-size: clamp(1.75rem, 6.5vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; margin: 2px 0 6px;
}
.pp-name { margin: 0 0 14px; color: var(--espresso-soft); font-size: 0.9375rem; }
.proof {
  display: inline-block; margin: 0 0 10px; padding: 6px 14px; font-size: 0.9375rem; font-weight: 700;
  background: var(--espresso); border-radius: 999px; color: #fff;
}
.buy-block { margin: 18px 0; text-align: center; }
.buy-block .btn { width: 100%; max-width: 420px; min-height: 54px; font-size: 1.0625rem; }
.buy-block .disclosure-top { margin: 10px 0 0; }
.buy-block .card-ad { margin-top: 8px; }
.pp-intro { font-size: 1.0625rem; line-height: 1.65; margin: 22px 0 8px; }
.pp-main h2 {
  font-family: var(--serif); font-weight: 600; font-variation-settings: "opsz" 48;
  font-size: 1.375rem; line-height: 1.25; margin: 28px 0 10px;
}
.pp-main p, .pp-main li { line-height: 1.6; }
.ticks, .notes { list-style: none; margin: 0; padding: 0; }
.ticks li, .notes li { position: relative; padding: 0 0 10px 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em; width: 7px; height: 12px;
  border: solid var(--terracotta); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg);
}
.notes li {
  background: var(--oat-light); border: 1px solid var(--linen); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 8px;
}
.faq-item { border-bottom: 1px solid var(--linen); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq-item p { margin: 0 0 14px; color: var(--espresso-soft); }
.buy-last { margin-top: 30px; }
.back { text-align: center; margin: 8px 0 0; }
.back a { color: var(--espresso); text-underline-offset: 3px; }
.sticky-buy { display: none; }

@media (max-width: 719px) {
  .sticky-buy {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
    background: rgba(251, 247, 241, 0.97); border-top: 1px solid var(--linen);
  }
  .sticky-buy .btn { flex: 1; margin: 0; min-height: 48px; }
  .sticky-buy p { margin: 0; font-size: 0.6875rem; line-height: 1.25; color: var(--espresso-soft); max-width: 9ch; }
  body.product-page { padding-bottom: 72px; }
}
@media (min-width: 720px) {
  .pp-grid { display: grid; grid-template-columns: 360px 1fr; gap: 36px; align-items: start; }
  .pp-media { position: sticky; top: 16px; margin: 0; max-width: none; }
  .buy-block { text-align: left; }
}
@media (min-width: 640px) { .proof-badge { font-size: 0.75rem; padding: 4px 9px; border-radius: 999px; } }
