/* AIC Kipkeikei Girls' Senior School
   Palette comes from the school uniform: violet sweaters, white shirts, charcoal skirts,
   with gold taken from the warm yellow of the school buildings.
   Signature shape: the arch, used for photo frames and portraits. */

:root {
  --violet: #6B2D8F;
  --deep: #3F1A5C;
  --mist: #EFE5F5;
  --gold: #E3A917;
  --ink: #2B2630;
  --paper: #FFFFFF;
  --muted: #62596B;
  --line: #DCCFE6;
  --tbc-bg: #FFF7DD;
  --tbc-line: #C99A10;
  --link: #5A2379;

  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.5vw, 5.2rem);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
  --radius: 6px;
  --arch: 999px 999px 8px 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; color: var(--deep); font-weight: 700; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; }
ul { padding-left: 1.2em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.lead { font-size: var(--step-1); max-width: 56ch; color: var(--ink); line-height: 1.5; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header { background: var(--violet); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header::after { content: ""; display: block; height: 5px; background: var(--gold); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { width: 54px; height: 54px; border-radius: 50%; background: #fff; padding: 2px; flex: none; }
.brand b { font-family: var(--display); font-size: 1.05rem; line-height: 1.15; display: block; font-weight: 700; }
.brand small { display: block; font-size: 0.78rem; opacity: 0.88; line-height: 1.2; margin-top: 2px; }
.brand:hover { color: #fff; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; color: #fff; text-decoration: none; padding: 10px 11px; border-radius: 4px; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { background: rgba(255,255,255,0.14); color: #fff; }
.nav a[aria-current="page"] { background: var(--deep); box-shadow: inset 0 -3px 0 var(--gold); }
.menu-btn { display: none; margin-left: auto; background: transparent; border: 2px solid #fff; color: #fff; padding: 8px 14px; border-radius: 4px; font: 600 0.95rem var(--body); cursor: pointer; }
@media (max-width: 1020px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--deep); padding: 8px var(--gutter) 18px; border-bottom: 5px solid var(--gold); margin: 0; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,0.14); border-radius: 0; font-size: 1.05rem; }
}
@media (max-width: 440px) { .brand small { display: none; } .brand b { font-size: 0.95rem; } }

/* ---------- hero ---------- */
.hero { background: var(--deep); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 5vw, 64px); align-items: end; padding-top: clamp(40px, 7vw, 88px); }
.hero h1 { color: #fff; max-width: 11ch; }
.hero p.lead { color: #EBDDF3; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-bottom: clamp(36px, 6vw, 72px); }
.hero-text { align-self: center; }
.arch { border-radius: var(--arch); overflow: hidden; background: var(--mist); position: relative; }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo { position: relative; max-width: 440px; justify-self: end; width: 100%; }
.hero-photo .arch { aspect-ratio: 3 / 4; border: 6px solid var(--gold); border-bottom: 0; }
.hero-photo .badge { position: absolute; left: -26px; bottom: 28px; width: 112px; height: 112px; background: #fff; border-radius: 50%; padding: 4px; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 340px; justify-self: center; }
  .hero-photo .badge { left: -8px; width: 92px; height: 92px; }
  .hero h1 { max-width: 14ch; }
}

.btn { display: inline-block; padding: 13px 24px; font: 700 1rem var(--body); text-decoration: none; border-radius: 4px; border: 2px solid transparent; cursor: pointer; text-align: center; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #F2BC2C; color: var(--ink); }
.btn-line { border-color: #fff; color: #fff; background: transparent; }
.btn-line:hover { background: #fff; color: var(--deep); }
.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: var(--deep); color: #fff; }
.btn-ghost { border-color: var(--violet); color: var(--violet); background: transparent; }
.btn-ghost:hover { background: var(--violet); color: #fff; }

/* ---------- facts ---------- */
.facts { background: var(--mist); border-bottom: 1px solid var(--line); }
.facts dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts div { padding: 20px 18px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-family: var(--display); font-size: var(--step-1); font-weight: 700; color: var(--deep); }
@media (max-width: 760px) {
  .facts dl { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(44px, 7vw, 92px); }
.section.tint { background: var(--mist); }
.section.deep { background: var(--deep); color: #EBDDF3; }
.section.deep h2, .section.deep h3 { color: #fff; }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.45; margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.split.wide-left { grid-template-columns: 1.3fr 0.9fr; }
@media (max-width: 820px) { .split, .split.wide-left { grid-template-columns: 1fr; } }

.page-title { background: var(--deep); color: #fff; padding-block: clamp(36px, 6vw, 72px); border-bottom: 5px solid var(--gold); }
.page-title h1 { color: #fff; font-size: var(--step-3); }
.page-title p { color: #EBDDF3; font-size: var(--step-1); margin: 14px 0 0; max-width: 60ch; }
.crumbs { font-size: var(--step--1); margin-bottom: 14px; color: #D9C4E6; }
.crumbs a { color: #fff; }

/* cards: used only where items are genuinely separate objects */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.pathway { border-top: 6px solid var(--violet); }
.pathway:nth-child(2) { border-top-color: var(--gold); }
.pathway:nth-child(3) { border-top-color: var(--deep); }
.pathway ul { margin: 10px 0 0; color: var(--muted); }

.values { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 2px solid var(--violet); }
.values li { padding: 16px 14px 16px 0; font-family: var(--display); font-weight: 700; font-size: var(--step-1); color: var(--deep); border-left: 1px solid var(--line); padding-left: 14px; }
.values li:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr 1fr; } .values li:nth-child(odd) { border-left: 0; padding-left: 0; } .values li { border-bottom: 1px solid var(--line); } }

.vm { display: grid; gap: 28px; }
.vm h3 { font-size: var(--step--1); color: var(--violet); margin-bottom: 4px; font-family: var(--body); font-weight: 700; }
.vm p { font-family: var(--display); font-size: var(--step-2); line-height: 1.25; color: var(--deep); font-weight: 600; margin: 0; max-width: 24ch; }

/* ---------- timeline (real sequence) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--violet); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 30px 28px; }
.timeline li::before { content: ""; position: absolute; left: -11px; top: 6px; width: 19px; height: 19px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--violet); }
.timeline time { font-family: var(--display); font-weight: 800; color: var(--violet); font-size: var(--step-1); display: block; }
.timeline h3 { margin: 2px 0 6px; }
.timeline p { margin: 0; }

/* ---------- people ---------- */
.person { text-align: left; min-width: 0; }
.person .arch { aspect-ratio: 4 / 5; display: grid; place-items: center; border: 2px dashed var(--tbc-line); background: var(--tbc-bg); }
.person .arch span { font-size: var(--step--1); color: #7A5A00; font-weight: 600; text-align: center; padding: 0 16px; }
.person h3 { margin-top: 14px; }
.person .role { color: var(--violet); font-weight: 700; font-size: var(--step--1); margin: 2px 0 6px; }
.person p { font-size: 0.95rem; color: var(--muted); }

/* ---------- placeholders: visible so the school can see what is missing ---------- */
.tbc { background: var(--tbc-bg); border-bottom: 2px dashed var(--tbc-line); color: #6B4E00; padding: 0 4px; border-radius: 2px; font-weight: 600; }
.tbc-block { background: var(--tbc-bg); border: 2px dashed var(--tbc-line); border-radius: var(--radius); padding: 18px 20px; color: #5A4200; }
.tbc-block b { display: block; margin-bottom: 4px; }
.tbc-block p { margin: 0; font-size: 0.95rem; }
body.hide-tbc .tbc-block { display: none; }
body.hide-tbc .tbc { background: none; border: 0; padding: 0; }

/* ---------- news / gallery ---------- */
.news-item { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); align-items: start; }
.news-item:first-child { border-top: 2px solid var(--violet); }
.news-item time { font-weight: 700; color: var(--violet); font-size: var(--step--1); }
.news-item h3 a { color: var(--deep); text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; }
.news-item p { margin: 6px 0 0; color: var(--muted); }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }
.feature { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.feature .arch { aspect-ratio: 3 / 4; max-width: 380px; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature .arch { max-width: 300px; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.gallery figure { margin: 0; }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gallery.wide img { aspect-ratio: 3/2; }
.gallery button { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: var(--step--1); color: var(--muted); padding-top: 6px; }
.lightbox { position: fixed; inset: 0; background: rgba(20,8,30,0.94); display: none; z-index: 200; padding: 20px; }
.lightbox.open { display: grid; place-items: center; }
.lightbox img { max-height: 84vh; max-width: min(92vw, 900px); width: auto; border-radius: 4px; }
.lightbox p { color: #fff; text-align: center; margin: 12px auto 0; max-width: 60ch; }
.lightbox button { position: absolute; background: var(--gold); border: 0; width: 46px; height: 46px; border-radius: 50%; font: 700 1.3rem var(--body); cursor: pointer; color: var(--ink); }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 12px; top: 50%; } .lb-next { right: 12px; top: 50%; }

.article { max-width: 760px; }
.article figure { margin: 28px 0; }
.article figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair img { border-radius: var(--radius); }

/* ---------- lists and tables ---------- */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); color: var(--deep); background: var(--mist); font-size: 0.95rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font: 800 1rem var(--display); }
.steps h3 { margin-bottom: 2px; }
.steps p { margin: 0; color: var(--muted); }

details { border-top: 1px solid var(--line); padding: 4px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-family: var(--display); font-size: var(--step-1); color: var(--deep); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--violet); }
details[open] summary::after { content: "–"; }
details > :not(summary) { padding-bottom: 14px; color: var(--muted); }

/* ---------- forms ---------- */
form { display: grid; gap: 16px; }
label { font-weight: 700; font-size: 0.95rem; display: grid; gap: 6px; }
input, select, textarea { font: inherit; padding: 12px 14px; border: 2px solid #BBA9C8; border-radius: 4px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); outline: 3px solid rgba(107,45,143,0.25); }
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-status { font-weight: 700; color: var(--deep); min-height: 1.4em; }

/* ---------- cta + footer ---------- */
.cta { background: var(--violet); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: clamp(36px, 5vw, 56px); }
.cta h2 { color: #fff; font-size: var(--step-2); max-width: 22ch; }
.cta p { color: #EBDDF3; margin: 8px 0 0; }
.site-footer { background: var(--deep); color: #D9C4E6; padding-top: 56px; font-size: 0.95rem; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: 12px; font-family: var(--body); font-weight: 700; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand img { width: 72px; height: 72px; border-radius: 50%; background: #fff; padding: 3px; flex: none; }
.foot-brand p { margin: 4px 0 0; }
.foot-bottom { margin-top: 40px; padding-block: 18px; border-top: 1px solid rgba(255,255,255,0.18); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.85rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.motto { font-family: var(--display); font-style: italic; color: var(--gold); font-weight: 600; }

.to-top { position: fixed; right: 16px; bottom: 16px; background: var(--violet); color: #fff; border: 2px solid var(--gold); width: 46px; height: 46px; border-radius: 50%; font: 700 1.2rem var(--body); cursor: pointer; display: none; z-index: 40; }
.to-top.show { display: block; }

/* the one orchestrated moment: hero photo rises into its arch once */
@keyframes rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero-photo .arch { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }

@media print { .site-header, .site-footer, .cta, .to-top, .menu-btn { display: none; } }

.split > *, .grid > *, .feature > *, .hero .wrap > * { min-width: 0; }
.pair img { width: 100%; }

.photo-ph{width:100%;height:100%;min-height:240px;display:grid;place-content:center;justify-items:center;gap:10px;background:var(--lilac,#EFE5F5);color:#3F1A5C;font-size:.9rem}
.photo-ph img{width:96px;height:96px;opacity:.9}
