/* ============================================================================
   BALANCED BEN PETS — STYLE.CSS
   ============================================================================
   Production stylesheet. Mobile-first. Editorial warmth design system.

   ORGANIZATION
   ─────────────
   1.  Design Tokens (CSS variables)
   2.  Reset & Base
   3.  Typography
   4.  Layout Containers
   5.  Header & Navigation
   6.  Footer
   7.  Post Hero (title-overlay)
   8.  Post Article Body
   9.  Affiliate Disclosure
   10. Author Bio Block
   11. Cards & Grids (homepage, blog, categories)
   12. Buttons & Links
   13. Forms (contact)
   14. Google Translate Widget
   15. Utility Classes
   16. Responsive Breakpoints
   ============================================================================ */


/* ─────────────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Color palette — warm editorial */
  --bg:           #FBF8F3;
  --bg-alt:       #F5F0E6;   /* slightly darker for sections */
  --surface:      #FFFFFF;
  --ink:          #2A2A2A;
  --ink-soft:     #5A5A5A;
  --ink-muted:    #8A8A8A;

  --accent:       #C8553D;   /* terracotta */
  --accent-hover: #B0432D;
  --accent-soft:  #F4DCD2;

  --sage:         #6B8E6F;
  --sage-soft:    #E4ECDF;

  --line:         #EAE4D8;
  --line-soft:    #F0EBDF;

  /* Shadows */
  --shadow-sm:    0 4px 12px rgba(42, 42, 42, 0.04);
  --shadow:       0 8px 24px rgba(42, 42, 42, 0.06);
  --shadow-lg:    0 16px 40px rgba(42, 42, 42, 0.10);

  /* Radius */
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;

  /* Typography scale */
  --font-serif:   'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container:    1200px;
  --container-narrow: 720px;
  --container-wide:   1100px;
}


/* ─────────────────────────────────────────────────────────────────────────
   1b. DARK MODE — auto, respects OS preference
   ─────────────────────────────────────────────────────────────────────────
   Triggered when the user's system is in dark mode. Same variable names so
   nothing else in the CSS needs to change — colors just remap. Designed to
   feel warm and editorial (not flat black), matching our daytime aesthetic.
   ───────────────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    /* Backgrounds — warm dark, not pure black */
    --bg:           #1A1714;     /* deep warm brown-black */
    --bg-alt:       #221E1A;     /* slightly lighter, for sections */
    --surface:      #2A2522;     /* cards/drawer/menus */

    /* Text — warm cream tones, not pure white */
    --ink:          #F0EBE3;     /* main text */
    --ink-soft:     #BFB7AB;     /* secondary text */
    --ink-muted:    #8A8276;     /* tertiary / hints */

    /* Accent — slightly warmer terracotta to feel less harsh in dark */
    --accent:       #E07358;     /* brighter for legibility on dark */
    --accent-hover: #D85F44;
    --accent-soft:  rgba(224, 115, 88, 0.15);  /* tint for hover/focus rings */

    /* Sage (used in disclosure box) — softer, cooler in dark */
    --sage:         #8FAA92;
    --sage-soft:    rgba(143, 170, 146, 0.12);

    /* Lines / borders — subtle, slightly visible against dark */
    --line:         #3A332E;
    --line-soft:    #2F2925;

    /* Shadows — increase intensity since dark surfaces show less depth */
    --shadow-sm:    0 4px 12px rgba(0, 0, 0, 0.20);
    --shadow:       0 8px 24px rgba(0, 0, 0, 0.30);
    --shadow-lg:    0 16px 40px rgba(0, 0, 0, 0.40);
  }

  /* Hero overlay gradient — darker bottom for legibility */
  .post-hero::after {
    background: linear-gradient(180deg,
      transparent 0%,
      transparent 40%,
      rgba(0, 0, 0, 0.55) 70%,
      rgba(0, 0, 0, 0.85) 100%) !important;
  }

  /* Images get a subtle dimming so they don't glare on dark backgrounds */
  article.post img {
    opacity: 0.92;
    transition: opacity 0.2s;
  }

  article.post img:hover {
    opacity: 1;
  }

  /* Header background — semi-opaque dark instead of cream */
  header {
    background: rgba(26, 23, 20, 0.95) !important;
  }

  @media (max-width: 800px) {
    header {
      background: rgba(26, 23, 20, 0.98) !important;
    }
  }

  /* Disclosure box — sage accent works fine, just rebalance */
  .affiliate-disclosure {
    background: var(--sage-soft);
    border-left-color: var(--sage);
  }

  /* Translate menu, dropdown, modals — proper dark surfaces */
  .translate-menu {
    background: var(--surface);
    border-color: var(--line);
  }

  /* Code blocks if any — adjust for readability */
  code, pre {
    background: var(--bg-alt);
    color: var(--ink);
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

iframe {
  max-width: 100%;
  border: 0;
  border-radius: var(--radius);
}
.video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}


/* ─────────────────────────────────────────────────────────────────────────
   3. TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.85rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.4rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

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

strong { font-weight: 600; color: var(--ink); }

blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

code {
  font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

ul, ol {
  margin: 0 0 1.4rem;
  padding-left: 1.5rem;
}

ul li, ol li { margin-bottom: 0.5rem; }


/* ─────────────────────────────────────────────────────────────────────────
   4. LAYOUT CONTAINERS
   ───────────────────────────────────────────────────────────────────────── */

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

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


/* ─────────────────────────────────────────────────────────────────────────
   5. HEADER & NAVIGATION
   ───────────────────────────────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  background: rgba(251, 248, 243, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

header .nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ===== LOGO — distinctive editorial brand mark ===== */
header .logo {
  font-family: var(--font-serif);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
}

header .logo:hover { text-decoration: none; }

/* The custom paw mark — hand-drawn feel, terracotta filled circle with serif initial */
header .logo .logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(200, 85, 61, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

header .logo .logo-mark::after {
  /* Subtle inner highlight for depth */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

header .logo:hover .logo-mark {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 6px 18px rgba(200, 85, 61, 0.35);
}

/* Wordmark stack — two-line layout with editorial hierarchy */
header .logo .logo-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

header .logo .logo-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

header .logo .logo-name em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

header .logo .logo-tag {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

header nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: color 0.15s;
}

header nav a:hover { color: var(--accent); text-decoration: none; }

header nav a.yt-link {
  color: var(--accent);
  font-weight: 600;
}


/* ===== HAMBURGER MENU (mobile) ===== */

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.menu-toggle:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.menu-toggle .bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.menu-toggle .bars span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}


/* ─────────────────────────────────────────────────────────────────────────
   6. FOOTER
   ───────────────────────────────────────────────────────────────────────── */

footer {
  background: #1a1814;
  color: #fff;
  padding: 3rem 1.25rem 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer .footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

footer .footer-signature {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
  color: #fff;
}

footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

footer .footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

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

footer .footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ─────────────────────────────────────────────────────────────────────────
   7. POST HERO (title-overlay magazine style)
   ───────────────────────────────────────────────────────────────────────── */

.post-hero-wrap {
  max-width: var(--container-wide);
  margin: 2rem auto 0;
  padding: 0 1.25rem;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  padding-bottom: 1px;
}

.breadcrumb a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.breadcrumb .sep {
  color: var(--ink-soft);
  opacity: 0.5;
  margin: 0 0.4rem;
}

.post-hero {
  position: relative;
  width: 100%;
  height: clamp(360px, 55vw, 560px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #d4a574 0%, #c8553d 100%);
}

.post-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.post-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.0) 30%,
    rgba(0, 0, 0, 0.35) 75%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.post-hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  z-index: 2;
  color: #fff;
}

.post-hero-content .category-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 1rem;
  text-decoration: none;
}

.post-hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0 0 0.85rem;
  max-width: 24ch;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.post-hero-content .meta-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  flex-wrap: wrap;
}

.post-hero-content .meta-line .author-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: #fff;
  overflow: hidden;
}

.post-hero-content .meta-line .author-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero-content .meta-line .dot { opacity: 0.5; }


/* ─────────────────────────────────────────────────────────────────────────
   8. POST ARTICLE BODY
   ───────────────────────────────────────────────────────────────────────── */

article.post {
  max-width: var(--container-narrow);
  margin: 3rem auto 0;
  padding: 0 1.25rem 4rem;
  font-size: 1.08rem;
}

article.post p { margin-bottom: 1.4rem; }

article.post p.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
}

article.post h2 {
  font-size: 1.85rem;
  margin: 3rem 0 1rem;
}

article.post img {
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

article.post figure {
  margin: 2rem 0;
}

article.post figure img { margin: 0; }

article.post figcaption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

article.post a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.15s;
}

article.post a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
}


/* ─────────────────────────────────────────────────────────────────────────
   9. AFFILIATE DISCLOSURE
   ───────────────────────────────────────────────────────────────────────── */

.affiliate-disclosure {
  background: var(--sage-soft);
  border-left: 4px solid var(--sage);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 0 0 2.5rem;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.6;
}

.affiliate-disclosure p { margin: 0; }

.affiliate-disclosure strong { color: var(--sage); }

.affiliate-disclosure a {
  color: var(--sage);
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.affiliate-disclosure a:hover {
  border-bottom-color: var(--sage);
  text-decoration: none;
}


/* ─────────────────────────────────────────────────────────────────────────
   10. AUTHOR BIO BLOCK
   ───────────────────────────────────────────────────────────────────────── */

.author-bio {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 4rem 0 2rem;
  box-shadow: var(--shadow);
}

.author-bio-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  background: transparent;
}

.author-bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 75%;
  display: block;
}

.author-bio-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--ink);
}

.author-bio-desc {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
  line-height: 1.65;
}

.author-bio-links {
  margin: 0;
  font-size: 0.9rem;
}

.author-bio-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.author-bio-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}


/* ─────────────────────────────────────────────────────────────────────────
   11. CARDS & GRIDS (homepage, blog, categories)
   ───────────────────────────────────────────────────────────────────────── */

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 3rem 0 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0 4rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-image img { transform: scale(1.04); }

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.card-title a {
  color: var(--ink);
  text-decoration: none;
}

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

.card-excerpt {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: auto;
}


/* ─────────────────────────────────────────────────────────────────────────
   12. BUTTONS & LINKS
   ───────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}

.btn-ghost:hover { text-decoration: underline; }


/* ─────────────────────────────────────────────────────────────────────────
   13. FORMS (contact)
   ───────────────────────────────────────────────────────────────────────── */

form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-sans);
}


/* ─────────────────────────────────────────────────────────────────────────
   14. GOOGLE TRANSLATE — custom button + hidden Google widget
   ─────────────────────────────────────────────────────────────────────────
   Approach: hide Google's injected widget completely, build a clean custom
   dropdown that programmatically triggers it. Functionality identical, the
   look matches the editorial design system.
   ───────────────────────────────────────────────────────────────────────── */

/* Hide Google's injected widget completely — we'll show our own */
#google_translate_element {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
}

/* Hide Google's injected top bar. The custom globe menu is the visible UI. */
.goog-te-banner-frame,
iframe.skiptranslate {
  display: none !important;
  visibility: hidden !important;
}

html.translated-ltr,
html.translated-rtl {
  margin-top: 0 !important;
}

/* Google adds inline top: 40px after translation; keep the layout pinned. */
body {
  top: 0 !important;
  position: static !important;
}

.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Wrapper that holds our custom button + menu (positioning context) */
.translate-pill {
  display: inline-flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

/* Custom translate button — small icon-only globe */
.translate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  color: var(--accent);
  font: inherit;
}

.translate-btn:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.translate-btn:active {
  transform: scale(0.96);
}

.translate-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.translate-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* Hide the legacy "Translate" label — kept for accessibility (screen readers) */
.translate-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Custom dropdown panel that appears when button is clicked */
.translate-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 300;
  display: none;
  list-style: none;
  margin: 0;
}

.translate-menu.is-open {
  display: block;
  animation: translateMenuIn 0.15s ease-out;
}

@keyframes translateMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.translate-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.translate-menu button:hover,
.translate-menu button:focus-visible {
  background: var(--bg-alt);
  color: var(--accent);
  outline: none;
}

.translate-menu button .flag {
  font-size: 1.05rem;
  line-height: 1;
}

.translate-menu .menu-divider {
  height: 1px;
  background: var(--line-soft);
  margin: 4px 0;
}

.translate-menu .reset-btn {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-style: italic;
}


/* ─────────────────────────────────────────────────────────────────────────
   15. UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-muted  { color: var(--ink-soft); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ─────────────────────────────────────────────────────────────────────────
   16. RESPONSIVE BREAKPOINTS
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 800px) {
  /* CRITICAL FIX: when drawer is open, raise the header's z-index so the
     entire header stacking context (which CONTAINS the fixed drawer) sits
     above the body::before backdrop. Without this, the backdrop's z-index
     150 wins against the drawer's z-index 200, because the drawer is
     trapped inside the header's stacking context (z-index 100). */
  body.nav-open header {
    z-index: 250;
  }

  /* CRITICAL: remove backdrop-filter on mobile — it creates a stacking context
     that traps position:fixed children (the drawer) inside the header. */
  header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(251, 248, 243, 0.98);
  }

  header .nav {
    padding: 0.75rem 1rem;
  }

  /* Show hamburger, hide horizontal nav */
  .menu-toggle {
    display: inline-flex;
  }

  /* Logo stays compact on mobile */
  header .logo .logo-name {
    font-size: 1rem;
  }

  header .logo .logo-tag {
    font-size: 0.58rem;
  }

  header .logo .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }

  /* Mobile nav drawer — slides in from right, takes ~75% width */
  header nav {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 78%;
    max-width: 320px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4.5rem 1.5rem 2rem;
    background: var(--surface);
    box-shadow: -16px 0 40px rgba(42, 42, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
  }

  header nav.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* Ensure all drawer children inherit pointer events */
  header nav.is-open a,
  header nav.is-open button,
  header nav.is-open .translate-pill {
    pointer-events: auto;
  }

  header nav a {
    width: 100%;
    padding: 0.95rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
  }

  header nav a:last-of-type {
    border-bottom: none;
  }

  /* Translate pill on mobile — inside drawer */
  header nav .translate-pill {
    width: 100%;
    padding: 0.95rem 0.25rem;
    border-bottom: 1px solid var(--line-soft);
    height: auto;
    justify-content: flex-start;
  }

  /* Backdrop overlay when drawer is open — clean dark dim, clickable to close */
  body.nav-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(42, 42, 42, 0.5);
    z-index: 150;
    animation: fadeIn 0.2s ease-out;
    pointer-events: auto;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Lock body scroll when drawer is open */
  body.nav-open {
    overflow: hidden;
  }

  /* Hamburger stays above the drawer for closing */
  .menu-toggle {
    position: relative;
    z-index: 250;
    background: var(--bg-alt);
  }

  /* When drawer is open, ensure hamburger has solid background so it's visible against the drawer */
  body.nav-open .menu-toggle {
    background: var(--surface);
  }

  .post-hero {
    height: 380px;
  }

  .post-hero-content {
    padding: 1.5rem;
  }

  .post-hero-content h1 {
    max-width: 100%;
  }

  .author-bio {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem;
  }

  .author-bio-photo {
    margin: 0 auto;
  }

  article.post {
    padding: 0 1rem 3rem;
  }

  .card-grid {
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .post-hero {
    height: 320px;
    border-radius: var(--radius);
  }

  .post-hero-content {
    padding: 1.25rem;
  }

  footer {
    padding: 2.5rem 1rem 1.5rem;
  }

  footer .footer-nav {
    gap: 1rem;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   17. CUSTOM POST COMPONENTS (carousel, chart, reading-list, post-nav)
   ─────────────────────────────────────────────────────────────────────────
   Floating, modern, editorial style — designed to feel premium without
   shouting. Uses the same color tokens and shadow system as the rest of
   the site for visual cohesion.
   ───────────────────────────────────────────────────────────────────────── */


/* ============ PHOTO CAROUSEL ============ */

.carousel-wrap {
  margin: 3.5rem 0;
}

.carousel-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}

.carousel-shell {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}

.carousel::-webkit-scrollbar {
  height: 6px;
}

.carousel::-webkit-scrollbar-track {
  background: transparent;
}

.carousel::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 999px;
}

.carousel .slide {
  flex: 0 0 86%;
  max-width: 720px;
  scroll-snap-align: start;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.carousel .slide:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.carousel .slide img {
  width: 100%;
  height: clamp(220px, 32vw, 360px);
  object-fit: cover;
  display: block;
  border-radius: 0;
  margin: 0;
}

.carousel .slide .caption {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  font-style: normal;
  text-align: left;
  background: var(--surface);
}

/* Carousel buttons — floating circles */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  padding: 0;
}

.carousel-btn:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.08);
  box-shadow: var(--shadow-lg);
  color: var(--accent);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-btn.left {
  left: -10px;
}

.carousel-btn.right {
  right: -10px;
}

.carousel-controls {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}


/* ============ DATA CHART (bar viz) ============ */

.chart-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow);
}

.chart-block h2,
.chart-block h3 {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.chart-block > p:first-of-type {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.chart-grid {
  display: grid;
  gap: 0.85rem;
}

.chart-row {
  display: grid;
  grid-template-columns: 130px 1fr 110px;
  gap: 1rem;
  align-items: center;
  font-size: 0.92rem;
}

.chart-label {
  font-weight: 500;
  color: var(--ink);
}

.chart-bar {
  background: var(--bg-alt);
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.chart-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #d77357);
  border-radius: 999px;
  transition: width 0.6s ease-out;
  box-shadow: 0 1px 3px rgba(200, 85, 61, 0.25);
}

.chart-row > div:last-child {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: right;
  font-style: italic;
}

.chart-note {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  font-style: italic;
}


/* ============ READING LIST (related posts) ============ */

.reading-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 3rem;
}

.reading-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.reading-list a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-soft);
  text-decoration: none;
}

.reading-list a strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.reading-list a:hover strong {
  color: var(--accent);
}

/* Children that are plain text inside the <a> become the description */
.reading-list a {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--ink-soft);
}


/* ============ POST NAVIGATION (back / next) ============ */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: var(--container-narrow);
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}

.post-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.post-nav a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.post-nav a.right {
  justify-content: flex-end;
  text-align: right;
}

.post-nav .arrow {
  font-size: 1.1rem;
  display: inline-block;
  transition: transform 0.2s;
}

/* ── Legal Pages ─────────────────────────────── */
.legal-page { padding: 4rem 1.5rem 6rem; }
.legal-container { max-width: 740px; margin: 0 auto; }
.legal-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
.legal-label { font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta, #C8553D); }
.legal-header h1 { font-family: 'Fraunces', serif; font-size: clamp(2rem, 5vw, 3rem); color: var(--ink, #2A2A2A); margin: 0.5rem 0; }
.legal-meta { font-size: 0.875rem; color: #888; margin: 0; }
.legal-body h2 { font-family: 'Fraunces', serif; font-size: 1.35rem; color: var(--ink, #2A2A2A); margin: 2.5rem 0 0.75rem; }
.legal-body p, .legal-body li { font-family: 'Inter', sans-serif; font-size: 1rem; line-height: 1.8; color: #444; }
.legal-body ul { padding-left: 1.5rem; margin: 0.75rem 0; }
.legal-body a { color: var(--terracotta, #C8553D); text-decoration: underline; }
.legal-footer-nav { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid rgba(0,0,0,0.1); display: flex; gap: 2rem; flex-wrap: wrap; font-family: 'Inter', sans-serif; font-size: 0.9rem; }
.legal-footer-nav a { color: var(--terracotta, #C8553D); text-decoration: none; }
.legal-footer-nav a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  .legal-header h1, .legal-body h2 { color: #f0ece4; }
  .legal-body p, .legal-body li { color: #bbb; }
  .legal-header, .legal-footer-nav { border-color: rgba(255,255,255,0.08); }
}

.post-nav a:hover .arrow {
  transform: translateX(-2px);
}

.post-nav a.right:hover .arrow {
  transform: translateX(2px);
}


/* ============ ARTICLE TAGS ============ */
/* For posts that have <div class="tags"><span>#Dogs</span>...</div>
   (Note: in the new design, tags are usually shown in the hero category-tag.
    But if a post still has them in the body, render them as soft chips.) */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}

.tags span {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* ============ MOBILE RESPONSIVE ============ */

@media (max-width: 800px) {
  .carousel .slide {
    flex: 0 0 92%;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .carousel-btn.left {
    left: 4px;
  }

  .carousel-btn.right {
    right: 4px;
  }

  .chart-block {
    padding: 1.5rem 1.25rem;
  }

  .chart-row {
    grid-template-columns: 110px 1fr 80px;
    gap: 0.75rem;
    font-size: 0.85rem;
  }

  .chart-row > div:last-child {
    font-size: 0.78rem;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav a.right {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .chart-row {
    grid-template-columns: 90px 1fr 70px;
    font-size: 0.8rem;
  }

  .chart-label {
    font-size: 0.82rem;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   18. PRINT
   ───────────────────────────────────────────────────────────────────────── */

@media print {
  header, footer, .affiliate-disclosure, .author-bio, .translate-pill,
  .carousel-wrap, .post-nav, .reading-list {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  article.post {
    max-width: 100%;
    padding: 0;
  }
}
