/* ================================================================
   GOBLIVITY — Shared Design System
   Color palette extracted from logo.png (green globe + wordmark).
   To retheme the entire site, edit the custom properties below.
   ================================================================ */

:root {
  /* ── Brand greens (logo-derived) ── */
  --c-50:   #f1f8e8;
  --c-100:  #d8eebc;
  --c-200:  #b8db88;
  --c-300:  #8dc43f;   /* logo light-green (text highlight) */
  --c-400:  #6aae25;   /* logo mid-green */
  --c-500:  #4e9419;
  --c-600:  #397a10;   /* logo dark-green */
  --c-700:  #276009;
  --c-800:  #184706;
  --c-900:  #0b2e03;

  --c-primary:       var(--c-400);
  --c-primary-light: var(--c-300);
  --c-primary-dark:  var(--c-700);
  --c-primary-tint:  var(--c-50);
  --c-primary-border: var(--c-200);

  /* ── Accent (warm gold — premium contrast) ── */
  --c-accent:       #c9a227;
  --c-accent-light: #e8c85a;

  /* ── Surfaces ── */
  --c-bg:      #f7faf4;
  --c-surface: #ffffff;
  --c-border:  #dde8d4;
  --c-border-light: #ecf4e6;

  /* ── Text ── */
  --c-text:        #182916;
  --c-text-sub:    #486044;
  --c-text-muted:  #869e82;
  --c-text-inverse: rgba(255, 255, 255, 0.92);

  /* ── Shadows ── */
  --shadow-sm:  0 1px 4px rgba(20, 45, 18, 0.09);
  --shadow-md:  0 4px 18px rgba(20, 45, 18, 0.12);
  --shadow-lg:  0 10px 40px rgba(20, 45, 18, 0.16);
  --shadow-xl:  0 20px 60px rgba(20, 45, 18, 0.20);

  /* ── Typography ── */
  --ff-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ff-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Spacing ── */
  --sp-1:  4px;  --sp-2:  8px;  --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* ── Layout ── */
  --max-w:  1200px;
  --nav-h:  100px;

  /* ── Radii ── */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* ── Motion ── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-slow: 400ms;
}

/* ================================================================
   RESET & BASE
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
button { font-family: var(--ff-sans); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* ── Section utility ── */
.section { padding: var(--sp-20) 0; }

/* ── Section labels / headings ── */
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--sp-3);
}

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: var(--sp-4);
}

.section-lead {
  font-size: 17px;
  color: var(--c-text-sub);
  line-height: 1.78;
}

/* ================================================================
   NAVIGATION
   ================================================================ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  transition:
    background var(--dur-slow) var(--ease),
    box-shadow var(--dur-slow) var(--ease);
}

.site-nav.is-solid {
  background: var(--c-surface);
  box-shadow: 0 1px 0 var(--c-border), var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  gap: var(--sp-4);
}

.nav-logo img {
  height: 84px;
  width: auto;
  flex-shrink: 0;
}

/* ── Desktop menu ── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a,
.nav-menu > li > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.93);
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition:
    color      var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
  letter-spacing: 0.01em;
  line-height: 1;
}

.site-nav.is-solid .nav-menu > li > a,
.site-nav.is-solid .nav-menu > li > button {
  color: var(--c-text);
}

.nav-menu > li > a:hover,
.nav-menu > li > button:hover,
.nav-menu > li > a.is-active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.site-nav.is-solid .nav-menu > li > a:hover,
.site-nav.is-solid .nav-menu > li > button:hover,
.site-nav.is-solid .nav-menu > li > a.is-active {
  background: var(--c-primary-tint);
  color: var(--c-600);
}

/* Chevron */
.nav-chevron {
  width: 12px;
  height: 12px;
  transition: transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.nav-menu > li:hover .nav-chevron { transform: rotate(180deg); }

/* ── Dropdown ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  padding: 6px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity    var(--dur-base) var(--ease),
    transform  var(--dur-base) var(--ease),
    visibility var(--dur-base);
}

/* Invisible bridge fills the 10px gap so hover doesn't drop when moving from button to dropdown */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-menu > li:hover .nav-dropdown,
.nav-menu > li:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
  display: block;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--c-text-sub);
  border-radius: var(--r-sm);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.nav-dropdown li a:hover {
  background: var(--c-primary-tint);
  color: var(--c-600);
}

/* ── Mobile burger ── */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.90);
  border-radius: 2px;
  transition: background var(--dur-base);
}

.site-nav.is-solid .nav-burger span { background: var(--c-text); }

/* ── Mobile panel ── */
.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  z-index: 899;
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-h));
  padding: var(--sp-3) var(--sp-4) var(--sp-10);
}

.mobile-panel.is-open { display: block; }

.mobile-panel a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--c-text-sub);
  border-radius: var(--r-md);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.mobile-panel a:hover {
  background: var(--c-primary-tint);
  color: var(--c-primary);
}

.mobile-group {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-text-muted);
  padding: 16px 16px 6px;
  margin-top: 8px;
  border-top: 1px solid var(--c-border);
}

.mobile-group:first-child { border-top: none; margin-top: 0; padding-top: 8px; }

/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  background: var(--c-primary-dark);
  color: var(--c-text-inverse);
  padding: var(--sp-16) 0 var(--sp-8);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-10);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: var(--sp-8);
}

.footer-brand img {
  height: 38px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
  margin-bottom: var(--sp-4);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.50);
  max-width: 280px;
}

.footer-col h5 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-col ul a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  transition: color var(--dur-fast);
}

.footer-col ul a:hover { color: var(--c-primary-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.30);
}

/* ================================================================
   PAGE HERO (inner pages — destination, café, reading)
   ================================================================ */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
  padding-bottom: var(--sp-12);
  height: 400px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 22, 8, 0.84) 0%,
    rgba(10, 22, 8, 0.44) 45%,
    rgba(10, 22, 8, 0.18) 100%
  );
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .section-tag   { color: var(--c-primary-light); }
.page-hero .section-title { color: #fff; font-size: clamp(32px, 5vw, 56px); margin-bottom: var(--sp-3); }
.page-hero .section-lead  { color: rgba(255,255,255,0.70); }

/* ================================================================
   TABS (shared)
   ================================================================ */

.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: var(--sp-8);
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}

.tab-btn:hover    { color: var(--c-text); }
.tab-btn.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

.tab-panel           { display: none; }
.tab-panel.is-active { display: block; }

/* ================================================================
   STORY CARDS (destination page)
   ================================================================ */

.story-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
  transition:
    box-shadow     var(--dur-base) var(--ease),
    border-color   var(--dur-base) var(--ease);
}

.story-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary-border);
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.story-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-600);
}

.story-date {
  font-size: 13px;
  color: var(--c-text-muted);
}

.story-text {
  font-size: 15px;
  line-height: 1.78;
  color: var(--c-text-sub);
  margin-bottom: var(--sp-4);
}

.story-images {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  margin-bottom: var(--sp-4);
  scrollbar-width: none;
}

.story-images::-webkit-scrollbar { display: none; }

.story-images img {
  width: 150px;
  height: 105px;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  transition: opacity var(--dur-fast);
}

.story-images img:hover { opacity: 0.88; }

.story-reactions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border-light);
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 5px 9px;
  border-radius: var(--r-sm);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.reaction-btn:hover {
  background: var(--c-primary-tint);
  color: var(--c-primary);
}

/* ================================================================
   BOOK CARDS (reading companion)
   ================================================================ */

.book-entry {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--c-border-light);
}

.book-entry:last-child { border-bottom: none; }

.book-cover {
  flex-shrink: 0;
  width: 64px;
  height: 90px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  letter-spacing: -0.02em;
}

.book-cover.green-1  { background: linear-gradient(135deg, #4e9419, #276009); }
.book-cover.green-2  { background: linear-gradient(135deg, #6aae25, #397a10); }
.book-cover.green-3  { background: linear-gradient(135deg, #8dc43f, #4e9419); }
.book-cover.slate    { background: linear-gradient(135deg, #3d5a4c, #1f3328); }
.book-cover.earth    { background: linear-gradient(135deg, #7a6040, #4a3820); }
.book-cover.teal     { background: linear-gradient(135deg, #2d7a6a, #1a4a3e); }

.book-info { flex: 1; min-width: 0; }

.book-title {
  font-family: var(--ff-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 3px;
}

.book-author {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2);
}

.book-reason {
  font-size: 14px;
  color: var(--c-text-sub);
  line-height: 1.65;
  margin-bottom: var(--sp-2);
}

.book-tag {
  display: inline-block;
  font-size: 11.5px;
  color: var(--c-600);
  background: var(--c-primary-tint);
  border: 1px solid var(--c-primary-border);
  border-radius: var(--r-full);
  padding: 3px 11px;
  margin-bottom: var(--sp-3);
}

.book-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-primary);
  padding: 6px 14px;
  border: 1px solid var(--c-primary-border);
  border-radius: var(--r-full);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}

.book-link:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

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

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 68px;
  }

  .nav-menu      { display: none; }
  .nav-burger    { display: flex; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .footer-brand { grid-column: auto; }

  .page-hero { height: 280px; padding-bottom: var(--sp-8); }
  .section   { padding: var(--sp-12) 0; }

  .book-cover { width: 54px; height: 76px; font-size: 18px; }
}

@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; text-align: center; }
  .story-images img { width: 120px; height: 85px; }
}
