/* ========== APPLY PAGE ========== */

/* Hide header/footer - standalone page */
.apply-page header,
.apply-page .footer {
  display: none;
}

/* Reset body for full-screen steps - WHITE background */
body.apply-page {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* ========== PROGRESS BAR ========== */
.apply-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  z-index: 200;
}

.apply-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-orange);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== BACK BUTTON ========== */
.apply-back {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 150;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000000;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.apply-back:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

/* ========== LOGO ========== */
.apply-logo {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
}

.apply-logo img {
  height: 48px;
  width: auto;
  transition: opacity 0.3s ease;
}

.apply-logo:hover img {
  opacity: 0.8;
}

/* ========== STEPS ========== */
.apply-step {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.apply-step.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 10;
}

.apply-step-inner {
  max-width: 960px;
  width: 100%;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Scrollable variant for longer content */
.apply-step-scrollable {
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding-top: 100px;
  padding-bottom: 100px;
  align-items: flex-start;
  text-align: left;
  max-width: 960px;
  -webkit-overflow-scrolling: touch;
}

.apply-step-scrollable::-webkit-scrollbar {
  width: 0;
}

/* ========== HERO (Step 1) ========== */
.apply-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 32px;
  font-family: 'Satoshi', monospace;
}

.apply-hero-headline {
  font-size: var(--alpha-heading-h1);
  font-weight: var(--font-weight-medium);
  line-height: 1.15;
  color: #000000;
  margin: 0 0 28px;
}

.apply-hero-sub {
  font-size: var(--alpha-body-medium);
  font-weight: var(--font-weight-regular);
  color: #666;
  line-height: 1.5;
  margin: 0 0 56px;
}

/* ========== CTA BUTTON (orange-dot-expand, matches commitment-button) ========== */
.apply-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 24px 48px 24px 48px;
  /* min-width: min(320px, 100%); */
  min-height: 80px;
  background-color: var(--bg-color);
  color: rgba(255, 255, 255, 0.90);
  font-size: var(--alpha-button-large);
  font-weight: var(--font-weight-bold);
  font-family: 'Satoshi', sans-serif;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
}

.apply-cta::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-orange);
  filter: drop-shadow(0 0 10px var(--accent-orange));
  transition: all 0.6s ease-in-out;
  z-index: 0;
}

.apply-cta:hover::before {
  transform: translateY(-50%) scale(80);
  left: 0;
}

.apply-cta .button-text {
  position: relative;
  z-index: 10;
  margin-left: 36px;
  transition: all 0.5s ease;
}

.apply-cta:hover .button-text {
  margin-left: 0;
  color: var(--text-white);
}

/* Submit variant */
.apply-cta-submit {
  /* width: 100%; */
  justify-content: flex-start;
  margin-top: 16px;
  padding: 24px 48px 24px 48px;
}

.apply-cta-submit:hover::before {
  transform: translateY(-50%) scale(200);
}

.apply-cta.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ========== ABOUT / DEAL (Step 2) ========== */
.apply-about-section {
  margin-bottom: 64px;
}

.apply-section-heading {
  font-size: var(--alpha-heading-h3);
  font-weight: var(--font-weight-medium);
  color: #000000;
  margin: 0 0 24px;
  line-height: 1.3;
}

.apply-body-text {
  font-size: var(--alpha-body-medium);
  font-weight: var(--font-weight-medium);
  color: #000000;
  line-height: 1.7;
  margin: 0 0 20px;
}

.apply-deal-section {
  margin-bottom: 56px;
}

.apply-deal-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.apply-deal-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.apply-deal-item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.apply-deal-label {
  font-size: var(--alpha-body-small);
  font-weight: var(--font-weight-bold);
  color: #000000;
  line-height: 1.7;
}

.apply-deal-value {
  font-size: var(--alpha-body-small);
  font-weight: var(--font-weight-medium);
  color: #000000;
  line-height: 1.7;
}

/* ========== TRANSITION (Step 3) ========== */
.apply-transition-text {
  font-size: var(--alpha-heading-h2);
  font-weight: var(--font-weight-medium);
  color: #000000;
  line-height: 1.3;
  margin: 0 0 56px;
}

/* ========== QUESTIONS (Steps 4-6) ========== */
.apply-question-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 24px;
}

.apply-question-text {
  font-size: var(--alpha-heading-h2);
  font-weight: var(--font-weight-medium);
  color: #000000;
  line-height: 1.35;
  margin: 0 0 40px;
}

.apply-color-inject {
  color: var(--accent-orange);
  font-style: italic;
}

/* ========== INPUTS ========== */
.apply-input-wrap {
  width: 100%;
  margin-bottom: 40px;
}

.apply-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 18px 24px;
  font-size: var(--alpha-body-small);
  font-family: 'Satoshi', sans-serif;
  font-weight: var(--font-weight-regular);
  color: #000000;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.apply-input::placeholder {
  color: #999;
}

.apply-input:focus {
  border-color: #000000;
  box-shadow: none;
}

.apply-input.error {
  border-color: #ef4444;
}

.apply-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 18px 24px;
  font-size: var(--alpha-body-small);
  font-family: 'Satoshi', sans-serif;
  font-weight: var(--font-weight-regular);
  color: #000000;
  outline: none;
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.apply-textarea::placeholder {
  color: #999;
}

.apply-textarea:focus {
  border-color: #000000;
  box-shadow: none;
}

.apply-textarea.error {
  border-color: #ef4444;
}

.apply-input-error {
  display: block;
  font-size: 14px;
  color: #ef4444;
  margin-top: 8px;
  min-height: 0;
}

/* ========== FORM FIELDS (Step 7) ========== */
.apply-form-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apply-field-label {
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: #000000;
}

.apply-optional {
  color: #999;
  font-weight: var(--font-weight-regular);
}

.apply-field-hint {
  font-size: 13px;
  color: #999;
  margin: 0;
}

/* Upload label */
.apply-upload-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: #ffffff;
  border: 2px dashed rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  cursor: pointer;
  color: #666;
  font-size: var(--alpha-body-xs);
  font-family: 'Satoshi', sans-serif;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.apply-upload-label:hover {
  border-color: var(--accent-orange);
  background: rgba(240, 103, 48, 0.03);
}

.apply-upload-label.has-file {
  border-style: solid;
  border-color: var(--accent-orange);
  color: #000000;
}

.apply-upload-label.error {
  border-color: #ef4444;
}

/* ========== CONFIRMATION (Step 8) ========== */
.apply-confirm-logo {
  height: 56px;
  width: auto;
  margin-bottom: 40px;
}

.apply-confirm-heading {
  font-size: var(--alpha-heading-h1);
  font-weight: var(--font-weight-medium);
  color: #000000;
  margin: 0 0 24px;
}

.apply-confirm-text {
  font-size: var(--alpha-body-small);
  font-weight: var(--font-weight-regular);
  color: #666;
  line-height: 1.7;
  margin: 0 0 12px;
  max-width: 480px;
}

.apply-confirm-divider {
  width: 48px;
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  margin: 40px 0;
}

.apply-confirm-share-text {
  font-size: var(--alpha-body-xs);
  font-weight: var(--font-weight-medium);
  color: #666;
  margin: 0 0 20px;
}

.apply-share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.apply-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  color: #000000;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Satoshi', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease;
}

.apply-share-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* ========== TOAST ========== */
.apply-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #dc2626;
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Satoshi', sans-serif;
  z-index: 500;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.apply-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

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

/* Tablets */
@media (max-width: 1024px) {
  .apply-step-inner {
    padding: 80px 40px;
  }

  .apply-step-scrollable {
    padding: 100px 40px;
    max-width: 700px;
  }

  .apply-deal-item {
    grid-template-columns: 140px 1fr;
    gap: 20px;
  }

  .apply-cta {
    padding: 20px 40px 20px 40px;
    font-size: var(--alpha-button-medium);
  }

  .apply-cta::before {
    left: 28px;
    width: 18px;
    height: 18px;
  }

  .apply-cta .button-text {
    margin-left: 30px;
  }

  .apply-cta-submit {
    padding: 20px 40px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .apply-back {
    top: 20px;
    left: 16px;
    width: 44px;
    height: 44px;
  }

  .apply-logo {
    top: 20px;
  }

  .apply-logo img {
    height: 36px;
  }

  .apply-step-inner {
    padding: 80px 20px;
  }

  .apply-step-scrollable {
    padding: 80px 20px 120px;
  }

  .apply-hero-headline {
    font-size: var(--alpha-heading-h2);
  }

  .apply-hero-sub {
    margin-bottom: 40px;
  }

  .apply-cta {
    /* width: 100%; */
    padding: 18px 36px 18px 36px;
    min-width: 0;
    min-height: 60px;
    font-size: var(--alpha-button-small);
  }

  .apply-cta::before {
    left: 24px;
    width: 14px;
    height: 14px;
  }

  .apply-cta .button-text {
    margin-left: 24px;
  }

  .apply-cta-submit {
    padding: 18px 36px;
  }

  .apply-input {
    font-size: 16px;
  }

  .apply-textarea {
    font-size: 16px;
  }

  .apply-deal-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px 0;
  }

  .apply-deal-label {
    color: var(--accent-orange);
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .apply-question-text {
    font-size: var(--alpha-heading-h3);
  }

  .apply-transition-text {
    font-size: var(--alpha-heading-h3);
  }

  .apply-share-buttons {
    flex-direction: column;
  }

  .apply-share-btn {
    justify-content: center;
  }

  .apply-confirm-logo {
    height: 40px;
  }
}

/* Small mobile */
@media (max-width: 479px) {
  .apply-step-inner {
    padding: 72px 16px;
  }

  .apply-step-scrollable {
    padding: 120px 16px 120px;
  }

  .apply-input {
    padding: 16px 16px;
    font-size: 16px;
  }

  .apply-textarea {
    padding: 16px 16px;
    min-height: 140px;
    font-size: 16px;
  }

  .apply-upload-label {
    padding: 16px;
    font-size: 14px;
  }

  .apply-cta {
    min-height: 56px;
  }
}

/* Virtual keyboard handling: make inputs and CTA visible when keyboard is open */
@media (max-height: 500px) {
  .apply-step-inner {
    padding-top: 40px;
    padding-bottom: 40px;
    justify-content: flex-start;
    overflow-y: auto;
    max-height: 100vh;
    max-height: 100dvh;
  }

  .apply-hero-headline,
  .apply-question-text,
  .apply-transition-text {
    font-size: clamp(20px, 5vw, 28px);
    margin-bottom: 20px;
  }

  .apply-hero-sub {
    margin-bottom: 20px;
  }

  .apply-label,
  .apply-question-label {
    margin-bottom: 12px;
  }

  .apply-input-wrap {
    margin-bottom: 20px;
  }
}
