/* ===================================================
   PAGE LEARNING — CUET REGISTRATION
   Inspired by: soft lavender card UI (reference image)
   Font: Inter | Mobile-first responsive
   =================================================== */

/* ---------- Variables ---------- */
:root {
  --navy: #0c1a35;
  --navy-dark: #071020;
  --navy-border: #1a3060;

  /* Lavender / periwinkle palette (from reference) */
  --lavender-bg: #eaebf8;
  --lavender-mid: #d6d8f5;
  --lavender-deep: #7b80d4;
  --lavender-pill: #7b80d4;
  --lavender-pill-hover: #6366c0;
  --lavender-card: #ffffff;
  --lavender-strip: #9da2e2;

  --text-dark: #1e2340;
  --text-mid: #4a5278;
  --text-muted: #8b90b8;
  --error: #e05c5c;
  --success: #22c55e;

  --input-border: #d0d3ef;
  --input-focus: #7b80d4;
  --input-bg: #f8f8fd;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ls-tight: -0.025em;
  --ls-label: -0.015em;
  --ls-ui: -0.02em;

  --radius-input: 10px;
  --radius-card: 22px;
  --radius-pill: 50px;
  --radius-btn: 50px;

  --shadow-card: 0 8px 48px rgba(100, 110, 200, 0.18), 0 2px 12px rgba(0,0,0,0.06);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  letter-spacing: var(--ls-tight);
  background: var(--lavender-bg);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ====================================================
   NAVBAR
   ==================================================== */
.navbar {
  background: linear-gradient(135deg, #07101f 0%, #0c1a35 100%);
  border-bottom: 1px solid var(--navy-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.navbar-logo:hover { opacity: 0.8; }

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.navbar-whatsapp {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: var(--transition);
}

.navbar-whatsapp:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.whatsapp-icon { flex-shrink: 0; }

.whatsapp-label {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: var(--ls-label);
}

/* ====================================================
   PAGE BODY
   ==================================================== */
.page-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
  overflow: hidden;
}

/* Decorative floating circles — reference UI corners */
.deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.deco-tl {
  width: 140px; height: 140px;
  background: var(--lavender-deep);
  opacity: 0.45;
  top: -40px; left: -40px;
}

.deco-tr {
  width: 90px; height: 90px;
  background: var(--lavender-deep);
  opacity: 0.3;
  top: 30px; right: 30px;
}

.deco-bl {
  width: 70px; height: 70px;
  background: var(--lavender-deep);
  opacity: 0.25;
  bottom: 80px; left: 60px;
}

.deco-br {
  width: 200px; height: 200px;
  background: var(--lavender-deep);
  opacity: 0.35;
  bottom: -60px; right: -60px;
}

/* ====================================================
   FORM CARD
   ==================================================== */
.card {
  position: relative;
  background: var(--lavender-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Illustration strip */
.card-strip {
  background: linear-gradient(135deg, var(--lavender-deep) 0%, #9da8e8 100%);
  height: 100px;
  position: relative;
  overflow: hidden;
}

.strip-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Title pill — overlapping the strip */
.card-title-wrap {
  display: flex;
  justify-content: center;
  margin-top: -18px;
  position: relative;
  z-index: 2;
}

.card-title-pill {
  background: var(--lavender-pill);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 8px 28px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(123, 128, 212, 0.45);
  white-space: nowrap;
}

/* Form body */
.cuet-form {
  padding: 28px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ====================================================
   FORM GROUPS
   ==================================================== */
.fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flabel {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Inputs */
.finput {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  color: var(--text-dark);
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: var(--ls-tight);
  padding: 11px 14px;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.finput::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.finput:focus {
  border-color: var(--input-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(123, 128, 212, 0.18);
}

.finput.is-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(224, 92, 92, 0.13);
}

.finput.is-valid {
  border-color: var(--success);
}

/* Select */
.fselect-wrap {
  position: relative;
}

.fselect {
  cursor: pointer;
  padding-right: 40px;
}

.fselect option {
  background: #fff;
  color: var(--text-dark);
}

.sel-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

/* Phone */
.phone-wrap {
  display: flex;
}

.phone-pfx {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--lavender-mid);
  border: 1.5px solid var(--input-border);
  border-right: none;
  border-radius: var(--radius-input) 0 0 var(--radius-input);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
  flex-shrink: 0;
  letter-spacing: var(--ls-label);
}

.phone-inp {
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
}

/* Same-as-phone checkbox */
.same-chk-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: var(--ls-label);
  user-select: none;
  width: fit-content;
}

.same-chk-inp {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chk-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--input-border);
  border-radius: 4px;
  background: var(--input-bg);
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.same-chk-inp:checked + .chk-box {
  background: var(--lavender-pill);
  border-color: var(--lavender-pill);
}

.same-chk-inp:checked + .chk-box::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Error message */
.ferr {
  font-size: 0.75rem;
  color: var(--error);
  letter-spacing: var(--ls-label);
  display: none;
}

.ferr.show { display: block; }

/* ====================================================
   SUBMIT BUTTON
   ==================================================== */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 24px;
  background: var(--lavender-pill);
  border: none;
  border-radius: var(--radius-btn);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: var(--ls-ui);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 18px rgba(123, 128, 212, 0.4);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  background: var(--lavender-pill-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(100, 106, 200, 0.5);
}

.submit-btn:hover::after { opacity: 1; }
.submit-btn:active { transform: translateY(0); }

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

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-btn.loading .btn-spinner { display: block; }
.submit-btn.loading #btn-label   { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ====================================================
   SUCCESS MESSAGE
   ==================================================== */
.success-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px 52px;
  gap: 12px;
  animation: fadeUp 0.4s ease both;
}

.success-msg.show { display: flex; }

.success-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  margin-bottom: 4px;
}

.success-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: var(--ls-tight);
}

.success-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: var(--ls-label);
}

/* ====================================================
   FOOTER
   ==================================================== */
.footer {
  background: var(--navy-dark);
  border-top: 1px solid var(--navy-border);
  padding: 18px 20px;
  text-align: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: var(--ls-label);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

/* Tablet + */
@media (min-width: 560px) {
  .navbar-inner { padding: 0 32px; }

  .page-body { padding: 56px 24px 80px; }

  .card { max-width: 520px; }

  .cuet-form { padding: 32px 36px 44px; gap: 20px; }
}

/* Mobile max */
@media (max-width: 400px) {
  .navbar-inner { padding: 0 14px; }

  .whatsapp-label { display: none; }

  .navbar-whatsapp { padding: 8px 10px; }

  .deco-tl { width: 90px; height: 90px; top: -25px; left: -25px; }
  .deco-tr { width: 55px; height: 55px; }
  .deco-br { width: 120px; height: 120px; }
  .deco-bl { display: none; }

  .card-strip { height: 80px; }

  .cuet-form { padding: 24px 18px 32px; gap: 16px; }

  .finput { font-size: 16px; } /* prevents iOS zoom */

  .footer-copy { font-size: 0.72rem; }
}

/* Prevent iOS input zoom */
@media (max-width: 480px) {
  .finput { font-size: 16px; }
}
