/* ============================================
   CONTRACTOR FOUNDING APPLICATION PAGE
   Uses theme variables from themes/theme-*.css
   ============================================ */

:root {
  --apply-radius: 12px;
  --apply-shadow: 0 4px 24px rgba(31, 41, 51, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- STICKY NAV ----- */
.apply-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}

.apply-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.apply-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary);
  text-decoration: none;
}

.apply-logo:hover {
  color: var(--text);
}

.apply-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.apply-nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.apply-nav-links a:hover {
  color: var(--primary-light, var(--primary));
}

.apply-nav-active {
  color: var(--primary) !important;
  font-weight: 600;
}

.apply-nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.apply-nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

/* ----- MAIN ----- */
.apply-main {
  flex: 1;
  padding: 2rem 1.5rem 3rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* ----- HERO ----- */
.apply-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.apply-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.apply-hero-text {
  font-size: 1.0625rem;
  color: var(--text);
  opacity: 0.9;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.apply-hero-badge {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(217, 108, 44, 0.06);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

/* ----- FORM CARD ----- */
.apply-form-section {
  margin-bottom: 2rem;
}

.apply-form-card {
  background: var(--card-bg);
  border-radius: var(--apply-radius);
  box-shadow: var(--apply-shadow);
  border: 1px solid var(--border);
  padding: 2rem;
}

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.apply-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.apply-field-full {
  grid-column: 1 / -1;
}

.apply-field-wcc {
  grid-column: 1 / -1;
}

.apply-field label {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text);
}

.apply-field input,
.apply-field select {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.apply-field input::placeholder {
  color: var(--text-secondary);
}

.apply-field input:focus,
.apply-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.apply-field input:invalid:not(:placeholder-shown):not(:focus),
.apply-field select:invalid:not([value=""]):not(:focus) {
  border-color: #b91c1c;
}

.apply-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231F2933' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* SUBMIT BUTTON */
.apply-submit {
  font-family: var(--font-main);
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  width: 100%;
  transition: background 0.2s;
}

.apply-submit:hover {
  background: var(--accent-hover);
}

.apply-submit:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* SUCCESS MESSAGE */
.apply-success {
  text-align: center;
  padding: 2rem 1rem;
}

.apply-success-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--secondary, var(--primary));
  line-height: 1.5;
}

.apply-error .apply-success-text {
  color: var(--primary);
}

/* ----- FOOTER ----- */
.apply-footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

.apply-footer p {
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0.8;
}

/* ----- RESPONSIVE: 1-col on mobile ----- */
@media (max-width: 600px) {
  .apply-nav {
    padding: 0.75rem 1rem;
  }

  .apply-nav-links {
    gap: 1rem;
  }

  .apply-nav-links a:not(.apply-nav-cta) {
    font-size: 0.875rem;
  }

  .apply-form-grid {
    grid-template-columns: 1fr;
  }

  .apply-field-full,
  .apply-field-wcc {
    grid-column: 1;
  }

  .apply-form-card {
    padding: 1.5rem;
  }

  .apply-main {
    padding: 1.5rem 1rem 2rem;
  }

  .apply-hero-badge {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}
