/* ==========================================================================
   BKGS SK Seberang Jaya 2 — landing page styles
   Palette (chosen because the official crest is only available in B/W;
   navy + gold is the classic Malaysian national-school combination and
   echoes the Penang flag):
     --navy    #1A3A6B  primary (headers, buttons)      — AA on white
     --navy-dk #12294D  darker shade (footer, hover)
     --gold    #F2B705  accent (highlights, badges)     — decorative only;
                        never used for body text on white (contrast!)
     --gold-dk #8A6803  darker gold, AA-safe as text on light backgrounds
     --paper   #FAF9F6  warm page background
     --ink     #22303F  body text — ~12:1 on paper
   Mobile-first: base styles are for phones; min-width media queries scale up.
   ========================================================================== */

:root {
  --navy: #1A3A6B;
  --navy-dk: #12294D;
  --gold: #F2B705;
  --gold-dk: #8A6803;
  --paper: #FAF9F6;
  --ink: #22303F;
  --card-bg: #FFFFFF;
  --border: #E3E0D8;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

.container {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

h1, h2, h3 { line-height: 1.25; color: var(--navy); }
h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0.25rem 0 0.5rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 0;
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo {
  width: 64px;
  height: auto;
  background: #fff;            /* white plate so the B/W crest reads cleanly */
  border-radius: 50%;
  padding: 4px;
  flex-shrink: 0;
}

.org-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.org-abbr { color: var(--gold); }

.school-name {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: #D9E2F2;             /* light blue-grey, AA on navy */
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dk) 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 0 3.5rem;
}

.hero h1 {
  color: #fff;
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

.hero-lead {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  color: #E8EDF7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgb(0 0 0 / 0.18); }

.btn-accent { background: var(--gold); color: var(--navy-dk); }   /* 8.5:1 */
.btn-primary { background: var(--navy); color: #fff; }            /* 9.9:1 */

/* ---------- About ---------- */
.about { padding: 2.5rem 0 0.5rem; }
.about p { max-width: 46rem; }

/* ---------- Activities ---------- */
.activities { padding: 2rem 0 3rem; }

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;          /* phones: single column */
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.6rem;
  box-shadow: 0 2px 8px rgb(26 58 107 / 0.06);
}

.card-featured { border-top: 4px solid var(--gold); }

.card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}
.badge-info  { background: #E3EAF6; color: var(--navy); }
.badge-event { background: var(--gold); color: var(--navy-dk); }
.badge-poll  { background: #E7F0E9; color: #1F5C3D; }

.big-figure {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0.4rem 0;
}
.big-figure .per { font-size: 1rem; font-weight: 600; color: var(--gold-dk); }

.reminder { font-size: 0.95rem; }

.lucky-draw {
  background: #FFF7DE;
  border-left: 4px solid var(--gold);
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
}

/* Placeholder blocks — intentionally dashed & obvious so they get replaced */
.placeholder-box {
  border: 2px dashed #B9B4A6;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  background: #FCFBF7;
}
.placeholder-label { margin: 0 0 0.2rem; font-weight: 700; color: var(--navy); }
.placeholder-box em { color: #8A5A00; font-style: normal; font-weight: 700; }

.event-meta {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  border: 2px dashed #B9B4A6;
  border-radius: 8px;
  background: #FCFBF7;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
}
.event-meta li { margin: 0.2rem 0; }
.event-meta .meta-label { font-weight: 700; color: var(--navy); }
.event-meta em { color: #8A5A00; font-style: normal; font-weight: 700; }

/* ---------- Poll ---------- */
.poll-form fieldset { border: none; padding: 0; margin: 0 0 1rem; }

.poll-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.poll-option:hover { border-color: var(--navy); background: #F4F7FC; }
.poll-option input { accent-color: var(--navy); width: 1.1rem; height: 1.1rem; }

.poll-hint { color: #A32020; font-size: 0.9rem; margin: 0.5rem 0 0; }

.poll-results { margin-top: 1.1rem; }
.results-title { font-weight: 700; color: var(--navy); margin-bottom: 0.6rem; }

.result-row { margin: 0.55rem 0; font-size: 0.92rem; }
.result-label { display: flex; justify-content: space-between; margin-bottom: 0.2rem; }
.result-pct { font-weight: 700; color: var(--navy); }

.result-track {
  background: #ECE9E1;
  border-radius: 999px;
  height: 0.7rem;
  overflow: hidden;
}
.result-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), #2C5AA0);
  border-radius: 999px;
  width: 0;                              /* animated to target width by JS */
  transition: width 0.7s ease;
}
.result-row.voted .result-fill { background: linear-gradient(90deg, var(--gold-dk), var(--gold)); }

.poll-note { font-size: 0.8rem; color: #5B6673; margin-top: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dk);
  color: #D9E2F2;
  text-align: center;
  padding: 1.75rem 0;
  font-size: 0.9rem;
}
.footer-fine { color: #A9B8D4; font-size: 0.8rem; margin-bottom: 0; }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
  h2 { font-size: 1.75rem; }
}

@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }  /* desktop: 3 cards */
}
