/* ===== TSMAA 2026 — Global Styles ===== */

:root {
  /* Color palette — sampled from the TSM & Alumni Association crests */
  --maroon: #A6151E;
  --maroon-dark: #7A0F16;
  --maroon-light: #C44048;
  --navy: #393185;
  --navy-dark: #2A2563;
  --gold: #8A6D0B;
  --gold-light: #CEA766;
  --gold-pale: #E8D9B0;
  --ivory: #FAF6EF;
  --ivory-dark: #F0E9DB;
  --text: #1A1A1A;
  --text-muted: #5A5A5A;
  --white: #FFFFFF;
  --border: #D9D2C5;
  --error: #B22222;
  --success: #2E7D32;

  /* Typography */
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

  /* Spacing (8px system) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 64px;

  /* Radius */
  --radius: 8px;
  --radius-lg: 16px;

  /* Shadow */
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */

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

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.section { padding: var(--space-6) 0; }
.section-ivory { background: var(--ivory); }
.section-alt { background: var(--ivory-dark); }

/* ===== Header ===== */

.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold-light);
  padding: var(--space-2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-2);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2);
}

.header-logo {
  height: 60px;
  width: auto;
}

.header-titles {
  text-align: center;
}

.header-titles h1 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--navy);
}

.header-titles .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* ===== Hero ===== */

.hero {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--white);
  padding: var(--space-6) 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 2.8rem;
  margin-bottom: var(--space-1);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--gold-pale);
  margin-bottom: var(--space-3);
}

.hero-banner {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: var(--space-1) var(--space-3);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

/* ===== About sections ===== */

.about-section { padding: var(--space-5) 0; }
.about-section p { font-size: 1.05rem; max-width: 780px; margin: 0 auto; text-align: center; color: var(--text); }

.about-section h2 {
  text-align: center;
  margin-bottom: var(--space-3);
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gold-light);
  margin: 0 auto var(--space-3);
  border: none;
  border-radius: 2px;
}

.policy-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--maroon);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--maroon);
  padding: 8px 18px;
  border-radius: 50px;
  transition: background 0.2s ease, color 0.2s ease;
}

.policy-inline-link svg { width: 16px; height: 16px; }

.policy-inline-link:hover {
  background: var(--maroon);
  color: var(--white);
  text-decoration: none;
}

/* ===== Committee list ===== */

.committee-list {
  max-width: 560px;
  margin: 20px auto 0;
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  counter-reset: committee-counter;
}

.committee-list li {
  counter-increment: committee-counter;
  position: relative;
  padding: 8px 0 8px 36px;
  font-size: 0.98rem;
}

.committee-list li + li { border-top: 1px solid var(--border); }

.committee-list li::before {
  content: counter(committee-counter);
  position: absolute;
  left: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Award cards ===== */

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.award-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.award-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.award-card .award-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-2);
  color: var(--maroon);
}

.award-card h3 {
  margin-bottom: var(--space-1);
}

.award-card p {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  flex-grow: 1;
}

/* ===== Coordinators ===== */

.coordinators-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  max-width: 1100px;
  margin: 0 auto;
}

.coordinator-card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-1);
  text-align: center;
}

.coordinator-card h4 { margin-bottom: 4px; }

.coordinator-role {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.coordinator-card p { margin-bottom: 2px; font-size: 0.92rem; }

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  background: var(--maroon);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
}
.btn-gold:hover { background: #6F5608; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--maroon);
  color: var(--maroon);
}
.btn-outline:hover {
  background: var(--maroon);
  color: var(--white);
}

.btn-block { width: 100%; }

/* ===== Footer ===== */

.site-footer {
  background: var(--maroon-dark);
  color: var(--ivory);
  padding: var(--space-5) 0 var(--space-3);
  text-align: center;
}

.footer-logos {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.footer-logo {
  height: 60px;
  width: auto;
  opacity: 0.9;
}

.footer-contact {
  font-size: 0.95rem;
  margin-bottom: var(--space-1);
}

.footer-contact a { color: var(--gold-pale); }

.footer-copy {
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-top: var(--space-2);
}

.footer-follow {
  font-size: 0.85rem;
  color: var(--gold-pale);
  margin-top: var(--space-2);
  opacity: 0.9;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-1);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-pale);
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--white);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-doc {
  font-size: 0.9rem;
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer-doc a {
  color: var(--gold-pale);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-doc a:hover {
  color: var(--white);
}

.footer-doc svg {
  width: 15px;
  height: 15px;
}

.footer-window {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}

/* ===== Form pages ===== */

.form-hero {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--white);
  padding: var(--space-5) 0;
  text-align: center;
}

.form-hero h1 { color: var(--white); margin-bottom: var(--space-1); }
.form-hero .award-desc {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--gold-pale);
}

.form-window-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}

.form-note {
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  margin: var(--space-2) 0;
  font-size: 0.95rem;
}

.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow);
}

.form-section h3 {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--gold-light);
}

.form-section > p.section-intro {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2); }

.form-group {
  margin-bottom: var(--space-2);
  display: flex;
  flex-direction: column;
}

.form-group.full { grid-column: 1 / -1; }

label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text);
}

label .req { color: var(--error); }

label .opt { color: var(--text-muted); font-weight: 400; font-size: 0.82rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(166,21,30,0.12);
}

textarea { resize: vertical; min-height: 100px; }

.field-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
  font-weight: 500;
}

input[type="file"] {
  font-size: 0.9rem;
  padding: 8px;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.radio-group label:hover {
  border-color: var(--maroon);
  background: var(--ivory);
}

.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--maroon);
}

/* Checkboxes */
.checkbox-group { display: flex; flex-direction: column; gap: 10px; }

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.92rem;
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--maroon);
  flex-shrink: 0;
}

/* Tables */
.achievement-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-1);
}

.achievement-table th {
  background: var(--maroon);
  color: var(--white);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.achievement-table th:first-child { border-radius: 6px 0 0 0; }
.achievement-table th:last-child { border-radius: 0 6px 0 0; }

.achievement-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.achievement-table select,
.achievement-table input {
  padding: 7px 8px;
  font-size: 0.88rem;
}

.achievement-table .row-num {
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
  width: 32px;
}

/* Honeypot */
.hidden-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* Consent + submit */
.consent-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin: var(--space-2) 0;
  padding: var(--space-1) var(--space-2);
  background: var(--ivory);
  border-radius: var(--radius);
}

.submit-row {
  margin-top: var(--space-3);
  text-align: center;
}

.file-size-warning {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Conditional display */
.form-part { display: none; }
.form-part.active { display: block; }

.other-text { display: none; margin-top: 8px; }
.other-text.active { display: block; }

/* Thank you page */
.thank-you-content {
  text-align: center;
  padding: var(--space-6) 0;
}

.thank-you-content .check-icon {
  width: 80px;
  height: 80px;
  color: var(--success);
  margin-bottom: var(--space-2);
}

.thank-you-content h1 { margin-bottom: var(--space-2); }
.thank-you-content p { font-size: 1.1rem; max-width: 600px; margin: 0 auto var(--space-3); }

/* ===== Responsive ===== */

@media (max-width: 860px) {
  .coordinators-grid { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
}

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

@media (max-width: 768px) {
  .header-logo { height: 48px; }
  .header-titles h1 { font-size: 1.1rem; }
  .header-titles .subtitle { font-size: 0.7rem; }
  .header-inner { gap: 8px; }

  .hero h1 { font-size: 1.8rem; }
  .hero .subtitle { font-size: 0.95rem; }

  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }

  .achievement-table { font-size: 0.8rem; }
  .achievement-table th { font-size: 0.72rem; padding: 6px 4px; }
  .achievement-table td { padding: 4px; }
  .achievement-table select,
  .achievement-table input { font-size: 0.78rem; padding: 5px 4px; }

  .form-section { padding: var(--space-2); }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .achievement-table .row-num { display: none; }
  .footer-logo { height: 48px; }

  .header-logo { height: 34px; }
  .header-titles h1 { font-size: 0.95rem; }
  .header-titles .subtitle { font-size: 0.65rem; }
  .header-inner { gap: 6px; padding: 0 8px; }
}
