/* ===========================================================================
   KOI — Knowing Others to Inspire
   Design system: "school of koi" — a warm pond palette where each program /
   section gets its own hue from a neurodiversity-spectrum accent set. The
   signature is the drifting koi-wave divider and the spectrum underline.
   Display: Fraunces (soft, characterful). Body: Mulish (warm humanist sans).
   =========================================================================== */

:root {
  /* palette */
  --ink:    #16263f;   /* deep pond navy — text */
  --ink-70: #44546b;
  --paper:  #fcfaf6;   /* bright warm paper (not muddy cream) */
  --paper-2:#f4efe6;   /* slightly deeper panel */
  --line:   #e7ddcd;   /* hairline on paper */
  --white:  #ffffff;

  /* the spectrum — koi + water + a neurodiverse range of hues */
  --koi:    #f2683f;   /* primary coral-orange */
  --koi-ink:#c9491f;
  --water:  #1a8a8a;   /* teal */
  --gold:   #f2a23d;
  --violet: #6c5ce0;
  --leaf:   #46a86a;
  --rose:   #e35d7a;

  /* soft tints for cards */
  --koi-soft:   #fde9e1;
  --water-soft: #ddefee;
  --gold-soft:  #fcefd7;
  --violet-soft:#e9e6fb;

  --radius:   18px;
  --radius-lg:28px;
  --shadow:   0 1px 2px rgba(22,38,63,.04), 0 14px 40px -22px rgba(22,38,63,.32);
  --shadow-sm:0 1px 2px rgba(22,38,63,.05), 0 8px 22px -18px rgba(22,38,63,.30);

  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Mulish", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* recurring eyebrow + spectrum underline (the signature accent) */
.eyebrow {
  font-family: "Mulish", sans-serif;
  font-weight: 800;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--koi-ink);
  margin: 0 0 .9rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 6px; border-radius: 99px;
  background: linear-gradient(90deg,
    var(--koi) 0 25%, var(--gold) 25% 45%, var(--leaf) 45% 62%,
    var(--water) 62% 80%, var(--violet) 80% 100%);
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--koi);
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: .98rem;
  padding: .82rem 1.4rem;
  border-radius: 99px;
  text-decoration: none;
  background: var(--bg);
  color: var(--white);
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--koi); color: var(--koi-ink); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .7rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand .brand-fallback {
  font-family: "Fraunces", serif; font-weight: 700; font-size: 1.35rem;
  letter-spacing: .04em; color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: clamp(.4rem, 2vw, 1.4rem); }
.nav-links a {
  text-decoration: none; font-weight: 700; font-size: .96rem;
  color: var(--ink-70); padding: .4rem .2rem; position: relative;
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  border-radius: 99px; background: var(--koi);
}
.nav-links .btn { color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(2.4rem, 6vw, 4.6rem); }
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  font-optical-sizing: auto;
  margin: .2rem 0 1rem;
}
.hero h1 .tint { color: var(--koi); font-style: italic; }
.hero .lede { font-size: clamp(1.08rem, 2.2vw, 1.32rem); color: var(--ink-70); max-width: 56ch; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* koi-wave: the signature divider */
.wave { display: block; width: 100%; height: auto; margin-top: clamp(2rem, 5vw, 3.4rem); }
.wave .koi { transform-origin: center; animation: drift 9s ease-in-out infinite; }
.wave .koi:nth-child(2) { animation-delay: -3s; }
.wave .koi:nth-child(3) { animation-delay: -6s; }
@keyframes drift {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  50%      { transform: translate(10px,-6px) rotate(2deg); }
}

/* ---------- sections ---------- */
section { padding-block: clamp(3rem, 7vw, 5.2rem); }
.section-head { max-width: 60ch; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.section-head p { color: var(--ink-70); margin-top: .8rem; font-size: 1.08rem; }

.panel { background: var(--paper-2); border-radius: var(--radius-lg); }

/* about block */
.about { display: grid; gap: clamp(1.4rem, 4vw, 3rem); align-items: center; }
.about .body p { font-size: 1.12rem; }
@media (min-width: 820px) { .about { grid-template-columns: 1.4fr .9fr; } }

/* program cards */
.cards { display: grid; gap: 1.2rem; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: var(--accent, var(--koi));
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .tag {
  display: inline-block; font-weight: 800; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent, var(--koi));
  background: var(--accent-soft, var(--koi-soft));
  padding: .3rem .7rem; border-radius: 99px; margin-bottom: 1rem;
}
.card h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.card p { color: var(--ink-70); margin: 0 0 1.2rem; }
.card .media { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: auto; }
.card .media img {
  border-radius: 14px; background: var(--paper-2);
  box-shadow: var(--shadow-sm); max-height: 150px; width: auto;
}

/* generic image-frame that looks intentional even before assets download */
.frame {
  background: linear-gradient(135deg, var(--paper-2), var(--white));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 120px;
  display: grid; place-items: center;
  overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* book page: showcase */
.showcase { display: grid; gap: clamp(1.4rem, 4vw, 2.8rem); align-items: center; }
@media (min-width: 820px) { .showcase { grid-template-columns: .85fr 1.15fr; } }
.showcase .cover { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.gallery figure { margin: 0; }
.gallery .frame { aspect-ratio: 4 / 3; }
.gallery figcaption { font-size: .82rem; color: var(--ink-70); margin-top: .5rem; font-weight: 600; }

.lang { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .lang { grid-template-columns: 1fr 1fr; } }
.lang .item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; text-align: center; box-shadow: var(--shadow-sm); }
.lang .item .frame { aspect-ratio: 5 / 4; margin-bottom: 1rem; }
.lang .item h3 { font-size: 1.3rem; }
.lang .item span { color: var(--ink-70); font-weight: 600; }

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.2rem; }
.people .person { text-align: center; }
.people .person .frame { aspect-ratio: 1 / 1; border-radius: 50%; max-width: 180px; margin: 0 auto 1rem; }
.people .person h4 { font-size: 1.12rem; }

.reviews { display: grid; gap: 1.2rem; }
@media (min-width: 720px) { .reviews { grid-template-columns: 1fr 1fr; } }

/* resources */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.video {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.video .embed { aspect-ratio: 16 / 9; background: var(--ink); display: grid; place-items: center; }
.video .embed iframe { width: 100%; height: 100%; border: 0; }
.video .embed .placeholder { color: #fff; opacity: .7; font-size: .85rem; padding: 1rem; text-align: center; }
.video p { padding: .9rem 1.1rem; margin: 0; font-weight: 600; }

.link-list { display: grid; gap: .8rem; }
.link-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--accent, var(--water));
  border-radius: 14px; padding: 1.05rem 1.2rem;
  text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease;
}
.link-card:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.link-card .lc-title { font-weight: 800; color: var(--ink); }
.link-card .lc-desc { color: var(--ink-70); font-size: .95rem; margin-top: .2rem; }
.link-card .lc-host { font-size: .78rem; color: var(--accent, var(--water)); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-top: .4rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d7e0ee; margin-top: clamp(3rem, 7vw, 5rem); }
.site-footer .wrap { padding-block: clamp(2.6rem, 5vw, 3.4rem); }
.footer-grid { display: grid; gap: 1.8rem; align-items: start; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer .brand-fallback, .site-footer h4 { color: #fff; }
.site-footer img.flogo { height: 58px; width: auto; margin-bottom: 1rem; }
.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.site-footer a:hover { border-bottom-color: var(--koi); }
.site-footer h4 { font-family: "Mulish", sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .7rem; color: #9fb0c9; }
.socials { display: flex; gap: .6rem; margin-top: .4rem; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); border: none; }
.socials a:hover { background: var(--koi); }
.socials svg { width: 20px; height: 20px; fill: #fff; }
.legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.4rem; font-size: .85rem; color: #9fb0c9; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---------- accessibility & motion ---------- */
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: .7rem 1rem; border-radius: 0 0 10px 0; z-index: 100; font-weight: 700;
}
.skip:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
