/* Lore of Men. Palette tokens are tested in test/site.test.js. */
:root {
  --gold: #D99A2B;
  --black: #0B0B0B;
  --brown: #1A1208;
  --cream: #F5EBD7;
  --muted: rgba(245, 235, 215, 0.72);
  --line: rgba(217, 154, 43, 0.28);
  --display: 'Cormorant SC', 'Cormorant Garamond', Georgia, serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --max: 72rem;
}

@font-face { font-family: 'Cormorant SC'; font-weight: 600; font-display: swap; src: url('/assets/fonts/cormorant-sc-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant SC'; font-weight: 700; font-display: swap; src: url('/assets/fonts/cormorant-sc-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-display: swap; src: url('/assets/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url('/assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('/assets/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font: 400 1rem/1.65 var(--ui);
  overflow-x: clip;
}
/* Hearts and drips are always shown whole: contain, never cover/crop. */
img { max-width: 100%; height: auto; display: block; object-fit: contain; }
a { color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--gold); letter-spacing: 0.06em; line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
.lede { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.45; color: var(--cream); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--gold); color: var(--black); padding: 0.6rem 1rem; font-weight: 600; }
.skip-link:focus { top: 1rem; color: var(--black); }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  padding: 1rem var(--pad); border-bottom: 1px solid var(--line); position: relative; z-index: 2; background: var(--black);
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; padding: 0.25rem 0; }
.brand-heart { width: 1.6rem; height: auto; }
.brand-word { width: clamp(9rem, 30vw, 12rem); }
.site-nav ul { list-style: none; display: flex; gap: clamp(1rem, 3vw, 2rem); margin: 0; padding: 0; }
.site-nav a { color: var(--cream); text-decoration: none; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; padding: 0.5rem 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }

.btn {
  display: inline-block; padding: 0.85rem 1.5rem; min-height: 44px; border: 1px solid var(--gold);
  font: 600 0.8rem/1.2 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; transition: background-color .2s, color .2s;
}
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover { background: var(--cream); border-color: var(--cream); color: var(--black); }
.btn-ghost { color: var(--gold); background: transparent; }
.btn-ghost:hover { background: var(--gold); color: var(--black); }
.text-link { margin-left: 1rem; font-size: 0.9rem; }
.eyebrow { font: 600 0.75rem/1 var(--ui); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem; }

/* Hero: the art is shown whole (contain). Desktop overlays copy on the calm left side. */
.hero { position: relative; background: var(--black); }
.hero-art img { width: 100%; height: auto; }
.hero-copy { padding: 0 var(--pad) 3rem; text-align: center; max-width: 34rem; margin: -2rem auto 0; position: relative; }
.hero h1 { margin: 0 0 1rem; }
.hero-wordmark { width: min(100%, 22rem); margin: 0 auto; }
.tagline { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.4; color: var(--cream); margin-bottom: 1.75rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
@media (max-width: 47.99rem) {
  .hero-art img { max-height: 62svh; width: auto; margin: 0 auto; }
  /* The mobile art already shows the wordmark, so the h1 image is kept for screen readers only. */
  .hero h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip-path: inset(50%); white-space: nowrap; }
  .hero-copy { margin-top: -1.5rem; }
}
@media (min-width: 48rem) {
  .hero-copy {
    position: absolute; inset: 0 auto 0 0; width: 58%; max-width: none; margin: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left;
    padding: 2rem var(--pad);
  }
  .hero-wordmark { width: min(100%, 30rem); margin: 0 0 0 calc(min(100%, 30rem) * -0.069); } /* the wordmark SVG has 80/1155 built-in left padding */
  .cta-row { justify-content: flex-start; }
  .tagline { max-width: 30rem; }
}

.section { max-width: var(--max); margin: 0 auto; padding: clamp(3.5rem, 9vw, 6.5rem) var(--pad); }
.about { max-width: 48rem; text-align: center; }
.ornament { width: min(100%, 26rem); margin: 0 auto 1.5rem; padding: 0.5rem 0; }
.heart-list { list-style: none; padding: 0; margin: 2rem auto 0; text-align: left; max-width: 36rem; display: grid; gap: 1.1rem; }
.heart-list li {
  padding-left: 2.6rem; min-height: 32px;
  background: url('/assets/brand/heart-mini-bullet-dark.svg') left 0.05rem / 32px 32px no-repeat;
}
.heart-list strong { color: var(--gold); font-weight: 600; }
/* Divider art is 1200x120 with the drips inside the canvas; shown whole. */
.divider { width: 100%; max-width: 34rem; margin: 0 auto; padding: 0.5rem var(--pad); height: auto; aspect-ratio: auto; }

.podcast-intro { display: grid; gap: 2rem; align-items: center; margin-bottom: 3rem; }
.cover { width: min(100%, 16rem); border: 1px solid var(--line); }
@media (min-width: 48rem) { .podcast-intro { grid-template-columns: minmax(14rem, 22rem) 1fr; gap: 3rem; } .cover { width: 100%; } }
.episodes-title { border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }
.episodes-status { color: var(--muted); }
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.episode {
  display: grid; gap: 1.25rem; padding: 1.5rem; background: var(--brown); border: 1px solid var(--line);
}
@media (min-width: 40rem) { .episode { grid-template-columns: 7.5rem 1fr; } }
.episode-art { width: 7.5rem; aspect-ratio: 1; object-fit: contain; background: var(--black); }
.episode h4 { font: 600 1.6rem/1.2 var(--serif); color: var(--cream); margin: 0 0 0.35rem; }
.episode-meta { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem; }
.episode-desc { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.episode audio { width: 100%; margin: 0.5rem 0 0.75rem; color-scheme: dark; }
.episode-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.9rem; margin: 0; }

.merch-teaser { text-align: center; border-top: 1px solid var(--line); max-width: 48rem; }

.shop { text-align: center; }
.coming-soon-art { width: min(100%, 52rem); margin: 0 auto 2rem; border: 1px solid var(--line); }
.coming-soon .lede { max-width: 38rem; margin: 0 auto 1.75rem; }
.shop-banner { max-width: 40rem; margin: 0 auto 1rem; padding: 1.25rem 1.5rem; border: 1px solid var(--line); background: var(--brown); }
.shop-banner p { margin: 0 0 0.4rem; }
.shop-banner p:last-child { margin: 0; }
.shop-banner strong { color: var(--gold); font-weight: 600; }
.products { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); text-align: left; }
.product { background: var(--brown); border: 1px solid var(--line); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
/* Product mockups sit on Cream; contain + padding keeps every heart whole. */
.product img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--cream); padding: 0.5rem; }
.product h2 { font-size: 1.45rem; margin: 0.25rem 0 0; letter-spacing: 0.03em; }
.product-desc { color: var(--muted); font-size: 0.95rem; flex: 1; margin: 0; }
.product .price { color: var(--gold); font-weight: 600; font-size: 1.1rem; margin: 0; }
.product .btn { align-self: flex-start; }
.product button[disabled] { opacity: 0.6; cursor: not-allowed; }
.product button[disabled]:hover { background: transparent; color: var(--gold); }
.tag { align-self: flex-start; margin: 0; padding: 0.25rem 0.6rem; border: 1px solid var(--gold); color: var(--gold); font: 600 0.7rem/1.2 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; }

.notfound { text-align: center; max-width: 40rem; }
.nf-heart { width: 8rem; margin: 0 auto 1.5rem; padding: 0.5rem; }

.site-footer { border-top: 1px solid var(--line); padding: 3.5rem var(--pad) 2.5rem; text-align: center; color: var(--muted); }
.footer-lockup { width: 10rem; margin: 0 auto 1.25rem; padding: 0.25rem; }
.footer-line { font-family: var(--serif); font-size: 1.2rem; }
.footer-links { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; }
.footer-links a { display: inline-block; padding: 0.4rem 0; }
.fineprint { font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Policy pages (shipping, returns) */
.policy { max-width: 46rem; margin-inline: auto; }
.policy h2 { font-family: var(--display); color: var(--gold); margin-top: 2rem; font-size: clamp(1.25rem, 3vw, 1.5rem); }
.draft-note { border: 1px solid var(--gold); padding: .75rem 1rem; border-radius: .5rem; color: var(--cream); }
.placeholder { background: rgba(217,154,43,.18); color: var(--gold); padding: 0 .3em; border-radius: .25rem; font-weight: 600; }
.policy-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.policy-table th, .policy-table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid rgba(245,235,215,.2); }
.policy-table th { color: var(--gold); }
.policy-table td:last-child { white-space: nowrap; }
.price-note { margin-top: -.35rem; font-size: .8rem; color: var(--muted); }
.gallery { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .5rem 0 0; }
.gallery-btn { padding: 0; border: 1px solid var(--line); background: var(--cream); border-radius: .25rem; cursor: pointer; width: 3.25rem; }
.gallery-btn img { display: block; width: 100%; height: auto; object-fit: contain; padding: 0; }
.gallery-btn[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.gallery-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Official tagline "Elevating Men." (Brand's outlined SVG; never cropped). */
.hero-tagline { margin: 0 0 1rem; }
.hero-tagline img { display: block; width: min(100%, 10rem); height: auto; margin: 0 auto; }
.footer-tagline { margin: -0.5rem 0 1rem; }
.footer-tagline img { display: block; width: 7.5rem; height: auto; margin: 0 auto; }
@media (min-width: 48rem) {
  .hero-tagline img { width: 12.6rem; margin: 0; }
}

/* Size chart: tables scroll inside their own box, never the page. */
.size-chart h3 { font-family: var(--display); color: var(--cream); font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.size-src { color: var(--muted); margin-top: -.5rem; }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: .5rem; }
.table-scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.size-table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: .85rem; }
.size-table th, .size-table td { padding: .5rem .6rem; text-align: left; border-bottom: 1px solid rgba(245,235,215,.15); white-space: nowrap; }
.size-table thead th, .size-table tbody th { color: var(--gold); }
.size-list { padding-left: 1.1rem; }
.size-list li { margin: .35rem 0; }
/* Size chart: wider column on desktop so S–3XL tables fit without scrolling. */
@media (min-width: 64rem) {
  .policy.size-chart { max-width: 72rem; }
  .size-chart .size-table { min-width: 0; }
  .size-chart .size-table td { white-space: normal; }
}
