/* apa-de-la-herculane — thermal springs identity */
:root {
  --paper: #faf6ee;
  --paper-2: #f3ecdd;
  --ink: #1d2a26;
  --ink-soft: #43534d;
  --line: #ddd2bd;
  --accent: #0e5f5c;
  --accent-ink: #0b4a48;
  --sulphur: #b07d10;
  --sulphur-soft: #f5e6c4;
  --card: #fffdf7;
  --bar: rgba(250, 246, 238, 0.94);
  --shadow: 0 1px 0 rgba(29, 42, 38, 0.08), 0 12px 32px -18px rgba(29, 42, 38, 0.35);
  --topbar-h: 3rem;
  --radius: 14px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Fraunces", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[data-theme="dark"] {
  --paper: #101816;
  --paper-2: #16211e;
  --ink: #e9e4d6;
  --ink-soft: #b3b3a6;
  --line: #2c3a35;
  --accent: #5fc2b6;
  --accent-ink: #8fd8cd;
  --sulphur: #e0a93e;
  --sulphur-soft: #2a2413;
  --card: #141d1b;
  --bar: rgba(16, 24, 22, 0.94);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/apa-de-la-herculane/assets/fonts/fraunces-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/apa-de-la-herculane/assets/fonts/fraunces-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/apa-de-la-herculane/assets/fonts/source-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/apa-de-la-herculane/assets/fonts/source-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}
section[id], header[id] { scroll-margin-top: calc(var(--topbar-h) + 0.75rem); }
a { color: var(--accent-ink); }
html[data-theme="dark"] a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--sulphur); outline-offset: 2px; border-radius: 4px; }

/* ── Topbar (house pattern) ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--topbar-h);
  padding: 0 0.9rem;
  background: var(--bar);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.85rem;
  white-space: nowrap;
}
.topbar .home { color: var(--ink); text-decoration: none; font-weight: 600; }
.topnav { display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}
.topnav a[aria-current="true"] { background: var(--paper-2); color: var(--ink); }
.topbar .spacer { flex: 1 1 auto; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }

/* ── Layout ── */
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.wide { max-width: 62rem; }
.hero {
  padding: 3.2rem 0 2rem;
  background:
    radial-gradient(60rem 22rem at 85% -6rem, var(--sulphur-soft), transparent 60%),
    linear-gradient(180deg, var(--paper-2), var(--paper) 70%);
  border-bottom: 1px solid var(--line);
}
.kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sulphur);
  margin: 0 0 0.9rem;
}
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.deck { font-size: 1.22rem; line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 40rem; }
.deck strong { color: var(--ink); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}
.stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}
.stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-ink);
  line-height: 1.15;
}
html[data-theme="dark"] .stats b { color: var(--accent); }
.stats span { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4; display: block; margin-top: 0.2rem; }

.block { padding: 2.6rem 0; border-bottom: 1px solid var(--line); }
.block:last-of-type { border-bottom: 0; }
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  line-height: 1.2;
  margin: 0 0 1.2rem;
  text-wrap: balance;
}
h2 .anchor { color: inherit; text-decoration: none; }
h2 .anchor:hover { text-decoration: underline; text-decoration-color: var(--sulphur); text-underline-offset: 0.2em; }
.lede { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 1.4rem; }
.prose p { margin: 0 0 1.1rem; }
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 1rem;
}
.facts dt { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); padding-top: 0.25rem; }
.facts dd { margin: 0; }

/* ── Figures ── */
.fig { margin: 1.8rem 0; }
.fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.fig.portrait img { max-width: 26rem; margin: 0 auto; }
figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.7rem; line-height: 1.55; }
.cr { display: block; margin-top: 0.25rem; font-size: 0.78rem; }
.figpair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 46rem) { .figpair { grid-template-columns: 1fr; } }

/* ── Explorer (interaction) ── */
.explorer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin: 1.6rem 0;
}
.springs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.springs button {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  min-height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.springs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .springs button[aria-pressed="true"] { color: #08110f; }
.readout { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.readout h3 { font-family: var(--display); font-size: 1.4rem; margin: 0 0 0.2rem; }
.readout .temp { font-family: var(--display); font-size: 2.6rem; font-weight: 600; color: var(--accent-ink); line-height: 1; margin: 0.4rem 0 0.1rem; }
html[data-theme="dark"] .readout .temp { color: var(--accent); }
.readout .temprange { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); margin: 0 0 1rem; }
.meters { display: grid; gap: 0.55rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.meters li { display: grid; grid-template-columns: 7.5rem 1fr 5.5rem; align-items: center; gap: 0.7rem; font-family: var(--sans); font-size: 0.85rem; }
.meters .bar { height: 0.65rem; background: var(--paper-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.meters .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--sulphur)); border-radius: 999px; }
.meters .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.taste {
  background: var(--sulphur-soft);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 1.02rem;
  margin: 0;
}
.datanote { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft); margin: 0.9rem 0 0; }
.fallback-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 1.4rem 0; }
.fallback-table caption { text-align: left; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); padding-bottom: 0.6rem; }
.fallback-table th, .fallback-table td { border: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.fallback-table th:first-child, .fallback-table td:first-child { text-align: left; }
.fallback-table thead th { background: var(--paper-2); font-family: var(--sans); font-size: 0.78rem; }
html.js .fallback-table { display: none; }

/* ── Timeline & sources ── */
.timeline { list-style: none; margin: 1.6rem 0 0; padding: 0 0 0 1rem; border-left: 3px solid var(--accent); display: grid; gap: 0.9rem; }
.timeline li { padding-left: 0.8rem; }
.timeline .year { font-family: var(--sans); font-weight: 700; color: var(--accent-ink); margin-right: 0.6rem; white-space: nowrap; }
html[data-theme="dark"] .timeline .year { color: var(--accent); }
.srcs { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.7rem; font-size: 1rem; }
.srcs li { padding-left: 1.1rem; border-left: 3px solid var(--line); }
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 2.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.foot p { margin: 0; }
.foot a { color: inherit; }

@media (max-width: 30rem) {
  body { font-size: 1.05rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li:last-child { grid-column: 1 / -1; }
  .meters li { grid-template-columns: 5.5rem 1fr 4.6rem; }
  .explorer { padding: 1rem; }
}
