/* ==========================================================================
   JOLLY MISS ENGLISH — Design System
   Brand: navy + gold (existing identity, refined)
   Signature: hand-marked "red pen" annotations — a literal nod to how an
   English teacher actually marks grammar and composition work.
   ========================================================================== */

:root {
  /* Color */
  --navy: #0b2545;
  --navy-dark: #071a33;
  --navy-mid: #12345f;
  --gold: #f5b700;
  --gold-dark: #d99a00;
  --ink: #1b2430;
  --ink-soft: #545f70;
  --ink-faint: #8993a4;
  --paper: #ffffff;
  --paper-alt: #f5f7fb;
  --paper-deep: #eef1f8;
  --border: #e3e7f0;
  --red-pen: #d6432e;
  --green-check: #2f9e44;
  --whatsapp: #25d366;

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-hand: "Kalam", cursive;

  /* Scale */
  --step-1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step2: clamp(1.5rem, 1.35rem + 0.7vw, 1.9rem);
  --step3: clamp(1.9rem, 1.6rem + 1.3vw, 2.6rem);
  --step4: clamp(2.4rem, 1.9rem + 2.2vw, 3.6rem);

  /* Layout */
  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 37, 69, 0.1);
  --shadow-lg: 0 24px 60px rgba(11, 37, 69, 0.16);
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: var(--step0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  font-weight: 600;
}
h1 { font-size: var(--step4); }
h2 { font-size: var(--step3); }
h3 { font-size: var(--step2); }
h4 { font-size: var(--step1); }
p { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--paper-alt); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #c7d2e6; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--step-1); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-dark);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold-dark); border-radius: 2px; }
.lede { font-size: var(--step1); color: var(--ink-soft); margin-top: 16px; }
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* ---------- Signature motif: red-pen annotations ---------- */
/* A literal nod to how Jolly Miss actually marks student work. Used
   sparingly — trust numbers, key proof points, and callouts only. */
.mark {
  font-family: var(--font-hand);
  color: var(--red-pen);
  font-size: 1.05em;
  display: inline-block;
  transform: rotate(-2.5deg);
}
.mark--tick::before { content: "✓ "; }
.squiggle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 5 Q4 0 8 5 T16 5' fill='none' stroke='%23D6432E' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 15px 7px;
  padding-bottom: 6px;
}
.stamp {
  position: absolute;
  font-family: var(--font-hand);
  color: var(--red-pen);
  border: 2px solid var(--red-pen);
  border-radius: 50%;
  padding: 10px 4px;
  font-size: 0.72rem;
  line-height: 1.15;
  text-align: center;
  transform: rotate(9deg);
  opacity: 0.9;
  width: 78px; height: 78px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 50px; font-weight: 700; font-size: var(--step0);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--navy-dark); box-shadow: 0 6px 20px rgba(245, 183, 0, 0.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(245, 183, 0, 0.45); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { filter: brightness(1.06); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: var(--step-1); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.logo strong span { color: var(--gold-dark); }
.logo small { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--ink); position: relative; padding: 6px 0; }
.nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold-dark);
}
.nav-links a:hover { color: var(--navy); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1100; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 0 0; height: calc(100vh - var(--header-h));
    background: var(--paper); flex-direction: column; justify-content: flex-start;
    padding: 36px 24px; gap: 26px; transform: translateX(100%); transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; }
  .nav-cta .btn span.long { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 76px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 40%, 0 100%);
}
.hero .container { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-copy { flex: 1 1 460px; }
.hero-copy .eyebrow { color: var(--gold); }
.hero-copy h1 { color: #fff; margin-bottom: 20px; }
.hero-copy h1 em { font-style: italic; color: var(--gold); }
.hero-copy p.lede { color: #cdd8ec; margin-bottom: 32px; max-width: 50ch; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-media { flex: 1 1 380px; position: relative; }
.hero-media .frame {
  border-radius: var(--radius-lg); overflow: hidden; border: 6px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow-lg); aspect-ratio: 16/10;
}
.hero-media .frame iframe, .hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: var(--step2); color: #fff; }
.hero-stat span { font-size: var(--step-1); color: #a9b8d4; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff; padding: 62px 0 80px; text-align: center;
}
.page-hero .eyebrow { justify-content: center; color: var(--gold); }
.page-hero h1 { color: #fff; }
.page-hero p { color: #cdd8ec; max-width: 60ch; margin: 14px auto 0; }
.breadcrumb { font-size: var(--step-1); color: #a9b8d4; margin-bottom: 14px; }
.breadcrumb a { color: #dfe7f5; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 34px; box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 54px; height: 54px; border-radius: 14px; background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 1.5rem;
}
.card h3 { font-size: var(--step1); margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.95rem; }

/* Course card */
.course-card { position: relative; }
.course-card .board-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; padding: 5px 11px;
  border-radius: 20px; background: var(--paper-deep); color: var(--navy-mid);
}
.course-card ul { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.course-card li { font-size: 0.92rem; color: var(--ink-soft); padding-left: 22px; position: relative; }
.course-card li::before { content: "✓"; position: absolute; left: 0; color: var(--green-check); font-weight: 700; }

/* Stat bar */
.stat-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  background: var(--paper-deep); border-radius: var(--radius-lg); padding: 42px 32px;
}
.stat { text-align: center; position: relative; }
.stat strong { display: block; font-family: var(--font-display); font-size: var(--step3); color: var(--navy); }
.stat span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
@media (max-width: 760px) { .stat-bar { grid-template-columns: repeat(2, 1fr); } }

/* Testimonial */
.testimonial {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 32px; box-shadow: var(--shadow-sm); position: relative;
}
.testimonial .quote-mark {
  font-family: var(--font-display); font-size: 3.2rem; color: var(--paper-deep); position: absolute;
  top: 12px; right: 22px; line-height: 1; z-index: 0;
}
.testimonial p.quote { color: var(--ink); font-size: 1.02rem; position: relative; z-index: 1; margin-bottom: 18px; }
.testimonial .who { display: flex; align-items: center; gap: 12px; }
.testimonial .avatar {
  width: 60px; height: 60px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
  flex-shrink: 0; overflow: hidden; font-size: 1.3rem;
}
.testimonial .avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial .who strong { display: block; font-size: 0.92rem; color: var(--navy); }
.testimonial .who span { font-size: 0.8rem; color: var(--ink-faint); }
.placeholder-note {
  border: 1.5px dashed var(--gold-dark); background: #fffaeb; border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: 0.88rem; color: var(--ink-soft);
}

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; text-align: left; font-weight: 600; color: var(--navy); font-size: 0.98rem;
}
.faq-q .plus { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-q .plus::before, .faq-q .plus::after {
  content: ""; position: absolute; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease;
}
.faq-q .plus::before { width: 100%; height: 2.5px; top: 50%; left: 0; transform: translateY(-50%); }
.faq-q .plus::after { height: 100%; width: 2.5px; left: 50%; top: 0; transform: translateX(-50%); }
.faq-item.open .faq-q .plus::after { transform: translateX(-50%) rotate(90deg) scale(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 22px 20px; font-size: 0.93rem; color: var(--ink-soft); }
.faq-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.faq-filter button {
  padding: 9px 18px; border-radius: 20px; border: 1.5px solid var(--border); font-size: 0.85rem; font-weight: 600;
  color: var(--ink-soft); transition: all 0.2s ease;
}
.faq-filter button.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
input, select, textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; font-size: 0.95rem; transition: border-color 0.2s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-mid); outline: none; }
textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.8rem; color: var(--ink-faint); margin-top: 10px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #b9c5dc; padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; margin-bottom: 50px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 18px; font-family: var(--font-body); font-weight: 700; }
.footer-grid ul { display: flex; flex-direction: column; gap: 11px; }
.footer-grid a { font-size: 0.9rem; color: #b9c5dc; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand strong { font-family: var(--font-display); color: #fff; font-size: 1.3rem; }
.footer-brand p { font-size: 0.88rem; margin-top: 12px; color: #93a1bd; max-width: 32ch; }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--gold); color: var(--navy-dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: #7c8bab;
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
  padding: 10px 14px; gap: 10px;
}
@media (max-width: 640px) { .mobile-cta-bar { display: flex; } body { padding-bottom: 66px; } }
.mobile-cta-bar .btn { flex: 1; padding: 12px 10px; font-size: 0.85rem; }

/* ---------- Jolly Bot widget ---------- */
#bot-launcher {
  position: fixed; bottom: 28px; right: 24px; z-index: 1200;
  width: 62px; height: 62px; border-radius: 50%; background: var(--gold);
  color: var(--navy-dark); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); font-size: 1.5rem; transition: transform 0.2s ease;
}
#bot-launcher:hover { transform: scale(1.06); }
#bot-launcher .dot {
  position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; background: var(--green-check);
  border: 2px solid #fff; border-radius: 50%;
}
@media (max-width: 640px) { #bot-launcher { bottom: 78px; right: 16px; width: 56px; height: 56px; } }

#bot-window {
  position: fixed; bottom: 104px; right: 24px; z-index: 1200;
  width: 380px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  display: none; flex-direction: column; overflow: hidden;
}
#bot-window.open { display: flex; }
@media (max-width: 640px) { #bot-window { bottom: 144px; right: 16px; height: 70vh; max-height: calc(100vh - 160px); } }

.bot-header {
  background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; flex-shrink: 0;
}
.bot-header .who { display: flex; align-items: center; gap: 10px; }
.bot-header .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
  overflow: hidden; flex-shrink: 0;
}
.bot-header .avatar img { width: 100%; height: 100%; object-fit: cover; }
.bot-header strong { font-size: 0.9rem; display: block; }
.bot-header .status { font-size: 0.72rem; color: #8de3a8; display: flex; align-items: center; gap: 5px; }
.bot-header .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8de3a8; }
.bot-close { color: #fff; font-size: 1.3rem; padding: 4px 8px; opacity: 0.8; }
.bot-close:hover { opacity: 1; }

.bot-messages { flex: 1; overflow-y: auto; padding: 16px; background: var(--paper-alt); display: flex; flex-direction: column; gap: 10px; }
.bot-msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 0.87rem; line-height: 1.45; word-wrap: break-word; }
.bot-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bot-msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.bot-msg a { color: var(--navy-mid); text-decoration: underline; }
.bot-msg.user a { color: #ffd873; }
.bot-msg .fallback-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bot-msg .fallback-actions a {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700;
  padding: 7px 12px; border-radius: 20px; text-decoration: none;
}
.fallback-actions .call { background: var(--navy); color: #fff; }
.fallback-actions .wa { background: var(--whatsapp); color: #fff; }
.bot-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; flex-shrink: 0; }
.bot-suggestions button {
  font-size: 0.76rem; padding: 7px 12px; border-radius: 16px; border: 1px solid var(--border);
  color: var(--navy-mid); background: #fff; font-weight: 600;
}
.bot-suggestions button:hover { background: var(--paper-deep); }
.bot-typing { display: flex; gap: 4px; padding: 12px 14px; align-self: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 4px; }
.bot-typing span { width: 6px; height: 6px; background: var(--ink-faint); border-radius: 50%; animation: botTyping 1.2s infinite ease-in-out; }
.bot-typing span:nth-child(2) { animation-delay: 0.15s; }
.bot-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes botTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.bot-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.bot-input-row input { flex: 1; padding: 11px 14px; border-radius: 24px; }
.bot-input-row button {
  width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.bot-input-row button:hover { background: var(--navy-mid); }
.bot-footer-note { font-size: 0.68rem; text-align: center; color: var(--ink-faint); padding: 0 12px 10px; flex-shrink: 0; }

/* ---------- Reveal-on-scroll (subtle, respects reduced motion) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Results table ---------- */
.results-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.results-table th, .results-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.results-table th { background: var(--paper-deep); color: var(--navy); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.results-table tbody tr:hover { background: var(--paper-alt); }
.results-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--paper-deep); color: var(--navy-mid);
  font-size: 0.78rem; font-weight: 700; padding: 6px 14px; border-radius: 20px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 12px 18px;
  z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Gallery page ---------- */
.gallery-event { margin-bottom: 72px; }
.gallery-event:last-child { margin-bottom: 0; }
.gallery-event-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.gallery-event-head h2 { font-size: var(--step3); }
.gallery-event-head p { color: var(--ink-soft); margin-top: 10px; }

.gallery-featured { max-width: 360px; margin: 0 auto 48px; }
.gallery-featured .photo-card { aspect-ratio: 3 / 4; }

.gallery-class { margin-bottom: 40px; }
.gallery-class:last-child { margin-bottom: 0; }
.gallery-class-head {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: var(--step1); font-weight: 600;
  color: var(--navy); margin-bottom: 20px;
}
.gallery-class-head::before { content: ""; width: 28px; height: 3px; background: var(--gold-dark); border-radius: 2px; flex-shrink: 0; }

.photo-card {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  cursor: zoom-in; background: var(--paper-alt);
}
button.photo-card { margin: 0; padding: 0; font: inherit; text-align: left; }
.photo-card--portrait { aspect-ratio: 3 / 4; }
.photo-card--wide { aspect-ratio: 16 / 9; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.photo-card:hover img { transform: scale(1.05); }
.photo-card:hover { box-shadow: var(--shadow-md); }
.photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px;
  background: linear-gradient(0deg, rgba(11,37,69,0.75), rgba(11,37,69,0));
  color: #fff; font-size: 0.85rem; font-weight: 600;
}

#lightbox {
  display: none; position: fixed; inset: 0; z-index: 1400;
  background: rgba(11, 20, 33, 0.92); align-items: center; justify-content: center; padding: 24px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
#lightbox-close {
  position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; border: none; font-size: 1.4rem; cursor: pointer;
}
#lightbox-close:hover { background: rgba(255,255,255,0.22); }
@media (max-width: 640px) {
  .gallery-event { margin-bottom: 52px; }
  .gallery-featured { max-width: 280px; }
}
