/* Trendify — mobile-first styles */

:root {
  --bg: #f6f1ea;
  --bg-elevated: #fffdf9;
  --ink: #1a1714;
  --ink-soft: #5a534b;
  --line: #e4dbd0;
  --accent: #9a3b12;
  --accent-hover: #7a2e0e;
  --accent-soft: #f4e4da;
  --ok-contrast: #fffdf9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(26, 23, 20, 0.06), 0 8px 24px rgba(26, 23, 20, 0.06);
  --font-serif: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --header-h: 3.5rem;
  --max: 72rem;
  --prose: 42rem;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--accent); }

a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: var(--ok-contrast);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus { top: 0.75rem; }

/* ----- Header ----- */

.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo:hover { color: var(--ink); }

.logo .dot { color: var(--accent); }

nav[aria-label="Primary"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  max-width: 100%;
}

nav[aria-label="Primary"] a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

nav[aria-label="Primary"] a:hover,
nav[aria-label="Primary"] a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent-soft);
}

/* ----- Disclosure banner ----- */

.disclosure {
  background: #efe6da;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.disclosure-inner,
.footer-inner,
.hero-inner,
.section-inner,
.page-hero-inner,
.prose-wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.disclosure p { margin: 0; }

.disclosure a {
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* ----- Main ----- */

main { flex: 1; }

.hero { padding: 2rem 1rem 1.5rem; }

.hero-inner h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.hero-inner .lede {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.page-hero { padding: 1.75rem 1rem 0.5rem; }

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

.count-line {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section { padding: 1.5rem 1rem 0.5rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-head a {
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.section-head a:hover { text-decoration: underline; }

/* ----- Product grid ----- */

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-bottom: 1rem;
}

@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #efe8de;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image-wrap.has-widget {
  aspect-ratio: auto;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: #fff;
}

.card-image-wrap.has-widget iframe,
.card-image-wrap.has-widget img {
  max-width: 100%;
}

.source-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card-body {
  padding: 0.95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.card-body h3 {
  font-size: 1.02rem;
  line-height: 1.3;
  margin: 0;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  font-weight: 750;
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0;
}

.price.is-missing {
  font-weight: 600;
  color: var(--ink-soft);
}

.price-as-of {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.blurb {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  flex: 1;
}

.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.55rem;
  background: var(--accent);
  color: #fffdf9;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  min-height: 44px;
  border-radius: 10px;
  width: 100%;
  border: 0;
}

.shop-btn:hover,
.shop-btn:focus-visible {
  background: var(--accent-hover);
  color: #fffdf9;
}

.shop-missing {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.7rem 0.5rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.empty {
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 0.5rem 0 1.5rem;
}

/* ----- Prose pages ----- */

.draft-note {
  background: #efe6da;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.draft-note strong {
  display: block;
  margin-bottom: 0.2rem;
}

.prose {
  padding: 0.5rem 1rem 2.5rem;
}

.prose-wrap { max-width: var(--prose); }

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 1.75rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.prose h2:first-child { margin-top: 0; }

.prose p, .prose li { color: var(--ink); }

.prose p { margin: 0 0 0.9rem; }

.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }

.prose li { margin: 0 0 0.35rem; }

.prose .updated {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Contact form (preview only — no backend) */

.contact-form {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 650;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--ink);
  min-height: 44px;
}

.contact-form textarea { min-height: 8rem; resize: vertical; }

.contact-form button {
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: #fffdf9;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  justify-self: start;
}

.contact-form button:hover { background: var(--accent-hover); }

.form-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.form-status[hidden] { display: none; }

.form-status {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

/* ----- Footer ----- */

.site-footer {
  margin-top: 2.5rem;
  background: #1a1714;
  color: #efe8e0;
  padding: 2.25rem 1rem 2.4rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2,
.site-footer .footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
  color: #fffdf9;
}

.site-footer p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: #d9d0c6;
}

.site-footer p:last-child { margin-bottom: 0; }

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-links a {
  color: #efe8e0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-disclosure {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #3a3530;
}

.footer-disclosure a {
  color: #f0c7b0;
  font-weight: 700;
}

.fine-print {
  color: #b5ada3 !important;
  font-size: 0.85rem !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
