/* =========================================================
   OVERRIDES + CUSTOMIZATIONS
   Applied AFTER base.css. Tunes the design tokens to match
   Troy's editorial decisions (2026-05-23):
     - sharper logo (527x90 src, displayed crisp at hi-DPI)
     - bold scenic background on hero + magazine detail pages
     - clean magazine cover (no card decoration around the JPG)
     - slide-in animations on hero entrance
   ========================================================= */

/* =========================================================
   LOGO — image replaces text brand, displayed sharp
   ========================================================= */
.brand__logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: 320px;
  /* source is 527x90 → display at 38px high = ~222px wide; downscaled = sharp on hi-DPI */
}
.brand__logo--footer {
  height: 44px;
  /* footer logo is white-on-dark — source `KlamathLiving_white_large.png` is already white. No filter needed. */
}
.brand__title,
.brand__sub {
  display: none !important; /* legacy text — fully replaced by logo image */
}

/* =========================================================
   HERO — bold scenic background, magazine cover floats clean
   =========================================================
   The hero now has a full-bleed scenic photo behind the cover
   thumbnail + headline + teaser. The cover image itself is
   shown clean (no border, no shadow card), just the magazine
   cover photograph as designed by BVM.
   ========================================================= */
.hero {
  position: relative;
  padding-block: 96px 96px;
  overflow: hidden;
  isolation: isolate;
}
/* Business-profile hero contact line — always light over the dark hero scrim
   (default lake hero OR custom darkened hero). Fixes dark-on-dark unreadable
   contact/address text. */
.hero .business-profile__contact,
.hero .business-profile__contact a,
.hero .business-profile__contact strong,
.hero .business-profile__contact em {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* dim + warm-tone the photo so cream + gold pop on top */
    linear-gradient(135deg, rgba(19, 52, 60, 0.72) 0%, rgba(26, 24, 20, 0.64) 100%),
    url('/assets/img/hero/link-river-park.jpg') center / cover no-repeat;
  z-index: -1;
}
.hero__inner {
  position: relative;
  z-index: 1;
}
.hero__cover {
  /* portrait column for the magazine cover — bumped 2026-05-23 per Troy's feedback */
  max-width: 460px;
}
.hero__inner {
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: clamp(32px, 5vw, 72px);
}
@media (max-width: 880px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__cover {
    max-width: 380px;
    margin: 0 auto;
  }
}
.hero__cover-link {
  display: block;
  text-decoration: none;
  animation: kl-slide-up 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 200ms both;
}
.hero__cover-img {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  border-radius: 0;
  box-shadow: 0 32px 64px -28px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.2);
  background: transparent;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}
.hero__cover-link:hover .hero__cover-img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 40px 72px -28px rgba(0, 0, 0, 0.65), 0 6px 16px rgba(0, 0, 0, 0.3);
}
.hero__copy {
  color: var(--white);
  animation: kl-slide-right 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 350ms both;
}
.hero__title {
  color: var(--white);
}
.hero__byline {
  color: var(--gold-soft);
}
.hero__teaser {
  color: rgba(251, 247, 238, 0.92);
}
.hero__eyebrow .eyebrow {
  color: var(--gold-soft);
}
.hero__eyebrow .dot {
  background: var(--gold-soft);
}
.hero .btn {
  background: var(--gold);
  color: var(--ink);
}
.hero .btn:hover {
  background: var(--gold-soft);
}

@keyframes kl-slide-up {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes kl-slide-right {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes kl-fade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__cover-link,
  .hero__copy {
    animation: none;
  }
}

/* =========================================================
   ARCHIVE GRID — clean cover images, no faux background
   ========================================================= */
.archive-grid .issue {
  background: transparent;
  border: none;
}
.archive-grid .issue__cover {
  background: transparent;
  background-image: none;
  padding: 0;
  border: none;
  border-radius: 0;
  overflow: visible;
  aspect-ratio: 3 / 4;
  display: block;
  position: relative;
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.archive-grid .issue__cover::before,
.archive-grid .issue__cover::after {
  display: none !important;
}
.archive-grid .issue__cover .issue__masthead,
.archive-grid .issue__cover .issue__date,
.archive-grid .issue__cover .issue__art,
.archive-grid .issue__cover .issue__story {
  display: none;
}
.archive-grid .issue__cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--paper-deep);
  border-radius: 0;
}
.archive-grid .issue__meta {
  margin-top: 14px;
  padding: 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: var(--fs-meta);
  color: var(--ink-soft);
}
.archive-grid .issue__meta strong {
  color: var(--ink);
  font-weight: 600;
}
.archive-grid .issue:hover .issue__cover {
  transform: translateY(-6px);
  box-shadow: 0 28px 48px -20px rgba(0, 0, 0, 0.45);
}

/* TOC card mini-cover — also clean */
.toc-card__cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: none;
  border-radius: 0;
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.4);
  background: var(--paper-deep);
}

/* =========================================================
   MAGAZINE DETAIL PAGE — scenic background behind whole page
   ========================================================= */
body.is-magazine-detail {
  background:
    /* dim overlay so cream content panel reads on top */
    linear-gradient(180deg, rgba(244, 236, 220, 0.7) 0%, rgba(244, 236, 220, 0.95) 60%),
    url('/assets/img/hero/link-river-park.jpg') center top / cover no-repeat fixed;
}
body.is-magazine-detail .hero::before {
  background:
    linear-gradient(135deg, rgba(19, 52, 60, 0.78) 0%, rgba(26, 24, 20, 0.66) 100%),
    url('/assets/img/hero/link-river-park.jpg') center / cover no-repeat;
}
body.is-magazine-detail .section {
  background: rgba(244, 236, 220, 0.96);
  backdrop-filter: blur(6px);
}

/* =========================================================
   ToC tag visual hierarchy — "Read on Web" (gold) vs "Coming to Web" (muted gold) vs "In Print" (paper edge)
   ========================================================= */
.toc-item__tag--web {
  background: var(--gold-soft);
  color: var(--ink);
  font-weight: 600;
}
/* "Coming to Web" — same shape as "Read on Web" but visually quieter (no link yet) */
.toc-item:not(:has(a)) .toc-item__tag--web {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  font-weight: 500;
}

/* =========================================================
   NAV scaling — keep all 11 items on one line at common widths
   ========================================================= */
@media (max-width: 1440px) { .nav a { font-size: 0.85rem; padding-inline: 7px; } }
@media (max-width: 1280px) { .nav a { font-size: 0.8rem;  padding-inline: 5px; letter-spacing: 0; } }

/* =========================================================
   Issue landing page — full-bleed hero background pattern
   (Troy locked 2026-05-25 starting with October 2022)
   When /assets/img/magazines/<issue>/hero-NNNw.jpg exists,
   the build emits a .hero--has-bg modifier + a responsive
   <picture class="hero__bg"> + dark overlay. This overrides
   the default ::before link-river-park.jpg backdrop.
   ========================================================= */
.hero--has-bg::before { display: none; }
.hero__bg,
.hero__overlay { display: none; }
.hero--has-bg .hero__bg,
.hero--has-bg .hero__overlay { display: block; }
.hero--has-bg .hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  margin: 0;
}
.hero--has-bg .hero__bg-img {
  width: 100%;
  /* 150% gives the parallax JS room to translate the bg down 30% of scroll
     without revealing whitespace at the top. issue-hero-parallax.js applies
     the transform; static fallback (no JS / reduced-motion) just shows the
     image at its natural object-position. */
  height: 150%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
.hero--has-bg .hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Lightened 2026-05-25 per Troy's October 2022 review — was 0.55/0.78,
     now 0.38/0.58 to let the photo come through more while keeping the
     title + teaser text readable. */
  background:
    linear-gradient(135deg,
      rgba(13, 36, 42, 0.38) 0%,
      rgba(26, 24, 20, 0.58) 100%);
}
.hero--has-bg {
  padding-block: clamp(80px, 12vw, 140px);
}

/* Home page Originals cards — render the article hero-thumb when present.
   The original .original__img is a placeholder block with aspect-ratio 4/3;
   when we inject an <img>, we make it cover the box. Added 2026-05-25. */
.original__img {
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-deep);
}
.original__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.original:hover .original__img img {
  transform: scale(1.04);
}

/* ===== Expert Contributors — directory highlight (the "tallest sunflowers") ===== */
.ef-chip--expert{background:linear-gradient(180deg,#f5c14e,#e0a92e);color:#3a2d05;border-color:#e0a92e;font-weight:700}
.ef-chip--expert.ef-chip--active{box-shadow:0 0 0 2px #b9831f inset}
.ec-badge{position:absolute;top:10px;right:10px;z-index:2;background:linear-gradient(180deg,#f5c14e,#e0a92e);color:#3a2d05;font-size:11px;font-weight:800;letter-spacing:.02em;padding:3px 8px;border-radius:999px;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.article-card--expert{position:relative;border:1.5px solid #e0a92e;box-shadow:0 2px 10px rgba(224,169,46,.18)}
.ec-strip{margin-top:28px;padding:22px;border-radius:14px;background:linear-gradient(135deg,#fff8e8,#fdf0d2);border:1px solid #efd28a}
.ec-strip__head h2{margin:0 0 4px;color:#7a5a12;font-size:1.25rem}
.ec-strip__head p{margin:0 0 14px;color:#6b5a32;font-size:.92rem}
.ec-strip__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.ec-strip__item{display:flex;flex-direction:column;gap:2px;padding:11px 13px;background:#fff;border:1px solid #eed9a6;border-radius:10px;text-decoration:none;transition:transform .12s,box-shadow .12s}
.ec-strip__item:hover{transform:translateY(-2px);box-shadow:0 4px 14px rgba(224,169,46,.25)}
.ec-strip__cat{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#b9831f}
.ec-strip__biz{font-weight:700;color:#1a1a1a;font-size:.95rem}
.ec-strip__who{font-size:.82rem;color:#666}

/* ===== Team member ↔ business ownership linkage ===== */
.owns-block{max-width:680px;margin:18px auto 0;padding:14px 18px;background:#f4f7f8;border:1px solid #dde6e8;border-radius:12px;text-align:left}
.owns-block__label{display:block;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#2c6e7f;margin-bottom:8px}
.owns-block__chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.owns-block__lead{font-size:.85rem;color:#555;font-weight:700}
.owns-chip{display:inline-block;padding:5px 12px;background:#fff;border:1px solid #cfdde0;border-radius:999px;text-decoration:none;color:#13434c;font-size:.86rem;font-weight:600}
.owns-chip:hover{background:#13434c;color:#fff;border-color:#13434c}
.owner-line{display:flex;align-items:center;gap:14px;margin:0 0 14px;padding:10px 14px;background:#f4f7f8;border-left:3px solid #2c6e7f;border-radius:6px;font-size:.95rem;color:#333;text-align:left}
.owner-line p{margin:0}
.owner-line a{color:#13434c}
.owner-line__avatar{flex:0 0 auto;line-height:0}

/* Team member headshots */
.team-avatar{display:block;border-radius:50%;object-fit:cover;object-position:center top;background:#e7eef0}
.team-avatar--inline,.owner-line__avatar .team-avatar{width:56px;height:56px}
.team-avatar-wrap{display:flex;justify-content:center;margin:0 auto 18px}
.team-avatar--hero{width:132px;height:132px;border:4px solid #fff;box-shadow:0 6px 24px rgba(12,30,34,.22)}

/* About-page team grid */
.team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:22px;margin:26px 0 8px}
.team-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:18px 12px;background:#fff;border:1px solid #e3eaec;border-radius:14px;text-decoration:none;color:inherit;transition:transform .15s ease,box-shadow .15s ease}
.team-card:hover{transform:translateY(-4px);box-shadow:0 10px 28px rgba(12,30,34,.14)}
.team-card__avatar{width:104px;height:104px;border-radius:50%;object-fit:cover;object-position:center top;margin-bottom:6px}
.team-card__avatar--initials{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#2c6e7f,#13434c);color:#fff;font-weight:800;font-size:1.9rem;letter-spacing:.02em}
.team-card__name{font-weight:800;color:#13434c}
.team-card__role{font-size:.85rem;color:#2c6e7f;font-weight:700}
.team-card__biz{font-size:.8rem;color:#667}

/* Face-safe crop: photo thumbnails in teasers/cards/originals favor the upper-middle
   (faces are usually in the top half) instead of dead-center which cuts heads off.
   Logos are unaffected (they use .article-card__logo / object-fit:contain). */
.original__img img, .feed-card__img img, .listing-card__photo img,
.article-card__photo img, .home-feature__img img, .preview-card__img img {
  object-position: center 25% !important;
}

/* Gallery images: same face-safe crop as heroes/cards — keep heads in frame. */
.article-gallery__item img, .gallery__item img { object-position: center 25% !important; }
/* who-we-support nonprofit cards: match business-directory logo treatment for consistency */
.nonprofit-card__logo{display:flex;align-items:center;justify-content:center;height:120px;padding:10px;background:#fff;border-radius:10px;margin-bottom:12px}
.nonprofit-card__logo img{max-width:100%;max-height:100%;object-fit:contain}
.nonprofit-card__logo--wide{height:90px}


/* Article hero parallax (hero.json {"parallax":true}) — fixed bg scroll effect */
.article-hero-image--parallax{
  height:clamp(320px,46vh,520px); max-width:1200px; margin:0 auto 32px;
  background-size:cover; background-repeat:no-repeat;
  background-attachment:fixed; border-radius:var(--radius-md,8px);
  display:flex; align-items:flex-end;
}
.article-hero-image--parallax figcaption{
  width:100%; margin:0; padding:14px 18px; color:#fff;
  background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.55) 100%);
  border-radius:0 0 var(--radius-md,8px) var(--radius-md,8px); text-align:left;
}
@media (max-width:768px){ .article-hero-image--parallax{ background-attachment:scroll; height:300px; } }

/* who-we-support card cover photo (org hero_photo) — used instead of the logo box */
.article-card__cover{width:100%;height:170px;border-radius:var(--radius-md,8px);overflow:hidden;margin:0 0 14px;background:#eee}
.article-card__cover img{width:100%;height:100%;object-fit:cover;object-position:center 30%;display:block}

/* Article-embedded video (e.g. CityFest highlight reel) */
.article-video{margin:28px 0;max-width:var(--maxw-narrow,760px);margin-left:auto;margin-right:auto}
.article-video video{width:100%;height:auto;background:#000;box-shadow:0 6px 24px rgba(12,30,34,.18)}
.article-video figcaption{margin-top:8px;font-size:.85rem;color:var(--ink-soft,#667);text-align:center;font-style:italic}
