/* =========================================================
   DTI Application Form — Stylesheet
   Palette: Navy #273755 · Gold #FEC601 · Orange #EA7317 · Sky #3DA5D9
   Type: Sora (display) + Inter (body)
   ========================================================= */

:root {
  --navy: #273755;
  --navy-dark: #1c2942;
  --gold: #FEC601;
  --orange: #EA7317;
  --sky: #3DA5D9;
  --ink: #1f2937;
  --muted: #6b7280;
  --border: #e2e5eb;
  --bg-field: #fafbfc;
  --card-bg: #ffffff;
  --page-bg: #eef1f6;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 20px 50px rgba(39, 55, 85, 0.12);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   Registration / Login Gate
   ========================================================= */
.gate-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 24px;
}

.gate-card {
  max-width: 440px;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  backdrop-filter: blur(6px);
  animation: fadeUp 0.5s ease both;
}

.gate-icon { font-size: 40px; margin-bottom: 12px; }
.gate-card h2 { font-family: var(--font-display); margin: 0 0 12px; font-size: 22px; }
.gate-card p { color: rgba(255,255,255,0.75); line-height: 1.6; font-size: 14.5px; margin-bottom: 24px; }
.gate-error { color: #fecaca !important; display: none; font-size: 13px; }

/* =========================================================
   Layout
   ========================================================= */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 60px;
  animation: fadeUp 0.5s ease both;
}

.hero {
  position: relative;
  padding: 56px 24px 90px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
}

.hero-stripe {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 55%, rgba(254,198,1,0.16) 55%, rgba(254,198,1,0.16) 68%, transparent 68%),
    linear-gradient(120deg, transparent 70%, rgba(61,165,217,0.18) 70%, rgba(61,165,217,0.18) 100%);
}

.hero-content { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

.hero .subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  margin: 8px 0 0;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin: -56px 20px 0;
  padding: 36px 32px 40px;
  position: relative;
  z-index: 2;
}

.page-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 28px;
}

/* =========================================================
   Info Box
   ========================================================= */
.info-box {
  background: var(--bg-field);
  border-left: 4px solid var(--sky);
  padding: 22px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.7;
}

.info-box h4 { color: var(--navy); margin: 0 0 8px; font-size: 14.5px; }
.info-box ul { padding-left: 20px; margin: 8px 0; }
.info-box .note { font-weight: 600; color: var(--navy); }
.info-box .divider { height: 1px; background: var(--border); margin: 16px 0; }
.code-chip {
  background: #f4f6f9;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: 'Inter', monospace;
  display: inline-block;
}
.file-format-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Keeps it responsive on smaller screens */
}

.file-format-row p {
    margin: 0;
}
/* =========================================================
   Sections
   ========================================================= */
.section { margin-bottom: 36px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}

.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-1 { background: var(--sky); }
.dot-2 { background: var(--orange); }
.dot-3 { background: var(--gold); }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.help-text { font-size: 12.5px; color: var(--muted); margin: -3px 0 8px; }




.multiselect { position: relative; }

.multiselect-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-field);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.multiselect-control:focus,
.multiselect-control.open {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(61, 165, 217, 0.15);
  background: #fff;
}

.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.placeholder { color: #9ca3af; font-size: 14.5px; }

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eaf4fb;
  color: var(--navy);
  border: 1px solid #cfe7f5;
  padding: 5px 8px 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.chip button {
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  width: auto;
  height: auto;
}

.ms-arrow { color: var(--navy); font-size: 13px; flex-shrink: 0; }

.multiselect-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  z-index: 10;
  padding: 8px;
}

.multiselect-panel.open { display: block; }

.ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

.ms-option:hover { background: #f4f8fb; }

.ms-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sky);
  cursor: pointer;
}



/* =========================================================
   Inputs, Textareas, Selects
   ========================================================= */
input, textarea, select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-field);
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder, textarea::placeholder { color: #9ca3af; }

input:hover, textarea:hover, select:hover { border-color: #c7ccd6; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--sky);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 165, 217, 0.15);
}

textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
textarea.tall { min-height: 200px; }
textarea.short { min-height: 100px; }

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23273755' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 44px;
}

input[type="file"] {
  padding: 11px 14px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  padding: 9px 16px;
  margin-right: 14px;
  border: none;
  border-radius: 8px;
  background: var(--sky);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

input[type="file"]::file-selector-button:hover { background: var(--navy-dark); }


input[type="file"].file-selected::file-selector-button {
  background: #16a34a;
}
input[type="file"].file-selected::file-selector-button:hover {
  background: #15803d;
}
.conditional-field {
  display: none;
  padding: 18px;
  margin: -4px 0 20px;
  background: #f6f9fc;
  border-left: 3px solid var(--sky);
  border-radius: var(--radius-sm);
}
.conditional-field.visible { display: block; animation: fadeUp 0.3s ease both; }
.conditional-field .field:last-child { margin-bottom: 0; }

.word-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.word-count.over-limit { color: #dc2626; font-weight: 600; }



/* =========================================================
   Terms & Submit
   ========================================================= */
.terms-box {
  background: #fffdf2;
  border: 1.5px solid var(--gold);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.terms-box label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
  color: var(--ink);
}

.terms-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--orange);
  cursor: pointer;
  flex-shrink: 0;
}
input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
}

.terms-box a { color: var(--sky); font-weight: 600; text-decoration: none; }
.terms-box a:hover { text-decoration: underline; }

.btn-primary {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover { background: #d86114; }
.btn-primary:active { transform: scale(0.98); }

.btn-submit {
  width: 100%;
  height: 54px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit:disabled,
button:disabled {
  background: #9aa4b2 !important;
  cursor: not-allowed;
  transform: none !important;
}

.loading { opacity: 0.6; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 3px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Success Screen
   ========================================================= */
.success-screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 24px;
}

.success-card {
  max-width: 420px;
  text-align: center;
  color: #fff;
  animation: fadeUp 0.5s ease both;
}

.success-icon { font-size: 48px; margin-bottom: 14px; }
.success-card h2 { font-family: var(--font-display); font-size: 22px; margin: 0 0 10px; }
.success-card p { color: rgba(255,255,255,0.75); line-height: 1.6; font-size: 14.5px; }

.info-box p a {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* =========================================================
   Mobile Responsive
   ========================================================= */
@media (max-width: 720px) {
    .info-box p {
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .info-box p a {
        width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
  .card {
    margin: -40px 14px 0;
    padding: 28px 20px 32px;
  }

  .hero {
    padding: 44px 20px 74px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gate-card {
    padding: 32px 24px;
  }

  /* Prevent inputs from overflowing */
  .field,
  .field-row > .field {
    min-width: 0;
  }

  input,
  textarea,
  select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
  }

  input[type="email"] {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 24px;
  }

  .card {
    padding: 22px 16px 28px;
  }

  .section-label {
    font-size: 14px;
  }

  input,
  textarea,
  select {
    font-size: 14px;
    padding: 12px 14px;
  }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 24px; }
  .card { padding: 22px 16px 28px; }
  .section-label { font-size: 14px; }
  input, textarea, select { font-size: 14px; padding: 12px 14px; }
}
