@font-face {
  font-family: "Helvena";
  src: url("../public/fonts/helvena-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvena";
  src: url("../public/fonts/helvena-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvena";
  src: url("../public/fonts/helvena-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvena";
  src: url("../public/fonts/helvena-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvena";
  src: url("../public/fonts/helvena-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #2a3990;
  --purple-dark: #1e2a6e;
  --purple-light: #e8ebf7;
  --purple-mid: #7b8fd4;
  --red: #eb2127;
  --red-dark: #c41920;
  --red-light: #fdeaea;
  --ink: #0a0a0f;
  --body: #3d3d4a;
  --muted: #8b8b9e;
  --border: #e8e8f0;
  --white: #ffffff;
  --off-white: #fafafa;
  --dark: #0d0d1a;
  --success: #087443;
  --success-light: #ecfdf5;
  --shadow-sm: 0 4px 32px rgba(42,57,144,0.08);
  --shadow-card: 0 24px 60px rgba(42,57,144,0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Helvena", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 56px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  width: 120px;
  height: 40px;
  object-fit: contain;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 24px;
  border-radius: 6px;
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: .2s ease;
}
.nav-cta:hover { background: var(--purple-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(42,57,144,.30); }

.page-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 72px 0 44px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 64px 56px 52px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 78%);
}

.hero-copy { max-width: 680px; }
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .035em;
}

h1 {
  margin: 0 0 22px;
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -.038em;
  font-weight: 700;
}
h1 span { color: var(--purple); }

.lede {
  max-width: 560px;
  margin: 0 0 30px;
  color: var(--body);
  font-size: 18px;
  line-height: 1.72;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 42px;
}
.primary-link,
.phone-pill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.primary-link { background: var(--purple); color: #fff; }
.primary-link:hover { background: var(--purple-dark); }
.phone-pill { border: 2px solid var(--purple); color: var(--purple); background: #fff; }

.calculator-card,
.card {
  background: #fff;
  border: 1px solid #f0f0f4;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.calculator-card {
  padding: 32px;
  width: 100%;
}
.form-heading { margin-bottom: 24px; }
h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
}
.form-heading p {
  margin: 8px 0 0;
  color: var(--body);
  font-size: 15px;
}

.form-grid,
.form-grid.multi-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

select,
input {
  width: 100%;
  height: 48px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
select:focus,
input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(42,57,144,.10);
}

button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  padding: 0 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
button:hover { background: var(--purple-dark); transform: translateY(-1px); }

.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.form-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.input-feedback { margin-top: 14px; border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.input-feedback.error { border: 1px solid #fecaca; background: #fff1f2; color: #be123c; }
.input-feedback.warning { border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; }
.input-feedback ul { margin: 6px 0 0 18px; padding: 0; }
.crm-status { margin-top: 12px; border-radius: 10px; padding: 11px 14px; font-size: 12px; font-weight: 600; line-height: 1.45; }
.crm-status.pending { border: 1px solid #dbeafe; background: #eff6ff; color: var(--purple); }
.crm-status.success { border: 1px solid #bbf7d0; background: #ecfdf5; color: #166534; }
.crm-status.error { border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; }
.hidden { display: none; }

.card {
  width: min(1168px, calc(100% - 48px));
  margin: 24px auto 0;
  padding: 28px;
}

.result {
  border-color: rgba(8,116,67,.18);
  background: linear-gradient(135deg, #ffffff 0%, var(--success-light) 100%);
}
.result .eyebrow { color: var(--red); }
.result-grid,
.programme-breakdown,
.hostel-breakdown {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.result-grid { grid-template-columns: 1.1fr repeat(4, 1fr); }
.result-grid.compact-result { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.programme-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hostel-breakdown { grid-template-columns: minmax(0, 1fr); }
.programme-card,
.metric {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  padding: 18px;
}
.programme-card.primary,
.programme-card.hostel-card {
  border-color: rgba(46, 58, 164, .28);
  background: linear-gradient(135deg, rgba(46,58,164,.08), #fff 58%);
}
.programme-card h3 {
  margin: 0 0 14px;
  color: var(--purple);
  font-size: 18px;
  letter-spacing: -.01em;
}
.fee-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #eef0f6;
}
.fee-line span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.fee-line strong,
.metric strong {
  display: block;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
}
.fee-line.benefit strong { color: var(--success); }
.fee-line.payable {
  margin: 10px -4px -2px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
}
.fee-line.payable span { color: rgba(255,255,255,.72); }
.fee-line.payable strong { color: #fff; font-size: 24px; }
.metric strong { margin-top: 8px; }
.metric.primary { background: var(--purple); border-color: var(--purple); }
.metric.primary span { color: rgba(255,255,255,.72); }
.metric.primary strong { color: #fff; font-size: 23px; }
.input-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
  padding: 14px;
  border: 1px solid rgba(46, 58, 164, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}
.input-summary div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eef0f6;
}
.input-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.input-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.notice { margin: 14px 0 0; color: var(--body); font-size: 14px; line-height: 1.55; }
.muted { color: var(--muted); font-weight: 500; }
.result-page-shell {
  min-height: 100vh;
  padding: 128px 28px 72px;
  background:
    radial-gradient(circle at 10% 10%, rgba(123,143,212,.18), transparent 28%),
    linear-gradient(180deg, #f8f9ff 0%, #ffffff 72%);
}
.result-hero {
  max-width: 980px;
  margin: 0 auto 28px;
  text-align: center;
}
.result-hero h1 {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 72px);
}
.result-hero .lede {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 16px;
  line-height: 1.65;
}
.result-page-shell .result,
.result-page-shell .crm-status,
.result-actions {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.result-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.inline-action { margin-top: 18px; }
.details-panel { display: none; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.table-wrap { overflow:auto; margin-top:16px; border:1px solid var(--border); border-radius:14px; }
table { width:100%; border-collapse:collapse; min-width:760px; background:#fff; }
th, td { text-align:left; padding:13px 14px; border-bottom:1px solid #f0f0f4; vertical-align:top; font-size:14px; color: var(--body); }
th { background:#f8f9ff; color:var(--purple); font-size:12px; text-transform:uppercase; letter-spacing:.05em; font-weight:700; }
tr.highlight td { background:#fff7ed; font-weight:700; color: var(--ink); }

.site-footer {
  width: 100%;
  margin: 0;
  padding: 34px 56px 30px;
  border-top: 0;
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(135deg, var(--purple-dark), var(--purple));
}
.footer-inner {
  width: min(1168px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}
.footer-brand-block {
  display: grid;
  gap: 8px;
}
.footer-kicker,
.footer-contact-block span,
.footer-bottom {
  color: rgba(255,255,255,.68);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.footer-brand-block strong {
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.footer-brand-block p {
  max-width: 620px;
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: 14px;
  line-height: 1.6;
}
.footer-contact-block {
  display: grid;
  justify-items: end;
  gap: 10px;
  text-align: right;
}
.site-footer a,
.footer-phone {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.footer-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.16);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

@media (max-width: 1100px) {
  .site-nav { padding: 0 28px; }
  .hero-section { grid-template-columns: 1fr; padding: 52px 28px; }
  .calculator-card { max-width: 720px; }
}
@media (max-width: 760px) {
  .site-nav { height: 64px; padding: 0 20px; }
  .nav-cta { display: none; }
  .page-shell { padding-top: 64px; }
  .hero-section { min-height: auto; padding: 38px 20px; }
  h1 { font-size: clamp(34px, 10vw, 46px); }
  .lede { font-size: 16px; }
  .calculator-card { padding: 22px; }
  .card { width: calc(100% - 28px); padding: 20px; }
  .result-grid,
  .result-grid.compact-result,
  .programme-breakdown,
  .hostel-breakdown,
  .input-summary { grid-template-columns: 1fr; }
  .fee-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-title { align-items:flex-start; flex-direction:column; }
  .site-footer { padding: 28px 20px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .footer-brand-block p { margin: 0 auto; }
  .footer-contact-block { justify-items: center; text-align: center; }
  .footer-bottom { padding-top: 18px; }
}
