/* IBioC homepage sections (design: /srv/biology_20 mockup). Shared tokens, nav and footer: menu_footer.css */
/* Hero: the cell landscape, full bleed on sunflower */
.hero { background: var(--sun); color: var(--moss); padding-top: clamp(1.6rem, 3.5vw, 2.8rem); border-bottom: 4px solid var(--moss); }
.hero__top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.6rem 3.5rem; align-items: end; padding-bottom: clamp(1.6rem, 3.5vw, 2.8rem); }
.hero__name { font-weight: 700; font-size: 1.05rem; margin-bottom: .7rem; }
.hero__title {
  font-size: clamp(3rem, 6.6vw, 6.2rem); font-stretch: 75%; font-weight: 800;
  letter-spacing: -.025em; line-height: .88; max-width: 10ch; text-wrap: balance;
}
.hero__side { padding-bottom: .5rem; }
.hero__lede { font-size: 1.15rem; max-width: 30rem; margin-bottom: 1.3rem; text-wrap: balance; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .7rem; }

.cell { margin: 0; position: relative; }
/* outside the cell: 17's sky, so the sunflower membrane reads against it */
.cell-stage { position: relative; background: var(--sky); border-top: 4px solid var(--moss); }
.cell-svg { display: block; width: 100%; height: auto; }
.cell-motion { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cell-motion .mol { pointer-events: visiblePainted; }
.cell-stage .mol { transition: opacity .2s ease; }
.cell-stage.is-focus .mol { opacity: .35; }
.cell-stage.is-focus .mol.on { opacity: 1; }
.cell-tip {
  position: absolute; z-index: 2; pointer-events: none; max-width: 17rem;
  background: var(--paper); color: var(--moss); border: 3px solid var(--moss); border-radius: 4px;
  box-shadow: 5px 5px 0 var(--moss); padding: .45rem .7rem .5rem; line-height: 1.25;
}
.cell-tip__name { display: block; font-family: var(--display); font-weight: 800; font-size: 1.15rem; font-stretch: 85%; }
.cell-tip__size { display: block; font-size: .88rem; color: var(--teal-dk); font-weight: 600; }
.cell-svg .scalebar text { font-family: var(--display); font-weight: 800; font-size: 26px; fill: var(--moss); }
.noscript { padding-block: 1.5rem; }


/* Why */
.why { background: var(--paper); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.why__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem 4rem; align-items: start; }
.why__title { font-size: clamp(2.4rem, 4.6vw, 4rem); font-stretch: 75%; letter-spacing: -.02em; color: var(--teal); max-width: 14ch; }
.why__item { padding-block: 1.1rem; border-top: 3px solid var(--moss); }
.why__item:last-child { border-bottom: 3px solid var(--moss); }
.why__item h3 { font-size: 1.6rem; font-stretch: 85%; margin-bottom: .4rem; }
.why__item p { max-width: 38rem; }

/* Topics / biomes: two columns of cards, art beside text */
.topics { background: var(--paper); padding-bottom: clamp(3rem, 6vw, 5rem); }
.topics__head { padding-block: clamp(2rem, 4vw, 3rem) clamp(1.6rem, 3vw, 2.4rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; background: linear-gradient(var(--moss), var(--moss)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 3px no-repeat; }
.topics__head h2 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-stretch: 75%; letter-spacing: -.02em; }
.topics__head p { max-width: 36rem; }

.biomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.biome { border: 3px solid var(--moss); border-radius: 4px; overflow: hidden; }
.biome:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - .625rem); }
.biome__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.5rem; padding: clamp(1.1rem, 2vw, 1.6rem); align-items: center; height: 100%; }
.biome__fig { margin: 0; order: -1; }
.biome__photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 3px solid currentColor; border-radius: 4px; }
.biome__credit { margin-top: .35rem; font-size: .7rem; line-height: 1.3; opacity: .75; }
.biome__credit a { color: inherit; }
.biome__body h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); font-stretch: 85%; line-height: 1.05; }
.biome__body .biome__name { font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: .35rem 0 .9rem; }
.biome__body ul { margin: 0; padding: .8rem 0 0; list-style: none; border-top: 2px solid currentColor; display: grid; gap: .3rem; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.biome--forest { background: var(--moss); color: var(--sky); }
.biome--forest .biome__name { color: var(--sun); }
.biome--reef { background: var(--teal); color: var(--paper); }
.biome--reef .biome__name { color: var(--sky); }
.biome--tundra { background: var(--sky); color: var(--moss); }
.biome--tundra .biome__name { color: var(--teal); }
.biome--savanna { background: var(--sun); color: var(--moss); }
.biome--savanna .biome__name { color: var(--moss); opacity: .7; }
.biome--wetland { background: var(--paper); color: var(--moss); }
.biome--wetland .biome__name { color: var(--teal); }

/* Qualification Round problem sheet preview */
.sample { background: var(--sky); padding-block: clamp(3.5rem, 7vw, 6rem); }
.sample h2 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-stretch: 75%; letter-spacing: -.02em; margin-bottom: .7rem; }
.sample__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; margin-bottom: 1.6rem; }
.sample__lede { font-size: 1.15rem; max-width: 34rem; margin-bottom: 1rem; }
.sample__lede b { white-space: nowrap; }
.sample__btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }
.sample .subscribe { max-width: 30rem; }
.pdf { background: var(--paper); border: 4px solid var(--moss); border-radius: 4px; overflow: hidden; box-shadow: 10px 10px 0 var(--teal); }
.pdf__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .8rem 1.2rem; border-bottom: 3px solid var(--moss); font-weight: 700; color: var(--moss); }
.pdf__bar a { color: var(--teal-dk); }
.pdf iframe { display: block; width: 100%; height: min(90vh, 900px); min-height: 560px; border: 0; }

/* Rounds */
.rounds { background: var(--moss); color: var(--sky); padding-block: clamp(3.5rem, 7vw, 6rem); }
.rounds__title { font-size: clamp(2.6rem, 6vw, 5.2rem); font-stretch: 75%; letter-spacing: -.02em; color: var(--sun); }
.rounds__lede { margin-top: .8rem; max-width: 36rem; }
.transect { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; position: relative; }
.transect::before {
  content: ""; position: absolute; left: 0; right: 0; top: 2.1rem; height: 0;
  border-top: 4px dashed var(--sun);
}
.stop { position: relative; }
.stop__peg {
  position: relative; display: grid; place-items: center; width: 4.2rem; height: 4.2rem; margin-bottom: 1.2rem;
  background: var(--sun); color: var(--moss); border-radius: 50%; border: 5px solid var(--moss); box-shadow: 0 0 0 3px var(--sun);
  font-family: var(--display); font-weight: 800; font-size: 2.1rem; font-stretch: 75%;
}
.stop h3 { font-size: 2rem; font-stretch: 85%; color: var(--paper); margin-bottom: .5rem; }
.stop > p { max-width: 26rem; }
.stop__dates { margin: 1.1rem 0 0; display: grid; gap: .35rem; }
.stop__dates div { display: grid; grid-template-columns: 6.4rem 1fr; gap: .6rem; border-top: 1px solid rgba(220, 239, 240, .3); padding-top: .35rem; }
.stop__dates dt { color: var(--sun); font-weight: 600; font-size: .92rem; }
.stop__dates dd { margin: 0; font-weight: 700; }

/* Age groups */
.groups { background: var(--paper); padding-block: clamp(3.5rem, 7vw, 6rem); }
.groups__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; margin-bottom: 2rem; }
.groups__head h2 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-stretch: 75%; letter-spacing: -.02em; }
.groups__table-wrap { overflow-x: auto; }
.groups__table { width: 100%; border-collapse: collapse; }
.groups__table th, .groups__table td { text-align: left; padding: 1rem .8rem; border-bottom: 3px solid var(--moss); vertical-align: middle; }
.groups__table thead th { font-size: .9rem; font-weight: 700; color: var(--teal-dk); border-bottom-width: 4px; }
.groups__table tbody th { font-family: var(--display); font-size: 2rem; font-stretch: 80%; font-weight: 800; white-space: nowrap; }
.groups__table .num { text-align: right; }
.groups__table .big { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--teal); font-variant-numeric: tabular-nums; }

/* Awards */
.awards { background: var(--sun); padding-block: clamp(3.5rem, 7vw, 6rem); }
.awards__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem 4rem; align-items: end; }
.awards h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); font-stretch: 75%; letter-spacing: -.02em; max-width: 11ch; margin-bottom: 1rem; }
.awards__main > p { max-width: 32rem; font-size: 1.15rem; }
.awards__more { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.awards__more > div { padding: 1.1rem 1.2rem 1.2rem; background: var(--paper); border: 3px solid var(--moss); border-radius: 4px; box-shadow: 6px 6px 0 var(--moss); }
.awards__more h3 { font-size: 1.35rem; font-stretch: 85%; margin-bottom: .35rem; }
.awards__more p { font-size: .95rem; }

/* Podium: silver, gold, bronze */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; align-items: end; max-width: 30rem; width: 100%; justify-self: center; }
.podium__step { display: flex; flex-direction: column; align-items: center; }
.podium__step--1 { order: 2; } .podium__step--2 { order: 1; } .podium__step--3 { order: 3; }
.medal { width: min(100%, 5.6rem); margin-bottom: -.6rem; position: relative; z-index: 1; filter: drop-shadow(3px 3px 0 rgba(31, 58, 43, .25)); }
.podium__step--1 .medal { width: min(100%, 6.8rem); }
.medal__num { font: 800 26px var(--display); fill: var(--moss); text-anchor: middle; }
.podium__step--1 .medal__disc { fill: #FFD95A; } .podium__step--1 .medal__ring { stroke: #C7921A; }
.podium__step--2 .medal__disc { fill: #DDE3E7; } .podium__step--2 .medal__ring { stroke: #98A3AB; }
.podium__step--3 .medal__disc { fill: #D99257; } .podium__step--3 .medal__ring { stroke: #9A5B2C; }
.podium__block { width: 100%; background: var(--moss); color: var(--paper); border-radius: 4px 4px 0 0; padding: 1.4rem .6rem .9rem; text-align: center; }
.podium__step--1 .podium__block { min-height: 12rem; }
.podium__step--2 .podium__block { min-height: 10rem; }
.podium__step--3 .podium__block { min-height: 8.5rem; }
.podium__place { display: block; font: 800 1.5rem/1 var(--display); font-stretch: 85%; color: var(--sun); margin-bottom: .6rem; }
.podium__cash { display: block; font: 800 2rem/1 var(--display); font-stretch: 85%; }
.podium__note { display: block; font-size: .78rem; opacity: .75; margin-top: .3rem; }
.podium__block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .9rem; font-weight: 700; }
.podium__block li span { font-weight: 500; opacity: .75; }

/* Countdown (in the problems section) */
.countdown { display: flex; gap: .5rem; }
.countdown > div { background: var(--moss); border-radius: 4px; padding: .6rem .5rem .5rem; min-width: 5.2rem; text-align: center; }
.cd__n { display: block; font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--sun); font-variant-numeric: tabular-nums; }
.cd__l { font-size: .8rem; color: var(--sky); }

/* Teachers / ambassadors */
.duo { display: grid; grid-template-columns: 1.25fr 1fr; }
.teachers { background: var(--paper); }
.ambassadors { background: var(--petal); }
.duo__inner { padding: clamp(3rem, 6vw, 5rem) var(--gutter); max-width: 44rem; }
.teachers .duo__inner { margin-left: auto; }
.duo h2 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); font-stretch: 75%; letter-spacing: -.02em; margin-bottom: 1rem; }
.duo p { margin-bottom: 1.2rem; max-width: 34rem; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .5rem; }
.ticks li { position: relative; padding-inline-start: 1.6rem; font-weight: 600; }
.ambassadors .ticks li::before { background: var(--moss); }

/* FAQ */
.faq { background: var(--sky); padding-block: clamp(3.5rem, 7vw, 6rem); }
.faq__grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 2rem 4rem; align-items: start; }
.faq h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); font-stretch: 75%; letter-spacing: -.02em; }
.faq details { border-top: 3px solid var(--moss); }
.faq details:last-child { border-bottom: 3px solid var(--moss); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; font-family: var(--display); font-weight: 700; font-size: 1.35rem; font-stretch: 90%; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--moss) no-repeat center / 12px 12px; background-image: linear-gradient(var(--sun), var(--sun)), linear-gradient(var(--sun), var(--sun)); background-size: 12px 3px, 3px 12px; }
.faq details[open] summary::after { background-size: 12px 3px, 0 0; }
.faq details p { padding: 0 0 1.2rem; max-width: 42rem; }


/* Focus colours on dark/colour sections */
.hero :focus-visible, .awards :focus-visible { outline-color: var(--moss); }
.why :focus-visible, .rounds :focus-visible, .biome--forest :focus-visible, .biome--reef :focus-visible { outline-color: var(--sun); }

/* Hero announcements (results link, admin index text) */
.hero__note { margin-top: 1.1rem; padding: .6rem .9rem; background: var(--paper); border: 3px solid var(--moss); border-radius: 4px; font-weight: 600; max-width: 34rem; }
.hero__note a { font-weight: 800; }

/* Rounds additions */
.stop__more { margin-top: 1rem; font-weight: 700; }
.stop__more a, .stop a { color: var(--sun); }
.rounds__all { margin-top: 2.5rem; }

/* Age group note */
.groups__note { margin-top: 1.2rem; max-width: 46rem; }

/* Awards link */
.awards__main .btn { margin-top: 1.4rem; }

/* CTA buttons and closed state */

/* Teachers / ambassadors additions */
.duo__btns { display: flex; flex-wrap: wrap; gap: .7rem; }
.amb__req { font-size: .95rem; }

/* Materials */
.materials { background: var(--paper); padding-block: clamp(3rem, 6vw, 4.5rem); border-top: 3px solid var(--moss); }
.materials h2 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); font-stretch: 75%; letter-spacing: -.02em; margin-bottom: 1.6rem; }
.docs { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.4rem 1.1rem; }
.docs:last-child { margin-bottom: 0; }
.docs a { display: block; text-decoration: none; color: var(--moss); }
.docs img { display: block; width: 100%; aspect-ratio: 1 / 1.414; object-fit: contain; background: var(--paper); border: 3px solid var(--moss); border-radius: 4px; box-shadow: 5px 5px 0 var(--teal); transition: transform .15s ease; }
.docs a:hover img { transform: translate(-2px, -2px); }
.docs span { display: block; margin-top: .7rem; font-weight: 700; font-size: .95rem; line-height: 1.25; }

/* FAQ additions: categories from the FAQ table, answers are HTML */
.faq__cat { font-family: var(--display); font-size: 1rem; font-weight: 800; color: var(--teal-dk); text-transform: uppercase; letter-spacing: .04em; margin: 1.6rem 0 .4rem; }
.faq__cat:first-child { margin-top: 0; }
.faq__a { padding: 0 0 1.2rem; max-width: 42rem; }
.faq__a p { margin-bottom: .6rem; }
.faq__more { margin-top: 1.4rem; }

@media (max-width: 1040px) {
  .awards__more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .biomes { grid-template-columns: 1fr; }
  .biome:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .biome__grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero__top, .why__grid, .topics__head, .groups__head, .awards__grid, .sample__head, .faq__grid { grid-template-columns: 1fr; }
  .transect { grid-template-columns: 1fr; gap: 2rem; padding-left: 0; }
  .transect::before { left: 2.1rem; right: auto; top: 0; bottom: 0; height: auto; border-top: 0; border-left: 4px dashed var(--sun); }
  .stop { padding-left: 5.6rem; }
  .stop__peg { position: absolute; left: 0; top: 0; }
  .duo { grid-template-columns: 1fr; }
  .teachers .duo__inner { margin-left: 0; }
  .pdf iframe { height: 520px; min-height: 0; }
}
@media (max-width: 560px) {
  .awards__more { grid-template-columns: 1fr; }
  .biome__grid { grid-template-columns: 1fr; }
  .podium__block ul { font-size: .8rem; }
  .groups__table th, .groups__table td { padding: .8rem .4rem; }
  .groups__table tbody th { font-size: 1.5rem; }
  .groups__table .big { font-size: 2.2rem; }
  .groups__table td:nth-child(2) { font-size: .9rem; }
  .countdown > div { min-width: 0; flex: 1; }
  .cd__n { font-size: 2.2rem; }
  .stop { padding-left: 4.6rem; }
  .stop__peg { width: 3.4rem; height: 3.4rem; font-size: 1.7rem; }
  .transect::before { left: 1.7rem; }
  .stop__dates div { grid-template-columns: 5.6rem 1fr; }
}
