/* ==========================================================================
   Knights of Columbus — Mid-Island Council #3842
   Prototype redesign stylesheet
   ========================================================================== */

:root {
  --navy: #0a2a52;
  --navy-dark: #061c39;
  --navy-light: #11417c;
  --red: #ce1126;
  --red-dark: #a60d1e;
  --gold: #c8a24b;
  --gold-light: #e4c877;
  --ink: #1c2530;
  --body: #3a4552;
  --muted: #6b7787;
  --line: #e4e8ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-navy-soft: #f0f3f8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(10, 42, 82, .08), 0 1px 2px rgba(10, 42, 82, .06);
  --shadow: 0 10px 30px rgba(10, 42, 82, .10);
  --shadow-lg: 0 24px 60px rgba(10, 42, 82, .18);
  --maxw: 1180px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

a { color: var(--navy-light); text-decoration: none; transition: color .18s; }
a:hover { color: var(--red); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #d6e0ee; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--navy .section-head p { color: #aeb cf; color: #b3c1d6; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 8px;
}
.section--navy .eyebrow { color: var(--gold-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .98rem;
  padding: 13px 26px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(206,17,38,.28); }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--gold { background: var(--gold); color: var(--navy-dark); }
.btn--gold:hover { background: var(--gold-light); color: var(--navy-dark); }
.btn--outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--ghost-light { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--navy); }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-dark);
  color: #c3d0e2;
  font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #c3d0e2; }
.topbar a:hover { color: #fff; }
.topbar__meta { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__meta span { display: inline-flex; align-items: center; gap: 7px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 18px; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__text b { font-family: var(--serif); color: var(--navy); font-size: 1.12rem; font-weight: 700; }
.brand__text span { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 8px;
  position: relative;
}
.nav a:hover { color: var(--navy); background: var(--bg-navy-soft); }
.nav a.active { color: var(--red); }
.nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: var(--red); border-radius: 2px;
}
.nav .btn { margin-left: 10px; padding: 10px 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 130px 0 120px;
  background:
    linear-gradient(90deg, rgba(6,20,44,.86) 0%, rgba(6,20,44,.66) 32%, rgba(6,20,44,.34) 62%, rgba(6,20,44,.18) 100%),
    linear-gradient(180deg, rgba(6,20,44,.30), rgba(6,20,44,.10)),
    var(--hero-img, none) center 32%/cover no-repeat;
  overflow: hidden;
}
.hero h1, .hero p { text-shadow: 0 2px 14px rgba(3,12,28,.55); }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 66%, var(--gold) 66%);
}
.hero__inner { max-width: 720px; position: relative; z-index: 2; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p { font-size: 1.18rem; color: #e6ecf5; margin-bottom: 30px; max-width: 620px; }
.hero .eyebrow { color: var(--gold-light); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Home hero variant: text band + full uncropped group photo */
.hero-lite {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: #fff;
  padding: 92px 0 66px;
  text-align: center;
}
.hero-lite .eyebrow { color: var(--gold-light); }
.hero-lite h1 { color: #fff; margin-bottom: 18px; }
.hero-lite p { font-size: 1.18rem; color: #e6ecf5; max-width: 660px; margin: 0 auto 28px; }
.hero-lite .hero__actions { justify-content: center; }
.hero-figure { max-width: 960px; margin: 46px auto 0; }
.hero-figure img { width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); }
.hero-figure figcaption { margin-top: 14px; color: #b3c1d6; font-size: .92rem; }
.hero-lite { position: relative; }
.hero-lite::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 66%, var(--gold) 66%);
}

.hero--page {
  padding: 96px 0 84px; text-align: center;
  background:
    linear-gradient(180deg, rgba(6,20,44,.80), rgba(6,20,44,.74)),
    var(--hero-img, none) center 28%/cover no-repeat;
}
.hero--page .hero__inner { margin: 0 auto; }
.hero--page p { margin-left: auto; margin-right: auto; }

/* breadcrumb */
.crumbs { font-size: .9rem; color: rgba(255,255,255,.8); margin-bottom: 16px; }
.crumbs a { color: rgba(255,255,255,.8); }
.crumbs a:hover { color: #fff; }

/* ---------- Stats bar ---------- */
.stats {
  background: var(--navy);
  color: #fff;
}
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 46px; padding-bottom: 46px; }
.stat { text-align: center; padding: 8px; }
.stat b { display: block; font-family: var(--serif); font-size: 2.5rem; color: var(--gold-light); line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: .92rem; color: #c3d0e2; letter-spacing: .03em; }

/* ---------- Pillars / cards ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3dbe6; }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--bg-navy-soft); color: var(--navy);
  margin-bottom: 18px;
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; margin-bottom: 0; }

.value-card { text-align: center; }
.value-card .card__icon { margin: 0 auto 18px; background: var(--red); color: #fff; }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; max-height: 460px; object-fit: cover; }
.split--reverse .split__media { order: 2; }
.lead { font-size: 1.15rem; color: var(--ink); }

.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li { position: relative; padding: 8px 0 8px 34px; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23061c39' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- News cards ---------- */
.news-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card__img { aspect-ratio: 16/10; overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-card__img img { transform: scale(1.05); }
.news-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.tag {
  align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--red); background: #fdecee; padding: 4px 11px; border-radius: 50px; margin-bottom: 12px;
}
.news-card h3 { font-size: 1.22rem; margin-bottom: 8px; }
.news-card .date { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.news-card p { font-size: .96rem; color: var(--muted); }
.news-card .more { margin-top: auto; font-weight: 600; color: var(--navy-light); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; position: relative; cursor: pointer; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px;
  background: linear-gradient(transparent, rgba(6,20,44,.85));
  color: #fff; font-size: .88rem; opacity: 0; transform: translateY(8px); transition: .25s;
}
.gallery-grid figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(6,16,32,.92); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox__cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #dfe6f0; font-size: .95rem; }
.lightbox__close { position: absolute; top: 22px; right: 30px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ---------- Officers ---------- */
.officer-card { text-align: center; padding: 30px 22px; }
.officer-card .avatar {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.7rem; font-weight: 700;
}
.officer-card h3 { font-size: 1.12rem; margin-bottom: 2px; }
.officer-card .role { color: var(--red); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Callout ---------- */
.callout {
  background: linear-gradient(120deg, var(--navy), var(--navy-light));
  color: #fff; border-radius: var(--radius); padding: 56px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.callout h2 { color: #fff; }
.callout p { color: #cdd8ea; max-width: 600px; margin: 0 auto 26px; }
.callout .btn { margin: 6px; }

/* ---------- Contact ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ic { flex: 0 0 42px; height: 42px; border-radius: 10px; background: var(--bg-navy-soft); color: var(--navy); display: grid; place-items: center; }
.info-list .ic svg { width: 20px; height: 20px; }
.info-list b { color: var(--ink); display: block; font-size: .95rem; }
.info-list span, .info-list a { color: var(--muted); font-size: .95rem; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(17,65,124,.12); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-success { display: none; background: #e9f7ee; border: 1px solid #b6e3c6; color: #1c6b39; padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.form-success.show { display: block; }

.map-embed { border: 0; width: 100%; height: 100%; min-height: 340px; border-radius: var(--radius); }

/* ---------- Prose ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { color: var(--red); margin-top: 1.6em; }
.prose .members { columns: 2; column-gap: 40px; font-size: .95rem; color: var(--body); }
@media (max-width: 640px) { .prose .members { columns: 1; } }

.quote {
  border-left: 4px solid var(--gold); background: var(--bg-soft);
  padding: 22px 26px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 28px 0;
  font-family: var(--serif); font-size: 1.2rem; font-style: italic; color: var(--navy);
}
.quote cite { display: block; margin-top: 10px; font-size: .9rem; font-style: normal; color: var(--muted); font-family: var(--sans); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #a9b8ce; padding: 66px 0 0; font-size: .95rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.footer-brand img { width: 54px; height: 54px; }
.footer-brand b { color: #fff; font-family: var(--serif); font-size: 1.15rem; display: block; }
.footer-brand span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-light); }
.site-footer a { color: #a9b8ce; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
  margin-top: 54px; border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: #8394ad;
}
.social { display: flex; gap: 10px; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #cdd8ea; }
.social a:hover { background: var(--red); color: #fff; }
.social svg { width: 18px; height: 18px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw);
    background: #fff; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 92px 22px 30px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .28s ease; overflow-y: auto;
  }
  .nav.open { transform: none; }
  .nav a { padding: 13px 12px; border-radius: 8px; }
  .nav a.active::after { display: none; }
  .nav a.active { background: var(--bg-navy-soft); }
  .nav .btn { margin: 12px 0 0; justify-content: center; }
  .nav-toggle { display: inline-flex; z-index: 70; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(6,16,32,.45); z-index: 55; display: none; }
  .nav-backdrop.open { display: block; }
}
@media (max-width: 760px) {
  .split, .split--reverse .split__media { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .callout { padding: 40px 24px; }
  .topbar__meta { display: none; }
}
@media (max-width: 480px) {
  .stats .container { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
