/* SMATA landing page styles
   Brand: navy #001529, gold #faad14, antd blue #1890ff
   Font stack matches the admin app (system fonts, no CDN). */

:root {
  --navy: #001529;
  --gold: #faad14;
  --blue: #1890ff;
  /* Darker blue for body text (links, labels) on white — #1890ff only
     measures 3.24:1 there, below WCAG AA's 4.5:1 for normal-size text.
     #0958a6 clears 4.5:1 comfortably (~7.1:1). Keep --blue itself for
     non-text uses (icons, borders, focus rings) where 3:1 is sufficient. */
  --blue-text: #0958a6;
  --grey-bg: #f0f2f5;
  --text-dark: rgba(0, 0, 0, 0.85);
  --text-muted: rgba(0, 0, 0, 0.6);
  --card-radius: 12px;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  color: var(--text-dark);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Focus states — visible everywhere for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: var(--card-shadow);
  flex-shrink: 0;
}

.topbar-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  opacity: 0.9;
}

.btn-gold {
  background: var(--gold);
  color: rgba(0, 0, 0, 0.85);
}

.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-small {
  padding: 7px 14px;
  font-size: 13px;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--navy);
  color: #ffffff;
  text-align: center;
  padding: 64px 24px 72px;
}

.hero-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #ffffff;
  padding: 8px;
  margin: 0 auto 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 700;
  color: #ffffff;
}

.hero .subline {
  margin: 0 auto 32px;
  max-width: 620px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ---------- Sections ---------- */

section {
  padding: 64px 0;
}

.section-alt {
  background: var(--grey-bg);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-header h2 {
  font-size: 28px;
  margin: 0 0 12px;
  font-weight: 700;
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 16px;
}

.card {
  background: #ffffff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 28px;
}

/* ---------- About ---------- */

.about-intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 16px;
  color: var(--text-dark);
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 0 auto 48px;
}

.affiliation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.affiliation img {
  height: 64px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

/* Layout-shift note: width/height attributes are set on each <img> in
   index.html (matching the real, now-optimized asset dimensions). With
   height fixed here and width: auto, browsers use those intrinsic
   dimensions to reserve the correct box before the image decodes, so the
   row doesn't reflow once it loads. */

.affiliation span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.leader-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.leader-card .leader-title {
  color: var(--blue-text);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 12px;
}

.leader-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.leader-card li {
  margin-bottom: 4px;
}

/* ---------- Training pillars ---------- */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.pillar-card {
  text-align: center;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--grey-bg);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.pillar-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.pillar-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Belt system ---------- */

.belt-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.belt-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--card-shadow);
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.85);
}

/* Belt colours mirror BeltTag.js's antd tag-colour map; text colour chosen
   per-swatch for >=4.5:1 contrast (purple is dark enough to need white text,
   the rest read better with dark text). */
.belt-white {
  background: #d9d9d9;
}

.belt-gold {
  background: #faad14;
}

.belt-green {
  background: #52c41a;
}

.belt-blue {
  background: #1890ff;
}

.belt-red {
  background: #f5222d;
}

.belt-purple {
  background: #722ed1;
  color: #ffffff;
}

/* ---------- Fees ---------- */

.fees-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.fee-card {
  text-align: center;
}

.fee-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.fee-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.fees-note {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

.fees-note strong {
  color: var(--text-dark);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: start;
}

.contact-info h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.contact-info p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 15px;
}

.contact-info a {
  color: var(--blue-text);
  font-weight: 600;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-row .required {
  color: #f5222d;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-family: inherit;
  color: var(--text-dark);
  background: #ffffff;
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-error {
  color: #f5222d;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.form-row.has-error input,
.form-row.has-error textarea {
  border-color: #f5222d;
}

.form-row.has-error .form-error {
  display: block;
}

/* Honeypot field — hidden from sighted users and screen readers, but present
   in the DOM/tab order avoidance for bots that fill every field. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

#form-status.status-success {
  display: block;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #237804;
}

#form-status.status-fail {
  display: block;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #a8071a;
}

.submit-btn {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover {
  opacity: 0.9;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */

footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 32px 24px;
  font-size: 14px;
}

footer a {
  color: #ffffff;
  font-weight: 600;
}

footer .footer-links {
  margin-top: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .leadership-grid,
  .pillar-grid,
  .fees-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar .container {
    flex-wrap: wrap;
  }

  .hero {
    padding: 48px 20px 56px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero .subline {
    font-size: 15px;
  }

  section {
    padding: 48px 0;
  }

  .leadership-grid,
  .pillar-grid,
  .fees-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 22px;
  }

  .affiliations {
    gap: 28px;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}
