/* Wish Loom Foundation — styles.css
   Fonts → tokens → base → layout → components. Palette taken from the Wish Loom
   logo: navy, leaf green and amber on white. The woven band (.weave) is the one
   decorative device; everything else stays plain. */

/* ————— Fonts (self-hosted variable WOFF2, latin subset; licences in assets/fonts/) ————— */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy-deep: #0c2f47;
  --navy: #14476d;
  --leaf: #6f9e50;
  --leaf-ink: #46702e;
  --amber: #f0b31f;
  --mist: #f1f6ee;
  --white: #ffffff;
  --ink: #1b2a36;
  --muted: #4f6476;
  --line: #dde5e2;
  --footer: #081e30;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --max: 1120px;
  --header-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

a { color: var(--navy); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-deep);
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 7vw, 5.25rem); font-weight: 500; line-height: 1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 8px;
  background: var(--navy-deep); color: var(--white);
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.small { font-size: 0.9rem; color: var(--muted); }
.lede, .sec-lede { max-width: 60ch; font-size: 1.15rem; color: #34495a; }

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.tint { background: var(--mist); }

/* ————— Buttons ————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.6rem 1.15rem;
  border: 1.5px solid transparent; border-radius: 8px;
  font: 600 0.98rem/1.2 var(--font-sans);
  text-decoration: none; cursor: pointer;
}
.btn-solid { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.btn-outline { background: transparent; border-color: #b9c8d3; color: var(--navy-deep); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy-deep); }

/* ————— Header ————— */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-in {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: inherit; text-decoration: none; }
.brand-tx { display: flex; flex-direction: column; line-height: 1.25; }
.brand-tx strong { font-size: 1.05rem; color: var(--navy-deep); }
.brand-tx small { font-size: 0.8rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--ink); font-weight: 500; text-decoration: none; }
.nav a:not(.btn):hover { color: var(--navy); text-decoration: underline; }

.nav-toggle {
  display: none;
  min-height: 2.75rem; padding: 0.4rem 0.95rem;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--navy-deep);
  font: 600 0.95rem var(--font-sans); cursor: pointer;
}

/* ————— Hero ————— */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid; grid-template-columns: 1fr minmax(260px, 320px);
  gap: 2rem 4rem; align-items: end;
}
.hero .lede { margin-top: 1.25rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.hero-facts { margin: 0; }
.hero-facts div { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.hero-facts div:last-child { border-bottom: 1px solid var(--line); }
.hero-facts dt { font-size: 0.85rem; color: var(--muted); }
.hero-facts dd { margin: 0; font-weight: 600; color: var(--navy-deep); }

.hero-photo { margin: clamp(2rem, 5vw, 3.25rem) 0 0; }
.hero-photo img {
  width: 100%; aspect-ratio: 1080 / 568; object-fit: cover;
  border-radius: 10px 10px 0 0;
}
.hero-photo figcaption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--muted); }

/* Woven band: two rows of navy/leaf "threads", offset like a basket weave,
   with a single amber weft thread between them. */
.weave {
  height: 12px;
  border-radius: 0 0 10px 10px;
  background:
    linear-gradient(var(--amber), var(--amber)) center / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--navy) 0 22px, var(--leaf) 22px 44px) top / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--leaf) 0 22px, var(--navy) 22px 44px) bottom / 100% 5px no-repeat;
}

/* ————— About ————— */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 3rem 4.5rem; align-items: start;
}
.prose { max-width: 62ch; }
.prose h3 { margin-top: 2rem; }

.focus { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.focus li {
  padding: 0.35rem 0.85rem;
  background: var(--mist); border-left: 3px solid var(--leaf); border-radius: 0 6px 6px 0;
  font-size: 0.95rem; font-weight: 500; color: var(--navy-deep);
}

.org-card {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  padding: 1.5rem 1.6rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 12px;
}
.org-card h3 { font-size: 1.2rem; }
.org-card dl { margin: 0.75rem 0 1rem; }
.org-card dl div {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem;
  padding: 0.65rem 0; border-top: 1px solid var(--line);
}
.org-card dt { font-size: 0.9rem; font-weight: 600; color: var(--navy-deep); }
.org-card dd { margin: 0; }
.org-card .small { margin: 0; }

/* ————— Programme ————— */
.programme-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem; margin-top: 2.25rem; align-items: start;
}
.themes article { padding-top: 1rem; border-top: 3px solid var(--leaf); }
.themes article + article { margin-top: 2rem; }

.session {
  padding: 1.6rem 1.75rem;
  background: var(--white);
  border: 1px solid var(--line); border-radius: 12px;
}
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative; counter-increment: step;
  padding: 0.8rem 0 0.8rem 3rem;
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.75rem;
  display: grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-size: 0.9rem; font-weight: 600;
}
.steps strong { color: var(--navy-deep); }

.recognition {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem 3rem; align-items: center;
  margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
}
.recognition figure { margin: 0; }
.recognition img { width: 100%; border-radius: 10px; }
.recognition p { max-width: 60ch; margin: 0; color: #34495a; }

/* ————— Photos ————— */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(120px, 16vw, 190px);
  gap: 0.6rem; margin-top: 2rem;
}
.tile {
  display: block; border-radius: 8px; overflow: hidden;
  background: var(--mist); cursor: zoom-in;
}
.tile.featured { grid-column: span 2; grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; }

/* ————— FAQ ————— */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; margin-top: 1.5rem; }
.faq article { padding: 1.25rem 0 0.4rem; border-top: 1px solid var(--line); }
.faq h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.faq p { max-width: 62ch; color: #34495a; }

/* ————— People ————— */
.sub { margin-top: 2.5rem; font-size: 1.35rem; }

.leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.leader {
  display: grid; grid-template-columns: 112px 1fr; gap: 1.25rem; align-items: center;
  padding: 1.25rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line); border-radius: 12px;
}
.leader img { width: 112px; height: 112px; object-fit: cover; border-radius: 50%; }
.leader h4 { margin: 0; }
.leader .role { margin: 0.1rem 0 0.4rem; font-size: 0.95rem; font-weight: 600; color: var(--leaf-ink); }
.leader p:last-child { margin: 0; font-size: 0.95rem; color: #34495a; }

.members-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 0.75rem 2rem; margin-top: 3rem;
}
.members-head .sub { margin: 0; }
.search { display: flex; align-items: center; gap: 1rem; }
.search input {
  width: min(20rem, 60vw); min-height: 2.75rem; padding: 0.55rem 0.9rem;
  border: 1.5px solid #c9d5dc; border-radius: 8px;
  background: var(--white); font: inherit; font-size: 1rem;
}
.search output { font-size: 0.9rem; font-weight: 600; color: var(--muted); white-space: nowrap; }

.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 1.75rem 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none;
}
.member { text-align: center; }
.member img {
  width: 88px; height: 88px; margin-inline: auto;
  object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--line);
}
.member-name { margin: 0.65rem 0 0; font-size: 0.92rem; font-weight: 600; line-height: 1.3; color: var(--navy-deep); }
.member-role { margin: 0.15rem 0 0; font-size: 0.82rem; font-weight: 600; color: var(--leaf-ink); }

/* ————— Contact ————— */
.contact { background: var(--navy-deep); color: #dbe7ef; }
.contact h2 { color: var(--white); }
.contact a { color: var(--amber); }
.contact a:hover { color: #ffd468; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 4.5rem; align-items: start; }

.contact-list { margin: 1.75rem 0 0; }
.contact-list div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem;
  padding: 0.85rem 0; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.contact-list dt { color: #a9c1d1; font-size: 0.92rem; }
.contact-list dd { margin: 0; color: var(--white); font-weight: 500; overflow-wrap: anywhere; }

.form {
  display: grid; gap: 1rem;
  padding: 1.75rem;
  background: var(--white); color: var(--ink);
  border-radius: 12px;
}
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.7rem 0.85rem;
  border: 1.5px solid #c9d5dc; border-radius: 8px;
  background: var(--white); color: var(--ink); font: inherit; font-size: 1rem;
}
.field textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form .small { margin: 0; }

/* ————— Footer ————— */
.footer { padding: 3rem 0 1.5rem; background: var(--footer); color: #c3d5e1; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer h2 { margin-bottom: 0.6rem; font: 600 0.95rem var(--font-sans); color: var(--white); }
.footer a { color: var(--white); }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; color: var(--white); }
.footer-brand img { padding: 3px; background: var(--white); border-radius: 50%; }
.footer-legal {
  margin-top: 2.25rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem; color: #9fb6c6;
}

/* ————— Lightbox ————— */
#lightbox {
  width: min(92vw, 960px); max-height: 92vh; padding: 0;
  border: 0; border-radius: 12px;
  background: var(--white);
}
#lightbox::backdrop { background: rgba(8, 30, 48, 0.82); }
#lightbox figure { margin: 0; }
#lightbox img { width: 100%; max-height: 70vh; object-fit: contain; background: #0f2233; }
#lightbox figcaption { padding: 0.9rem 1.25rem 0; color: #34495a; }
.lb-close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1;
}
.lb-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.25rem 1.1rem; }
.lb-nav span { font-size: 0.9rem; color: var(--muted); }
.lb-close, .lb-nav button {
  min-height: 2.5rem; padding: 0.4rem 1rem;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--navy-deep);
  font: 600 0.92rem var(--font-sans); cursor: pointer;
}
.lb-close:hover, .lb-nav button:hover { border-color: var(--navy); }

/* ————— Secondary pages (privacy, 404) ————— */
.page { padding-block: clamp(3rem, 7vw, 5rem); }
.page .prose h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 1rem; }
.page .prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.page .prose ul { padding-left: 1.2rem; }
.page .prose li { margin: 0.4rem 0; }
.breadcrumb { margin-bottom: 0.75rem; }
.footer-legal:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ————— Responsive ————— */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-facts { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 1.5rem; }
  .hero-facts div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .about-grid, .programme-grid, .contact-grid, .recognition { grid-template-columns: 1fr; }
  .org-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Collapsed navigation. Without JavaScript (no .js class on <html>) the links
   simply wrap under the logo, so they stay usable. */
@media (max-width: 900px) {
  .header-in { flex-wrap: wrap; padding-block: 0.6rem; }
  .nav { flex-wrap: wrap; gap: 0.4rem 1.2rem; }

  .js .header-in { flex-wrap: nowrap; padding-block: 0; }
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .nav {
    display: none;
    position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.25rem;
    padding: 0.75rem;
    background: var(--white);
    border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 28px rgba(12, 47, 71, 0.12);
  }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 0.6rem 0.5rem; }
  .js .nav .btn { margin-top: 0.4rem; }
}

@media (max-width: 760px) {
  .faq { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 34vw; }
  .leaders { grid-template-columns: 1fr; }
  .members-head { align-items: stretch; flex-direction: column; }
  .search input { flex: 1; width: auto; }
}

@media (max-width: 520px) {
  .brand-tx small { display: none; }
  .hero-photo img { aspect-ratio: 3 / 2; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div:nth-last-child(2) { border-bottom: 0; }
  .org-card { padding-inline: 1.2rem; }
  .org-card dl div { grid-template-columns: 1fr; gap: 0.1rem; }
  .leader { grid-template-columns: 84px 1fr; gap: 1rem; padding: 1.1rem; }
  .leader img { width: 84px; height: 84px; }
  .team-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 0.5rem; }
  .member img { width: 76px; height: 76px; }
  .contact-list div { grid-template-columns: 6rem 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
