/* ESPORA paper-origami rebrand, derived from the user-supplied poster. */
:root {
  --paper: #f1efe5;
  --paper-light: #faf8ef;
  --paper-shadow: #d8d3c2;
  --ink-900: #2b2b27;
  --ink-600: #56574c;
  --olive-ink: #3b3a2e;
  --forest-900: #174536;
  --forest-800: #1f5a48;
  --forest-700: #2e6a55;
  --forest-500: #6b7d4a;
  --olive-500: #6b7d4a;
  --huemul-500: #8a6a4a;
  --mint-300: #a9d3b5;
  --mint-100: #dcebdf;
  --sage-band: #e3f0e6;
  --moss-100: #e2e5d2;
  --line: #b9b7aa;
  --sun-400: #c9da6a;
  --sun-300: #dce792;
  --ok-bg: #dce9dd;
  --ok-fg: #24513a;
  --dev-bg: #e6dfbd;
  --dev-fg: #604f13;
  --font-display: "Archivo Narrow", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --radius: 2px;
  --header-h: 4.5rem;
}

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(64, 73, 55, .035) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 74%, rgba(64, 73, 55, .025) 0 1px, transparent 1.5px);
  background-size: 17px 19px, 23px 29px;
  color: var(--ink-900);
}

h2 {
  color: var(--ink-900);
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  line-height: .92;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

h3 { color: var(--ink-900); }
a { color: var(--forest-800); }

.site-header {
  background: var(--paper);
  color: var(--ink-900);
  border-bottom: 0;
  box-shadow: none;
}
/* Torn paper edge: the header reads as a sheet laid over the page, not a framed bar. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 7' preserveAspectRatio='none'%3E%3Cpath fill='rgba(43,43,39,.08)' d='M0 0H360V4.6L340 6 318 4.2 296 6.8 270 4.8 247 6.4 222 4 199 6 176 4.6 150 6.9 128 5 103 6.5 80 4.4 57 6.2 33 4.7 12 6.7 0 5Z'/%3E%3Cpath fill='%23f1efe5' d='M0 0H360V2.8L340 4 318 2.3 296 4.6 270 2.9 247 4.3 222 2.1 199 4 176 2.7 150 4.8 128 3 103 4.4 80 2.5 57 4.1 33 2.8 12 4.6 0 3.1Z'/%3E%3C/svg%3E") 0 0 / 360px 7px repeat-x;
  pointer-events: none;
}

.brand { color: var(--ink-900); }
.brand-mark {
  position: relative;
  padding-left: 0;
  background: transparent;
  color: var(--olive-ink);
  border-radius: 0;
  letter-spacing: .16em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: .2rem;
  right: .02rem;
  width: .32rem;
  height: .32rem;
  background: var(--forest-800);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.brand-sub { color: var(--ink-600); }

.site-nav a {
  color: var(--ink-900);
  border-radius: 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="true"] {
  background: transparent;
  color: var(--forest-800);
  border-bottom-color: var(--forest-800);
}

.nav-toggle {
  color: var(--ink-900);
  border-color: var(--ink-900);
  border-radius: 0;
}

/* ---------- Folded poster hero ---------- */
.hero {
  min-height: auto;
  background: var(--paper-light);
  color: var(--ink-900);
  border-bottom: 1px solid var(--ink-900);
}

.hero-landscape { display: none; }

.hero-inner {
  max-width: 80rem;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(25rem, .78fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.hero-copy { padding-block: 2rem; }

.hero-title {
  max-width: none;
  gap: 1.2rem;
}

.wordmark {
  color: var(--olive-ink);
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 10.5rem);
  font-weight: 600;
  line-height: .7;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.hero-expanded {
  align-self: flex-start;
  color: var(--olive-ink);
  max-width: 34ch;
  padding: .55rem 1.1rem .6rem .9rem;
  background: var(--sage-band);
  box-shadow: 3px 3px 0 rgba(31, 90, 72, .18);
  clip-path: polygon(0 0, 100% 0, 98.5% 100%, 1% 94%);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-summary {
  color: var(--olive-ink);
  max-width: 36rem;
  margin-top: 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--sage-band);
  border-left: 4px solid var(--forest-800);
  clip-path: polygon(0 0, 100% 3px, calc(100% - 4px) 100%, 0 calc(100% - 2px));
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.hero-meta {
  color: var(--ink-600);
  max-width: 38rem;
  font-family: var(--font-display);
  font-weight: 600;
}

/* Paper diorama: layered cut-outs from the brand board, standing on a sage sheet. */
.hero-art {
  position: relative;
  margin: 0;
  padding-top: 4.5rem;
}

.diorama {
  position: relative;
  aspect-ratio: 1 / .92;
}

.diorama-ground {
  position: absolute;
  left: -6%;
  right: -4%;
  bottom: 0;
  height: 50%;
  background: linear-gradient(180deg, #cfe6d5, var(--mint-300));
  clip-path: polygon(2% 22%, 13% 9%, 29% 15%, 46% 2%, 62% 12%, 79% 4%, 98% 18%, 100% 58%, 97% 96%, 81% 100%, 63% 94%, 41% 99%, 21% 93%, 4% 100%, 0 68%);
}
.diorama-ground::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(31, 90, 72, .09);
  clip-path: polygon(46% 2%, 62% 12%, 59% 95%, 38% 99%);
}
.diorama-ground::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 239, .35);
  clip-path: polygon(2% 22%, 13% 9%, 22% 93%, 4% 100%, 0 68%);
}

.piece {
  position: absolute;
  height: auto;
  filter: drop-shadow(3px 5px 4px rgba(43, 43, 39, .16));
}
.piece-salvia { z-index: 1; left: 3%; top: 12%; width: min(52%, 259px); filter: saturate(.92) drop-shadow(2px 3px 3px rgba(43, 43, 39, .1)); }
.piece-hojas { z-index: 2; left: 34%; top: 0; width: min(17%, 90px); transform: rotate(-14deg); }
.piece-bosque { z-index: 3; right: 1%; top: 31%; width: min(54%, 262px); }
.piece-huemul { z-index: 5; left: -3%; bottom: 3%; width: min(35%, 170px); }
.piece-condor { z-index: 6; left: 7%; top: 0; width: min(21%, 110px); }

.spore {
  position: absolute;
  z-index: 2;
  width: .75rem;
  height: .75rem;
  background: var(--forest-800);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  pointer-events: none;
}
.spore.s1 { left: 22%; top: 8%; opacity: .55; }
.spore.s2 { left: 56%; top: 34%; width: .5rem; height: .5rem; background: var(--olive-500); opacity: .6; }
.spore.s3 { left: -5%; top: 38%; width: 1.3rem; height: 1.3rem; opacity: .85; background: linear-gradient(135deg, var(--mint-300) 50%, #6f9f87 50%); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.spore.s4 { left: 44%; top: 72%; width: .55rem; height: .55rem; background: var(--forest-700); opacity: .5; }
.spore.s5 { right: -3%; bottom: 4%; width: .9rem; height: .9rem; background: var(--olive-500); opacity: .45; }
.spore.s6 { left: 30%; top: 26%; width: 1rem; height: 1rem; opacity: .7; background: linear-gradient(135deg, #cfe6d5 50%, var(--forest-700) 50%); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.spore.s7 { left: 12%; top: 58%; width: .45rem; height: .45rem; opacity: .35; }

.institutional-band {
  width: min(100%, 16rem);
  margin-top: 1.25rem;
  padding: .7rem .85rem;
  background: var(--forest-900);
  box-shadow: 3px 4px 6px rgba(32, 35, 31, .18);
}

.hero-institutional-logo {
  position: static;
  width: 100%;
  height: auto;
}

.hero-art figcaption {
  position: absolute;
  bottom: 1rem;
  left: -1.25rem;
  padding: .45rem .8rem;
  background: var(--ink-900);
  color: var(--paper-light);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  z-index: 7;
}

.hero-actions { margin-top: 2rem; }
.btn {
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .025em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink-900);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink-900); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink-900); }
.btn-sun {
  background: var(--forest-800);
  color: var(--paper-light);
  border-color: var(--forest-800);
}
.btn-sun:hover { background: var(--forest-700); }
.btn-ghost {
  color: var(--ink-900);
  border-color: var(--ink-900);
  background: var(--paper-light);
}
.btn-ghost:hover { background: var(--mint-100); color: var(--ink-900); border-color: var(--ink-900); }

.hero-tags {
  position: relative;
  z-index: 3;
  max-width: none;
  margin: 3rem calc(var(--gutter) * -1) 0;
  padding: 1rem var(--gutter);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--forest-900);
}

.hero-tags li {
  justify-content: center;
  border: 0;
  border-right: 1px solid rgba(250, 248, 239, .35);
  border-radius: 0;
  background: transparent;
  color: var(--paper-light);
  padding: .5rem;
  font-family: var(--font-display);
  font-size: .95rem;
}
.hero-tags li:last-child { border-right: 0; }
.hero-tags b {
  background: var(--mint-300);
  color: var(--forest-900);
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 22%, 92% 80%, 50% 100%, 8% 80%, 0 22%);
}

/* ---------- Paper bands ---------- */
.notice {
  background: var(--mint-300);
  color: var(--ink-900);
  border-bottom: 1px solid var(--ink-900);
}

.notice-icon { color: var(--forest-900); }

.section { background: transparent; }
.section-tint {
  background: var(--moss-100);
  border-block: 1px solid var(--ink-900);
}
.section-lines { background: var(--paper-light); }
.section-deep {
  position: relative;
  overflow: hidden;
  background: var(--forest-900);
  color: var(--paper-light);
}
.section-deep::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -7rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(220, 233, 221, .28);
  transform: rotate(45deg);
}
.section-deep h2 { color: var(--paper-light); }

.section-head {
  max-width: 52rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head::after {
  content: "";
  display: block;
  width: 5rem;
  height: .65rem;
  margin-top: 1.2rem;
  background: var(--forest-700);
  clip-path: polygon(0 0, 100% 10%, 88% 100%, 4% 85%);
}
.section-head .lede { color: var(--ink-600); }

/* ---------- Platform facets ---------- */
.facets {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.facet {
  position: relative;
  min-height: 18rem;
  padding: 4.5rem 1.35rem 1.5rem;
  border: 1px solid var(--ink-900);
  background: var(--paper-light);
  box-shadow: 5px 6px 0 var(--paper-shadow);
}
.facet::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  width: 2.8rem;
  height: 2.8rem;
  background: var(--forest-700);
  clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%);
}
.facet:nth-child(2)::before {
  background: var(--mint-300);
  clip-path: polygon(50% 18%, 64% 0, 82% 12%, 100% 38%, 50% 100%, 0 38%, 18% 12%, 36% 0);
}
.facet:nth-child(3)::before {
  background: var(--ink-900);
  clip-path: polygon(0 42%, 25% 42%, 25% 0, 75% 0, 75% 42%, 100% 42%, 50% 100%);
}
.facet:nth-child(4)::before {
  background: var(--forest-500);
  clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%, 22% 50%);
}
.facet dt {
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1;
  text-transform: uppercase;
}
.facet dd { color: var(--ink-600); }

/* ---------- Institutional axes ---------- */
.split { gap: clamp(3rem, 8vw, 7rem); }
.split-lead h2 { color: var(--ink-900); }
.split-lead .stamp {
  border: 0;
  border-radius: 0;
  background: var(--forest-800);
  color: var(--paper-light);
  box-shadow: 3px 3px 0 var(--ink-900);
}
.axes li {
  padding-left: 4rem;
  border-bottom-color: var(--line);
}
.axes li:first-child { border-top-color: var(--line); }
.axes li::before {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0;
  background: var(--forest-700);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- Six folded strips ---------- */
.lines {
  border-block: 1px solid var(--ink-900);
  gap: .65rem;
  padding-block: .65rem;
}
.line {
  position: relative;
  min-height: 19rem;
  padding: 1.2rem 1rem 1.4rem;
  border: 0;
  background: var(--moss-100);
  clip-path: polygon(0 0, 88% 0, 100% 10%, 100% 100%, 0 100%);
}
.line:nth-child(even) { background: var(--mint-100); }
.line:first-child { padding-left: 1rem; }
.line-letter {
  color: var(--forest-800) !important;
  font-family: var(--font-display);
  font-size: clamp(4rem, 7vw, 6rem);
  font-weight: 600;
}
.line h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-transform: uppercase;
}
.line p { color: var(--ink-600); }

/* ---------- Project ledger ---------- */
#proyectos { background: var(--paper); }
.filters button {
  border-radius: 0;
  border-color: var(--ink-900);
  background: var(--paper-light);
  color: var(--ink-900);
  font-family: var(--font-display);
  text-transform: uppercase;
}
.filters button:hover { background: var(--mint-100); }
.filters button[aria-pressed="true"] {
  background: var(--forest-800);
  color: var(--paper-light);
  border-color: var(--forest-800);
  box-shadow: 3px 3px 0 var(--ink-900);
}
.count { border-radius: 0; background: var(--mint-100); color: var(--forest-900); }

.status { border-radius: 0; }
.status::before { border-radius: 0; transform: rotate(45deg); }

.project {
  position: relative;
  border-radius: 0;
  border-color: var(--ink-900);
  background: var(--paper-light);
  box-shadow: 6px 7px 0 var(--paper-shadow);
}
.project::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(225deg, var(--paper) 48%, var(--line) 50%, var(--paper-light) 54%);
  pointer-events: none;
}
.project:hover {
  border-color: var(--ink-900);
  box-shadow: 8px 9px 0 #c6c2b1;
}
.project-dev { background: #f0ecd9; border-style: dashed; border-color: var(--ink-900); }
.project summary { border-radius: 0; }
.project-index {
  color: var(--forest-800);
  border-left-color: var(--ink-900);
  font-family: var(--font-display);
  text-transform: uppercase;
}
.project-name {
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  text-transform: uppercase;
}
.project-cat, .project-body p { color: var(--ink-600); }
.chevron { border-radius: 0; border-color: var(--ink-900); transform: rotate(45deg); }
.chevron::before { transform: translateY(-2px) rotate(0); }
.project[open] .chevron { transform: rotate(225deg); }
.tool-callout {
  border-radius: 0;
  border-color: var(--forest-800);
  background: var(--mint-100);
}
.btn-outline, .btn-tool { border-radius: 0; }
.btn-tool { background: var(--forest-900); }

/* ---------- Participation path ---------- */
.protocol::before {
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--mint-300) 0 18px, transparent 18px 28px);
}
.protocol-num {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0;
  background: var(--mint-300);
  color: var(--forest-900);
  outline-color: var(--forest-900);
  clip-path: polygon(50% 0, 100% 28%, 86% 88%, 50% 100%, 14% 88%, 0 28%);
}
.protocol-step h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-transform: uppercase;
}
.protocol-step p, .protocol-note { color: var(--mint-100); }
.protocol-note a { color: var(--paper-light); font-weight: 700; }

/* ---------- Ethics + footer ---------- */
.ethics li {
  border-bottom-color: var(--line);
  color: var(--ink-600);
}
.ethics li:first-child { border-top-color: var(--line); }
.ethics li::before {
  background: var(--forest-700);
  clip-path: polygon(50% 0, 100% 22%, 92% 80%, 50% 100%, 8% 80%, 0 22%);
}

.site-footer {
  background: var(--ink-900);
  color: var(--mint-100);
}
.footer-ridge { fill: var(--ink-900); }
.footer-mark {
  color: var(--mint-300);
  font-family: var(--font-display);
  font-weight: 600;
}
.site-footer a { color: var(--mint-300); }

@media (prefers-reduced-motion: no-preference) {
  .diorama-ground { animation: seta-rise .9s cubic-bezier(.16, 1, .3, 1) both; }
  .piece-salvia { animation: seta-rise .9s .15s cubic-bezier(.16, 1, .3, 1) both; }
  .piece-bosque { animation: seta-rise .9s .3s cubic-bezier(.16, 1, .3, 1) both; }
  .piece-huemul { animation: seta-rise .9s .45s cubic-bezier(.16, 1, .3, 1) both; }
  .piece-condor, .piece-hojas { animation: seta-rise .9s .6s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes seta-rise {
  from { opacity: 0; translate: 0 .75rem; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Brand-board motifs (faceted mushroom, spores, paper icons) ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: min(46rem, 60%);
  height: 30rem;
  background: url("brand/esporas.svg") 0 0 / 240px 240px repeat;
  opacity: .22;
  -webkit-mask-image: linear-gradient(160deg, #000 20%, transparent 75%);
  mask-image: linear-gradient(160deg, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; }

.wm-a { position: relative; }
.wm-a::after {
  content: "";
  position: absolute;
  top: .3em;
  right: .02em;
  width: .15em;
  height: .15em;
  background: var(--forest-800);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.line-icon {
  position: absolute;
  top: 1.1rem;
  right: 1rem;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
}

.section-deep::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("brand/esporas.svg") 60px 30px / 260px 260px repeat;
  opacity: .12;
  pointer-events: none;
}
.section-deep > .wrap { position: relative; z-index: 1; }

.site-footer .footer-mark { color: var(--mint-300); }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(20rem, .7fr); gap: 2rem; }
  .wordmark { font-size: clamp(5rem, 12vw, 8rem); }
  .facets { grid-template-columns: repeat(2, 1fr); }
  .lines { grid-template-columns: repeat(3, 1fr); }
  .line { min-height: 15rem; }
  .line:not(:nth-child(3n + 1)) { padding-left: 1rem; border-left: 0; }
}

@media (max-width: 860px) {
  .site-nav { background: var(--paper); border-bottom-color: var(--ink-900); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { width: min(100%, 34rem); margin-inline: auto; }
  .hero-tags { grid-template-columns: repeat(3, 1fr); }
  .hero-tags li:nth-child(3) { border-right: 0; }
  .hero-tags li:nth-child(-n + 3) { border-bottom: 1px solid rgba(250, 248, 239, .35); }
}

@media (max-width: 640px) {
  .hero-inner { padding-top: 1.5rem; padding-bottom: 0; }
  .hero-copy { padding-block: 1rem; }
  .wordmark { font-size: clamp(4.6rem, 24vw, 6rem); }
  .hero-expanded { font-size: 1.25rem; }
  .hero-art { margin-top: .5rem; padding-top: 3.75rem; }
  .institutional-band { width: min(100%, 13.5rem); padding: .55rem .65rem; }
  .hero-art figcaption { left: .25rem; bottom: .25rem; font-size: .72rem; }
  .piece-condor { left: 6%; right: auto; top: 0; width: min(24%, 90px); }
  .piece-hojas { left: 30%; }
  .hero::before { width: 100%; height: 22rem; }
  .line-icon { top: .85rem; right: .75rem; width: 2.5rem; height: 2.5rem; }
  .hero-tags { margin-top: 2.5rem; }
  .hero-tags li { justify-content: flex-start; }
  .facets { grid-template-columns: 1fr; }
  .facet { min-height: auto; }
  .lines { grid-template-columns: repeat(2, 1fr); }
  .line {
    display: block;
    min-height: 13rem;
    padding: 1rem;
  }
  .line-letter { margin-bottom: .7rem; }
  .line:nth-child(even) { padding-right: 1rem; }
}
