/* ==========================================================================
   G.P. Koirala Memorial College — Admission Inquiry
   Palette sampled directly from the college crest:
     --navy   #2e3094  (crest band / arched lettering)
     --blue   #0f5aa0  (globe)
     --gold   #ffde00  (laurel wreath / ribbon)
     --rose   #ee1c25  (corner roses)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --navy-900: #14163f;
  --navy-800: #1d2070;
  --navy-700: #2e3094;
  --navy-600: #3d3fae;
  --blue-600: #0f5aa0;
  --gold-500: #ffde00;
  --gold-700: #a87c00;
  --rose-600: #c81e28;
  --paper:    #f4f5fb;
  --ink:      #171a3d;
  --ink-soft: #4b4e70;
  --white:    #ffffff;

  --font-display: 'Cinzel', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow-card: 0 30px 60px -25px rgba(20, 22, 63, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 50% -10%, rgba(46, 48, 148, 0.10), transparent 60%),
    var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- Top identity bar ---------- */

.masthead {
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: var(--white);
  padding: 22px clamp(16px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border-bottom: 4px solid var(--gold-500);
}

.masthead__logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--white);
  padding: 2px;
  box-shadow: 0 0 0 2px var(--gold-500);
}

.masthead__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.masthead__text {
  line-height: 1.25;
  text-align: center;
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: clamp(15px, 2.6vw, 20px);
  text-transform: uppercase;
}

.masthead__sub {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-top: 2px;
}

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

.hero {
  position: relative;
  padding: clamp(40px, 7vw, 76px) 20px 30px;
  text-align: center;
  overflow: hidden;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-700);
  font-weight: 600;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--gold-700);
  opacity: 0.6;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  color: var(--navy-800);
  margin: 14px 0 10px;
  line-height: 1.15;
}

.hero p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---------- Form section ---------- */

.form-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 20px 60px;
}

.form-frame {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 900px;
}

.laurel {
  flex: 0 0 auto;
  width: 70px;
  opacity: 0.9;
  display: none;
}

@media (min-width: 820px) {
  .laurel { display: block; }
}

.laurel--right { transform: scaleX(-1); }

.card {
  flex: 1 1 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(46, 48, 148, 0.08);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 222, 0, 0.6);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.card__title {
  font-family: var(--font-display);
  color: var(--navy-800);
  font-size: 20px;
  margin: 0 0 4px;
  text-align: center;
}

.card__hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 28px;
}

/* ---------- Fields ---------- */

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: var(--navy-800);
  margin-bottom: 7px;
}

.field label .req {
  color: var(--rose-600);
  margin-left: 2px;
}

.field input,
.field select {
  width: 100%;
  padding: 13px 15px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid rgba(46, 48, 148, 0.18);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232e3094'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy-700);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(46, 48, 148, 0.12);
}

.field.has-error input,
.field.has-error select {
  border-color: var(--rose-600);
  background: #fff5f5;
}

.field__error {
  display: none;
  color: var(--rose-600);
  font-size: 12.5px;
  margin-top: 6px;
}

.field.has-error .field__error {
  display: block;
}

/* ---------- Submit ribbon button ---------- */

.submit-row {
  margin-top: 30px;
  text-align: center;
}

.btn-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--navy-900);
  background: linear-gradient(180deg, #ffe94d 0%, var(--gold-500) 55%, var(--gold-700) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 24px -10px rgba(168, 124, 0, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -10px rgba(168, 124, 0, 0.6); }
.btn-submit:active { transform: translateY(0); }

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-submit svg { width: 16px; height: 16px; }

/* ---------- Status message ---------- */

.status-msg {
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
  display: none;
}

.status-msg.show { display: block; }

.status-msg.success {
  background: #eaf7ee;
  color: #1e6b34;
  border: 1px solid #b7e3c3;
}

.status-msg.error {
  background: #fdecec;
  color: #9c1f24;
  border: 1px solid #f3bcbd;
}

/* ---------- Ribbon footer ---------- */

.ribbon-footer {
  background: var(--navy-800);
  color: var(--white);
  text-align: center;
  padding: 16px 20px;
  font-size: 13px;
  letter-spacing: 0.06em;
  border-top: 3px solid var(--gold-500);
}

.ribbon-footer strong { color: var(--gold-500); }

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .masthead { gap: 12px; }
  .masthead__logo { width: 46px; height: 46px; }
  .card { padding: 24px 18px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-submit { transition: none; }
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold-700);
  outline-offset: 2px;
}