@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --wood: #3a2415;
  --wood-2: #5b3a22;
  --ink: #24160d;
  --clear: #eef3f0;
  --clear-2: #dfe9e4;
  --ruby: #b4152f;
  --cobalt: #1d4fb5;
  --emerald: #178a4a;
  --amber: #eaa514;
  --amber-hi: #f4b935;
  --lead: 6px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
  scrollbar-color: var(--wood-2) var(--clear);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--text);
  color: var(--ink);
  background: var(--clear);
  caret-color: var(--ruby);
}
::selection { background: var(--amber); color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.wrap { max-width: 72rem; margin-inline: auto; }

/* Hero: the whole first viewport is the lattice; the text sits in one clear opening. */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(var(--gutter), env(safe-area-inset-top)) var(--gutter) var(--gutter);
  background: var(--wood) url("/lattice.svg") center / cover;
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 236 170 / 0.55) 48%, transparent 62%) 0 0 / 260% 100% no-repeat;
  mix-blend-mode: screen;
  animation: sun 2.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
@keyframes sun {
  from { background-position: 100% 0; opacity: 1; }
  to { background-position: 0 0; opacity: 0; }
}
.opening {
  width: min(100%, 46rem);
  background: rgb(238 243 240 / 0.96);
  border: clamp(9px, 1.3vw, 15px) solid var(--wood);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  display: grid;
  gap: 1.1rem;
}
.opening h1 { font-size: clamp(2.5rem, 8.5vw, 5.25rem); line-height: 1; }
.tagline { font-family: var(--display); font-weight: 700; font-size: clamp(1.05rem, 2.6vw, 1.5rem); color: var(--ruby); line-height: 1.25; }
.lede { max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.8rem 1.3rem;
  border: 3px solid var(--wood);
  font: 700 0.95rem/1.2 var(--display);
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}
.btn-primary { background: var(--amber); }
@media (hover: hover) {
  .btn:hover { background: var(--clear-2); transform: translateY(-2px); }
  .btn-primary:hover { background: var(--amber-hi); }
}
.status { display: flex; align-items: baseline; gap: 0.6rem; font-size: 0.95rem; color: #4a3626; }
.status::before, .principles li::before {
  content: "";
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--amber);
  border: 2px solid var(--wood);
  transform: rotate(45deg) translateY(-1px);
}

/* The grade-9 window: every topic is a pane of glass. */
.window { padding: clamp(3.5rem, 9vw, 7rem) var(--gutter); }
.intro { display: grid; gap: 1.25rem 3rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.intro h2 { font-size: clamp(1.9rem, 5vw, 3.25rem); }
.intro .copy { display: grid; gap: 0.9rem; max-width: 40rem; }
@media (min-width: 54rem) { .intro { grid-template-columns: 1fr 1.2fr; align-items: end; } }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: 0.9rem; }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend i { width: 1.1rem; height: 1.1rem; border: 3px solid var(--wood); background: var(--clear-2); }
.legend .ready i { background: linear-gradient(90deg, var(--cobalt) 33%, var(--ruby) 33% 66%, var(--emerald) 66%); }
.legend .prep i { background: var(--amber); }
.frame { display: grid; gap: var(--lead); background: var(--wood); border: clamp(10px, 1.4vw, 16px) solid var(--wood); }
.subject { display: grid; gap: var(--lead); }
.subject header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.4rem 1rem; padding: 0.85rem 0.6rem 0.5rem; color: var(--clear); }
.subject h3 { font-size: clamp(1rem, 2.4vw, 1.2rem); }
.subject header a { color: var(--amber-hi); font-size: 0.92rem; font-weight: 600; }
.panes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.75rem), 1fr)); gap: var(--lead); margin: 0; padding: 0; list-style: none; }
.pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 7rem;
  padding: 0.9rem 0.9rem 1rem;
  background: var(--clear-2) linear-gradient(160deg, rgb(255 255 255 / 0.45), transparent 50%);
  transition: filter 0.3s ease-out;
}
.pane b { font-family: var(--display); font-size: 0.78rem; color: #6b5442; }
.pane span, .pane a { font-weight: 600; line-height: 1.3; }
.pane { position: relative; }
.pane a::after { content: ""; position: absolute; inset: 0; }
.pane small { font-size: 0.78rem; color: #5a4535; }
.pane[data-state="prep"] { background-color: var(--amber); }
.pane[data-state="prep"] b, .pane[data-state="prep"] small { color: var(--ink); }
@media (hover: hover) { .pane:hover { filter: brightness(1.08) saturate(1.1); } }

/* How we work: a cobalt pane. */
.principles { background: var(--cobalt); color: #f3f6ff; padding: clamp(3.5rem, 9vw, 7rem) var(--gutter); }
.principles .wrap { display: grid; gap: 2rem 4rem; }
.principles h2 { font-size: clamp(1.9rem, 5vw, 3.25rem); }
.principles ul { margin: 0; padding: 0; list-style: none; max-width: 42rem; }
.principles li { display: flex; gap: 1rem; align-items: baseline; padding: 1.1rem 0; border-top: 2px solid rgb(255 255 255 / 0.22); font-size: 1.125rem; }
.principles li:last-child { border-bottom: 2px solid rgb(255 255 255 / 0.22); }
@media (min-width: 54rem) { .principles .wrap { grid-template-columns: 1fr 1.6fr; } }

/* Volunteer call (Turkish): an amber pane. */
.volunteer { background: var(--amber); padding: clamp(3.5rem, 9vw, 7rem) var(--gutter); }
.volunteer :focus-visible { outline-color: var(--wood); }
.volunteer .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.volunteer h2 { font-size: clamp(1.9rem, 5vw, 3.25rem); max-width: 20ch; }
.volunteer .lead-in { max-width: 40rem; margin-top: 1rem; font-size: 1.125rem; }
.roles { display: grid; gap: 0; margin: 0; }
.roles div { padding: 1rem 0; border-top: 3px solid var(--wood); }
.roles dt { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.3; }
.roles dd { margin: 0.35rem 0 0; }
@media (min-width: 54rem) {
  .volunteer .wrap { grid-template-columns: 1fr 1fr; align-items: start; }
  .volunteer .head { grid-column: 1 / -1; }
}
.join { background: var(--clear); border: clamp(9px, 1.3vw, 14px) solid var(--wood); padding: clamp(1.25rem, 4vw, 2.25rem); display: grid; gap: 1rem; }
.join h3 { font-size: 1.15rem; }
.join pre { margin: 0; padding: 0.9rem 1rem; background: var(--clear-2); border-left: 0; font: 500 0.95rem/1.7 var(--text); white-space: pre-wrap; }
.email { font: 700 clamp(1.05rem, 3.8vw, 1.6rem)/1.2 var(--display); overflow-wrap: anywhere; }
.note { font-size: 0.95rem; color: #3d2a1c; }

footer { background: var(--wood); color: var(--clear); }
footer::before { content: ""; display: block; height: clamp(2.5rem, 6vw, 4rem); background: url("/lattice.svg") center / cover; border-bottom: 6px solid var(--wood); }
footer .wrap { padding: 2.5rem var(--gutter) max(2.5rem, env(safe-area-inset-bottom)); display: grid; gap: 1rem; }
footer p { font-size: 0.95rem; }
footer .name { font: 700 1.25rem/1.2 var(--display); }
footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer a { color: var(--amber-hi); }
footer small { color: #cbbcae; }

@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; opacity: 0; }
  .btn, .pane { transition: none; }
}

/* Language switch and "who we are" (emerald pane). */
.lang { justify-self: end; margin: -0.4rem -0.2rem 0 0; font-size: 0.92rem; font-weight: 600; }
.about { background: var(--emerald); color: #f2fbf5; padding: clamp(3.5rem, 9vw, 7rem) var(--gutter); }
.about .wrap { display: grid; gap: 1.25rem 4rem; }
.about h2 { font-size: clamp(1.9rem, 5vw, 3.25rem); }
.about .copy { display: grid; gap: 1rem; max-width: 40rem; font-size: 1.125rem; }
.about :focus-visible { outline-color: var(--amber-hi); }
@media (min-width: 54rem) { .about .wrap { grid-template-columns: 1fr 1.6fr; } }
