/* =============================================
   WORLD ECHO — EARTH EDITION DESIGN SYSTEM
============================================= */
:root {
  --parchment: #f4edd8;
  --parchment-mid: #eae0c8;
  --parchment-dark: #d8ccaf;
  --bark: #8b6b4a;
  --bark-light: #c4a882;
  --bark-dark: #5c4228;
  --ink: #1a120a;
  --ink-mid: #3a2a18;
  --ink-soft: #6b5038;
  --ink-faint: #a08a6a;
  --green: #7ea869;
  --green-dark: #5a8248;
  --green-deep: #3d6032;
  --green-light: #e6f2dc;
  --green-muted: #a8c490;
  --blue: #67aad5;
  --blue-dark: #4a85ad;
  --blue-deep: #2e607f;
  --blue-light: #dcf0fa;
  --biomed: #3a7a5c;
  --biomed-light: #dff0e8;
  --white: #fdfaf4;
  --rule: rgba(139, 107, 74, 0.25);
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --max-w: 1200px;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow-sm: 0 2px 16px rgba(26, 18, 10, 0.07);
  --shadow-md: 0 8px 40px rgba(26, 18, 10, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-head);
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p { color: var(--ink-mid); font-size: 0.95rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-ui); }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bark);
}
.eyebrow.green { color: var(--green-dark); }
.eyebrow.blue { color: var(--blue-dark); }
.eyebrow.biomed { color: var(--biomed); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--green-light);
  color: var(--green-dark);
  margin-right: 5px;
  margin-bottom: 4px;
}
.tag.blue { background: var(--blue-light); color: var(--blue-dark); }
.tag.earth { background: var(--parchment-dark); color: var(--bark-dark); }
.tag.biomed { background: var(--biomed-light); color: var(--biomed); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 36px; }
.container-narrow { max-width: 740px; margin: 0 auto; padding: 0 36px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }

.rule-h { height: 1px; background: var(--rule); border: none; }
.thick-rule {
  width: 48px;
  height: 3px;
  background: var(--green);
  border: none;
  border-radius: 2px;
  margin: 16px 0 28px;
}
.thick-rule.blue { background: var(--blue); }
.thick-rule.earth { background: var(--bark); }
.thick-rule.biomed { background: var(--biomed); }
.thick-rule.center { margin-left: auto; margin-right: auto; }

.section-label { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.section-label::before, .section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-label::before { flex: 0 0 40px; }
.section-label span {
  font-family: var(--font-ui);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.pull-quote {
  border-left: 3px solid var(--bark);
  padding: 14px 24px;
  margin: 32px 0;
  background: var(--parchment-mid);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.pull-quote p {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
}
.pull-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--bark);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 24px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.22s;
}
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(126, 168, 105, 0.4); }
.btn-blue { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-earth { background: var(--bark); color: white; }
.btn-earth:hover { background: var(--bark-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--green-dark); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green-light); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--parchment-dark); }
.btn-ghost:hover { border-color: var(--bark-light); color: var(--ink); }
.btn-biomed { background: var(--biomed); color: white; }
.btn-biomed:hover { background: #2a5a42; transform: translateY(-1px); }

.card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.28s, box-shadow 0.28s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.card-img .img-fill { width: 100%; height: 100%; }
.card:hover .card-img .img-fill { transform: scale(1.04); transition: transform 0.5s; }
.card-body { padding: 22px; }
.card-body h3 { font-size: 1.05rem; margin: 8px 0; line-height: 1.3; }
.card-body p { font-size: 0.83rem; line-height: 1.6; }
.card-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-size: 0.7rem; color: var(--ink-faint); margin-top: 12px; }
.card-meta strong { color: var(--ink-soft); }
.card-article { border-top: 3px solid var(--green); }
.card-interview { border-top: 3px solid var(--blue); }
.card-biomed { border-top: 3px solid var(--biomed); }

.img-earth { background: linear-gradient(145deg, #d4b896, #a07850, #6b4c28); }
.img-green { background: linear-gradient(145deg, #b8d4a8, #7ea869, #4a6a34); }
.img-blue { background: linear-gradient(145deg, #b8d8e8, #67aad5, #3a78a8); }
.img-teal { background: linear-gradient(145deg, #a8d0c0, #5aa880, #2a6a4a); }
.img-warm { background: linear-gradient(145deg, #d8c0a0, #b09070, #805040); }
.img-sky { background: linear-gradient(145deg, #c8dce8, #88b8d0, #487898); }
.img-moss { background: linear-gradient(145deg, #c0c8a0, #889860, #506030); }
.img-sienna { background: linear-gradient(145deg, #d8b0a0, #b08070, #804840); }

/* ============ HEADER ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 237, 216, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--parchment-dark);
  transition: box-shadow 0.3s;
}
#site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; cursor: pointer; flex-shrink: 0; }
.logo-mark svg { width: 42px; height: 42px; }
.logo-text { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; line-height: 1.1; }
.logo-text em { color: var(--green); font-style: normal; }
.logo-sub { font-family: var(--font-ui); font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a, .nav-links button {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 20px;
  background: none;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links button:hover { color: var(--ink); background: var(--parchment-dark); }
.nav-links a.active, .nav-links button.active { color: var(--green-dark); background: var(--green-light); font-weight: 600; }
.nav-links .nav-biomed a, .nav-links .nav-biomed button { color: var(--biomed); }
.nav-links .nav-biomed a.active, .nav-links .nav-biomed a:hover, .nav-links .nav-biomed button.active, .nav-links .nav-biomed button:hover { background: var(--biomed-light); }
.header-cta { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600; padding: 8px 20px; background: var(--ink); color: var(--parchment); border-radius: 24px; border: none; transition: all 0.2s; letter-spacing: 0.04em; }
.header-cta:hover { background: var(--ink-mid); transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; z-index: 201; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: all 0.3s; }

/* ============ FOOTER ============ */
.site-footer { background: var(--ink); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.footer-brand .logo-text { color: white; }
.footer-brand .logo-text em { color: var(--green-muted); }
.footer-brand p { color: rgba(255, 255, 255, 0.4); font-size: 0.84rem; line-height: 1.7; margin-top: 12px; max-width: 260px; font-family: var(--font-body); }
.footer-brand a { color: var(--green-muted); font-size: 0.82rem; font-weight: 500; margin-top: 14px; display: block; font-family: var(--font-ui); }
.footer-col h5 { font-family: var(--font-ui); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.3); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { color: rgba(255, 255, 255, 0.5); font-family: var(--font-ui); font-size: 0.83rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: white; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; font-family: var(--font-ui); font-size: 0.72rem; color: rgba(255, 255, 255, 0.25); }
.footer-bottom a { color: rgba(255, 255, 255, 0.35); transition: color 0.2s; }
.footer-bottom a:hover { color: white; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ UTILITIES ============ */
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; }
.text-center { text-align: center; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  #site-header {
    backdrop-filter: none; /* Removed to fix mobile fixed menu containing block issue */
  }
  .hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: fixed;
    inset: 66px 0 0;
    background: var(--parchment);
    flex-direction: column;
    padding: 24px 32px;
    gap: 6px;
    z-index: 200;
    border-top: 1px solid var(--parchment-dark);
    overflow-y: auto;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a,
  .nav-links button {
    font-size: 1rem;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
  }
  .header-cta {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  /* Hamburger 'X' Animation */
  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
@media (max-width: 600px) {
  .container,
  .container-narrow {
    padding: 0 18px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
