/* proto/landing-style.css — production landing for blogs.karibucamps.com.
   Adventure-glass register: forest-green glassmorphic hero, then a Karibu cream
   (or dark) body for the journal grid + storytelling stats + closing band.
   Loaded by views/landing.ejs after /styles.css (Karibu site header) and
   /blog-home-style.css (which carries the :root tokens + theme toggle styles). */

/* ============================================================
   § LANDING TOKENS
   The body+card surfaces flip per [data-theme]. Hero green gradient
   stays the same in both themes — that's the template signature.
   ============================================================ */
:root, [data-theme="light"] {
  --lp-bg:          #f6f1ea;
  --lp-bg-2:        #ece5d8;                       /* deeper cream for closing band */
  --lp-card:        #ffffff;
  --lp-card-2:      rgba(0,0,0,0.025);             /* hover surface tint */
  --lp-ink:         #1d1d1b;
  --lp-ink-soft:    #5f5b54;
  --lp-ink-mute:    #8a857c;
  --lp-rule:        rgba(29,29,27,0.10);
  --lp-rule-2:      rgba(29,29,27,0.16);
  --lp-shadow:      0 24px 48px -16px rgba(29,29,27,0.10);
}
[data-theme="dark"] {
  --lp-bg:          #1a1a17;                       /* matches bh-foot exactly */
  --lp-bg-2:        #0d0d0c;
  --lp-card:        #22221e;
  --lp-card-2:      rgba(255,255,255,0.03);
  --lp-ink:         #f4f0e8;
  --lp-ink-soft:    #c7c0b1;
  --lp-ink-mute:    #8a8478;
  --lp-rule:        rgba(244,240,232,0.10);
  --lp-rule-2:      rgba(244,240,232,0.18);
  --lp-shadow:      0 24px 48px -12px rgba(0,0,0,0.45);
}
:root {
  /* Hero tokens — same in both themes. */
  --lp-grad:        radial-gradient(ellipse at top right, rgba(196,154,108,0.40) 0%, transparent 40%),
                    radial-gradient(ellipse at bottom left, rgba(196,154,108,0.22) 0%, transparent 45%),
                    linear-gradient(135deg, #1F4538 0%, #2C4A3E 40%, #3F6B5E 100%);
  --lp-glass-bg:        rgba(255,255,255,0.08);
  --lp-glass-bg-strong: rgba(255,255,255,0.14);
  --lp-glass-border:    rgba(255,255,255,0.20);
  --lp-fg-white:        #ffffff;
  --lp-fg-soft:         rgba(255,255,255,0.78);
  --lp-fg-muted:        rgba(255,255,255,0.55);

  --lp-gold:        #c49a6c;
  --lp-gold-bright: #d4ad7e;
  --lp-gold-soft:   #e3c39f;
  --lp-gold-dim:    #8b6f4b;

  --lp-serif:       "Cormorant Garamond","Hoefler Text",Garamond,serif;
  --lp-sans:        Helvetica,Arial,sans-serif;
  --lp-mono:        "Geist Mono",ui-monospace,monospace;
  --lp-ease:        cubic-bezier(0.23, 1, 0.32, 1);
  --lp-card-radius: 28px;
  --lp-chip-radius: 16px;
}

html, body {
  background: var(--lp-bg);
  color: var(--lp-ink);
  transition: background 280ms var(--lp-ease), color 280ms var(--lp-ease);
}

/* ============================================================
   § HERO (forest-green glassmorphic)
   1.05fr / 1fr · visual-left 4:5 portrait · content-right
   ============================================================ */
.hero {
  background: var(--lp-grad);
  color: var(--lp-fg-white);
  padding: 56px 0 96px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--lp-card-radius);
  overflow: hidden;
  isolation: isolate;
}
.hero-visual img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: saturate(0.95);
}
.hero-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(31,69,56,0.55));
  pointer-events: none;
}
.hero-chip-overlay {
  position: absolute;
  top: 24px; left: 24px;
  background: var(--lp-glass-bg-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--lp-glass-border);
  padding: 12px 18px;
  border-radius: var(--lp-chip-radius);
  display: flex; align-items: center; gap: 12px;
  max-width: 240px;
}
.hero-chip-overlay .avatar-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lp-gold-soft), var(--lp-gold));
  flex-shrink: 0;
}
.hero-chip-overlay .chip-text { font-size: 13px; line-height: 1.3; }
.hero-chip-overlay .chip-title { font-weight: 600; color: var(--lp-fg-white); }
.hero-chip-overlay .chip-sub { color: var(--lp-fg-soft); font-size: 11px; margin-top: 2px; letter-spacing: 0.02em; }

.hero-content { padding-left: 8px; }
.hero-kicker {
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--lp-gold-soft);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: var(--lp-serif);
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--lp-fg-white);
}
.hero-content h1 em {
  font-style: italic;
  color: var(--lp-gold-soft);
  font-weight: 400;
}
.hero-content .dek {
  font-size: 16px;
  color: var(--lp-fg-soft);
  max-width: 44ch;
  line-height: 1.6;
  margin: 0 0 32px;
}

/* Glassmorphic search bar — real input, filters .story-card live as you type.
   The little JS that drives the filter is at the bottom of views/landing.ejs. */
.search-bar {
  background: var(--lp-glass-bg-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--lp-glass-border);
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 540px;
  transition: border-color 220ms var(--lp-ease), background 220ms var(--lp-ease);
}
.search-bar:focus-within {
  border-color: rgba(255,255,255,0.40);
  background: rgba(255,255,255,0.18);
}
.search-icon {
  display: inline-flex;
  color: var(--lp-fg-soft);
  flex-shrink: 0;
}
.search-bar input[type="search"] {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--lp-fg-white);
  font-family: var(--lp-sans);
  font-size: 16px;        /* >=16px on mobile prevents iOS focus-zoom */
  font-weight: 300;
  padding: 12px 0;
  letter-spacing: 0.005em;
  -webkit-appearance: none;
          appearance: none;
}
.search-bar input[type="search"]::placeholder {
  color: var(--lp-fg-muted);
  font-style: italic;
}
.search-bar input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 18px; width: 18px;
  background: var(--lp-fg-muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round'><path d='M6 6l12 12M6 18L18 6'/></svg>") center / 14px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round'><path d='M6 6l12 12M6 18L18 6'/></svg>") center / 14px no-repeat;
  cursor: pointer;
}
.search-btn {
  background: var(--lp-fg-white);
  color: #1d1d1b;
  padding: 11px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 200ms var(--lp-ease), transform 160ms var(--lp-ease);
  flex-shrink: 0;
}
.search-btn:hover  { background: var(--lp-gold-soft); }
.search-btn:active { transform: scale(0.97); }

/* Empty-state message when search filters everything out. JS un-hides it. */
.search-empty {
  margin: 32px auto 0;
  max-width: 60ch;
  text-align: center;
  font-family: var(--lp-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--lp-ink-soft);
}

/* ============================================================
   § SECTION shell (stories + storytelling)
   ============================================================ */
.section {
  padding: 96px 32px 56px;
  max-width: 1280px;
  margin: 0 auto;
  color: var(--lp-ink);
}
.section-tight { padding-top: 0; padding-bottom: 80px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}
.section-eyebrow {
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--lp-gold);
  margin: 0 0 12px;
}
.section-head h2 {
  font-family: var(--lp-serif);
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.05;
  color: var(--lp-ink);
  margin: 0;
}
.section-head h2 em { font-style: italic; color: var(--lp-gold); font-weight: 400; }
.view-all-link {
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lp-ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--lp-gold);
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms var(--lp-ease);
}
.view-all-link:hover { color: var(--lp-gold); }
.entries-count {
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lp-ink-mute);
}

/* ============================================================
   § STORIES grid (DB-driven cards using the linked-card pattern)
   ============================================================ */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.story-card {
  position: relative;             /* so the .story-link overlay covers the whole card */
  background: var(--lp-card);
  border: 1px solid var(--lp-rule);
  border-radius: 20px;
  padding: 14px;
  transition: transform 250ms var(--lp-ease), box-shadow 250ms var(--lp-ease), border-color 250ms var(--lp-ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lp-shadow);
  border-color: var(--lp-rule-2);
}
.story-link {
  position: absolute; inset: 0;
  z-index: 1;
  border-radius: inherit;
}
/* The img/body/foot all sit visually inside the card; the overlay is z-index 1
   so the whole card is clickable via the hidden anchor. */
.story-img-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--lp-card-2);
}
.story-img-wrap img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95); transition: transform 400ms var(--lp-ease); }
.story-card:hover .story-img-wrap img { transform: scale(1.03); }
.story-img-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--lp-card-2), var(--lp-rule)); }

.tag-chip {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.96);
  color: #1d1d1b;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--lp-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
  max-width: calc(100% - 70px);    /* leaves room for the read-chip */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}
.tag-chip svg { color: var(--lp-gold); width: 11px; height: 11px; flex-shrink: 0; }
.read-chip {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(29,29,27,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 7px 14px;
  border-radius: 10px;
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  z-index: 2;
}

.story-body { padding: 22px 12px 8px; }
.story-body h3 {
  font-family: var(--lp-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--lp-ink);
  margin: 0 0 8px;
  /* Clamp at 2 lines so long titles like "Matriarchal Magic: What the 1993
     Tarangire Drought Teaches Us About Elephant Survival" don't blow out the
     card height. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-body .meta {
  font-family: var(--lp-mono);
  font-size: 10.5px;
  color: var(--lp-ink-mute);
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.story-foot {
  margin-top: auto;
  padding: 16px 12px 4px;
  border-top: 1px solid var(--lp-rule);
  display: flex; align-items: center; justify-content: flex-end;
}
.story-cta {
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lp-ink);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 200ms var(--lp-ease);
}
.story-cta svg { transition: transform 200ms var(--lp-ease); }
.story-card:hover .story-cta { color: var(--lp-gold); }
.story-card:hover .story-cta svg { transform: translateX(3px); }

/* ============================================================
   § STORYTELLING (asymmetric stat panel)
   ============================================================ */
.storytelling-section { padding: 56px 32px 96px; max-width: 1280px; margin: 0 auto; color: var(--lp-ink); }
.storytelling-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.story-card-tall {
  background: var(--lp-card);
  border: 1px solid var(--lp-rule);
  border-radius: 20px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.story-illustration {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
}
.story-illustration img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95); }
.story-illustration::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(29,29,27,0.50));
  pointer-events: none;
}
.story-illustration .caption {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  color: #fff;
  font-family: var(--lp-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.stat-stack { display: flex; flex-direction: column; gap: 20px; }
.stat-card {
  flex: 1;
  background: var(--lp-card);
  border: 1px solid var(--lp-rule);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.stat-card-text { display: flex; flex-direction: column; }
.stat-numeral {
  font-family: var(--lp-serif);
  font-size: 50px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--lp-ink);
}
.stat-numeral em { font-style: italic; color: var(--lp-gold); font-weight: 500; }
.stat-label {
  font-family: var(--lp-mono);
  font-size: 11px;
  color: var(--lp-ink-mute);
  margin-top: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.stat-icon {
  width: 58px; height: 58px;
  background: rgba(196, 154, 108, 0.13);
  border-radius: 14px;
  display: grid; place-items: center;
  color: var(--lp-gold);
  flex-shrink: 0;
}

.story-portrait {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
}
.story-portrait img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95); }
.stat-overlay {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  background: rgba(29,29,27,0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 18px 22px;
  color: #fff;
}
.stat-overlay .stat-numeral {
  color: #fff;
  font-size: 38px;
}
.stat-overlay .stat-numeral em { color: var(--lp-gold-soft); }
.stat-overlay .stat-label {
  color: rgba(255,255,255,0.78);
  margin-top: 6px;
  letter-spacing: 0.20em;
}

/* ============================================================
   § CLOSING BAND
   ============================================================ */
.closing-band {
  background: var(--lp-bg-2);
  border-top: 1px solid var(--lp-rule);
  border-bottom: 1px solid var(--lp-rule);
  padding: 64px 32px;
  color: var(--lp-ink);
  transition: background 280ms var(--lp-ease);
}
.closing-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.closing-text { max-width: 56ch; }
.closing-text .eyebrow {
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--lp-gold);
  margin: 0 0 10px;
}
.closing-text h3 {
  font-family: var(--lp-serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--lp-ink);
  margin: 0 0 10px;
}
.closing-text h3 em { font-style: italic; color: var(--lp-gold); font-weight: 400; }
.closing-text .sub {
  font-size: 14.5px;
  color: var(--lp-ink-soft);
  line-height: 1.6;
  margin: 0;
}
.closing-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-filled {
  background: var(--lp-gold);
  color: #fff;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 220ms var(--lp-ease), transform 160ms var(--lp-ease);
}
.btn-filled:hover { background: var(--lp-gold-bright); }
.btn-filled:active { transform: scale(0.97); }
.btn-ghost {
  background: transparent;
  color: var(--lp-ink);
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--lp-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--lp-rule-2);
  text-decoration: none;
  transition: border-color 220ms var(--lp-ease), color 220ms var(--lp-ease), transform 160ms var(--lp-ease);
}
.btn-ghost:hover { border-color: var(--lp-gold); color: var(--lp-gold); }
.btn-ghost:active { transform: scale(0.97); }

/* ============================================================
   § RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .stories-grid { grid-template-columns: 1fr 1fr; }
  .stories-grid .story-card:nth-child(3) { grid-column: 1 / -1; }
  .storytelling-grid { grid-template-columns: 1fr 1fr; }
  .story-card-tall { grid-column: 1 / -1; }
  .story-card-tall .story-illustration { aspect-ratio: 16/9; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 0; }
  .hero-visual { aspect-ratio: 4/3; }
  .hero-chip-overlay { top: 18px; left: 18px; }
  .section, .storytelling-section { padding-left: 24px; padding-right: 24px; }
  .closing-band { padding: 56px 24px; }
}
@media (max-width: 700px) {
  .stories-grid, .storytelling-grid { grid-template-columns: 1fr; }
  .stories-grid .story-card:nth-child(3) { grid-column: auto; }
  .story-card-tall { grid-column: auto; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .closing-inner { flex-direction: column; align-items: flex-start; }
  .browse-bar { flex-wrap: wrap; }
  .browse-divider { display: none; }
}
