/* ==========================================================================
   ENROLLENCE — Design System
   Signature idea: "The Comparison Ledger" — course cards and the compare
   table share one visual language (hairline rules, tabular figures, stamp
   badges) so the page's core job — compare programs before you commit —
   is felt in the UI, not just described in copy.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,800&family=Work+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Color */
  --ink: #10192B;
  --ink-soft: #1B2A44;
  --paper: #FAF7F1;
  --card: #FFFFFF;
  --amber: #E2993B;
  --amber-dark: #C97F22;
  --pine: #1E6F5C;
  --pine-soft: #E7F1EC;
  --slate: #51586A;
  --slate-light: #8890A0;
  --line: #E7E1D3;
  --line-dark: #2A3A57;
  --danger: #C4453B;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-w: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(16,25,43,0.06), 0 8px 24px rgba(16,25,43,0.08);
  --shadow-pop: 0 20px 60px rgba(16,25,43,0.35);
  --header-h: 72px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; }
.container { max-width: var(--max-w); width: 100%; margin: 0 auto; padding: 0 24px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  font-weight: 600;
}
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); margin-top: 8px; }
.section-head p { color: var(--slate); font-size: 16px; margin-top: 12px; }
.tabular { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-outline-ink { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline-ink:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  width: 100%;
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.site-header__row {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header__logo {
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff; text-decoration: none;
}
.site-header__logo span { color: var(--amber); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,0.12);
}
.icon-btn:hover { background: rgba(255,255,255,0.16); }
@media (max-width: 640px) {
  .site-header__phone-label { display: none; }
}

/* ==========================================================================
   HERO  +  SIDEBAR FORM (shared sticky column runs through hero & carousel)
   ========================================================================== */
.hero {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: #fff;
  width: 100%;
  padding: 56px 0 90px;
}
.lp-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  justify-items: stretch;
  gap: 48px;
  align-items: start;
  width: 100%;
}
.lp-grid > * { min-width: 0; }
/* Carousel row: form (narrow) sits left, carousel (wide) sits right —
   mirrored from the hero row on purpose, per brief. Track widths are
   swapped here rather than using `order`, so the form column keeps its
   narrower width instead of inheriting the hero's wide-left track. */
.lp-grid--reverse { grid-template-columns: 0.85fr 1.15fr; }
.hero__eyebrow { color: var(--amber); }
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  margin-top: 14px;
  color: #fff;
}
.hero__sub {
  font-size: 18px; color: rgba(255,255,255,0.78);
  margin-top: 16px; max-width: 46ch; line-height: 1.55;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.stamp-badge {
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 12px;
}
.stamp-badge:nth-child(2) { transform: rotate(-1.2deg); }
.stamp-badge strong { font-family: var(--font-mono); font-size: 12.5px; color: #fff; }
.stamp-badge span { color: rgba(255,255,255,0.6); font-size: 11px; }

/* Sticky column wraps the form; spans hero + carousel section visually
   because it sits in a position:sticky container inside .lp-grid, which
   is reused as the outer wrapper for the carousel row below. */
.sticky-col { position: sticky; top: calc(var(--header-h) + 20px); }

.lead-form {
  background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-card);
}
.lead-form__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.lead-form__sub { font-size: 13px; color: var(--slate); margin-top: 4px; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--pine); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: none; }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.field.has-error .field-error { display: block; }
.lead-form__note { font-size: 11px; color: var(--slate-light); margin-top: 12px; text-align: center; }
.lead-form__success { display: none; text-align: center; padding: 20px 0; }
.lead-form__success.is-visible { display: block; }
.lead-form.is-submitted form { display: none; }

/* Mobile: sidebar form becomes an inline block below hero, no stickiness */
@media (max-width: 900px) {
  .lp-grid { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
}

/* ==========================================================================
   CAROUSEL / COURSE CARDS  ("ledger card" signature)
   ========================================================================== */
.carousel-row { padding: 64px 0 8px; }
.carousel-row .section-head { color: var(--ink); }
.carousel-track {
  display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 20px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.course-card {
  scroll-snap-align: start;
  flex: 0 0 272px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
}
.course-card__logo {
  width: 44px; height: 44px; border-radius: 8px; background: var(--pine-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--pine); font-size: 17px;
}
.course-card__uni { font-size: 12px; color: var(--slate); }
.course-card__program { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.course-card__meta { display: flex; gap: 14px; font-size: 12px; color: var(--slate); }
.course-card__meta strong { color: var(--ink); font-family: var(--font-mono); }

/* Fee "stub" — perforated ticket look, on-subject for a comparison ledger */
.fee-stub {
  border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 10px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.fee-stub__amount { font-family: var(--font-mono); font-weight: 600; font-size: 18px; }
.fee-stub__emi { font-size: 11px; color: var(--pine); font-family: var(--font-mono); }

.course-card__compare {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--slate);
  border-top: 1px solid var(--line); padding-top: 10px;
}
.course-card__actions { display: flex; gap: 8px; margin-top: auto; }
.course-card__actions .btn { flex: 1; }

/* ==========================================================================
   COMPARE BAR (floating, appears once >=1 card selected) + MODAL
   ========================================================================== */
.compare-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120%);
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 10px 10px 10px 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-pop); z-index: 50; transition: transform .25s ease;
}
.compare-bar.is-visible { transform: translate(-50%, 0); }
.compare-bar__count { font-family: var(--font-mono); font-size: 13px; }
.compare-bar__count strong { color: var(--amber); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,25,43,0.55);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; z-index: 60;
}
.modal-overlay.is-open { display: flex; }
.modal-card {
  background: #fff; border-radius: var(--radius); max-width: 880px; width: 100%;
  box-shadow: var(--shadow-pop); overflow: hidden;
}
.modal-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.modal-card__head h3 { font-size: 20px; }
.modal-close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; font-size: 16px; line-height: 1;
}
.modal-close:hover { background: var(--paper); }
.modal-card__body { padding: 4px 24px 24px; overflow-x: auto; }

.ledger-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.ledger-table th, .ledger-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger-table thead th { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.ledger-table tbody th { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--slate); white-space: nowrap; }
.ledger-table td.tabular { font-family: var(--font-mono); }
.ledger-table .check { color: var(--pine); font-weight: 700; }
.ledger-table .cross { color: var(--slate-light); }
.compare-empty { padding: 40px 24px; text-align: center; color: var(--slate); }

/* ==========================================================================
   TRUST / WHY SECTION
   ========================================================================== */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.trust-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.trust-card__icon { width: 38px; height: 38px; border-radius: 8px; background: var(--pine-soft); color: var(--pine); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; }
.trust-card h4 { font-size: 16px; margin-top: 14px; }
.trust-card p { font-size: 13.5px; color: var(--slate); margin-top: 6px; }

.testimonial-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.testimonial { background: var(--paper); border-left: 3px solid var(--amber); padding: 18px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.testimonial p { font-size: 14px; color: var(--ink); line-height: 1.6; }
.testimonial cite { display: block; margin-top: 12px; font-size: 12px; color: var(--slate); font-style: normal; font-family: var(--font-mono); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list { max-width: 720px; margin-top: 8px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item__q {
  width: 100%; background: none; border: none; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 4px; font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink);
}
.faq-item__icon { font-family: var(--font-mono); font-size: 18px; color: var(--pine); flex-shrink: 0; }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .25s ease; font-size: 14px; color: var(--slate); line-height: 1.6; }
.faq-item__a p { padding: 0 4px 18px; }
.faq-item.is-open .faq-item__a { max-height: 240px; }

/* ==========================================================================
   POPUP  (timed, 5s)
   ========================================================================== */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(16,25,43,0.6);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 70;
}
.popup-overlay.is-open { display: flex; }
.popup-card {
  background: #fff; border-radius: var(--radius); max-width: 400px; width: 100%;
  padding: 28px 24px 24px; position: relative; box-shadow: var(--shadow-pop);
  border-top: 4px solid var(--amber);
}
.popup-card .modal-close { position: absolute; top: 14px; right: 14px; }
.popup-card__eyebrow { color: var(--pine); }
.popup-card h3 { font-size: 22px; margin-top: 8px; }
.popup-card p.sub { font-size: 13.5px; color: var(--slate); margin-top: 6px; margin-bottom: 18px; }

/* ==========================================================================
   MOBILE STICKY BOTTOM BAR
   ========================================================================== */
.mobile-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(16,25,43,0.08);
}
@media (max-width: 900px) { .mobile-bar { display: flex; } }
.mobile-bar .btn { flex: 1; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 40px 0; font-size: 13px; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }

/* ==========================================================================
   RESPONSIVE — carousel + form row (tablet: stack cleanly, never overlap)
   ========================================================================== */
@media (max-width: 900px) {
  .section { padding: 48px 0; }
  .trust-grid, .testimonial-row { grid-template-columns: 1fr; }
  .course-card { flex-basis: 240px; }
  body { padding-bottom: 64px; } /* room for mobile bar */
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 56px; }
}

/* Thank-you page */
.ty-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.ty-card { max-width: 520px; text-align: center; }
.ty-card .eyebrow { display: block; }
.ty-card h1 { font-size: 32px; margin-top: 10px; }
.ty-card p { color: var(--slate); margin-top: 12px; font-size: 15px; }
.ty-check { width: 56px; height: 56px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; font-size: 28px; }
