@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --sediment-950: #150f0a;
  --sediment-900: #1c140d;
  --sediment-850: #241a11;
  --sediment-800: #2d2015;
  --sediment-700: #3a2a1a;
  --bone-100: #f4ecd8;
  --bone-200: #e8dcc0;
  --bone-400: #c9b791;
  --bone-600: #93826333;
  --amber-400: #e3a44a;
  --amber-500: #d98e34;
  --amber-600: #b3701f;
  --teal-400: #6fb3ac;
  --teal-500: #3f8b83;
  --teal-600: #2a615c;
  --rust-500: #c05a3a;
  --rust-600: #a1462a;
  --line: rgba(244, 236, 216, 0.14);
  --line-soft: rgba(244, 236, 216, 0.08);
  --font-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sediment-950);
  color: var(--bone-100);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(217,142,52,0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(63,139,131,0.10), transparent 55%);
  background-attachment: fixed;
}

a { color: var(--amber-400); }
a:hover { color: var(--amber-500); }

.container { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 980px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  background: rgba(21, 15, 10, 0.88);
  backdrop-filter: blur(8px);
  z-index: 50;
}
.brand { text-decoration: none; color: var(--bone-200); font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em; }
.lang-switch { display: flex; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.78rem; }
.lang-btn { color: var(--bone-400); text-decoration: none; padding: 0.2rem 0.5rem; border-radius: 4px; }
.lang-btn.active { color: var(--amber-400); border: 1px solid var(--line); }
.lang-btn:hover { color: var(--amber-400); }

/* Hero */
.hero-scene {
  position: relative;
  padding: 4rem 0 2.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.hero-scene::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 420px at 50% 120%, rgba(63,139,131,0.16), transparent 70%);
  pointer-events: none;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 1.1rem;
  position: relative;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  color: var(--bone-100);
  position: relative;
}
.hero-title em { font-style: italic; color: var(--amber-400); font-weight: 500; }
.hero-deck {
  font-size: 1.14rem;
  line-height: 1.62;
  color: var(--bone-200);
  max-width: 62ch;
  margin: 0 0 2.2rem;
  position: relative;
}
.hero-deck strong { color: var(--bone-100); font-weight: 600; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.stat-box { background: var(--sediment-900); padding: 1.1rem 1.2rem; }
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--amber-400);
  line-height: 1.1;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.stat-value.teal { color: var(--teal-400); }
.stat-value.rust { color: var(--rust-500); }
.stat-label { font-size: 0.82rem; color: var(--bone-400); line-height: 1.4; }

/* island silhouette svg */
.island-map { width: 100%; height: auto; display: block; margin: 2.2rem 0 0; opacity: 0.9; }

/* Sections */
section.block { padding: 3.2rem 0; border-bottom: 1px solid var(--line-soft); }
section.block:last-of-type { border-bottom: none; }
.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-400);
  margin-bottom: 0.7rem;
}
h2.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.22;
  color: var(--bone-100);
  margin: 0 0 1.2rem;
  max-width: 26ch;
}
.prose p { margin: 0 0 1.15rem; color: var(--bone-200); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--bone-100); font-weight: 600; }
.prose em { color: var(--amber-400); font-style: italic; }
.prose h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--bone-100);
  margin: 2.1rem 0 0.8rem;
}
.prose h3:first-child { margin-top: 0; }

.pull {
  border-left: 3px solid var(--amber-500);
  padding: 0.2rem 0 0.2rem 1.2rem;
  margin: 1.6rem 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--bone-100);
  font-style: italic;
}

/* Tool: balanța insulei */
.tool {
  background: linear-gradient(180deg, var(--sediment-900), var(--sediment-850));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 1.6rem 2rem;
}
.tool-head { margin-bottom: 1.6rem; }
.tool-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--bone-100);
  margin: 0 0 0.5rem;
}
.tool-desc { color: var(--bone-400); font-size: 0.95rem; max-width: 58ch; margin: 0; }

.species-row { padding: 1.5rem 0; border-top: 1px solid var(--line-soft); }
.species-row:first-of-type { border-top: none; padding-top: 0.4rem; }
.species-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.species-name { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.18rem; color: var(--bone-100); }
.species-name .common { font-style: normal; font-family: var(--font-body); font-size: 0.92rem; color: var(--bone-400); display: block; margin-top: 0.1rem; }

.toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.toggle button {
  background: transparent;
  border: none;
  color: var(--bone-400);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}
.toggle button.active { background: var(--amber-500); color: var(--sediment-950); font-weight: 600; }
.toggle button:focus-visible { outline: 2px solid var(--teal-400); outline-offset: -2px; }

.bar-track {
  position: relative;
  height: 34px;
  background: var(--sediment-800);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.bar-fill {
  position: absolute; inset: 0 auto 0 0;
  height: 100%;
  border-radius: 6px;
  background: var(--amber-500);
  transition: width 0.55s cubic-bezier(.4,0,.2,1), background-color 0.4s;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.6rem;
}
.bar-fill.state-mainland { background: var(--teal-500); }
.bar-fill span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sediment-950);
  white-space: nowrap;
}
.bar-human {
  position: absolute; top: 0; bottom: 0;
  width: 2px;
  background: rgba(244,236,216,0.55);
}
.bar-human::after {
  content: attr(data-label);
  position: absolute;
  top: -1.15rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--bone-400);
  white-space: nowrap;
}
.species-readout {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--bone-200);
  line-height: 1.5;
}
.species-readout strong { color: var(--amber-400); }
.species-note { font-size: 0.86rem; color: var(--bone-400); margin-top: 0.6rem; max-width: 60ch; }

.tool-foot {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.84rem;
  color: var(--bone-400);
}

/* Timeline / discovery */
.timeline { margin: 1.6rem 0 0; padding: 0; list-style: none; }
.timeline li {
  position: relative;
  padding: 0 0 1.4rem 1.6rem;
  border-left: 1px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute; left: -4.5px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber-500);
}
.timeline .year { font-family: var(--font-mono); font-size: 0.8rem; color: var(--amber-400); display: block; margin-bottom: 0.25rem; }
.timeline p { margin: 0; color: var(--bone-200); }

/* Sources */
.sources-list { margin: 0; padding: 0; list-style: none; }
.sources-list li { padding: 0.85rem 0; border-top: 1px solid var(--line-soft); font-size: 0.92rem; color: var(--bone-300, var(--bone-200)); }
.sources-list li:first-child { border-top: none; }
.sources-list .src-what { color: var(--bone-400); font-size: 0.86rem; display: block; margin-top: 0.2rem; }
.status-note {
  font-size: 0.86rem;
  color: var(--bone-400);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-top: 1.4rem;
}

/* Footer */
.site-footer {
  padding: 2.4rem 1.5rem 3.2rem;
  text-align: center;
  color: var(--bone-400);
  font-size: 0.86rem;
}
.footer-links { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-top: 0.7rem; }
.footer-links a { color: var(--bone-400); text-decoration: none; }
.footer-links a:hover { color: var(--amber-400); }

.action-btn {
  display: inline-block;
  background: var(--amber-500);
  color: var(--sediment-950);
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill { transition: none; }
}

@media (max-width: 640px) {
  .hero-scene { padding: 2.6rem 0 2rem; }
  section.block { padding: 2.4rem 0; }
  .species-head { flex-direction: column; align-items: flex-start; }
  .tool { padding: 1.4rem 1.1rem 1.6rem; }
}
