/* FAVNica · Chinandega 2026
   Pacific-coast palette: deep teal, clay, palapa gold, cream */

:root {
  --teal: #0a353b;
  --teal-deep: #072428;
  --teal-mid: #14545c;
  --teal-soft: #1e6b74;
  --clay: #b54a2c;
  --clay-deep: #8c351e;
  --gold: #c9923a;
  --gold-soft: #e4c07a;
  --cream: #f6f0e4;
  --cream-2: #efe6d3;
  --paper: #fbf7ee;
  --white: #fffcf6;
  --ink: #1a1712;
  --ink-soft: #3d3830;
  --muted: #5c564c;
  --line: rgba(26, 23, 18, 0.12);
  --line-gold: rgba(201, 146, 58, 0.45);
  --header-h: 4.25rem;
  --max: 72rem;
  --text: 38rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px rgba(7, 36, 40, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html[lang="es"] {
  --quote-open: "«";
  --quote-close: "»";
}

body {
  margin: 0;
  font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--clay-deep);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--clay);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: var(--teal-deep);
  padding: 0.5rem 0.85rem;
  font-family: Figtree, system-ui, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 53, 59, 0.94);
  color: var(--cream);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(228, 192, 122, 0.22);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  line-height: 1.15;
}

.brand-kicker {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 0.12rem;
}

.brand-title {
  font-family: Fraunces, "Source Serif 4", serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 40, "WONK" 0.4;
}

.nav {
  display: flex;
  gap: 0.15rem 1.1rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0.02em;
}

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

.nav a {
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.88;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  color: var(--gold-soft);
  border-bottom-color: var(--gold);
}

.lang-toggle {
  display: flex;
  flex-shrink: 0;
  border: 1px solid rgba(228, 192, 122, 0.4);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 0.35rem;
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--teal-deep);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 52rem);
  color: var(--cream);
  background: var(--teal-deep);
  display: grid;
  align-items: end;
}

.hero-photo {
  position: absolute;
  inset: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 36, 40, 0.28) 0%, rgba(7, 36, 40, 0.15) 32%, rgba(7, 36, 40, 0.72) 72%, rgba(7, 36, 40, 0.92) 100%),
    linear-gradient(90deg, rgba(7, 36, 40, 0.35), transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5rem 0 2.4rem;
}

.kicker {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: Fraunces, "Source Serif 4", serif;
  font-weight: 560;
  font-size: clamp(2.15rem, 5.4vw, 4.35rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  max-width: 18ch;
  font-variation-settings: "SOFT" 50, "WONK" 0.7;
}

.hero-verse {
  margin: 0 0 1.15rem;
  padding: 0;
  max-width: 28rem;
  border: 0;
}

.hero-verse p {
  font-family: Fraunces, "Source Serif 4", serif;
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.35;
  color: var(--gold-soft);
  margin: 0 0 0.35rem;
}

.hero-verse cite {
  font-family: Figtree, system-ui, sans-serif;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.85;
}

.hosted-by {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  margin: -0.15rem 0 1rem;
}

.hero-rule {
  width: 4.5rem;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 0 0 1.1rem;
}

.hero-sub {
  font-size: 1.05rem;
  max-width: 38rem;
  color: var(--cream-2);
  margin: 0 0 1.5rem;
}

.hero-cap,
.hero figcaption {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.78rem;
  color: rgba(246, 240, 228, 0.78);
  border-top: 1px solid rgba(228, 192, 122, 0.28);
  padding-top: 0.75rem;
  max-width: 40rem;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.prose {
  max-width: var(--text);
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.section {
  padding: 4.5rem 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
  max-width: var(--text);
}

.num {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
}

h2 {
  font-family: Fraunces, "Source Serif 4", serif;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.12;
  font-weight: 560;
  letter-spacing: -0.02em;
  margin: 0;
  font-variation-settings: "SOFT" 40, "WONK" 0.3;
}

h3 {
  font-family: Fraunces, "Source Serif 4", serif;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 560;
  margin: 0 0 0.7rem;
}

.first-claim {
  font-family: Fraunces, "Source Serif 4", serif;
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.4;
  color: var(--teal);
  margin: 0 0 1.15rem;
  max-width: 36rem;
}

.lede {
  font-size: 1.28rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.cite {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  margin: -0.45rem 0 1.2rem;
}

.cite a {
  color: var(--muted);
}

.pull {
  font-family: Fraunces, serif;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  line-height: 1.28;
  font-weight: 500;
  font-style: italic;
  color: var(--teal);
  max-width: 28rem;
  margin: 1.75rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--gold);
  font-variation-settings: "SOFT" 70, "WONK" 1;
}

/* ---------- Opening ---------- */

.open {
  background: var(--paper);
  padding: 4.25rem 0 3.5rem;
}

.open-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 880px) {
  .open-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.aside-card {
  background: var(--teal);
  color: var(--cream);
  padding: 1.6rem 1.5rem 1.45rem;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.aside-card h2,
.aside-card .num {
  color: var(--gold-soft);
}

.aside-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.aside-card p,
.aside-card li {
  color: var(--cream-2);
  font-size: 1.02rem;
}

.aside-card a {
  color: var(--gold-soft);
}

.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meta-list li {
  padding: 0.55rem 0;
  border-top: 1px solid rgba(228, 192, 122, 0.22);
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.meta-list strong {
  display: block;
  color: var(--gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

/* ---------- Photos ---------- */

.photo-block {
  margin: 0;
}

.photo-block img {
  width: 100%;
  height: min(78vh, 44rem);
  object-fit: cover;
}

.photo-block.portrait img {
  height: min(88vh, 52rem);
  object-position: 50% 35%;
}

.caption {
  width: min(100% - 2rem, var(--max));
  margin: 0.7rem auto 0;
  padding-bottom: 0.4rem;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

.caption::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 2px;
  background: var(--gold);
  margin-right: 0.55rem;
  vertical-align: middle;
  transform: translateY(-0.08em);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    min-height: 36rem;
  }

  .split .photo-block img {
    height: 100%;
    min-height: 36rem;
  }

  .split-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.split-copy {
  padding: 3rem 0;
}

.split .caption {
  width: auto;
  margin: 0.7rem 1rem 1.2rem;
}

.narrow {
  max-width: 38rem;
  margin-inline: auto;
}

.split-pad {
  width: min(100% - 2rem, 34rem);
  margin-inline: auto;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0 0.5rem;
}

@media (min-width: 720px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 1.15rem 1.1rem 1.05rem;
}

.stat b {
  display: block;
  font-family: Fraunces, serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.stat span {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.stat small {
  display: block;
  margin-top: 0.55rem;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Chapters ---------- */

.land {
  background: var(--cream);
}

.hd {
  background: var(--cream-2);
}

.catheters {
  background: var(--paper);
}

.pd {
  background: var(--teal-deep);
  color: var(--cream);
}

.pd h2,
.pd h3 {
  color: var(--white);
}

.pd .num {
  color: var(--gold-soft);
}

.pd .lede,
.pd p {
  color: var(--cream-2);
}

.pd .cite,
.pd .cite a {
  color: rgba(246, 240, 228, 0.65);
}

.fistula {
  background: var(--teal);
  color: var(--cream);
}

.fistula h2,
.fistula h3 {
  color: var(--white);
}

.fistula .num {
  color: var(--gold-soft);
}

.fistula .lede,
.fistula p {
  color: var(--cream-2);
}

.fistula .pull {
  color: var(--gold-soft);
  border-left-color: var(--gold);
}

.or {
  background: var(--paper);
}

.week {
  background: var(--cream);
}

.team {
  background: var(--cream-2);
}

.news {
  background: var(--paper);
}

.note {
  background: rgba(181, 74, 44, 0.08);
  border-left: 3px solid var(--clay);
  padding: 0.95rem 1rem;
  margin: 1.4rem 0 0;
  font-size: 1.02rem;
}

.fistula .note {
  background: rgba(228, 192, 122, 0.12);
  border-left-color: var(--gold);
  color: var(--cream);
}

/* ---------- Steps / week ---------- */

.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  background: var(--white);
  padding: 1.1rem 1.15rem 1rem;
  border: 1px solid var(--line);
}

.steps strong {
  display: block;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.3rem;
}

.steps span {
  display: block;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2.5rem;
}

@media (min-width: 800px) {
  .gallery.two {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .gallery.two .photo-block img {
    height: 28rem;
  }
}

/* ---------- Team ---------- */

.roster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .roster {
    grid-template-columns: 1fr 1fr;
  }
}

.roster li {
  padding: 0.75rem 0 0.7rem;
  border-top: 1px solid var(--line);
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.98rem;
  line-height: 1.35;
}

.roster b {
  display: block;
  font-family: Fraunces, serif;
  font-size: 1.12rem;
  font-weight: 560;
  color: var(--teal);
  margin-bottom: 0.12rem;
}

.together {
  margin-top: 2rem;
  padding: 1.4rem 1.3rem;
  background: var(--teal);
  color: var(--cream);
}

.together p {
  margin: 0;
  font-size: 1.08rem;
  color: var(--cream-2);
}

.together em {
  font-family: Fraunces, serif;
  font-style: italic;
  color: var(--gold-soft);
  font-size: 1.2rem;
}

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

@media (min-width: 760px) {
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.news-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.35rem 1.25rem 1.2rem;
  min-height: 100%;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  color: inherit;
}

.news-card .source {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
}

.news-card h3 {
  margin: 0.45rem 0 0.55rem;
  font-size: 1.25rem;
}

.news-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.news-card .go {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--clay-deep);
}

/* ---------- Instruments ---------- */

.kit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1.2rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.92rem;
}

@media (min-width: 700px) {
  .kit {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.kit li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}


/* ---------- Week in pictures ---------- */

.week-gallery {
  background: var(--teal-deep);
  color: var(--cream);
}

.week-gallery h2 {
  color: var(--white);
}

.week-gallery .num {
  color: var(--gold-soft);
}

.week-gallery .lede,
.week-gallery .prose p {
  color: var(--cream-2);
}

.picture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem 1.15rem;
  margin-top: 2.1rem;
}

@media (min-width: 780px) {
  .picture-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem 1.25rem;
  }

  .picture-grid .wide {
    grid-column: 1 / -1;
  }
}

.picture-grid figure {
  margin: 0;
  background: rgba(7, 36, 40, 0.55);
  border: 1px solid rgba(228, 192, 122, 0.22);
}

.picture-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 42%;
}

.picture-grid .portrait img {
  aspect-ratio: 3 / 4;
  object-position: 50% 28%;
}

.picture-grid .wide img {
  aspect-ratio: 16 / 9;
  max-height: 32rem;
  object-position: 50% 48%;
}

.picture-grid figcaption {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(246, 240, 228, 0.82);
  padding: 0.75rem 0.9rem 0.95rem;
}

.picture-grid figcaption::before {
  content: "";
  display: inline-block;
  width: 1.25rem;
  height: 2px;
  background: var(--gold);
  margin-right: 0.5rem;
  vertical-align: middle;
  transform: translateY(-0.08em);
}

@media (max-width: 720px) {
  .picture-grid img,
  .picture-grid .portrait img,
  .picture-grid .wide img {
    max-height: none;
    aspect-ratio: 4 / 3;
  }

  .picture-grid .portrait img {
    aspect-ratio: 3 / 4;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--teal-deep);
  color: var(--cream-2);
  padding: 2.8rem 0 2.2rem;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer a {
  color: var(--gold-soft);
}

.site-footer p {
  margin: 0 0 0.7rem;
  max-width: 46rem;
}

.footer-brand {
  font-family: Fraunces, serif;
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 0.85rem;
}

/* ---------- Misc ---------- */

hr.gold {
  border: 0;
  height: 1px;
  background: var(--line-gold);
  margin: 2rem 0;
}

.disclaimer {
  font-size: 0.95rem;
  color: var(--muted);
  font-family: Figtree, system-ui, sans-serif;
  margin-top: 1.6rem;
}

@media (max-width: 720px) {
  :root {
    --header-h: auto;
  }

  .site-header {
    height: auto;
    padding: 0.55rem 0 0.5rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: 0.15rem;
  }

  .lang-toggle {
    margin-left: auto;
  }

  .hero-copy {
    padding-top: 6.5rem;
  }

  .photo-block img {
    height: 58vw;
    min-height: 16rem;
  }

  .photo-block.portrait img {
    height: 78vw;
  }

  .section {
    padding: 3.1rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .news-card {
    transition: none;
  }
}
