/* IESC homepage, "Sky to mantle" transect.
   Headings are widest in the sky and compress with depth: --wdth per band.
   Tokens (--ink, --paper, ...) and header/footer/buttons live in menu_footer.css. */

:root {
  --right: #2F6B16;
  --wrong: #A3260F;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 750; line-height: 1.05; text-wrap: balance; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }

main { min-width: 0; }

/* ---------- hero ---------- */
.hero { display: grid; background: var(--sky); }
.hero-left { display: contents; }
.hero-copy { order: 1; padding: clamp(2rem, 5vw, 3.25rem) var(--gut) 1.5rem; max-width: 46rem; position: relative; z-index: 1; }
.hero h1 {
  font-stretch: 125%; font-weight: 820;
  font-size: clamp(2.1rem, 3.3vw, 3.5rem); line-height: .98; letter-spacing: -.025em;
  margin-bottom: 1.2rem; max-width: 13em;
}
.hero-info { font-size: 1.05rem; color: var(--ink-2); max-width: 36em; }
.hero-deadline { margin: .6rem 0 0; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.4rem 0 .5rem; }
.hero-announcement {
  margin: 1.25rem 0 0; padding: .7rem .9rem; max-width: 36rem;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); line-height: 1.4;
}
.hero-figure { order: 2; margin: 0; min-width: 0; position: relative; }
.xsec { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 750; }
.xsec > :not(.hits) { pointer-events: none; }
.hit { fill: transparent; pointer-events: all; transition: fill .15s ease; }
.hit--line { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; }
.hit.is-act { cursor: pointer; }
.hit.is-on:not(.hit--line) { fill: rgba(255, 255, 255, .34); stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; }
.hit--line.is-on { stroke: rgba(255, 255, 255, .6); }
.hx-tip {
  position: absolute; z-index: 3; pointer-events: none; max-width: 17rem;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); padding: .5rem .75rem .6rem; line-height: 1.3;
}
.hx-tip__name { display: block; font-stretch: 85%; font-weight: 750; font-size: 1.05rem; margin-bottom: .15rem; }
.hx-tip__text { display: block; font-size: .88rem; color: var(--ink-2); }
.hx-tip__act { display: block; margin-top: .4rem; font-size: .8rem; font-weight: 700; }
.hx-tip__act:empty { display: none; }
/* continuous ambient motion: drifting clouds and billowing plume (off for reduced motion, see the end of the file) */
.hx-drift { animation: hx-drift 40s ease-in-out infinite alternate; }
.hx-drift--slow { animation-duration: 70s; animation-direction: alternate-reverse; }
@keyframes hx-drift { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
#plume circle { transform-box: fill-box; transform-origin: center; animation: hx-billow 5s ease-in-out infinite; }
#plume circle:nth-child(2) { animation-delay: -1.25s; }
#plume circle:nth-child(3) { animation-delay: -2.5s; }
#plume circle:nth-child(4) { animation-delay: -3.75s; }
@keyframes hx-billow { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.15); } }

@media (min-width: 1360px) {
  .hero > .hero-figure { grid-area: 1 / 1; }
  .hero-left { display: flex; flex-direction: column; grid-area: 1 / 1; align-self: start; z-index: 1; width: 33%; min-width: 31rem; padding: 0 0 0 var(--gut); margin-left: 3vw; }
  .hero h1 { font-size: clamp(2.3rem, 2.9vw, 3.3rem); }
  .hero-copy { padding: calc(4.5vw + clamp(2.25rem, 3vw, 3.5rem)) 0 .5rem; max-width: none; } /* roughly centred in the sky above the forest */
}

/* ---------- bands: one stratum per section, with the drill core on the left ---------- */
.band {
  position: relative;
  padding-left: var(--core);
  background: color-mix(in srgb, var(--ics) 13%, var(--paper));
  border-top: 1.5px solid var(--ink);
}
.core {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--core);
  background-color: var(--ics); background-image: var(--pat);
  border-right: 1.5px solid var(--ink);
}
#band-ped .core { background-image: var(--pat), linear-gradient(#3B2A1E 0 4%, #6E4B2E 4% 15%, #B5733A 15% 50%, #D9C19A 50%); }
#band-hyd .core { background-image: var(--pat), linear-gradient(#F9F97F 0 26%, #1E1B18 26% calc(26% + 1.5px), #7FB3D9 calc(26% + 1.5px)); }
#band-atm { background: color-mix(in srgb, var(--ics) 22%, var(--paper)); }
.core-label {
  position: sticky; top: calc(var(--hdr) + 1.25rem);
  display: block; width: fit-content; margin: 1.25rem auto;
  writing-mode: vertical-rl; transform: rotate(180deg);
  background: var(--paper); border: 1px solid var(--ink);
  padding: .55rem .15rem;
  font-stretch: 72%; font-weight: 600; font-size: .78rem; line-height: 1.1; white-space: nowrap;
}
.band-body { padding: clamp(3rem, 7vw, 5.5rem) var(--gut); }
.sec + .sec { margin-top: clamp(3.5rem, 7vw, 5.5rem); }

.band h2 {
  font-stretch: calc(var(--wdth) * 1%);
  font-size: clamp(1.85rem, 3.4vw, 3rem); letter-spacing: -.015em;
  margin-bottom: 1rem; max-width: 20em;
}
.band h3 { font-stretch: calc(var(--wdth) * 1%); }
.intro { font-size: 1.125rem; max-width: 40em; color: var(--ink-2); margin-bottom: 2.25rem; }
.small { font-size: .95rem; color: var(--ink-2); }
.row-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.after-actions { margin: 1.5rem 0 .6rem; color: var(--ink-2); }

.fig-t text, text.fig-t { font-family: var(--font); font-stretch: 82%; font-weight: 600; font-size: 12.5px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3.5px; stroke-linejoin: round; }
.fig-t .fig-inv { fill: var(--paper); stroke: none; }
.fig-t .fig-inv2 { stroke: var(--paper); }
.fig-n text { font-family: var(--font); font-stretch: 75%; font-size: 11.5px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.fx-labels text { font-family: var(--font); font-weight: 750; font-size: 14px; fill: var(--ink); }

/* atmosphere: join the challenge */
.join .intro { margin-bottom: 1rem; }
.countdown { display: flex; flex-wrap: wrap; gap: .5rem clamp(1.5rem, 4vw, 3rem); margin: 1.25rem 0; }
.cd { display: grid; }
.cd-n { font-stretch: 125%; font-weight: 850; font-size: clamp(3.2rem, 8.5vw, 6.75rem); line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cd-l { font-stretch: 78%; font-weight: 600; color: var(--ink-2); }
.deadline-note { max-width: 36em; margin-bottom: 1.5rem; font-weight: 600; }
.countdown.is-closed .cd { display: none; }
.join--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.join--split .cd-n { font-size: clamp(2.8rem, 4.6vw, 6rem); }
.join--split .countdown { gap: .5rem clamp(1rem, 2.5vw, 2.5rem); }
.join--split .pdf-preview { margin: 0; max-width: none; }
.pdf-preview { margin: 2rem 0 0; max-width: 60rem; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.pdf-preview iframe { display: block; width: 100%; height: clamp(24rem, 70vh, 44rem); border: 0; }
.join .subscribe { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 34rem; }
.join .subscribe input {
  flex: 1 1 15rem; min-height: 2.75rem; padding: .55rem .8rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: 2px;
}

/* rounds */
.rounds-intro + .round { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.round {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem); align-items: start;
}
.round-num {
  margin: 0; font-stretch: 125%; font-weight: 900; font-size: clamp(4.5rem, 8vw, 7rem); line-height: .78;
  letter-spacing: -.04em;
}
.round h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: .8rem; }
.round-text p { max-width: 34em; }
.facts-log { margin: 0; border-bottom: 1.5px solid var(--ink); }
.facts-log > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.facts-log > div:first-child { border-top: 1.5px solid var(--ink); }
.facts-log dt { font-stretch: 78%; font-weight: 600; color: var(--ink-2); }
.facts-log dd { margin: 0; font-weight: 550; }


/* why participate: four cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.card { border-top: 1.5px solid var(--ink); padding-top: .9rem; }
.card h3 { font-size: 1.35rem; margin-bottom: .6rem; }
.card p { color: var(--ink-2); font-size: 1rem; }
.card > a:not(.btn) { font-weight: 650; font-stretch: 88%; }

/* topics: one photo card per area */
.topic-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(1rem, 2vw, 1.5rem); margin: 0; padding: 0; }
.topic {
  position: relative; display: flex; flex-direction: column; background: var(--paper);
  border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.topic--wide { grid-column: span 2; }
.topic-fig { height: 17rem; overflow: hidden; background: color-mix(in srgb, var(--ics) 22%, var(--paper)); border-bottom: 1.5px solid var(--ink); }
.topic-fig img { display: block; width: 100%; height: 100%; object-fit: cover; }
.topic-body { padding: 1rem 1.15rem 1.25rem; }
.topic-link { color: inherit; text-decoration: none; }
.topic-link::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.topic-link:focus-visible { outline: none; }
.topic-link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 3px; }
.topic h3 { display: flex; align-items: center; gap: .65rem; font-stretch: 82%; font-weight: 720; font-size: 1.2rem; line-height: 1.2; margin: 0 0 .5rem; }
.topic .swatch { width: 2rem; height: 1.25rem; }
.topic p { margin: 0; color: var(--ink-2); font-size: .98rem; }
@media (prefers-reduced-motion: reduce) { .topic { transition: none; } .topic:hover { transform: none; } }
.swatch {
  flex: none; width: 2.6rem; height: 1.6rem; border: 1.5px solid var(--ink);
  background-color: var(--ics, var(--paper)); background-image: var(--pat);
}
.sw-soil { background-image: var(--pat), linear-gradient(#3B2A1E 0 12%, #6E4B2E 12% 38%, #B5733A 38% 70%, #D9C19A 70%); }

/* awards */
.awards-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.awards h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.awards-list { list-style: none; border-bottom: 1.5px solid var(--ink); }
.awards-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .65rem 0; border-top: 1px solid var(--rule); line-height: 1.35; }
.awards-list li:first-child { border-top: 1.5px solid var(--ink); }
.awards-list span { display: inline-flex; align-items: center; gap: .55rem; font-weight: 550; }
.awards-list strong { font-stretch: 85%; font-weight: 750; text-align: right; }
.medal { width: .95rem; height: .95rem; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.medal-gold { background: #E8B923; }
.medal-silver { background: #C9CCCF; }
.medal-bronze { background: #B8763E; }
.card-cert { border-top: 1.5px solid var(--ink); }
.card-cert .btn { margin-top: .5rem; }
.plain { list-style: none; border-bottom: 1.5px solid var(--ink); max-width: 40rem; }
.plain li { padding: .65rem 0; border-top: 1px solid var(--rule); line-height: 1.4; }
.plain li:first-child { border-top: 1.5px solid var(--ink); }

/* nonconformity: the granite band gets a wavy top, the Jurassic shows through above it */
.unconformity { position: relative; height: 0; z-index: 3; }
.unconformity svg { position: absolute; left: 0; top: -28px; width: 100%; height: 28px; overflow: visible; display: block; }
.unconformity p {
  position: absolute; right: var(--gut); top: .75rem; margin: 0;
  font-style: italic; font-stretch: 85%; font-size: .9rem; color: var(--ink-2);
  max-width: 60%; text-align: right;
}
#band-up {
  margin-top: -28px; border-top: 0; padding-top: 28px;
  -webkit-mask: var(--wave) top left / 100% 28px no-repeat, linear-gradient(#000, #000) 0 28px / 100% calc(100% - 28px) no-repeat;
  mask: var(--wave) top left / 100% 28px no-repeat, linear-gradient(#000, #000) 0 28px / 100% calc(100% - 28px) no-repeat;
}
#band-j .band-body { padding-bottom: calc(clamp(3rem, 7vw, 5.5rem) + 28px); }

/* crust: get involved + diagrams */
.people h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); margin-bottom: .8rem; }
.people p { max-width: 38em; }
.people .plain { margin: 1.25rem 0 1.5rem; }

/* materials: documents as legend tiles */
.materials h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); margin-bottom: 1.25rem; }
.materials-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); margin: 0 0 2rem; padding: 0; }
.material a { display: block; color: inherit; text-decoration: none; }
.material-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 425 / 600; object-fit: cover; object-position: top center;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.material a:hover .material-thumb { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.material-label { display: block; margin-top: .8rem; font-stretch: 85%; font-weight: 720; font-size: 1.05rem; line-height: 1.25; }
.material-desc { display: block; margin-top: .25rem; color: var(--ink-2); font-size: .92rem; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .material-thumb { transition: none; } .material a:hover .material-thumb { transform: none; } }

/* mantle: faq + plates */
.faq-list { border-bottom: 1.5px solid var(--ink); max-width: 52rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.faq-list:empty { border-bottom: 0; margin-bottom: 0; }
.faq-cat { font-size: 1.15rem; font-stretch: 85% !important; margin: 1.75rem 0 .5rem; color: var(--ink-2); }
.faq details { border-top: 1.5px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1rem 2.5rem 1rem 0; font-weight: 650; font-size: 1.1rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: .8rem; height: .8rem; margin-top: -.4rem;
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
}
.faq details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat; }
.faq-a { margin: 0 0 1.2rem; max-width: 40em; color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .join--split { grid-template-columns: minmax(0, 1fr); }
  .join--split .pdf-preview { margin-top: 1rem; }
  .round { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .facts-log { grid-column: 2; }
}

@media (max-width: 860px) {
  :root { --core: 1.4rem; }
  .core-label { display: none; }
  .round { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .facts-log { grid-column: auto; }
  .round-num { font-size: 4.5rem; }
  .unconformity p { position: static; transform: translateY(.6rem); max-width: none; text-align: left; padding: 0 var(--gut) 0 calc(var(--core) + var(--gut)); }
}

@media (max-width: 640px) {
  .awards-grid, .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .topic--wide { grid-column: auto; }
  .topic-fig { height: 14rem; }
  .pdf-preview { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .facts-log > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .hero-actions .btn, .row-actions .btn { width: 100%; }
  .unconformity p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

