/* ============================================================
   Brunei Aquatics (BASA) — Design System
   Brand: World Aquatics deep blue/cyan + Brunei yellow & black
   ============================================================ */

:root {
  /* Brand */
  --c-blue-900: #002a5c;
  --c-blue-700: #0066b2;   /* primary */
  --c-blue-500: #1e88d6;
  --c-cyan: #00a9e0;       /* accent */
  --c-yellow: #f7e017;     /* Brunei yellow */
  --c-yellow-dark: #d4be00;
  --c-black: #0a0a0a;
  --c-charcoal: #1a1f2e;

  /* Neutrals */
  --c-white: #ffffff;
  --c-bg: #f5f8fb;
  --c-bg-alt: #eaf1f7;
  --c-border: #d9e2ec;
  --c-text: #1a2233;
  --c-text-soft: #4a5568;
  --c-text-muted: #6b7280;

  /* Layout */
  --container: 1200px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(10, 30, 60, .08);
  --shadow: 0 8px 24px rgba(10, 30, 60, .10);
  --shadow-lg: 0 24px 60px rgba(10, 30, 60, .18);

  /* Type */
  --font-display: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--c-blue-700); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--c-cyan); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-blue-900);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

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

/* ====== TOP BAR ============================================ */
.topbar {
  background: var(--c-black);
  color: rgba(255, 255, 255, .85);
  font-size: .85rem;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: rgba(255, 255, 255, .85); }
.topbar a:hover { color: var(--c-yellow); }
.topbar .socials a { margin-left: 14px; }

/* ====== NAVIGATION ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.brand img { height: 48px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 800; line-height: 1;
  color: var(--c-blue-900);
}
.brand-text small {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--c-cyan);
  text-transform: uppercase;
  margin-top: 4px;
}

.nav-links {
  display: flex; gap: 4px; list-style: none; padding: 0; margin: 0;
}
.nav-links a {
  display: inline-block;
  padding: 10px 14px;
  color: var(--c-text);
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--c-blue-700);
  background: var(--c-bg-alt);
}
.nav-links a.cta {
  background: var(--c-yellow);
  color: var(--c-black);
  padding-inline: 18px;
}
.nav-links a.cta:hover { background: var(--c-yellow-dark); color: var(--c-black); }

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

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid var(--c-border);
    padding: 12px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all .2s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { display: block; }
}

/* ====== BUTTONS ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--c-yellow);
  color: var(--c-black);
}
.btn-primary:hover { background: var(--c-yellow-dark); color: var(--c-black); }
.btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, .8);
}
.btn-secondary:hover { background: white; color: var(--c-blue-900); }
.btn-ghost {
  background: transparent;
  color: var(--c-blue-700);
  border-color: var(--c-blue-700);
}
.btn-ghost:hover { background: var(--c-blue-700); color: white; }

/* ====== HERO =============================================== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  color: white;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(0, 42, 92, .92) 0%, rgba(0, 102, 178, .75) 55%, rgba(0, 169, 224, .35) 100%),
    url('https://images.unsplash.com/photo-1530549387789-4c1017266635?auto=format&fit=crop&w=2000&q=80') center/cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 120px;
  background: linear-gradient(to top, white, transparent);
  z-index: -1;
}
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(247, 224, 23, .15);
  color: var(--c-yellow);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid rgba(247, 224, 23, .35);
}
.hero h1 {
  color: white;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 18px 0 18px;
}
.hero h1 .accent {
  color: var(--c-yellow);
  position: relative;
  display: inline-block;
}
.hero p {
  font-size: 1.15rem;
  max-width: 620px;
  color: rgba(255, 255, 255, .9);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap; margin-top: 56px;
  padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .2);
}
.hero-stat strong {
  display: block;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 800; color: var(--c-yellow); line-height: 1;
}
.hero-stat span { font-size: .85rem; opacity: .85; letter-spacing: .08em; text-transform: uppercase; }

/* ====== SECTIONS =========================================== */
section { padding: 80px 0; }
.section-eyebrow {
  display: inline-block;
  color: var(--c-cyan);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: ""; display: inline-block;
  width: 32px; height: 2px; background: var(--c-yellow);
  vertical-align: middle; margin-right: 10px;
}

/* Mission/Vision split */
.mv-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.mv-card {
  position: relative;
  padding: 40px;
  border-radius: var(--radius-lg);
  color: white;
  overflow: hidden; isolation: isolate;
}
.mv-card.mission { background: linear-gradient(135deg, var(--c-blue-900), var(--c-blue-700)); }
.mv-card.vision { background: linear-gradient(135deg, var(--c-blue-700), var(--c-cyan)); }
.mv-card h3 { color: white; font-size: 1.5rem; }
.mv-card p { font-size: 1.1rem; opacity: .95; margin: 0; }
.mv-card .icon-bg {
  position: absolute; right: -20px; bottom: -20px;
  font-size: 12rem; opacity: .12; line-height: 1;
}

@media (max-width: 760px) { .mv-grid { grid-template-columns: 1fr; } }

/* Objectives / values cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--c-cyan);
}
.feature-card .ico {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-blue-700), var(--c-cyan));
  color: white;
  margin-bottom: 16px;
  font-size: 1.4rem;
}
.feature-card h4 { color: var(--c-blue-900); margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { font-size: .94rem; color: var(--c-text-soft); margin: 0; }

/* Banded section (alt background) */
.section-alt { background: var(--c-bg); }
.section-dark {
  background:
    linear-gradient(115deg, var(--c-blue-900), var(--c-charcoal));
  color: white;
}
.section-dark h2 { color: white; }
.section-dark .section-eyebrow { color: var(--c-yellow); }

/* Section heading center variant */
.heading-center { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.heading-center p { color: var(--c-text-soft); font-size: 1.1rem; }

/* About/Strategic */
.split-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split-grid img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; height: auto; }
@media (max-width: 880px) { .split-grid { grid-template-columns: 1fr; } }

/* Exec committee */
.committee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.member-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--c-border);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.member-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--c-blue-700), var(--c-yellow));
}
.member-card .role {
  display: inline-block;
  font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700;
  color: var(--c-cyan);
  background: rgba(0, 169, 224, .1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.member-card .name {
  font-weight: 700; color: var(--c-blue-900); font-size: 1rem; line-height: 1.3;
}
.member-card.president::before { background: var(--c-yellow); height: 6px; }

/* CTA strip */
.cta-strip {
  background: linear-gradient(135deg, var(--c-yellow) 0%, var(--c-yellow-dark) 100%);
  color: var(--c-black);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  margin-top: 24px;
}
.cta-strip h3 { color: var(--c-black); margin: 0; font-size: 1.6rem; }
.cta-strip p { margin: 6px 0 0; color: var(--c-charcoal); }
.cta-strip .btn { background: var(--c-black); color: var(--c-yellow); border-color: var(--c-black); }
.cta-strip .btn:hover { background: var(--c-charcoal); color: var(--c-yellow); }

/* ====== TABLES (RECORDS) =================================== */
.records-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.tab-btn {
  border: 1px solid var(--c-border);
  background: white;
  color: var(--c-text);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600; font-size: .9rem;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.tab-btn:hover { border-color: var(--c-blue-700); color: var(--c-blue-700); }
.tab-btn.active {
  background: var(--c-blue-900); color: white; border-color: var(--c-blue-900);
}
.records-controls {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px;
}
.records-controls input,
.records-controls select {
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: white;
  min-width: 180px;
}
.records-controls input:focus,
.records-controls select:focus {
  outline: none;
  border-color: var(--c-blue-700);
  box-shadow: 0 0 0 3px rgba(0, 102, 178, .15);
}
.records-table-wrap {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.records-table {
  width: 100%; border-collapse: collapse; min-width: 720px;
}
.records-table thead {
  background: var(--c-blue-900); color: white;
}
.records-table th {
  text-align: left; padding: 14px 16px;
  font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
.records-table tbody tr {
  border-top: 1px solid var(--c-border);
  transition: background .15s;
}
.records-table tbody tr:hover { background: var(--c-bg); }
.records-table td {
  padding: 14px 16px; font-size: .95rem; vertical-align: middle;
}
.records-table .event { font-weight: 700; color: var(--c-blue-900); }
.records-table .time {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--c-blue-700);
  background: rgba(0, 169, 224, .08);
  padding: 4px 10px; border-radius: 6px;
  display: inline-block;
}
.records-table .gender-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.gender-tag.male { background: #dbeafe; color: #1e40af; }
.gender-tag.female { background: #fce7f3; color: #be185d; }

/* ====== CLUBS GRID ========================================= */
.clubs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.club-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--c-border);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.club-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.club-card h3 {
  margin: 0; font-size: 1.1rem; color: var(--c-blue-900);
  display: flex; align-items: center; gap: 10px;
}
.club-card h3 .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-yellow); flex-shrink: 0;
}
.club-card .meta {
  display: flex; flex-direction: column; gap: 4px; margin-top: 8px;
  font-size: .9rem; color: var(--c-text-soft);
}
.club-card .meta a { color: var(--c-blue-700); }
.club-card .meta span svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

/* ====== FORMS ============================================== */
.form-shell {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: .85rem; font-weight: 600;
  color: var(--c-blue-900); letter-spacing: .02em;
}
.field label .req { color: #dc2626; margin-left: 2px; }
.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: white;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-blue-700);
  box-shadow: 0 0 0 3px rgba(0, 102, 178, .15);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { font-size: .8rem; color: var(--c-text-muted); }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.reg-tabs { display: flex; gap: 0; margin-bottom: 28px; border-bottom: 2px solid var(--c-border); }
.reg-tabs button {
  background: transparent; border: 0;
  padding: 14px 24px;
  font: inherit; font-weight: 700;
  color: var(--c-text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.reg-tabs button.active {
  color: var(--c-blue-900);
  border-color: var(--c-yellow);
}

.form-success {
  background: #ecfdf5; border: 1px solid #10b981;
  color: #065f46; padding: 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px; display: none;
}
.form-success.show { display: block; }

/* ====== Documents list ===================================== */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.doc-list li {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
  transition: border-color .2s, transform .2s;
}
.doc-list li:hover {
  border-color: var(--c-cyan);
  transform: translateX(4px);
}
.doc-list .doc-title { font-weight: 600; color: var(--c-blue-900); }
.doc-list .doc-meta { color: var(--c-text-muted); font-size: .85rem; }

/* ====== FOOTER ============================================= */
.footer {
  background: var(--c-charcoal);
  color: rgba(255, 255, 255, .85);
  padding: 64px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h5 {
  color: white; font-size: .85rem; letter-spacing: .14em;
  text-transform: uppercase; margin: 0 0 18px; font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: rgba(255, 255, 255, .8); }
.footer a:hover { color: var(--c-yellow); }
.footer-brand p { font-size: .9rem; max-width: 320px; }
.footer-brand .brand-text { color: white; }
.footer-brand .brand-text small { color: var(--c-yellow); }
.footer-bottom {
  padding-top: 24px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}
.footer-bottom a { color: rgba(255, 255, 255, .7); }

/* ====== Page hero (sub-pages) ============================== */
.page-hero {
  position: relative;
  padding: 120px 0 80px;
  background:
    linear-gradient(115deg, rgba(0, 42, 92, .94), rgba(0, 102, 178, .85)),
    url('https://images.unsplash.com/photo-1530549387789-4c1017266635?auto=format&fit=crop&w=1800&q=80') center/cover;
  color: white;
  text-align: center;
}
.page-hero h1 { color: white; }
.page-hero .breadcrumb {
  display: inline-flex; gap: 8px; align-items: center;
  font-size: .85rem; opacity: .85; margin-bottom: 12px;
}
.page-hero .breadcrumb a { color: var(--c-yellow); }

/* ====== Utility ============================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.bullet-list { padding-left: 1.2em; }
.bullet-list li { margin-bottom: 6px; }
.note-box {
  background: var(--c-bg); border-left: 4px solid var(--c-yellow);
  padding: 16px 20px; border-radius: var(--radius-sm);
  margin: 16px 0;
}
.note-box.info { border-color: var(--c-cyan); background: rgba(0, 169, 224, .08); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: all .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* Print */
@media print {
  .site-header, .topbar, .footer, .nav-toggle, .hero-actions { display: none !important; }
}
