/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --accent: #06B6D4;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --dark: #0F172A;
  --gray-900: #1E293B;
  --gray-700: #334155;
  --gray-500: #64748B;
  --gray-300: #CBD5E1;
  --gray-100: #F1F5F9;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Poppins', 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

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

.btn-ghost {
  color: var(--gray-700);
  background: transparent;
}
.btn-ghost:hover { color: var(--primary); background: var(--gray-100); }

.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  border-bottom-color: var(--gray-100);
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}
.logo-icon { font-size: 1.6rem; }
.logo-accent { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: 0.3s;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 50%, #ECFEFF 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(79,70,229,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6,182,212,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: white;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark);
}
.stat span {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ========== SECTION HEADER ========== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ========== FEATURES ========== */
.features {
  padding: 100px 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.feature-card:hover {
  background: white;
  border-color: var(--gray-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
  padding: 100px 0;
  background: linear-gradient(180deg, #F8FAFC 0%, white 100%);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 240px;
  max-width: 300px;
  text-align: center;
  padding: 24px;
}
.step-number {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.step p {
  color: var(--gray-500);
  font-size: 0.95rem;
}
.step-arrow {
  font-size: 1.8rem;
  color: var(--primary-light);
  margin-top: 40px;
  font-weight: 300;
}

/* ========== STUDENT PORTAL SECTION ========== */
.student-portal-section {
  padding: 100px 0;
  background: white;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.portal-content h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.portal-lead {
  color: var(--gray-500);
  font-size: 1.1rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.portal-features {
  list-style: none;
  margin-bottom: 36px;
}
.portal-features li {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}
.portal-features .check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #D1FAE5;
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.portal-features strong {
  display: block;
  font-size: 1rem;
}
.portal-features span {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* Mockup */
.mockup {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--gray-300);
}
.mockup-header {
  background: var(--gray-900);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #10B981; }
.mockup-header span { margin-left: 8px; opacity: 0.8; }

.mockup-body { padding: 20px; }

.mock-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  margin-bottom: 16px;
}

.mock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.mock-avatar {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.mock-card strong { display: block; font-size: 0.95rem; }
.mock-card span { font-size: 0.8rem; color: var(--gray-500); }

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.mock-stat {
  background: #EEF2FF;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.mock-stat .num {
  display: block;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}
.mock-stat span { font-size: 0.75rem; color: var(--gray-500); }

.mock-list { display: flex; flex-direction: column; gap: 8px; }
.mock-item {
  background: var(--gray-100);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* ========== PRICING ========== */
.pricing {
  padding: 100px 0;
  background: var(--gray-100);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}

.price-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.25s;
}
.price-card:hover {
  box-shadow: var(--shadow-lg);
}
.price-card.popular {
  border-color: var(--primary);
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 50px;
}

.price-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-500);
}
.price-card > p {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.price-card ul {
  list-style: none;
  margin-bottom: 28px;
}
.price-card li {
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.price-card li:last-child { border-bottom: none; }

/* ========== CTA BANNER ========== */
.cta-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 50%, var(--accent) 100%);
  text-align: center;
  color: white;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--dark);
  color: #94A3B8;
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 16px; color: white; }
.footer-brand p { font-size: 0.95rem; line-height: 1.7; max-width: 280px; }

.footer-links h4,
.footer-contact h4 {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-contact p { font-size: 0.9rem; margin-bottom: 8px; }

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}
.footer-bottom a { color: #94A3B8; }
.footer-bottom a:hover { color: white; }

/* ========== MODALS ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal-lg { max-width: 560px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--gray-100);
  color: var(--dark);
}

.modal-header {
  margin-bottom: 28px;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-header p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* Forms */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--dark);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.form-group textarea { resize: vertical; min-height: 70px; }

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.checkbox-group a { color: var(--primary); text-decoration: underline; }

.form-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
}
.form-footer a { color: var(--primary); }

.helper-text {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 8px;
}

/* Search box */
.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}
.search-results {
  margin-top: 8px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.search-results.active { display: block; }
.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--gray-100); }
.search-result-item strong { display: block; font-size: 0.95rem; }
.search-result-item span { font-size: 0.8rem; color: var(--gray-500); }

.selected-school {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.selected-school .school-icon {
  font-size: 1.6rem;
}
.selected-school strong { display: block; }
.selected-school span { font-size: 0.85rem; color: var(--gray-500); }

/* Success state */
.form-success {
  text-align: center;
  padding: 20px 0;
}
.success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.form-success h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.form-success p {
  color: var(--gray-500);
  margin-bottom: 8px;
}
.success-detail {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 16px 0 !important;
  color: var(--gray-700) !important;
}
.success-note {
  font-size: 0.9rem;
  margin-bottom: 24px !important;
}

/* Portal Preview */
.portal-preview { }
.preview-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}
.preview-avatar {
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.preview-header h3 { font-size: 1.15rem; }
.preview-header p { font-size: 0.85rem; color: var(--gray-500); }

.preview-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-500);
  border-radius: 6px;
  white-space: nowrap;
}
.tab.active {
  background: var(--primary);
  color: white;
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.p-card {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.p-label { display: block; font-size: 0.75rem; color: var(--gray-500); margin-bottom: 4px; }
.p-value { font-size: 1.3rem; font-weight: 700; color: var(--primary); }

.preview-content h4 {
  font-size: 0.95rem;
  margin: 16px 0 10px;
}
.doc-list {
  list-style: none;
  margin-bottom: 12px;
}
.doc-list li {
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
}
.remark {
  background: #FEF3C7;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.9rem;
}
.remark p { margin-bottom: 6px; font-style: italic; }
.remark span { font-size: 0.8rem; color: var(--gray-500); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .step-arrow { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .nav-actions .btn-ghost { display: none; }

  .hero { padding: 120px 0 70px; }
  .hero-stats { gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .price-card.popular { transform: none; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-lg { width: 100%; }
  .modal { padding: 24px 20px; }
}
