/* Keuzecursus microscoop — kleuren van Jenaplanschool De Pandelaar
   bron: https://www.depandelaar.nl/  (--ast-global-color-0/1/6/8)
   #e2004d magenta, #006a64 petrol, #cede97 lime, #BFD1FF lichtblauw, #fbfcff papier
   Aarde-tinten gemengd voor een warme, nieuwsgierige Foldscope-sfeer.
   Geen externe fonts, geen tracking. */

:root {
  --magenta: #e2004d;
  --teal: #006a64;
  --lime: #cede97;
  --sky: #bfd1ff;
  --paper: #fbfcff;
  --cream: #f6f1e4;
  --sand: #e8dcc4;
  --earth: #8a5a2b;
  --ink: #14211f;
  --ink-soft: #2a3d3a;
  --white: #ffffff;
  --btn-h: 3.4rem;
  --radius: 1.1rem;
  --shadow: 0 8px 24px rgba(20, 33, 31, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.45rem;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(206, 222, 151, 0.55), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(191, 209, 255, 0.45), transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--paper) 55%, #eef6ef 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a { color: var(--teal); }

.decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.decor svg {
  position: absolute;
  opacity: 0.22;
}

.decor .leaf-tl { top: -20px; left: -10px; width: 140px; }
.decor .leaf-br { bottom: -10px; right: -16px; width: 160px; }
.decor .bug-tr { top: 90px; right: 18px; width: 72px; opacity: 0.28; }
.decor .bug-bl { bottom: 90px; left: 16px; width: 80px; opacity: 0.24; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.8rem 0 7.5rem;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.logo {
  width: min(280px, 48vw);
  height: auto;
  display: block;
}

.kicker {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  text-align: right;
  letter-spacing: 0.02em;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

h1 {
  font-family: Georgia, "Palatino Linotype", "Times New Roman", ui-serif, serif;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.15;
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  max-width: 22ch;
  text-wrap: balance;
}

h1.wide { max-width: 28ch; }

.lead, .sub {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: var(--ink);
  max-width: 32ch;
  text-wrap: balance;
}

.sub { color: var(--ink-soft); }

.papa {
  margin: 0.15rem 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  color: var(--magenta);
  font-weight: 700;
}

.note {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--ink-soft);
  font-weight: 650;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0.4rem auto 0;
  display: grid;
  gap: 0.7rem;
  text-align: left;
  max-width: 28ch;
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
}

.steps li {
  background: var(--white);
  border: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow);
}

.video-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #14211f;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 4px solid var(--teal);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.page-video h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  max-width: 30ch;
}

.pager {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(251, 252, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 3px solid var(--lime);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-h);
  min-width: 9rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid var(--teal);
  color: var(--white);
  background: var(--teal);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.btn:focus-visible {
  outline: 4px solid var(--magenta);
  outline-offset: 3px;
}

.btn-prev {
  justify-self: start;
  background: var(--white);
  color: var(--teal);
}

.btn-next { justify-self: end; background: var(--magenta); border-color: var(--magenta); }

.btn[aria-disabled="true"] {
  visibility: hidden;
  pointer-events: none;
}

.dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dots a {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--sand);
  border: 2px solid var(--teal);
  display: block;
  text-indent: -999px;
  overflow: hidden;
}

.dots a[aria-current="page"] {
  background: var(--magenta);
  border-color: var(--magenta);
  transform: scale(1.25);
}

.page-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
  text-align: center;
}

.credit {
  margin: 1.2rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 42ch;
}

.credit a { color: var(--teal); font-weight: 700; }

/* Gallery */
.gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.gallery a {
  display: block;
  background: var(--white);
  border-radius: 0.8rem;
  overflow: hidden;
  border: 3px solid var(--teal);
  box-shadow: var(--shadow);
  aspect-ratio: 1;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty {
  background: var(--white);
  border: 3px dashed var(--teal);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  max-width: 24ch;
  box-shadow: var(--shadow);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 31, 0.92);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.6rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 700px) {
  body { font-size: 1.25rem; }
  .kicker { font-size: 0.85rem; max-width: 12ch; }
  .logo { width: min(200px, 52vw); }
  .btn { min-width: 6.4rem; font-size: 1.1rem; padding: 0.5rem 0.8rem; }
  .decor .bug-tr, .decor .bug-bl { display: none; }
  .wrap { padding-bottom: 6.8rem; }
}

@media (max-height: 700px) and (orientation: landscape) {
  h1 { font-size: clamp(1.5rem, 5vh, 2.4rem); }
  .lead, .sub, .papa { font-size: 1.2rem; }
  .video-wrap { max-height: 58vh; aspect-ratio: auto; height: 58vh; }
  .wrap { padding-bottom: 5.6rem; padding-top: 0.3rem; }
  header.top { margin-bottom: 0.4rem; }
}

.icon-hero {
  width: min(160px, 28vw);
  height: auto;
  display: block;
  margin: 0 auto 0.4rem;
}

/* Secondary "not part of the lesson" box — obvious on a projector */
.thuis {
  width: 100%;
  max-width: 34rem;
  margin: 1.3rem auto 0;
  padding: 0.9rem 1.1rem 1rem;
  text-align: left;
  background: #e7eecf;
  border: 4px dashed var(--teal);
  border-radius: 1.2rem;
  box-shadow: none;
  color: var(--ink-soft);
}

.thuis-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  padding: 0.28rem 0.85rem 0.28rem 0.65rem;
  background: var(--magenta);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: 999px;
  transform: rotate(-3deg);
  box-shadow: 0 3px 0 rgba(20, 33, 31, 0.18);
}

.thuis-badge svg {
  display: block;
  flex: 0 0 auto;
}

.thuis h2 {
  margin: 0.15rem 0 0.15rem;
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--teal);
  font-weight: 800;
}

.thuis .thuis-note {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--magenta);
}

.thuis ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.thuis li { margin: 0.2rem 0; }

.thuis a {
  color: var(--teal);
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.thuis a:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
}

@media (max-height: 700px) and (orientation: landscape) {
  .thuis { margin-top: 0.7rem; padding: 0.6rem 0.9rem 0.7rem; }
  .thuis h2, .thuis .thuis-note, .thuis ul { font-size: 1rem; }
  .thuis-badge { font-size: 1rem; }
}
