/* ==========================================================================
   FoDaC — Friends of Dana and Correia Middle Schools
   Design tokens lifted from the original site so the rebuild matches 1:1.
   ========================================================================== */

:root {
  --primary: #5179a6;          /* FoDaC blue */
  --primary-dark: #3f6288;     /* darker blue for hovers */
  --primary-tint: #eff4fa;     /* pale blue section wash */
  --secondary: #5152a6;        /* indigo */
  --accent: #a67c51;           /* bronze */
  --dana-green: #3da442;

  --bg: #efefef;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink-muted: #5e5e5e;
  --border: #cacaca;
  --footer-bg: #1b1b1b;

  --font-heading: "Archivo Black", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Lora", Georgia, "Times New Roman", serif;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --wrap: 1200px;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 130px; }
a { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; font-weight: 400; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.wrap-mid { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

section { padding: 56px 0; }
section.tight { padding: 40px 0; }
.bg-white { background: #fff; }
.bg-grey { background: #efefef; }
.bg-tint { background: var(--primary-tint); }
.bg-primary { background: var(--primary); color: #fff; }
.bg-primary h1, .bg-primary h2, .bg-primary h3 { color: #fff; }

.center { text-align: center; }
.muted { color: var(--ink-muted); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(81, 121, 166, .1);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 14px;
}
.section-title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: .35em; }
.section-lede { color: var(--ink-muted); max-width: 700px; margin: 0 auto 2rem; }
.center .section-lede { text-align: center; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.43;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { opacity: .88; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-white { background: transparent; color: #fff; border-color: #fff; }
.btn-pill { border-radius: 999px; padding: 8px 18px; }
.btn-outline-white:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* --------------------------------------------------------------- header -- */
/* Top bar and masthead stick together, as on the original site. */
.site-header { position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }

.topbar { background: var(--primary); color: #fff; font-size: .875rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.topbar a:hover { opacity: .8; }
.tb-group { display: flex; align-items: center; gap: 24px; }
.tb-group.socials { gap: 16px; }
.topbar .pill { background: #fff; color: var(--primary); font-weight: 600; border-radius: 999px; padding: 6px 16px; white-space: nowrap; }
.topbar .pill:hover { opacity: .9; }

.masthead { background: #fff; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a, .nav button {
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  color: #374151;
  background: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.nav a:hover, .nav button:hover { background: var(--primary); color: #fff; }
.nav a.is-active { background: var(--primary); color: #fff; }

.has-menu { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: none;
}
.menu.open { display: block; }
.menu a { display: block; padding: 9px 12px; }

/* Hamburger: three lines, swaps to an X while the menu is open. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 8px;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
}
.nav-toggle:hover { background: #f3f4f6; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Phone/tablet menu: a flat divided list that pushes the page down. */
.mobile-nav {
  background: #fff;
  border-top: 1px solid #f3f4f6;
  padding: 0 16px 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-size: .875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a.is-active { color: var(--primary); font-weight: 600; }

@media (max-width: 1023px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 1024px) {
  .mobile-nav { display: none !important; }
}
@media (max-width: 639px) {
  .topbar .wrap { padding-left: 16px; padding-right: 16px; }
  /* Icons only on phones; the words stay available to screen readers. */
  .tb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* --------------------------------------------------------------- hero -- */
.hero { position: relative; min-height: min(60vh, 520px); display: flex; align-items: center; overflow: hidden; padding: 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 60px; padding-bottom: 60px; }
.hero-card {
  background: rgba(81, 121, 166, .88);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  max-width: 560px;
}
.hero-card h1 { color: #fff; font-size: clamp(1.9rem, 4.6vw, 2.7rem); }
.hero-card p { font-size: .98rem; }
.hero-card p.lead { font-weight: 600; color: rgba(255, 255, 255, .9); }
.hero-card p.sub { color: rgba(255, 255, 255, .8); margin-bottom: 1.5em; }

@media (max-width: 639px) {
  .hero { min-height: 0; }
  .hero .wrap { padding: 32px 16px; }
  .hero-card { padding: 24px; border-radius: 12px; }
  .hero-card h1 { font-size: 1.5rem; line-height: 1.25; margin-bottom: 12px; }
  .hero-card p { font-size: .875rem; line-height: 1.625; }
  .hero-card p.lead { line-height: 1.43; margin-bottom: 8px; }
  .hero-card p.sub { margin-bottom: 24px; }
}

/* page banner used on interior pages */
.page-hero { background: var(--primary); color: #fff; text-align: center; padding: 56px 0; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.page-hero p { color: rgba(255, 255, 255, .92); max-width: 720px; margin: 0 auto; }
.page-hero .eyebrow { background: rgba(255, 255, 255, .18); color: #fff; }
.page-hero .icon-badge {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* --------------------------------------------------------------- ribbon -- */
.ribbon { background: var(--primary); color: #fff; text-align: center; padding: 12px 16px; font-weight: 500; font-size: .75rem; line-height: 1.33; }
@media (min-width: 640px) { .ribbon { font-size: .875rem; line-height: 1.43; } }

/* --------------------------------------------------------- konstella cta -- */
.konstella-band { background: #757575; padding: 24px 16px; }
.konstella-card {
  max-width: 1024px;
  margin: 0 auto;
  background: #f0f0f0;
  border: 5px solid var(--dana-green);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.kc-body { display: flex; align-items: flex-start; gap: 16px; }
.kc-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(81, 121, 166, .1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.kc-title { font-size: 1rem; line-height: 1.5; color: var(--primary); margin: 0 0 2px; }
.kc-text { font-size: .875rem; line-height: 1.625; color: var(--ink-muted); margin: 0; }
.konstella-card .btn { flex-shrink: 0; white-space: nowrap; }
@media (min-width: 640px) {
  .konstella-card { flex-direction: row; justify-content: space-between; }
}

/* --------------------------------------------------------------- cards -- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card h3 { font-size: 1.05rem; margin-bottom: .3em; }
.card p { color: var(--ink-muted); font-size: .93rem; margin-bottom: 0; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(81, 121, 166, .12); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.badge {
  align-self: flex-start;
  font-size: .72rem; font-weight: 700;
  color: var(--primary); background: rgba(81, 121, 166, .1);
  border-radius: 999px; padding: 3px 12px;
}

/* numbered steps */
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: var(--font-heading); font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}

/* link list (resource pages) */
.linklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; list-style: none; padding: 0; }
.linklist a {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.linklist a:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

/* definition rows (cotillion details) */
.deflist { display: grid; gap: 10px; margin: 0 0 1.2em; }
.defrow { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: .93rem; }
.defrow dt { font-weight: 700; }
.defrow dd { margin: 0; color: var(--ink-muted); }
@media (max-width: 560px) { .defrow { grid-template-columns: 1fr; gap: 2px; } }

/* pill list (Power Their Potential funding list) */
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.pills li {
  background: #fff; border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 18px; font-size: .9rem; font-weight: 700;
}

/* --------------------------------------------------------------- carousel -- */
.carousel { position: relative; max-width: 900px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); }
.carousel-track { display: flex; transition: transform .4s ease; }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; height: clamp(260px, 46vw, 460px); object-fit: contain; background: #fff; padding: 12px; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: var(--primary); color: #fff; }
.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }
@media (max-width: 980px) { .carousel-prev { left: 6px; } .carousel-next { right: 6px; } }
.carousel-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.carousel-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--border); cursor: pointer; }
.carousel-dots button[aria-current="true"] { background: var(--primary); width: 22px; border-radius: 999px; }
.carousel-caption { text-align: center; font-size: .88rem; color: var(--ink-muted); margin-top: 10px; min-height: 1.4em; }

/* --------------------------------------------------------------- partners -- */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; align-items: center; }
.partners figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; height: 110px; display: flex; align-items: center; justify-content: center; }
.partners img { max-height: 100%; width: auto; object-fit: contain; }

/* --------------------------------------------------------------- forms -- */
.form { display: grid; gap: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 700; }
.field input, .field textarea, .field select {
  font-family: var(--font-sans); font-size: .95rem;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff; color: var(--ink);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field textarea { min-height: 110px; resize: vertical; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 400; }
.checks input { width: auto; }
.form-note { font-size: .78rem; color: var(--ink-muted); margin: 0; }
.form-status { font-size: .9rem; font-weight: 700; margin: 0; }
.form-status.ok { color: var(--dana-green); }
.form-status.err { color: #c0392b; }

/* --------------------------------------------------------------- calendar -- */
.cal { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cal-head h3 { margin: 0; font-size: 1.05rem; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 34px; height: 34px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--primary); font-size: 1rem; }
.cal-nav button:hover { background: var(--primary); color: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { min-width: 0; text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); padding: 8px 0; border-bottom: 1px solid var(--border); }
.cal-day { min-width: 0; min-height: 92px; border-right: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6; padding: 6px; font-size: .78rem; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #fafafa; color: #b5b5b5; }
.cal-day .dnum { font-weight: 700; display: inline-block; margin-bottom: 4px; }
.cal-day.today .dnum { background: var(--primary); color: #fff; border-radius: 50%; width: 22px; height: 22px; text-align: center; line-height: 22px; }
.cal-event {
  display: block; width: 100%; text-align: left;
  background: rgba(81, 121, 166, .12); color: var(--primary);
  border: 0; border-radius: 5px; padding: 2px 5px; margin-bottom: 3px;
  font-size: .7rem; font-family: var(--font-sans); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-event:hover { background: var(--primary); color: #fff; }
.cal-list { display: grid; gap: 10px; }
.cal-list-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.cal-list-item h4 { margin: 0 0 2px; font-size: .95rem; }
.cal-list-item p { margin: 0; font-size: .84rem; color: var(--ink-muted); }
.cal-empty, .cal-loading { text-align: center; color: var(--ink-muted); padding: 42px 16px; font-size: .92rem; }
@media (max-width: 700px) {
  .cal-grid { display: none; }
  .cal-mobile-note { display: block; }
}
.cal-mobile-note { display: none; }

dialog.evt { border: 0; border-radius: var(--radius-lg); padding: 24px; max-width: 460px; width: calc(100% - 32px); box-shadow: var(--shadow-md); }
dialog.evt::backdrop { background: rgba(0, 0, 0, .45); }
dialog.evt h3 { font-size: 1.05rem; }
dialog.evt .meta { font-size: .85rem; color: var(--ink-muted); margin-bottom: .8em; }
dialog.evt .desc { font-size: .88rem; white-space: pre-wrap; max-height: 320px; overflow: auto; }

/* --------------------------------------------------------------- bylaws -- */
.legal h2 { font-size: 1.15rem; margin-top: 1.8em; color: var(--primary); }
.legal h3 { font-size: .98rem; margin-top: 1.2em; }
.legal p, .legal li { font-size: .93rem; }

/* --------------------------------------------------------------- faq -- */
details.faq { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { font-weight: 700; cursor: pointer; font-family: var(--font-heading); font-size: .95rem; }
details.faq p { margin: .8em 0 0; font-size: .92rem; color: var(--ink-muted); }

/* --------------------------------------------------------------- footer -- */
footer.site {
  background: var(--footer-bg);
  color: #fff;
  padding: 48px 0 28px;
}
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 34px; }
footer.site img.logo { height: 54px; width: auto; background: #fff; border-radius: 8px; padding: 5px; }
footer.site h4 { font-size: .95rem; color: #fff; margin-bottom: .7em; }
footer.site p { font-size: .86rem; color: #c9c9c9; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
footer.site a { color: #d8d8d8; text-decoration: none; font-size: .88rem; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site .legal-bar { border-top: 1px solid #333; margin-top: 34px; padding-top: 18px; text-align: center; font-size: .8rem; color: #9a9a9a; }

/* --------------------------------------------------------------- misc -- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 34px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.skip {
  position: absolute; left: -9999px;
  background: #fff; color: var(--primary); padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }
