/* Kulmis brand components (illustrated + interactive). Loaded after styles.css. */

/* Page loader: the Kuli badge animates until the page has loaded (CSS hides it after 5s even if JS never runs) */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--beige);
  transition: opacity .6s var(--ease), visibility .6s; animation: loader-out .01s 5s forwards; }
.loader img { width: min(180px, 42vw); height: auto; animation: loader-in .6s var(--ease) both; }
.is-loaded .loader { opacity: 0; visibility: hidden; }
@keyframes loader-in { from { transform: scale(.6); opacity: 0; } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* SVG icons from assets/icons.svg */
.ic { width: 52px; height: 52px; color: var(--ink); flex: none; }
.ic-sm { width: 30px; height: 30px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { width: 46px; height: 46px; }
.logo.big img { width: clamp(70px, 9vw, 120px); height: auto; }

/* ---------- Illustrated hero ---------- */
.k-hero { position: relative; background: url(assets/prairie.svg) center bottom / cover no-repeat, var(--beige); padding: 60px 0 220px; overflow: hidden; z-index: 1; }
.k-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; background: var(--white); border-radius: 999px; padding: 8px 18px 8px 10px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(31,42,68,.08); margin-bottom: 22px; }
.eyebrow .ic { width: 28px; height: 28px; }
.k-hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); letter-spacing: -.03em; }
.k-hero h1 .hl { color: var(--sky); position: relative; white-space: nowrap; }
.k-hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .16em; background: var(--lime); border-radius: 99px; z-index: -1;
  transform: scaleX(0); transform-origin: left; animation: underline .9s var(--ease) 1s forwards; }
@keyframes underline { to { transform: none; } }
.ages { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 30px; }
.ages span { background: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: .9rem; }
.hero-photo { position: relative; aspect-ratio: 1 / 1; max-width: 560px; justify-self: center; width: 100%; }
.hero-photo .blob { position: absolute; inset: 0; border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%; overflow: hidden; border: 10px solid var(--white);
  box-shadow: 0 30px 60px rgba(31,42,68,.18); animation: morph 12s ease-in-out infinite; }
.hero-photo .blob img { width: 100%; height: 100%; object-fit: cover; }
@keyframes morph { 50% { border-radius: 44% 56% 58% 42% / 56% 44% 56% 44%; } }
.float-card { position: absolute; background: var(--white); border-radius: 18px; padding: 12px 16px; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 16px 40px rgba(31,42,68,.16); font-weight: 600; font-size: .92rem; animation: bob 5s ease-in-out infinite; z-index: 3; }
.float-card small { display: block; color: var(--muted); font-weight: 500; }
.float-card.f1 { top: 8%; left: -6%; }
.float-card.f2 { bottom: 12%; right: -4%; animation-delay: 1.4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Kuli mascot (eyes follow the pointer; click for a tip) */
.kuli { position: absolute; width: 150px; bottom: -40px; left: -40px; z-index: 4; cursor: pointer; border: 0; background: none; padding: 0;
  transition: transform .4s var(--ease); }
.kuli:hover { transform: rotate(-6deg) scale(1.05); }
.kuli:focus-visible { outline: 3px solid var(--sky); outline-offset: 6px; border-radius: 50%; }
.kuli svg { width: 100%; height: auto; display: block; overflow: visible; }
.kuli .pupils { transition: transform .15s; }
.kuli.hop { animation: hop .6s var(--ease); }
@keyframes hop { 40% { transform: translateY(-26px) rotate(-8deg); } }
.bubble-tip { position: absolute; left: 110px; bottom: 120px; width: 240px; background: var(--ink); color: var(--white); border-radius: 18px 18px 18px 4px;
  padding: 14px 16px; font-size: .92rem; line-height: 1.45; z-index: 5; opacity: 0; transform: translateY(10px) scale(.95); transition: .35s var(--ease); pointer-events: none; }
.bubble-tip.show { opacity: 1; transform: none; }
.sun .rays { animation: spin 40s linear infinite; transform-origin: 0 0; }

/* ---------- Trust strip ---------- */
.trust-strip { position: relative; z-index: 2; margin-top: -90px; }
.trust-row { background: var(--white); border-radius: 28px; box-shadow: 0 24px 60px rgba(31,42,68,.12); display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; gap: 14px; align-items: center; padding: 26px 24px; }
.trust-item + .trust-item { border-left: 2px dashed var(--line); }
.trust-item b { display: block; font-family: 'Nunito'; font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.trust-item span { color: var(--muted); font-size: .88rem; }

/* ---------- Program finder ---------- */
.finder { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--ink); color: var(--white); border-radius: 32px; overflow: hidden; }
.finder-form { padding: 56px; }
.finder-form h2 { color: var(--white); font-size: clamp(2rem, 4vw, 3.2rem); }
.finder-form p { color: #c9cfdd; margin: 14px 0 26px; }
.finder-form label { font-weight: 600; display: block; margin-bottom: 10px; }
.finder-row { display: flex; gap: 10px; flex-wrap: wrap; }
.finder-row input { flex: 1; min-width: 200px; font: inherit; padding: 15px 18px; border-radius: 14px; border: 0; color: var(--ink); }
.finder-result { position: relative; background: var(--cream); color: var(--ink); padding: 56px; display: flex; flex-direction: column; justify-content: center; min-height: 360px; }
.finder-result .room { font-family: 'Nunito'; font-weight: 900; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin: 8px 0 10px; }
.finder-result .age-out { display: inline-block; background: var(--white); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.finder-result p { color: var(--muted); max-width: 420px; }
.finder-result .btn { margin-top: 22px; align-self: flex-start; }
.finder-result.pop .room { animation: popin .6s var(--ease); }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
.finder-result .mini-kuli { position: absolute; right: 26px; bottom: 20px; width: 110px; }

/* ---------- Programs ---------- */
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prog { position: relative; border-radius: var(--radius); padding: 30px; background: var(--white); border: 2px solid var(--line); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s; }
.prog::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--band, var(--lime)); }
.prog:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 24px 50px rgba(31,42,68,.12); }
.prog .ic { margin-bottom: 16px; transition: transform .6s var(--ease); }
.prog:hover .ic { transform: rotate(-10deg) scale(1.1); }
.prog .age { display: inline-block; background: var(--beige); border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: .85rem; margin-bottom: 10px; }
.prog p { color: var(--muted); margin-top: 8px; }
.prog .ratio { margin-top: 16px; font-size: .88rem; color: var(--ink); font-weight: 600; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pillar { text-align: center; padding: 34px 26px; border-radius: var(--radius); background: var(--white); }
.pillar .ic { width: 64px; height: 64px; margin: 0 auto 16px; }
.pillar p { color: var(--muted); margin-top: 8px; }

/* ---------- Virtual tour ---------- */
.tour { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: center; }
.tour-art { position: relative; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px rgba(31,42,68,.12); border: 8px solid var(--white); }
.tour-art img { width: 100%; display: block; }
.spot { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 0; cursor: pointer; background: var(--white);
  color: var(--ink); font-weight: 900; font-size: 1.3rem; box-shadow: 0 6px 18px rgba(31,42,68,.25); display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; }
.spot::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--white); animation: ping 2s ease-out infinite; }
.spot:hover, .spot[aria-pressed="true"] { transform: scale(1.15); background: var(--lime); }
.spot:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; }
@keyframes ping { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.tour-card { background: var(--white); border-radius: var(--radius); padding: 34px; min-height: 280px; }
.tour-card .ic { width: 60px; height: 60px; margin-bottom: 14px; }
.tour-card p { color: var(--muted); margin-top: 10px; }
.tour-card .hint { font-size: .9rem; color: var(--muted); margin-top: 18px; }
.tour-card.swap { animation: popin .45s var(--ease); }

/* ---------- Openings board ---------- */
.openings { display: grid; gap: 14px; }
.opening { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 24px; align-items: center; background: var(--white); border-radius: 18px; padding: 20px 26px; }
.opening b { font-family: 'Nunito'; font-weight: 800; font-size: 1.15rem; }
.opening small { display: block; color: var(--muted); }
.meter { height: 12px; border-radius: 99px; background: var(--beige); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--leaf); transition: width 1.4s var(--ease); }
.opening[data-status="limited"] .meter i { background: var(--lime); }
.opening[data-status="waitlist"] .meter i { background: var(--coral); }
.pill { border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.pill.open { background: #D3F0DF; color: #1d6b43; }
.pill.limited { background: #FFE7A8; color: #7a5600; }
.pill.waitlist { background: #FFD0CA; color: #9b2c22; }
.updated { color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* ---------- Enrollment steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; top: 34px; left: 12%; right: 12%; border-top: 3px dashed var(--line); }
.stp { text-align: center; position: relative; }
.stp::before { counter-increment: s; content: counter(s); width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px;
  background: var(--lime); font-family: 'Nunito'; font-weight: 900; font-size: 1.6rem; position: relative; box-shadow: 0 0 0 8px var(--white); }
.stp:nth-child(2)::before { background: var(--lilac); color: var(--white); }
.stp:nth-child(3)::before { background: var(--coral); color: var(--white); }
.stp:nth-child(4)::before { background: var(--leaf); color: var(--white); }
.stp p { color: var(--muted); margin-top: 6px; }

/* ---------- FAQ tabs + search ---------- */
.faq-tools { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { border: 2px solid var(--line); background: var(--white); border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; transition: .25s; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.faq-search { font: inherit; border: 2px solid var(--line); border-radius: 999px; padding: 10px 18px; min-width: 240px; }
.faq-search:focus { outline: none; border-color: var(--ink); }
.faq-empty { color: var(--muted); text-align: center; padding: 20px; }

/* ---------- Nebraska resources ---------- */
.ne-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ne-card { background: var(--white); border-radius: var(--radius); padding: 30px; border: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.ne-card p { color: var(--muted); }
.ne-card a.link { margin-top: auto; color: var(--sky); font-weight: 700; }
.ne-card a.link:hover { text-decoration: underline; }

/* Wavy section edge */
.wave-top { position: relative; }
.wave-top::before { content: ""; position: absolute; left: 0; right: 0; top: -38px; height: 40px; background: inherit;
  -webkit-mask: radial-gradient(40px 24px at 50% 100%, #000 98%, transparent) 0 0 / 80px 40px repeat-x; mask: radial-gradient(40px 24px at 50% 100%, #000 98%, transparent) 0 0 / 80px 40px repeat-x; }

/* Confetti canvas */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

@media (max-width: 1100px) {
  .trust-row, .pillars { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(3) { border-left: 0; }
  .prog-grid, .ne-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .k-hero-grid, .finder, .tour { grid-template-columns: 1fr; }
  .k-hero { padding-bottom: 180px; }
  .hero-photo { max-width: 420px; }
  .float-card.f1 { left: 0; }
  .float-card.f2 { right: 0; }
  .finder-form, .finder-result { padding: 36px 26px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before { display: none; }
  .opening { grid-template-columns: 1fr auto; }
  .opening .meter { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  .trust-row, .pillars, .prog-grid, .ne-grid, .steps { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: 0; border-top: 2px dashed var(--line); }
  .kuli { width: 110px; left: -10px; }
  .bubble-tip { left: 70px; width: 200px; }
  .finder-result .mini-kuli { width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo .blob, .float-card, .spot::before, .sun .rays { animation: none; }
  .k-hero h1 .hl::after { transform: none; }
}

/* ---------- Footer: night sky over the prairie (open until 1 AM) ---------- */
.footer { background: var(--ink); color: #DCE2EE; padding: 90px 0 0; overflow: hidden; }
.night { position: absolute; inset: 0 0 150px; pointer-events: none; }
.night::before, .night::after { content: ""; position: absolute; inset: 0; animation: twinkle 3.5s ease-in-out infinite alternate; }
.night::before { background-image:
  radial-gradient(1.6px 1.6px at 6% 22%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 18% 64%, #fff 50%, transparent 52%),
  radial-gradient(2px 2px at 31% 12%, #FFE7A8 50%, transparent 52%), radial-gradient(1.2px 1.2px at 44% 48%, #fff 50%, transparent 52%),
  radial-gradient(1.6px 1.6px at 57% 20%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 69% 70%, #fff 50%, transparent 52%),
  radial-gradient(2px 2px at 83% 38%, #FFE7A8 50%, transparent 52%), radial-gradient(1.2px 1.2px at 95% 16%, #fff 50%, transparent 52%); }
.night::after { animation-delay: 1.75s; background-image:
  radial-gradient(1.2px 1.2px at 11% 42%, #fff 50%, transparent 52%), radial-gradient(1.8px 1.8px at 25% 30%, #fff 50%, transparent 52%),
  radial-gradient(1.2px 1.2px at 38% 78%, #fff 50%, transparent 52%), radial-gradient(1.6px 1.6px at 51% 8%, #FFE7A8 50%, transparent 52%),
  radial-gradient(1.2px 1.2px at 63% 44%, #fff 50%, transparent 52%), radial-gradient(1.8px 1.8px at 76% 14%, #fff 50%, transparent 52%),
  radial-gradient(1.2px 1.2px at 89% 62%, #fff 50%, transparent 52%); }
@keyframes twinkle { from { opacity: .3; } to { opacity: 1; } }
.moon { position: absolute; top: 40px; right: 7%; width: 52px; height: 52px; border-radius: 50%; box-shadow: 14px -8px 0 0 #FFD23F; transform: rotate(-12deg); }

.foot-grid { position: relative; display: grid; grid-template-columns: 1.25fr 1.3fr .8fr 1fr; gap: 40px; align-items: start; }
.footer h4 { font-family: 'Nunito'; font-weight: 900; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); margin-bottom: 16px; }
.foot-logo { display: flex; align-items: center; gap: 14px; color: #fff; font-family: 'Lilita One', sans-serif; font-size: 2.4rem; line-height: 1; }
.foot-logo img { width: 92px; height: 92px; transition: transform .6s var(--ease); }
.foot-logo:hover img { transform: rotate(-12deg) scale(1.05); }
.foot-logo small { display: block; margin-top: 6px; font-family: 'Nunito'; font-weight: 800; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--lime); }
.foot-tag { color: #AEB6C8; margin: 18px 0 22px; max-width: 320px; }
.foot-contact { display: grid; gap: 10px; }
.foot-pill { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  padding: 12px 14px; color: #fff; font-weight: 600; overflow-wrap: anywhere; transition: background .25s, transform .3s var(--ease); }
.foot-pill:hover { background: rgba(255,255,255,.12); transform: translateX(4px); }
.foot-pill .ic { color: #fff; --tint: rgba(245,184,46,.45); }
.foot-pill small { display: block; color: #AEB6C8; font-weight: 500; font-size: .8rem; }
.foot-links { display: grid; gap: 10px; }
.foot-links a { color: #DCE2EE; width: fit-content; background: linear-gradient(var(--lime), var(--lime)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .25s; }
.foot-links a:hover { color: #fff; background-size: 100% 2px; }
.foot-hours { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 22px; }
.foot-hours .status { background: rgba(255,255,255,.1); color: #fff; }
.foot-hours b { display: block; font-family: 'Nunito'; font-weight: 900; font-size: 1.3rem; color: #fff; }
.foot-hours p { color: #DCE2EE; }
.foot-note { color: #AEB6C8 !important; font-size: .88rem; margin-top: 10px; }
.foot-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.states { display: flex; gap: 8px; margin-top: 8px; }
.states span { background: var(--lime); color: var(--ink); font-weight: 800; border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.footer a:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 8px; }

.foot-hills { position: relative; height: 150px; margin-top: 50px; }
.foot-hills svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.foot-kuli { position: absolute; left: 0; bottom: 58px; width: 64px; animation: walk 45s linear infinite; }
.foot-kuli img { display: block; transform-origin: 50% 100%; animation: waddle .55s ease-in-out infinite alternate; }
@keyframes walk { from { transform: translateX(-80px); } to { transform: translateX(calc(100vw + 20px)); } }
@keyframes waddle { from { transform: rotate(-6deg); } to { transform: rotate(6deg) translateY(-3px); } }
.foot-bottom { background: #23724A; color: #E4F3EA; font-size: .9rem; }
.foot-bottom .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 14px; }
.to-top { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center;
  font-weight: 900; font-size: 1.2rem; transition: transform .3s var(--ease); }
.to-top:hover { transform: translateY(-4px); }

@media (max-width: 1100px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .foot-logo { font-size: 2rem; }
  .foot-logo img { width: 72px; height: 72px; }
  .moon { top: 24px; }
}
@media (prefers-reduced-motion: reduce) { .night::before, .night::after, .foot-kuli, .foot-kuli img { animation: none; } }
