/* ============================================================
   LANDING PAGE — SPECIFIC STYLES
   ============================================================ */

/* ---- Hero ---- */
.hero-section {
  padding: var(--space-16) 0 var(--space-12);
  background: linear-gradient(160deg, #F8F9FA 60%, #EDF2FF 100%);
}
.hero-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-5);
}
.hero-badge svg { width: 12px; height: 12px; }
.hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: var(--space-5);
}
.hero-accent { color: var(--color-primary); }
.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 420px;
  margin-bottom: var(--space-8);
  line-height: 1.75;
}
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---- Action Cards Section ---- */
.action-cards-section {
  padding: var(--space-16) 0;
  background: var(--color-bg);
}
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-10);
}
.action-cards-grid { margin-top: var(--space-4); }
.featured-card {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
  position: relative;
}
.featured-card::before {
  content: 'Popular';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs); font-weight: 700;
  padding: 2px 12px; border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

/* ---- Features Section ---- */
.features-section {
  padding: var(--space-16) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.feature-item { display: flex; align-items: flex-start; gap: var(--space-4); }
.feature-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  margin-top: 2px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-item h5 { margin-bottom: var(--space-1); color: var(--color-text); }
.feature-item p { color: var(--color-text-secondary); }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) 0 var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}
.footer-contact { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-contact-item {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-sm); color: var(--color-text-secondary);
}
.footer-contact-item svg { color: var(--color-primary); flex-shrink: 0; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-section .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}
@media (max-width: 768px) {
  .action-cards-section .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   REGISTER MODAL — COMPACT / NO-SCROLL LAYOUT
   Forces all fields to fit on one screen without scrolling.
   ============================================================ */

/* Prevent the modal from scrolling when showing the register panel */
#auth-modal:has(#modal-register:not([style*="display: none"]):not([style*="display:none"])) {
  overflow: hidden;
  max-height: none;
}

/* ---- Modal chrome ---- */
#modal-register .modal-header {
  padding: 14px 20px 0;
}
#modal-register .modal-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
#modal-register .modal-subtitle {
  font-size: 0.69rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}
#modal-register .modal-body {
  padding: 10px 20px 14px;
}

/* ---- Form stack gaps ---- */
#register-form .flex.flex-col {
  gap: 7px !important;
}
#register-form .grid.grid-2 {
  gap: 8px !important;
}

/* ---- Individual field groups ---- */
#modal-register .form-group {
  gap: 2px;
  margin-bottom: 0;
}
#modal-register .form-label {
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.2;
}

/* ---- Inputs & selects — fixed 35 px height ---- */
#modal-register .form-input,
#modal-register .form-select {
  height: 35px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.8125rem;
  line-height: 35px;
}

/* Keep eye-toggle centred in the shorter input */
#modal-register .input-icon-right {
  top: 0;
  bottom: 0;
  transform: none;
  height: 35px;
  display: flex;
  align-items: center;
}

/* ---- Error text — minimal footprint ---- */
#modal-register .form-error {
  font-size: 0.62rem;
  line-height: 1.2;
}

/* ---- Submit button ---- */
#register-submit-btn {
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.8125rem;
}

/* ---- Real-time password match indicator ---- */
.pw-match-status {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2px;
}
.pw-match-status.visible { display: flex; }
.pw-match-status[data-state="match"]    { color: #15803d; }
.pw-match-status[data-state="mismatch"] { color: #dc2626; }
.pw-match-status svg { width: 11px; height: 11px; flex-shrink: 0; }
/* Tint the confirm input border live */
#reg-confirm-password.input-match    { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.12); }
#reg-confirm-password.input-mismatch { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.1);  }

/* ---- Password strength meter ---- */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.pw-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.25s ease, background-color 0.25s ease;
}
.pw-strength-label {
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 46px;
  text-align: right;
  transition: color 0.25s ease;
}
/* strength level colours */
.pw-strength-fill[data-level="1"] { background: #dc2626; width: 20%; }
.pw-strength-fill[data-level="2"] { background: #ea580c; width: 40%; }
.pw-strength-fill[data-level="3"] { background: #ca8a04; width: 60%; }
.pw-strength-fill[data-level="4"] { background: #16a34a; width: 80%; }
.pw-strength-fill[data-level="5"] { background: #15803d; width: 100%; }
.pw-strength-label[data-level="1"] { color: #dc2626; }
.pw-strength-label[data-level="2"] { color: #ea580c; }
.pw-strength-label[data-level="3"] { color: #ca8a04; }
.pw-strength-label[data-level="4"] { color: #16a34a; }
.pw-strength-label[data-level="5"] { color: #15803d; }

/* ---- "Already have an account?" link row ---- */
#modal-register .modal-body > p {
  margin-top: 8px !important;
  font-size: 0.69rem;
  line-height: 1.4;
}

/* ---- Mobile ≤ 640 px ---- */
@media (max-width: 640px) {
  #modal-register .modal-header {
    padding: 12px 16px 0;
  }
  #modal-register .modal-body {
    padding: 8px 16px 12px;
  }
  #register-form .flex.flex-col {
    gap: 6px !important;
  }
  #modal-register .form-input,
  #modal-register .form-select {
    height: 34px;
    line-height: 34px;
  }
  #modal-register .input-icon-right {
    height: 34px;
  }
  #register-submit-btn {
    height: 36px;
  }
  /* Keep Student ID + Year Level side by side on mobile too */
  #modal-register .grid-2 {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
}
