/* ============================================================
   Claremont Fan Court Student Union – Main Stylesheet
   Colour palette inspired by Claremont Fan Court School:
     Navy  #1a2e5a  (primary)
     Gold  #c9a84c  (accent)
     Cream #f5f1e8  (bg warm)
     White #ffffff
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1a2e5a;
  --navy-deep:  #0f1e3d;
  --navy-mid:   #243870;
  --gold:       #c9a84c;
  --gold-light: #e0c06e;
  --gold-pale:  #f5edcf;
  --cream:      #f5f1e8;
  --off-white:  #faf9f6;
  --text-dark:  #1c1c2e;
  --text-mid:   #4a4a6a;
  --text-light: #7a7a9a;
  --border:     #dcd8cc;
  --shadow:     0 4px 20px rgba(26,46,90,.12);
  --shadow-lg:  0 8px 40px rgba(26,46,90,.18);
  --radius:     8px;
  --radius-lg:  16px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--off-white);
}

h1,h2,h3,h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  color: var(--navy);
}

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: .5px; cursor: pointer; transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent; color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy); color: #fff;
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.btn-white {
  background: #fff; color: var(--navy); border-color: #fff;
}
.btn-white:hover {
  background: var(--gold-pale); border-color: var(--gold-pale);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #a93226; border-color: #a93226; }

/* ── Navigation ─────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Playfair Display', serif;
  color: #fff; font-size: 18px; font-weight: 700;
}
.nav-logo .crest {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--navy); flex-shrink: 0;
}
.nav-logo span { line-height: 1.15; }
.nav-logo small { display: block; font-family: 'Lato', sans-serif; font-size: 11px; font-weight: 400; color: var(--gold-light); letter-spacing: 1px; text-transform: uppercase; }

nav ul { display: flex; list-style: none; gap: 4px; }
nav ul li a {
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 700;
  padding: 8px 14px; border-radius: var(--radius);
  letter-spacing: .3px; transition: all var(--transition);
}
nav ul li a:hover, nav ul li a.active {
  color: var(--gold); background: rgba(201,168,76,.12);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: all var(--transition); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 60%, var(--navy) 100%);
  color: #fff; padding: 100px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(201,168,76,.18), transparent);
}
.hero-content { position: relative; max-width: 680px; }
.hero-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold); border: 1px solid rgba(201,168,76,.4);
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; margin-bottom: 20px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { font-size: 18px; color: rgba(255,255,255,.8); margin-bottom: 32px; max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Section Headings ───────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 52px; }
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 14px; }
.section-header p { color: var(--text-mid); max-width: 560px; margin: 0 auto; font-size: 17px; }
.divider { width: 60px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ── Petitions ───────────────────────────────────────────────── */
.petitions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 28px; }
.petition-card { padding: 28px; }
.petition-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.petition-card h3 { font-size: 1.15rem; color: var(--navy); flex: 1; }
.petition-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; background: var(--gold-pale); color: var(--navy);
  flex-shrink: 0;
}
.petition-card p { color: var(--text-mid); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.progress-wrap { margin-bottom: 16px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.progress-bar {
  height: 10px; background: #e8e4d8; border-radius: 6px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 6px; transition: width .8s cubic-bezier(.4,0,.2,1);
}
.sign-form { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.sign-form h4 { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.sign-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sign-field { width: 100%; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: inherit; transition: border-color var(--transition); }
.sign-field:focus { outline: none; border-color: var(--navy); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-mid); cursor: pointer; }
.signed-badge { background: #e8f5e9; color: #2e7d32; border-radius: var(--radius); padding: 8px 14px; font-size: 13px; font-weight: 700; margin-top: 8px; display: none; }

/* ── Leadership ─────────────────────────────────────────────── */
#leadership { background: var(--cream); }
.leadership-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 28px; }
.leader-card { text-align: center; padding: 32px 24px; }
.leader-avatar {
  width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 16px;
  border: 3px solid var(--gold); overflow: hidden;
  box-shadow: 0 4px 16px rgba(26,46,90,.2);
}
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-role {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.leader-name { font-size: 1.1rem; margin-bottom: 4px; }
.leader-year { font-size: 13px; color: var(--text-mid); margin-bottom: 10px; }
.leader-bio { font-size: 13px; color: var(--text-mid); line-height: 1.55; margin-bottom: 14px; }
.leader-contact { font-size: 13px; color: var(--navy); font-weight: 700; }
.leader-contact a { color: var(--navy); }
.leader-contact a:hover { color: var(--gold); }

/* ── News ────────────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 28px; }
.news-card { display: flex; flex-direction: column; }
.news-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.news-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.news-card h3 { font-size: 1.05rem; margin-bottom: 10px; line-height: 1.3; }
.news-card p { font-size: 14px; color: var(--text-mid); flex: 1; line-height: 1.6; margin-bottom: 16px; }
.news-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-light); }
.news-card .btn { align-self: flex-start; margin-top: auto; }

/* ── Contact & Mailing ──────────────────────────────────────── */
#contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-panel { background: #fff; border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.contact-panel h3 { font-size: 1.3rem; margin-bottom: 8px; }
.contact-panel .subtitle { color: var(--text-mid); font-size: 14px; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; letter-spacing: .3px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 14px; transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,46,90,.08);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success { background: #e8f5e9; color: #2e7d32; border-radius: var(--radius); padding: 12px 16px; font-size: 14px; font-weight: 700; margin-top: 12px; display: none; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,30,61,.7); backdrop-filter: blur(4px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 680px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 28px; border-bottom: 1px solid var(--border);
  background: var(--navy); color: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 { color: #fff; }
.modal-close { background: none; border: none; color: rgba(255,255,255,.7); font-size: 24px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 28px; }
.modal-body p { color: var(--text-mid); margin-bottom: 14px; line-height: 1.7; }
.modal-meta { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--navy-deep); color: rgba(255,255,255,.7);
  padding: 48px 0 28px; font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand h4 { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; line-height: 1.6; }
.footer-col h5 { color: var(--gold); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.7); font-size: 13px; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.footer-admin-link { color: rgba(255,255,255,.4); font-size: 12px; }
.footer-admin-link:hover { color: var(--gold); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 3000;
  background: var(--navy); color: #fff; padding: 14px 22px;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 700; border-left: 4px solid var(--gold);
  transform: translateY(80px); opacity: 0; transition: all .4s ease;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-left-color: #c0392b; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  nav ul { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy-deep); padding: 16px; gap: 4px; }
  nav ul.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 52px; }
  section { padding: 52px 0; }
}
