/* ==========================================================================
   INDIAN AERONAUTICS — TEST PORTAL
   Design tokens derived from the brand mark:
     navy field, blue instrument ring, orange flame accent.
   ========================================================================== */

:root {
  --navy-950: #060f1c;
  --navy-900: #0b1e33;
  --navy-800: #12293f;
  --navy-700: #1a3a55;
  --blue-500: #2f7fd1;
  --blue-300: #8dc0ef;
  --orange-500: #f5a623;
  --orange-400: #ffc857;
  --white: #f5f8fb;
  --gray-300: #c3d0dd;
  --gray-400: #93a6ba;
  --green-500: #33c481;
  --red-500: #e5555c;
  --radius-md: 10px;
  --radius-lg: 18px;
  --font-display: "Rajdhani", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(47,127,209,0.20), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245,166,35,0.10), transparent 55%),
    var(--navy-950);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

a { color: var(--blue-300); }

button, input {
  font-family: inherit;
}

/* ---- Layout shells ---- */

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.brand img { width: 40px; height: 40px; display: block; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--orange-400);
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.center-page {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ---- Hero ---- */

.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue-300);
  border: 1px solid rgba(141,192,239,0.35);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  color: var(--white);
}

.hero h1 span { color: var(--orange-400); }

.hero p.lede {
  max-width: 620px;
  margin: 20px auto 0;
  color: var(--gray-300);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--orange-400), var(--orange-500));
  color: #21150a;
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.22);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--blue-300); color: var(--blue-300); }

.btn-whatsapp {
  background: #1fae5c;
  color: #ffffff;
}
.btn-whatsapp:hover { filter: brightness(1.08); }

.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Cards / panels ---- */

.card {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.panel-title {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.panel-sub {
  color: var(--gray-400);
  font-size: 0.94rem;
  margin-bottom: 26px;
}

/* ---- How it works steps ---- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 56px 0;
}

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

.step {
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}

.step .step-index {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--blue-300);
  margin-bottom: 10px;
}

.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--gray-400); font-size: 0.94rem; margin: 0; }

/* ---- Papers grid ---- */

.papers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.paper-card {
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paper-card .paper-name { font-size: 1.15rem; font-family: var(--font-display); font-weight: 700; }
.paper-card .paper-meta { color: var(--gray-400); font-size: 0.86rem; margin-bottom: 12px; }

/* ---- Forms ---- */

.field { margin-bottom: 18px; text-align: left; }

.field label {
  display: block;
  font-size: 0.86rem;
  color: var(--gray-300);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.14);
  background: var(--navy-950);
  color: var(--white);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus { border-color: var(--blue-500); }

.form-error {
  background: rgba(229,85,92,0.12);
  border: 1px solid rgba(229,85,92,0.4);
  color: #ffb3b6;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: none;
}

.form-error.visible { display: block; }

/* ---- Exam runner ---- */

.exam-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(6,15,28,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gauge-wrap { display: flex; align-items: center; gap: 12px; }

.gauge { position: relative; width: 56px; height: 56px; }
.gauge svg { transform: rotate(-90deg); }
.gauge-track { stroke: rgba(255,255,255,0.1); }
.gauge-fill { stroke: var(--orange-400); transition: stroke-dashoffset 1s linear; }
.gauge-time {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
}

.exam-progress-label { font-size: 0.86rem; color: var(--gray-400); }

.runway {
  display: flex;
  gap: 3px;
  padding: 10px 24px;
  overflow-x: auto;
}

.runway .tick {
  flex: 0 0 auto;
  width: 9px;
  height: 20px;
  border-radius: 2px;
  background: rgba(255,255,255,0.09);
  cursor: pointer;
  border: none;
  padding: 0;
}
.runway .tick.answered { background: var(--blue-500); }
.runway .tick.current { background: var(--orange-400); }
.runway .tick.flagged { outline: 2px solid var(--orange-500); outline-offset: 1px; }

.exam-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 120px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-300);
  margin-bottom: 14px;
}

.question-text {
  font-size: 1.28rem;
  line-height: 1.45;
  margin-bottom: 28px;
}

.options { display: flex; flex-direction: column; gap: 12px; }

.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--navy-900);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.option:hover { border-color: var(--blue-500); }
.option.selected { border-color: var(--orange-400); background: rgba(245,166,35,0.08); }

.option .opt-letter {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}
.option.selected .opt-letter { background: var(--orange-400); color: #21150a; border-color: var(--orange-400); }

.exam-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(6,15,28,0.94);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- Results ---- */

.score-hero {
  text-align: center;
  padding: 40px 0 20px;
}

.score-ring { position: relative; width: 180px; height: 180px; margin: 0 auto 20px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring-track { stroke: rgba(255,255,255,0.08); }
.score-ring-fill { stroke: var(--orange-400); }
.score-ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-ring-label .num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; }
.score-ring-label .den { color: var(--gray-400); font-size: 0.85rem; }

.breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 30px 0;
}
@media (max-width: 640px) { .breakdown { grid-template-columns: 1fr; } }

.breakdown .b-card {
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}
.breakdown .b-card .b-score { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.breakdown .b-card .b-label { color: var(--gray-400); font-size: 0.82rem; margin-top: 4px; }

.review-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: var(--navy-900);
}
.review-item .q { margin-bottom: 10px; }
.review-item .row { font-size: 0.92rem; padding: 3px 0; color: var(--gray-300); }
.review-item .row.correct { color: var(--green-500); }
.review-item .row.incorrect { color: var(--red-500); }
.review-item .row.unanswered { color: var(--gray-400); font-style: italic; }

/* ---- Footer ---- */

footer.site-footer {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.85rem;
  padding: 40px 20px 60px;
}

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
}

.muted { color: var(--gray-400); }
.small { font-size: 0.86rem; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.text-center { text-align: center; }
