/* ============================================================
   TrueIberico — v2 "Bodega" design
   Dark burgundy chrome, warm sand paper, gold accents,
   photography-forward.
   ============================================================ */

:root {
  --bg: #f2e6cf;            /* warm sand */
  --surface: #faf2e0;       /* card / callout paper */
  --ink: #2e1f18;           /* warm espresso */
  --ink-soft: #6f5b4d;
  --ink-faint: #99836f;
  --wine: #4a120c;          /* deep burgundy chrome */
  --wine-deep: #320b07;
  --accent: #9e2b1b;        /* ham red */
  --accent-dark: #7c1f12;
  --gold: #b9842f;          /* burnished gold */
  --gold-soft: #d4a94f;
  --cream: #f6ead2;         /* text on dark */
  --rule: #ddcbab;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --measure: 42rem;
  --wide: 72rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 0.15em; transition: color 0.15s ease; }
a:hover { color: var(--accent-dark); }

.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* ---------- Header (dark) ---------- */

.site-header {
  background: linear-gradient(180deg, var(--wine-deep), var(--wine));
  text-align: center;
  padding: 2.25rem 1.25rem 1.4rem;
  border-bottom: 3px solid var(--gold);
}

.masthead {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  letter-spacing: 0.01em;
  color: var(--cream);
  text-decoration: none;
}
.masthead:hover { color: var(--gold-soft); }

.site-tagline {
  margin: 0.3rem 0 1.2rem;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.site-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1.6rem; }

.site-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 80%, transparent);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--gold-soft); }
.site-nav a[aria-current="page"] { color: var(--gold-soft); border-bottom-color: var(--gold); }

/* ---------- Layout ---------- */

main { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 3.25rem 0 1.75rem;
}
.section-label::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- Hero (homepage) ---------- */

.hero { position: relative; background: var(--wine-deep); }

.hero-link { display: block; position: relative; text-decoration: none; }

.hero-img {
  width: 100%;
  height: clamp(20rem, 62vh, 34rem);
  object-fit: cover;
  opacity: 0.92;
}

.hero-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(50,11,7,0.25) 0%, rgba(50,11,7,0.05) 35%, rgba(40,8,5,0.88) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, var(--wide));
  padding: 0 1.25rem 2.5rem;
  z-index: 1;
}

.hero-category {
  display: inline-block;
  background: var(--gold);
  color: var(--wine-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.08;
  color: var(--cream);
  margin: 0 0 0.7rem;
  max-width: 52rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  transition: color 0.15s ease;
}
.hero-link:hover .hero-title { color: var(--gold-soft); }

.hero-excerpt {
  color: color-mix(in srgb, var(--cream) 85%, transparent);
  font-size: 1.05rem;
  max-width: 40rem;
  margin: 0 0 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-cta {
  display: inline-block;
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.15rem;
}

/* ---------- Post grid / cards ---------- */

.post-grid {
  display: grid;
  gap: 2.25rem 2rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  margin-bottom: 4rem;
}

.post-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(46,31,24,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(46,31,24,0.16); }

.post-card-media { overflow: hidden; }
.post-card-media img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }

.post-card-text { padding: 1.2rem 1.3rem 1.4rem; }

.post-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.post-card-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.22;
  margin: 0.4rem 0 0.45rem;
  transition: color 0.15s ease;
}
.post-card:hover .post-card-title { color: var(--accent); }

.post-card-excerpt {
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-date { font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- Archive (category pages) ---------- */

.archive-header { text-align: center; padding: 3rem 0 2.25rem; }
.archive-title { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 5vw, 2.9rem); margin: 0; color: var(--wine); }
.archive-title::after { content: ""; display: block; width: 4rem; height: 3px; background: var(--gold); margin: 0.9rem auto 0; }
.archive-count { color: var(--ink-faint); font-size: 0.9rem; margin: 0.8rem 0 0; }
.archive-empty { text-align: center; color: var(--ink-soft); padding: 2rem 0 5rem; }

/* ---------- Article ---------- */

.post { padding-top: 3rem; }

.post-header { max-width: 46rem; margin: 0 auto 2.25rem; text-align: center; }

.post-category {
  display: inline-block;
  background: var(--gold);
  color: var(--wine-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
}
.post-category:hover { background: var(--gold-soft); color: var(--wine-deep); }

.post-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--wine);
  margin: 0.9rem 0;
}

.post-dek {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.post-meta { font-size: 0.85rem; color: var(--ink-faint); margin: 0; }

.post-figure { max-width: 58rem; margin: 0 auto 2.5rem; }
.post-figure img {
  border-radius: 8px;
  width: 100%;
  max-height: 30rem;
  object-fit: cover;
  box-shadow: 0 14px 40px rgba(46,31,24,0.22);
}
.post-figure figcaption { font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.7rem; text-align: center; }
.img-credit { opacity: 0.85; }

.post-body { max-width: var(--measure); margin: 0 auto; padding-bottom: 1rem; }

.post-body p { margin: 0 0 1.4rem; }

.post-body h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.22;
  color: var(--wine);
  margin: 2.75rem 0 1rem;
}

.post-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--wine);
  margin: 2.25rem 0 0.75rem;
}

.post-body ul, .post-body ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.5rem; }

.post-body hr {
  border: 0;
  margin: 2.75rem auto;
  width: 6rem;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  border-radius: 2px;
}

.post-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--wine);
  border-left: 4px solid var(--gold);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  margin: 2.5rem 0;
  padding: 1.1rem 1.5rem;
}
.post-body blockquote p { margin: 0; }

.post-body img { margin: 2rem auto; border-radius: 8px; }

.post-body strong { font-weight: 600; }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(46,31,24,0.1);
}
.post-body th {
  font-family: var(--sans);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--wine);
  text-align: left;
  padding: 0.7rem 0.8rem;
}
.post-body td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.post-body tr:last-child td { border-bottom: 0; }
@media (max-width: 540px) { .post-body table { display: block; overflow-x: auto; } }

.post-tags { max-width: var(--measure); margin: 2rem auto 0; font-size: 0.8rem; color: var(--ink-faint); }
.post-tag {
  display: inline-block;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  margin-left: 0.35rem;
  color: var(--ink-soft);
  background: var(--surface);
}

/* ---------- Affiliate product card ---------- */

.product-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(46,31,24,0.1);
  padding: 1.4rem 1.6rem;
  margin: 2.5rem 0;
}

.product-card-body { flex: 1 1 18rem; }

.product-card-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.3rem;
}

.product-card-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--wine);
  margin: 0 0 0.3rem;
}

.product-card-desc { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

.product-card-action { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
@media (min-width: 540px) { .product-card-action { align-items: flex-end; } }

.product-card-price { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--wine); }

.product-card-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(158,43,27,0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}
.product-card-cta:hover { background: var(--accent-dark); color: var(--cream); transform: translateY(-1px); }

/* ---------- Related ---------- */

.related { max-width: var(--wide); margin: 0 auto; }

/* ---------- Footer (dark) ---------- */

.site-footer {
  background: linear-gradient(180deg, var(--wine), var(--wine-deep));
  border-top: 3px solid var(--gold);
  margin-top: 4.5rem;
  padding: 2.75rem 1.25rem 3.25rem;
  text-align: center;
}

.footer-disclosure {
  max-width: 38rem;
  margin: 0 auto 1rem;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--cream) 65%, transparent);
  line-height: 1.6;
}

.footer-meta { font-size: 0.82rem; color: color-mix(in srgb, var(--cream) 80%, transparent); margin: 0; }
.footer-meta a { color: var(--gold-soft); }
.footer-meta a:hover { color: var(--cream); }

/* ---------- Small screens ---------- */

@media (max-width: 540px) {
  .post-header { text-align: left; }
  .post-body { font-size: 1rem; }
  .product-card { padding: 1.1rem 1.2rem; }
  .hero-content { padding-bottom: 1.75rem; }
}
