/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1A1A1A;
  --primary-light: #2E2E2E;
  --primary-dark: #111111;
  --accent: #CC0000;
  --accent-light: #E60012;
  --accent-dark: #A30000;
  --bg: #ffffff;
  --bg-alt: #F5F5F7;
  --bg-dark: #111111;
  --text: #1A1A1A;
  --text-light: #666666;
  --text-white: #ffffff;
  --border: #E0E0E0;
  --border-focus: var(--accent);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.btn--primary {
  background: var(--accent);
  color: var(--text-white);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(204, 0, 0, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: var(--text-white);
}

.btn--outline:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn--outline:disabled:hover {
  background: transparent;
  color: var(--primary);
  transform: none;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo-img {
  height: 52px;
  width: auto;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-light);
  position: relative;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.navbar__links a:hover {
  color: var(--text);
}

.navbar__links a:hover::after {
  width: 100%;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #0a0a0a 0%, #1a1a1a 40%, #222222 70%, #1a1a1a 100%);
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(204, 0, 0, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(204, 0, 0, 0.05) 0%, transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px 0 80px;
}

.hero__logo {
  max-width: 220px;
  margin: 0 auto 40px;
  filter: drop-shadow(0 4px 24px rgba(204, 0, 0, 0.2));
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero__cta {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
  padding: 16px 40px;
  font-size: 1.1rem;
}

.hero__cta:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(204, 0, 0, 0.45);
}

/* ===== STATS ===== */
.stats {
  background: var(--accent);
  padding: 48px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stats__item {
  color: var(--text-white);
}

.stats__number {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
}

.stats__suffix {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.stats__label {
  margin-top: 4px;
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 500;
}

/* ===== ABOUT ===== */
.about {
  padding: 100px 0;
  background: var(--bg);
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.about__card {
  background: var(--bg-alt);
  padding: 40px 32px;
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.about__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.about__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.about__card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.about__card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== BENEFITS ===== */
.benefits {
  padding: 100px 0;
  background: var(--bg-alt);
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.benefits__card {
  background: var(--bg);
  padding: 40px 36px;
  border-radius: var(--radius);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.benefits__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.benefits__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.benefits__card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.benefits__card p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ===== APPLICATION FORM ===== */
.apply {
  padding: 100px 0;
  background: var(--bg);
}

/* Progress */
.form-progress {
  max-width: 680px;
  margin: 0 auto 48px;
}

.form-progress__bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.form-progress__fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.form-progress__steps {
  display: flex;
  justify-content: space-between;
}

.form-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--text-light);
  border: 2px solid var(--border);
  transition: var(--transition);
}

.step-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

.form-progress__step.active .step-circle {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(204, 0, 0, 0.3);
}

.form-progress__step.active .step-label {
  color: var(--accent);
  font-weight: 600;
}

.form-progress__step.completed .step-circle {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.form-progress__step.completed .step-label {
  color: var(--primary);
}

/* Form container */
.app-form {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow-sm);
}

.form-step {
  display: none;
  animation: fadeIn 0.35s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-step__title i {
  color: var(--accent);
}

/* Form fields */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.req {
  color: var(--accent);
}

.form-hint {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.5;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.08);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.08);
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #e53935;
  margin-top: 4px;
  min-height: 0;
}

/* Size alert */
.size-alert {
  background: #fff3f3;
  border: 1px solid #e53935;
  color: #c62828;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Compressing spinner */
.file-upload__compressing {
  padding: 12px 0;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* File upload */
.file-upload__area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-alt);
}

.file-upload__area:hover {
  border-color: var(--text);
  background: rgba(26, 26, 26, 0.02);
}

.file-upload__area.dragover {
  border-color: var(--accent);
  background: rgba(204, 0, 0, 0.03);
}

.file-upload__area.has-files {
  border-color: var(--text);
  border-style: solid;
  background: rgba(26, 26, 26, 0.02);
}

.file-upload__area i {
  font-size: 2rem;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}

.file-upload__area p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.file-upload__browse {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.file-upload__area small {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #999;
}

.file-upload__preview {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-upload__file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
}

.file-upload__file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.file-upload__file-info i {
  color: var(--accent);
  flex-shrink: 0;
}

.file-upload__file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-upload__file-size {
  color: var(--text-light);
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-left: 8px;
}

.file-upload__remove {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.file-upload__remove:hover {
  transform: scale(1.2);
}

.file-upload.has-error .file-upload__area {
  border-color: #e53935;
}

/* Form navigation */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===== FORM SUCCESS ===== */
.form-success__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-success__inner i {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.form-success__inner h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.form-success__inner p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact {
  padding: 100px 0;
  background: var(--bg-alt);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.contact__card {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.contact__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact__card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.contact__card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.contact__card p,
.contact__card a {
  color: var(--text-light);
  font-size: 0.92rem;
}

.contact__card a:hover {
  color: var(--accent);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-dark);
  padding: 32px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}

.footer__logo-img {
  height: 36px;
  width: auto;
}

.footer__brand .logo-text {
  color: var(--text-white);
  font-weight: 400;
}

.footer__brand .logo-text strong {
  font-weight: 800;
  color: var(--accent);
}

.footer__copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.footer__links a:hover {
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .benefits__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar__links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .navbar__links.open {
    display: flex;
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar__toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .navbar__toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero__content {
    padding: 100px 0 60px;
  }

  .hero__logo {
    max-width: 170px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 48px auto 0;
  }

  .app-form {
    padding: 32px 20px;
  }

  .step-label {
    display: none;
  }

  .form-progress__steps {
    justify-content: center;
    gap: 16px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .form-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .form-nav .btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats__grid {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__logo {
    max-width: 140px;
  }

  .benefits__card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Spinner for submit */
.btn--loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.btn--loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
