/*
 * ln-master.css — Latina Network Design System
 * Enqueued on every page via functions.php at priority 20.
 * All shared styles live here. Template-specific styles load conditionally.
 *
 * Sections (in order):
 *   01 · Reset and Base
 *   02 · Navigation
 *   03 · Gradient Band
 *   04 · Typography Base
 *   05 · Story Cards
 *   06 · Category Color Classes
 *   07 · Category Strip
 *   08 · Section Shared Styles
 *   09 · Email Capture Block
 *   10 · Footer
 *   11 · Reveal Animations
 *   12 · Responsive Breakpoints
 *   13 · Search, Tag, and Index Templates
 */


/* ── 01  RESET ─────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--crema);
  color: var(--plum);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

/* Skip-to-content link: visually hidden until keyboard focus */
.skip-to-content {
  position: absolute;
  top: -200px;
  left: 16px;
  z-index: 9999;
  padding: 10px 20px;
  background: #C4622D;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.15s ease;
}
.skip-to-content:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}


/* ── 02  NAVIGATION ────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 84px;
  background: transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
}

/* Scrolled state: Plum Dark + blur */
.nav.scrolled {
  background: rgba(61, 29, 52, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 68px;
}

/* Logo */
.nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav.scrolled .nav-logo img {
  height: 38px;
}

/* Nav links container */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Individual nav link */
.nav-links a {
  position: relative;
  display: inline-block;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 237, 216, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
  overflow: hidden;
}

/* Tierra underline animates in from left on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--tierra);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* CTA button — no underline animation */
.nav-links a.nav-cta {
  background: var(--tierra);
  color: var(--crema);
  padding: 8px 20px;
  border-radius: 0;
  margin-left: 12px;
  transition: background 0.2s ease;
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--tierra-light);
  color: var(--crema);
}

/* ── NAV DROPDOWNS ───────────────────────────────────────────────────────────
   Desktop (≥901px): hover on .has-dropdown reveals sub-menu — pure CSS.
   Mobile/Tablet:    tapping the parent link toggles .is-open via JS.
   No buttons. No chevrons. The parent link is the only trigger.
   ────────────────────────────────────────────────────────────────────────── */

/* Wrapper div for top-level items that have children */
.nav-links .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Parent link — identical appearance to regular nav links */
.nav-links .nav-parent-link {
  position: relative;
  display: inline-block;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 237, 216, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links .nav-parent-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--tierra);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-links .has-dropdown:hover .nav-parent-link,
.nav-links .has-dropdown.is-open .nav-parent-link {
  color: #fff;
}

.nav-links .has-dropdown:hover .nav-parent-link::after,
.nav-links .has-dropdown.is-open .nav-parent-link::after {
  transform: scaleX(1);
}

/* The dropdown panel — hidden until hover (desktop) or .is-open (all) */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: var(--plum-dark);
  border-top: 2px solid var(--tierra);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  z-index: 9100;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  pointer-events: none;
}

/* Desktop: CSS hover shows the dropdown — no JS needed */
@media (min-width: 901px) {
  .has-dropdown:hover > .nav-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
    pointer-events: auto;
  }
}

/* JS adds .is-open for mobile tap — works at all breakpoints */
.has-dropdown.is-open > .nav-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
  pointer-events: auto;
}

/* Sub-menu links */
.nav-dropdown a {
  display: block;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 237, 216, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 237, 216, 0.07);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-dropdown a:last-child { border-bottom: none; }

.nav-dropdown a:hover,
.nav-dropdown a.current {
  background: rgba(245, 237, 216, 0.07);
  color: #fff;
}

/* ── MOBILE: inside the open fullscreen overlay ──────────────────────────── */
.nav.open .nav-item.has-dropdown {
  flex-direction: column;
  width: 100%;
  position: static;
}

/* Mobile parent link — same style as all other mobile nav links */
.nav.open .nav-parent-link {
  font-size: 18px;
  padding: 20px 24px;
  color: rgba(245, 237, 216, 0.85);
  letter-spacing: 0.2em;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(245, 237, 216, 0.06);
  display: block;
}

.nav.open .nav-parent-link::after { display: none; }

/* Mobile dropdown — collapses, expands with .is-open */
.nav.open .nav-dropdown {
  position: static;
  width: 100%;
  min-width: 0;
  border-top: none;
  border-bottom: 1px solid rgba(245, 237, 216, 0.06);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.04);
  /* On mobile, use height-based approach instead of opacity */
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav.open .has-dropdown.is-open > .nav-dropdown {
  max-height: 600px;
  pointer-events: auto;
}

.nav.open .nav-dropdown a {
  font-size: 14px;
  padding: 13px 24px;
  text-align: center;
  letter-spacing: 0.15em;
  color: rgba(245, 237, 216, 0.65);
  border-bottom: 1px solid rgba(245, 237, 216, 0.05);
}

.nav.open .nav-dropdown a:hover {
  color: #fff;
  background: rgba(245, 237, 216, 0.05);
}

/* ── NAV SEARCH ─────────────────────────────────────────────────────────────
   Desktop: icon button sitting in the nav bar, right of the CTA.
   Clicking the icon toggles .nav-search--open on the .nav-search wrapper,
   which slides the text input into view via max-width transition.
   Mobile: icon becomes a link to the search page; the inline form is hidden.
   ────────────────────────────────────────────────────────────────────────── */

.nav-search {
  display: flex;
  align-items: center;
  margin-left: 12px;
  position: relative;
}

.nav-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(245, 237, 216, 0.7);
  transition: color 0.2s ease;
  flex-shrink: 0;
  border-radius: 0;
  padding: 0;
}

.nav-search-toggle:hover,
.nav-search--open .nav-search-toggle {
  color: var(--crema);
}

.nav-search-form {
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.3s ease, opacity 0.25s ease;
}

.nav-search--open .nav-search-form {
  max-width: 220px;
  opacity: 1;
}

.nav-search-input {
  width: 200px;
  height: 34px;
  padding: 0 12px;
  background: rgba(245, 237, 216, 0.08);
  border: 1px solid rgba(245, 237, 216, 0.18);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--crema);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.nav-search-input::placeholder {
  color: rgba(245, 237, 216, 0.35);
}

.nav-search-input:focus {
  border-color: rgba(196, 98, 45, 0.6);
  background: rgba(245, 237, 216, 0.12);
}

/* Cancel X button: appears inside input when form is open */
.nav-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}


/* Mobile hamburger toggle — hidden at desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(245, 237, 216, 0.85);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Open state: animate hamburger to X */
.nav.open .nav-toggle {
  position: relative;
  z-index: 9001; /* above the overlay (z-index 9000) so the X is always tappable */
}

.nav.open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay menu */
.nav.open {
  background: var(--plum-dark); /* show solid background so the X toggle is visible */
}

.nav.open .nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* dvh covers the full visual viewport including browser chrome on iOS —
     bottom:0 alone uses the layout viewport and can leave a gap at the bottom */
  height: 100dvh;
  min-height: -webkit-fill-available;
  background: var(--plum-dark);
  z-index: 9000;
  /* Force GPU compositing layer so Instagram/WebView respects z-index */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/*
 * When nav is open: force-hide iframes and any GHL-injected elements.
 * Uses !important to defeat GHL's form_embed.js inline style overrides.
 * The body class is toggled by nav JS — covers Instagram in-app browser,
 * iOS Safari, and Android WebView where z-index alone is not reliable.
 */
body.nav-is-open iframe,
body.nav-is-open [class*="hl-embed"],
body.nav-is-open [class*="hl-form"],
body.nav-is-open [id*="hl-embed"],
body.nav-is-open [id*="hl-form"] {
  visibility: hidden !important;
  pointer-events: none !important;
}

/*
 * Scroll lock when nav is open.
 * Prevents the page from scrolling behind the overlay, and forces
 * WebView-based browsers to treat the viewport as static — fixing
 * their broken position:fixed compositing.
 * position:fixed is intentionally NOT used here — it causes a visible
 * page jump on mobile as the browser repositions the layout.
 * position:fixed IS restored here — it is required for correct GPU compositing
 * in iOS Safari and WebView. The visible jump it causes is hidden in JS by
 * applying it only after the nav overlay has already painted (double-rAF).
 */
html.nav-is-open,
body.nav-is-open {
  overflow: hidden !important;
}

body.nav-is-open {
  position: fixed !important;
  width: 100% !important;
}

/* Full-viewport iframe blocker div — sits between page content and nav overlay.
 * A transparent div covering the viewport forces proper layer compositing in
 * browsers that otherwise let iframes punch through fixed overlays.
 */
#ln-nav-blocker {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8999;
  background: transparent;
  pointer-events: none;
}

body.nav-is-open #ln-nav-blocker {
  display: block;
}

.nav.open .nav-links a {
  font-size: 18px;
  padding: 20px 24px;
  color: rgba(245, 237, 216, 0.85);
  letter-spacing: 0.2em;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(245, 237, 216, 0.06);
}

.nav.open .nav-links a::after {
  display: none;
}

.nav.open .nav-links a:hover {
  background: rgba(245, 237, 216, 0.05);
  color: #fff;
}

.nav.open .nav-links a.nav-cta {
  background: var(--tierra);
  margin: 24px auto 0;
  width: auto;
  padding: 14px 40px;
  letter-spacing: 0.2em;
}


/* ── 03  GRADIENT BAND ─────────────────────────────────────────────────────── */

/*
 * Fixed 3px bar at absolute top of viewport.
 * z-index 300 — above the nav (z-index 200) and everything else.
 * Visible on every page at all times. Does not scroll.
 */
.grad-band {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 300;
  background: linear-gradient(
    90deg,
    var(--tierra),
    var(--oro),
    var(--teal),
    var(--plum)
  );
}


/* ── 04  TYPOGRAPHY BASE ───────────────────────────────────────────────────── */

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.05;
  color: var(--plum);
}

p {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  color: rgba(26, 13, 24, 0.75);
}

a {
  color: var(--tierra);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--tierra-light);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

blockquote {
  font-family: var(--font-serif);
  font-style: italic;
}


/* ── 05  STORY CARDS ───────────────────────────────────────────────────────── */

/*
 * .card is the atomic unit of editorial content.
 * Used across all category grids on the homepage and all archive templates.
 * Defined here so Projects 2–4 inherit it without adding card styles.
 */

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
}

/* Card image wrapper */
.card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--plum-dark);
  flex-shrink: 0;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: transform 0.6s ease, filter 0.3s ease;
}

.card:hover .card-img img {
  transform: scale(1.04);
  filter: saturate(1);
}

/* Category badge — top-left of image */
.card-cat {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crema);
  line-height: 1;
}

/* Card body */
.card-body {
  padding: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-headline {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--plum);
  transition: color 0.2s ease;
}

.card:hover .card-headline {
  color: var(--tierra);
}

.card-dek {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(92, 45, 78, 0.65);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: rgba(92, 45, 78, 0.45);
}

.card-meta span + span::before {
  content: '·';
  margin-right: 8px;
}


/* ── 06  CATEGORY COLOR CLASSES ────────────────────────────────────────────── */

/* Card badge backgrounds — applied via PHP using category slug */
.card-cat.business { background: var(--tierra); }
.card-cat.money    { background: var(--plum-dark); }
.card-cat.wellness { background: var(--teal); }
.card-cat.culture  { background: var(--plum); }
.card-cat.power    { background: var(--plum-dark); border: 1px solid rgba(196, 98, 45, 0.4); }
.card-cat.voices   { background: linear-gradient(90deg, var(--tierra), var(--oro)); }

/* Category strip dot indicators */
.cat-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-dot.business { background: var(--tierra); }
.cat-dot.money    { background: var(--oro); }
.cat-dot.wellness { background: var(--teal); }
.cat-dot.culture  { background: #8a5a7a; }
.cat-dot.power    { background: var(--plum-dark); }
.cat-dot.voices   { background: linear-gradient(90deg, var(--tierra), var(--oro)); }


/* ── 07  CATEGORY STRIP ────────────────────────────────────────────────────── */

/*
 * Sticky secondary nav below the hero on the homepage and below
 * the archive header on category pages. Scrolls horizontally on mobile
 * with no visible scrollbar.
 */

.cat-strip {
  background: var(--plum-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(212, 168, 83, 0.15);
  padding: 0 56px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cat-strip::-webkit-scrollbar {
  display: none;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 237, 216, 0.5);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-right: 1px solid rgba(245, 237, 216, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cat-item:hover,
.cat-item.active {
  color: var(--crema);
  border-bottom-color: var(--tierra);
}

/* Post count badge — appears inline after the category label */
.cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: rgba(245, 237, 216, 0.1);
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(245, 237, 216, 0.45);
  transition: background 0.2s ease, color 0.2s ease;
}

.cat-item:hover .cat-count,
.cat-item.active .cat-count {
  background: rgba(196, 98, 45, 0.25);
  color: var(--crema);
}


/* ── 08  SECTION SHARED STYLES ─────────────────────────────────────────────── */

/*
 * Every homepage editorial section uses this pattern.
 * Projects 3 and 4 inherit these classes directly.
 */

.section {
  padding: 80px 56px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(92, 45, 78, 0.1);
}

.section-header-left {
  display: flex;
  flex-direction: column;
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--tierra);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 300;
  line-height: 1.05;
  color: inherit;
}

.section-see-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(92, 45, 78, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.section-see-all:hover {
  color: var(--tierra);
}

.section-see-all::after {
  content: '→';
  font-size: 14px;
}

/* Section grid — 3 column default */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

/* Alternating section backgrounds */
.section--crema    { background: var(--crema); }
.section--plum     { background: var(--plum); color: var(--crema); }
.section--plum-dark { background: var(--plum-dark); color: var(--crema); }
.section--tierra   { background: var(--tierra); color: var(--crema); }
.section--white    { background: #fff; }


/* ── 09  EMAIL CAPTURE BLOCK ───────────────────────────────────────────────── */

/*
 * Two-column email capture. Appears on homepage and at base of archives.
 * Used by Projects 3 and 4. Defined here for immediate availability.
 */

.section-email {
  background: var(--crema);
  padding: 80px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.email-left {}

.email-eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--tierra);
  margin-bottom: 12px;
}

.email-headline {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--plum);
  margin-bottom: 16px;
}

.email-sub {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(92, 45, 78, 0.65);
}

/* Form block */
.email-form-block {
  background: var(--plum-dark);
  padding: 48px 40px;
}

.email-field {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--crema);
  border: 1px solid rgba(92, 45, 78, 0.2);
  color: var(--plum);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s ease;
}

.email-field::placeholder {
  color: rgba(92, 45, 78, 0.45);
}

.email-field:focus {
  border-color: var(--tierra);
}

.email-submit {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--tierra);
  color: var(--crema);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.email-submit:hover {
  background: var(--tierra-light);
}

.email-promise {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: rgba(245, 237, 216, 0.45);
  margin-top: 12px;
}


/* ── 10  FOOTER ────────────────────────────────────────────────────────────── */

.ln-site-footer {
  background: var(--plum-dark);
  padding: 72px 56px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 56px;
  max-width: 1440px;
  margin: 0 auto 48px;
}

/* Column 1: brand */
.footer-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 20px;
}

.footer-desc {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(245, 237, 216, 0.45);
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(212, 168, 83, 0.8);
}

/* Columns 2–4: nav columns */
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(212, 168, 83, 0.6);
  margin-bottom: 20px;
}

.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 300;
  color: rgba(245, 237, 216, 0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--crema);
}

/* Footer bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  max-width: 1440px;
  margin: 0 auto;
  border-top: 1px solid rgba(245, 237, 216, 0.06);
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: rgba(245, 237, 216, 0.3);
  line-height: 1;
  margin: 0;
}

/* Social icon buttons */
.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(245, 237, 216, 0.4);
  border: 1px solid rgba(245, 237, 216, 0.1);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background: var(--tierra);
  color: var(--crema);
  border-color: var(--tierra);
}


/* ── 11  REVEAL ANIMATIONS ─────────────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/*
 * IntersectionObserver reveal system.
 * Elements start at opacity 0 + translateY(24px).
 * JavaScript adds .visible class at threshold 0.08.
 * Sibling stagger via reveal-delay-1/2/3.
 */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }


/* ── 12  RESPONSIVE BREAKPOINTS ────────────────────────────────────────────── */

/* 1100px: reduce padding, tighten grids */
@media (max-width: 1100px) {
  .section {
    padding: 64px 40px;
  }

  .section-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .section-email {
    padding: 64px 40px;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
  }
}

/* 900px: two-column footer, hide nav links, show hamburger */
@media (max-width: 900px) {
  .nav:not(.open) .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .cat-strip {
    padding: 0 24px;
  }

  .cat-item {
    padding: 12px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .section-email {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 640px: single column, mobile-first padding */
@media (max-width: 640px) {
  .section {
    padding: 40px 20px;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cat-strip {
    padding: 0 16px;
  }

  .cat-item {
    padding: 12px 14px;
    font-size: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .section-email {
    padding: 40px 20px;
    gap: 32px;
  }

  .email-form-block {
    padding: 32px 24px;
  }

  .ln-site-footer {
    padding: 48px 20px 32px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2 ADDITIONS — Shared editorial component extensions
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── CARD VARIANTS ─────────────────────────────────────────────────────────── */

/* Feature card — 2-column: image left, body right */
.card--feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 420px;
}

.card-feature-img {
  display: block;
  overflow: hidden;
  background: var(--plum-dark);
  min-height: 420px;
}

.card-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: transform 0.7s ease, filter 0.35s ease;
}

.card--feature:hover .card-feature-img img {
  transform: scale(1.03);
  filter: saturate(1);
}

.card-feature-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  background: var(--crema);
}

.card--feature .card-headline {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.card-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tierra);
  text-decoration: none;
  margin-top: 8px;
  transition: gap 0.2s ease;
}

.card-read-link:hover {
  gap: 10px;
}

/* Horizontal card — thumbnail left, text right (hero sidebar) */
.card--horizontal {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.card-h-img {
  display: block;
  width: 80px;
  height: 80px;
  overflow: hidden;
  background: var(--plum-dark);
  flex-shrink: 0;
}

.card-h-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: filter 0.25s ease;
}

.card--horizontal:hover .card-h-img img {
  filter: saturate(1);
}

.card-h-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-headline--sm {
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 400;
  line-height: 1.2;
}

/* Compact card — text only, separator line */
.card--compact {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(92, 45, 78, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card--compact:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.card-headline--compact {
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 400;
  line-height: 1.25;
}

/* Inline category badge — used inside feature and horizontal variants */
.card-cat--inline {
  position: static;
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 0;
}

/* Image placeholder when no featured image is set */
.card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--plum-dark), var(--plum));
  min-height: 200px;
}

.card-img-placeholder--sm {
  min-height: 80px;
}


/* ── SECTION-HEADER DARK VARIANT ─────────────────────────────────────────── */

.section-header--dark .section-title {
  color: var(--crema);
}

.section-header--dark {
  border-bottom-color: rgba(245, 237, 216, 0.1);
}

.section-see-all--dark {
  color: rgba(245, 237, 216, 0.45);
}

.section-see-all--dark:hover {
  color: var(--crema);
}


/* ── LOOP EMPTY STATE ─────────────────────────────────────────────────────── */

.loop-empty {
  padding: 80px 0;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.loop-empty-headline {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 300;
  color: var(--plum);
  margin-bottom: 16px;
}

.loop-empty-sub {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(92, 45, 78, 0.55);
  margin-bottom: 40px;
}

.loop-empty-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.loop-empty-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--crema);
  border: 1px solid rgba(92, 45, 78, 0.15);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.loop-empty-cat-link:hover {
  border-color: var(--tierra);
  color: var(--tierra);
}


/* ── SCREEN READER UTILITIES ──────────────────────────────────────────────── */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ── PHASE 2 RESPONSIVE ADDITIONS ─────────────────────────────────────────── */

@media (max-width: 900px) {
  .card--feature {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .card-feature-img {
    min-height: 280px;
  }

  .card-feature-body {
    padding: 32px 28px;
  }
}

@media (max-width: 640px) {
  .card-feature-body {
    padding: 24px 20px;
  }

  .loop-empty {
    padding: 48px 0;
  }
}


/* ── 13  SEARCH & TAG & INDEX ──────────────────────────────────────────────── */

/*
 * Covers three templates:
 *   search.php      — Full-page search results
 *   tag.php         — Tag archive with related-tags sidebar
 *   index.php       — Fallback archive (author, date, post-type, etc.)
 *
 * Layout vocabulary shared across all three:
 *   *-header        — Plum Dark page header band
 *   *-body          — Crema background content area
 *   *-body-inner    — Max-width container with horizontal padding
 *   *-grid          — 3-column card grid (matches archive and category grids)
 */


/* ── SHARED: PAGE HEADER BAND ─────────────────────────────────────────────── */
/*
 * Used by search-header, tag-header, and index-header.
 * Plum Dark background, Cormorant headline, generous vertical padding.
 * Positioned below the fixed nav (84px) with a padding-top offset.
 */

.search-header,
.tag-header,
.index-header {
  background: var(--plum-dark);
  padding: 112px 56px 56px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.12);
}

.search-header-inner,
.tag-header-inner,
.index-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.search-header-label,
.tag-header-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tierra);
  margin-bottom: 16px;
}

.search-header-query,
.tag-header-name,
.index-header-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--crema);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.search-header-count,
.tag-header-count {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: rgba(245, 237, 216, 0.4);
  margin: 0;
}

.index-header-desc {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(245, 237, 216, 0.55);
  max-width: 560px;
  margin: 0;
}


/* ── SEARCH FORM IN HEADER ─────────────────────────────────────────────────── */

.search-form-wrap {
  margin-top: 32px;
}

.search-form {
  display: flex;
  align-items: stretch;
  max-width: 620px;
  border: 1px solid rgba(245, 237, 216, 0.18);
  background: rgba(245, 237, 216, 0.06);
  transition: border-color 0.2s ease;
}

.search-form:focus-within {
  border-color: rgba(196, 98, 45, 0.55);
  background: rgba(245, 237, 216, 0.09);
}

.search-form-input {
  flex: 1;
  height: 54px;
  padding: 0 20px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--crema);
  appearance: none;
  -webkit-appearance: none;
}

.search-form-input::placeholder {
  color: rgba(245, 237, 216, 0.3);
}

.search-form-input::-webkit-search-cancel-button,
.search-form-input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.search-form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(245, 237, 216, 0.12);
  color: rgba(245, 237, 216, 0.5);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.search-form-submit:hover {
  color: var(--crema);
  background: rgba(196, 98, 45, 0.2);
}


/* ── SHARED: CONTENT BODY ─────────────────────────────────────────────────── */

.search-body,
.tag-body,
.index-body {
  background: var(--crema);
  padding: 64px 56px 96px;
}

.search-body-inner,
.tag-body-inner,
.index-body-inner {
  max-width: 1200px;
  margin: 0 auto;
}


/* ── SHARED: 3-COLUMN CARD GRID ────────────────────────────────────────────── */
/*
 * Matches the category archive grid exactly.
 * search-grid, tag-grid, and index-grid all use the same pattern.
 */

.search-grid,
.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}


/* ── TAG PAGE: SIDEBAR LAYOUT ─────────────────────────────────────────────── */
/*
 * Two-column layout: card grid takes the majority, sidebar sits right.
 * On tablet and below, sidebar drops below the grid.
 */

.tag-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0 48px;
  align-items: start;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
}

.tag-sidebar {
  position: sticky;
  top: 100px;
}

.tag-sidebar-inner {
  background: rgba(92, 45, 78, 0.04);
  border: 1px solid rgba(92, 45, 78, 0.1);
  padding: 28px 24px 32px;
}

.tag-sidebar-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tierra);
  margin: 0 0 18px;
}

.tag-sidebar-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-pill--sidebar {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--plum);
  text-decoration: none;
  border: 1px solid rgba(92, 45, 78, 0.15);
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tag-pill--sidebar:hover {
  border-color: var(--tierra);
  color: var(--tierra);
  background: rgba(196, 98, 45, 0.04);
}


/* ── NO RESULTS (search-specific) ─────────────────────────────────────────── */

.search-no-results {
  padding: 64px 0;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.search-no-results-headline {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  color: var(--plum);
  margin: 0 0 14px;
  line-height: 1.2;
}

.search-no-results-sub {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(92, 45, 78, 0.55);
  margin: 0 0 36px;
}

.search-no-results-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}


/* ── PAGINATION (search, tag, index) ──────────────────────────────────────── */

.navigation.pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--plum);
  text-decoration: none;
  border: 1px solid rgba(92, 45, 78, 0.15);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.page-numbers:hover {
  border-color: var(--tierra);
  color: var(--tierra);
}

.page-numbers.current {
  background: var(--plum-dark);
  color: var(--crema);
  border-color: var(--plum-dark);
}

.page-numbers.dots {
  border-color: transparent;
  pointer-events: none;
}


/* ── 13  RESPONSIVE ────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .tag-layout {
    grid-template-columns: 1fr;
  }

  .tag-sidebar {
    position: static;
    margin-top: 48px;
  }

  .tag-sidebar-inner {
    padding: 24px;
  }

  .tag-sidebar-tags {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tag-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .search-header,
  .tag-header,
  .index-header {
    padding: 104px 28px 44px;
  }

  .search-body,
  .tag-body,
  .index-body {
    padding: 48px 28px 72px;
  }

  .search-grid,
  .index-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }

  .tag-grid {
    grid-template-columns: 1fr;
  }

  /* Nav search: icon routes to search page; inline form is hidden */
  .nav-search-form {
    display: none;
  }

  .nav-search-toggle {
    /* Becomes a direct link to the search page via JS */
  }
}

@media (max-width: 640px) {
  .search-header,
  .tag-header,
  .index-header {
    padding: 96px 20px 36px;
  }

  .search-body,
  .tag-body,
  .index-body {
    padding: 36px 20px 60px;
  }

  .search-grid,
  .index-grid,
  .tag-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .search-form {
    max-width: 100%;
  }

  .search-form-input {
    font-size: 15px;
  }

  /* Cat-count badge — hide on the narrowest viewports to save strip width */
  .cat-count {
    display: none;
  }
}
