:root {
  --blue: #25597B; --navy: #1A3A54; --cream: #F7F1E3; --ink: #26211A;
  --mustard: #D9A93F; --terracotta: #C9714A; --moss: #8FAF6A; --gold: #D9B319;
  --meadow: #A9C77F; --rust: #8B3A1E; --pine: #4A6B2A; --sun: #EDCB5B;
  --sheet-width: 60rem;
}
@font-face { font-family: Bungee; src: url("/assets/fonts/bungee-400.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+FEFF, U+FFFD; }
@font-face { font-family: Bungee; src: url("/assets/fonts/bungee-400-ext.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Bitter; src: url("/assets/fonts/bitter-400.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+FEFF, U+FFFD; }
@font-face { font-family: Bitter; src: url("/assets/fonts/bitter-400-ext.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Bitter; src: url("/assets/fonts/bitter-700.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+FEFF, U+FFFD; }
@font-face { font-family: Bitter; src: url("/assets/fonts/bitter-700-ext.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Bitter; src: url("/assets/fonts/bitter-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+FEFF, U+FFFD; }
@font-face { font-family: Bitter; src: url("/assets/fonts/bitter-400-italic-ext.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }

* { box-sizing: border-box; }
/* Cross-document view transitions (Chrome/Safari; others just navigate):
   the browser crossfades whole pages instead of flashing blank. Deliberately
   NO pinned per-element groups: extracting the chrome from the root snapshot
   leaves background-colored holes behind it that some engines flash for a
   frame - the plain root crossfade is the robust form. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
/* stop the page detaching from the pattern on rubber-band overscroll */
html { overscroll-behavior-y: none; }
/* The CANVAS paints the real background: browsers show the bare canvas for a
   frame on navigation (before content), and if that frame already carries the
   pattern it is indistinguishable from the loaded page - nothing to flash.
   body must stay background-free or its box would cover the pattern sides. */
html { background: var(--blue) url("/assets/taust.webp") center / cover no-repeat fixed; }
body { margin: 0; font-family: Bitter, Georgia, serif; color: var(--ink); line-height: 1.65; }
/* The old site's signature: the patterned background holds still while the foreground
   sheet scrolls over it. A fixed-position layer rather than background-attachment: fixed,
   which iOS Safari ignores. taust.webp is the original artwork from the old site. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--blue) url("/assets/taust.webp") center / cover no-repeat; }

/* the continuous foreground: one cream column from header to footer */
.sheet { position: relative; max-width: var(--sheet-width); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--cream); box-shadow: 0 0 2.5rem rgba(10, 25, 38, 0.55); }

h1, .display { font-family: Bungee, "Arial Black", sans-serif; font-weight: 400; letter-spacing: 0.02em; }
h1 { color: var(--blue); }
h2, h3 { font-weight: 700; }
img { max-width: 100%; height: auto; }
iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
a { color: var(--terracotta); }
.tagline { font-style: italic; }

/* shell */
/* padding/negative-margin pair: extends the header color a viewport above the page
   (in-flow, so a rubber-band bounce reveals sun, not the pattern) without moving content */
.site-header { background: var(--sun); color: var(--ink); padding-top: 100vh; margin-top: -100vh; }
.header-inner { display: flex; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap;
  max-width: var(--sheet-width); margin: 0 auto; padding: 0.35rem 1rem; }
.logo img { display: block; width: 60px; height: 60px; }
.site-header nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 0.25rem 1.4rem; align-items: baseline;
  font-family: Bungee, "Arial Black", sans-serif; font-size: 1.05rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
nav .nav-0 { color: var(--navy); }
nav .nav-1 { color: var(--rust); }
nav .nav-2 { color: var(--pine); } nav .nav-3 { color: var(--ink); }
/* gallery menu: jump straight to an entry. Only fine-pointer hover devices get
   it (laptops/desktops) - on touch the item stays a plain link to the index.
   The panel hangs from the header's bottom edge as part of the header itself:
   header-inner is its containing block (top: 100%), while left: auto keeps it
   at its static position under the Galerii link. */
.header-inner { position: relative; }
/* the drawer wears Galerii's own pine, so it reads as that item's menu and
   stands off both the sun header and the photos below; sun returns only as
   the accent (hover, and the underline for the entry being viewed) */
.nav-menu { display: none; position: absolute; top: 100%; z-index: 50;
  margin: 0 0 0 -1rem; padding: 0.45rem 0 0.6rem; list-style: none;
  max-height: 70vh; overflow-y: auto;
  background: var(--pine); border-radius: 0 0 8px 8px; box-shadow: 0 0.8rem 1.6rem -0.3rem rgba(10, 25, 38, 0.55); }
.site-header .nav-menu a { display: block; padding: 0.32rem 1rem; font-size: 0.8rem; letter-spacing: 0.03em;
  color: var(--cream); white-space: nowrap; }
.site-header .nav-menu a:hover, .site-header .nav-menu a:focus-visible { color: var(--sun); outline: none; }
.site-header .nav-menu a[aria-current="page"] { color: var(--sun); text-decoration-color: var(--sun); }
@media (hover: hover) and (pointer: fine) {
  .has-menu:hover .nav-menu, .has-menu:focus-within .nav-menu { display: block; }
  /* bridge from the link down to the panel, so the pointer never crosses
     un-hovered header while moving into the menu */
  .has-menu > a { position: relative; }
  .has-menu:hover > a::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 2.5rem; }
  /* site.js sets this on click: the soft navigation keeps the pointer where it
     was, so the menu must close until the pointer leaves */
  .has-menu[data-dismissed] .nav-menu { display: none; }
}
.site-header .lang { color: var(--ink); font-family: Bitter, Georgia, serif; font-size: 0.85rem;
  margin-left: auto; text-decoration: none; }

main { flex: 1 1 auto; }
.content { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem; }
/* wide variant (photo grids): the full sheet, not just the text column */
.content.wide { max-width: none; }

/* home lead: intro text beside the camp video, frameless on the sheet like the
   side-splits elsewhere; the native element keeps the file's own aspect ratio,
   so a portrait video stays a narrow column */
video { display: block; max-width: 100%; height: auto; }
.home-lead { display: flex; gap: 2rem; align-items: center; margin: 0.5rem 0 1.5rem; }
.home-lead > [data-field] { flex: 1 1 auto; min-width: 0; }
.home-lead > [data-kind="video"] { flex: 0 0 auto; max-width: 45%; }
/* definite width so the box exists before metadata arrives (a dimensionless
   video computes to 0×0 in flex); auto 9/16 = portrait placeholder ratio
   until the file's real one loads */
.home-lead video { width: 14rem; aspect-ratio: auto 9 / 16; border-radius: 4px; }
.home-lead [data-field] > p:first-child { margin-top: 0; }
.home-lead [data-field] > p:last-child { margin-bottom: 0; }
/* typographic hierarchy: the lead speaks up, the MTÜ note steps back into a
   centered stanza (the old site's terracotta-band rhythm) */
.home-lead [data-field] p { font-size: 1.18rem; line-height: 1.6; }
[data-field="home.mtuText"] { display: block; max-width: 34rem; margin: 1.75rem auto 0.5rem;
  text-align: center; color: var(--rust); }
@media (max-width: 640px) {
  .home-lead { flex-direction: column; }
  .home-lead > [data-kind="video"] { max-width: 100%; align-self: center; }
}

/* hero band: page title on the chrome color, spanning the sheet */
.hero-band { background: var(--terracotta); color: var(--cream); text-align: center; padding: 0.9rem 1rem 0.8rem; }
.hero-band h1 { margin: 0 0 0.25rem; color: var(--cream); font-size: clamp(1.4rem, 4vw, 2rem); }
.hero-band .tagline { margin: 0; opacity: 0.9; }
.subnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.subnav a { font-family: Bungee, "Arial Black", sans-serif; font-size: 0.85rem;
  border: 2px solid var(--cream); border-radius: 999px; padding: 0.25em 0.9em;
  color: var(--cream); text-decoration: none; }
.subnav a[aria-current="page"] { background: var(--cream); color: var(--terracotta); }

/* section headings in Bungee with rotating palette colors - the page's rhythm */
.content section > h2 { font-family: Bungee, "Arial Black", sans-serif; font-weight: 400;
  font-size: 1.25rem; letter-spacing: 0.02em; margin-top: 2.25rem; }
.content section:nth-of-type(4n+1) > h2 { color: var(--rust); }
.content section:nth-of-type(4n+2) > h2 { color: var(--pine); }
.content section:nth-of-type(4n+3) > h2 { color: var(--navy); }
.content section:nth-of-type(4n+4) > h2 { color: var(--terracotta); }
/* camp intro is the page lead - same voice as the home lead */
[data-field="camp.intro"] { display: block; font-size: 1.15rem; line-height: 1.6; }

/* text with media on the side: a photo rail (venue) or a single image (press) */
.side-split { display: flex; gap: 1.5rem; align-items: flex-start; }
.side-split > :first-child { flex: 1 1 auto; min-width: 0; }
.side-split .photo-grid { flex: 0 0 10.5rem; grid-template-columns: 1fr; gap: 0.75rem; }
.side-split .photo-grid:empty { display: none; } /* admin.css re-shows the placeholder */
.side-split > [data-kind="image"] { flex: 0 0 45%; max-width: 45%; }
.side-split > [data-kind="image"] img { width: 100%; border-radius: 6px; }
/* zigzag (Tääksi): every other section's photo rail swaps sides, wider rail */
.zigzag .side-split { gap: 2rem; }
.zigzag .side-split .photo-grid { flex-basis: 13rem; }
.zigzag section:nth-of-type(even) .side-split { flex-direction: row-reverse; }
@media (max-width: 640px) {
  .side-split, .zigzag section:nth-of-type(even) .side-split { flex-direction: column; }
  .side-split .photo-grid { flex-basis: auto; width: 100%; grid-template-columns: repeat(2, 1fr); }
  .side-split > [data-kind="image"] { max-width: 100%; align-self: center; }
}

/* documents render as chips, not text links */
.doc-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.doc-chip { display: inline-block; background: #fff; border: 2px solid var(--mustard); border-radius: 6px;
  padding: 0.3em 0.8em; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.doc-chip:hover { background: var(--sun); }

/* meelespea: each "+ lõik" block in the items field becomes one bulleted item */
.checklist [data-field] p { display: list-item; list-style: disc; margin-left: 1.4em; margin-top: .3em; margin-bottom: .3em; }

/* cards & buttons */
/* seasonal camp block: no frame - a centered stanza fed by the site config */
.camp-card { text-align: center; margin: 2rem 0 1.5rem; }
.camp-card .register-row { justify-content: center; }
/* registration state on the PUBLIC page: full and closed drop the price and
   ticket link (the dates stay, with a note why); the admin origin
   (body[data-page]) keeps the row visible and editable */
body:not([data-page]) .camp-card:is([data-registration="full"], [data-registration="closed"]) .register-row { display: none; }
.camp-cta { text-align: center; margin: -0.5rem 0 1.5rem; }
.button { display: inline-block; font-family: Bungee, "Arial Black", sans-serif; font-size: 0.95rem;
  background: var(--terracotta); color: var(--cream); text-decoration: none;
  padding: 0.6em 1.2em; border-radius: 6px; }
.button:hover { filter: brightness(1.08); }
.register-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
/* nowrap so the date and "- Kohad on täis" wrap as whole units, never mid-phrase */
.registration-note { color: var(--terracotta); white-space: nowrap; }
.camp-card .dates > span { white-space: nowrap; }

/* footer */
.site-footer { background: var(--meadow); color: var(--ink); margin-top: 3rem; }
.footer-inner { max-width: var(--sheet-width); margin: 0 auto; padding: 1.5rem 1rem; }
.site-footer a { color: var(--rust); }
.supporters { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center;
  background: var(--cream); padding: 1rem; border-radius: 6px; margin-top: 1rem; }
.supporters img { height: 48px; width: auto; filter: grayscale(1); opacity: 0.75; }
.supporters img:hover { filter: none; opacity: 1; }

/* galleries */
.gallery-list, .photo-grid { list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; padding: 0; }
.gallery-list a { display: block; color: inherit; text-decoration: none; }
.photo-grid figure { margin: 0; }
/* uniform square crops so mixed portrait/landscape photos align; the lightbox shows the full image */
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; display: block; }

.card a { display: block; }
.card .cover, .cover-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.cover-placeholder { background: var(--blue) url("/assets/taust.webp") center / 350px auto; }
.card-name { display: block; padding: 0.4rem 0.2rem 0; font-size: 0.85rem; color: var(--ink); }

/* site-wide hero strip: rendered by Layout between header and main on every page
   (behavior in site.js; static first slide without JS). Spans the sheet. */
.carousel { position: relative; }
.carousel .slide { display: none; margin: 0; }
.carousel .slide[data-current] { display: block; }
/* the crop favors faces: of the hidden area, 1 part comes off the top and 5
   off the bottom (object-position 1/6) */
.carousel .slide img { width: 100%; height: clamp(260px, 38vw, 440px); object-fit: cover; object-position: 50% 16.7%; display: block; cursor: zoom-in; }
/* manual scrolling: side arrows, only revealed while hovering (or focused) */
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.35); color: var(--cream);
  font-size: 1.6rem; line-height: 1; padding: 0 0 0.2rem; cursor: pointer;
  opacity: 0; transition: opacity 0.15s ease; }
.carousel-arrow.prev { left: 0.75rem; }
.carousel-arrow.next { right: 0.75rem; }
.carousel:hover .carousel-arrow, .carousel-arrow:focus-visible { opacity: 1; }
.carousel-arrow:hover { background: rgba(0, 0, 0, 0.55); }

/* board member cards (juhatus): portrait beside name + article */
.member-card { display: flex; gap: 1.75rem; align-items: flex-start; margin: 2.5rem 0; }
.member-card img.field-image { width: 220px; height: 290px; object-fit: cover; border-radius: 6px; }
.member-card .member-body { flex: 1; min-width: 0; }
/* top-align the name's glyphs with the portrait's top edge */
.member-card h2 { margin: -0.2em 0 0.35rem; line-height: 1.25; }
.member-card .member-body [data-field] > p:first-child { margin-top: 0; }

/* mobile: logo + language toggle on the top row, nav on its own row below;
   denser supporter wall; two-column photo grids down to small phones */
@media (max-width: 640px) {
  .logo img { width: 52px; height: 52px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .supporters img { height: 36px; }
}
@media (max-width: 430px) {
  .gallery-list, .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .member-card { flex-direction: column; }
  .member-card img.field-image { align-self: center; }
  .member-card h2 { margin-top: 0; }
}

/* lightbox (built by site.js) */
.lightbox { position: fixed; inset: 0; background: rgba(20, 30, 40, 0.92); z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }
.lightbox img { max-width: 100%; max-height: 85vh; }
.lightbox figcaption { color: var(--cream); margin-top: 0.5rem; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--cream);
  font-size: 2rem; cursor: pointer; padding: 0.5rem 1rem; }
.lightbox .lb-close { top: 0.5rem; right: 0.5rem; }
.lightbox .lb-prev { left: 0.5rem; top: 50%; }
.lightbox .lb-next { right: 0.5rem; top: 50%; }
