/* =========================================
   Custom Typeform-Style Application CSS
   ========================================= */

/* Body & Background */
.apply-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
}

.apply-bg-image {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.15;
  mix-blend-mode: luminosity;
  z-index: 0;
}

.apply-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, transparent 0%, rgba(31,33,32,0.8) 100%);
  z-index: 1;
}

/* Header & Progress */
.apply-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.back-link:hover {
  opacity: 1;
}

.brand-text {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  font-size: 1.2rem;
  opacity: 0.9;
}

.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(251, 251, 250, 0.1);
  z-index: 20;
}

.progress-bar {
  height: 100%;
  background: var(--sage);
  width: 0%;
  transition: width 0.4s ease-out;
}

/* Form Container */
.form-container {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.typeform-form {
  width: 100%;
  position: relative;
  height: 100%;
}

/* Steps */
.form-step {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
  pointer-events: none;
}

.form-step.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.form-step.fade-up {
  transform: translateY(-40px);
}

.step-content {
  width: 100%;
}

.step-number {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sage);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.question-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--paper);
}

.question-desc {
  font-size: 1.2rem;
  color: rgba(251, 251, 250, 0.7);
  margin-bottom: 2rem;
}

.fee-notice {
  background: rgba(251, 251, 250, 0.05);
  border-left: 3px solid var(--sage);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 8px 8px 0;
}

/* Inputs */
.input-wrapper {
  margin-bottom: 2rem;
  width: 100%;
}

.typeform-input, .typeform-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(251, 251, 250, 0.2);
  color: var(--sage);
  font-family: var(--font-body);
  font-size: 2rem;
  padding: 0.5rem 0;
  transition: border-color 0.3s;
}

.typeform-input:focus, .typeform-textarea:focus {
  outline: none;
  border-bottom-color: var(--sage);
}

.typeform-input::placeholder, .typeform-textarea::placeholder {
  color: rgba(251, 251, 250, 0.2);
}

.typeform-textarea {
  resize: none;
  min-height: 100px;
  line-height: 1.4;
}

/* Multiple Choice / Options */
.options-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.typeform-option {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(251, 251, 250, 0.05);
  border: 1px solid rgba(251, 251, 250, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.typeform-option:hover {
  background: rgba(251, 251, 250, 0.1);
}

.typeform-option input[type="radio"] {
  display: none;
}

.typeform-option input[type="radio"]:checked + .option-key + .option-text {
  color: var(--ink);
}

.typeform-option input[type="radio"]:checked ~ * {
  color: var(--ink);
}

.typeform-option:has(input[type="radio"]:checked) {
  background: var(--sage);
  border-color: var(--sage);
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(251, 251, 250, 0.1);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 1rem;
}

.typeform-option:has(input[type="radio"]:checked) .option-key {
  background: rgba(31, 33, 32, 0.2);
}

.option-text {
  font-size: 1.25rem;
}

/* Buttons & Hints */
.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  padding: 0.75rem 2rem;
}

.hint {
  display: inline-block;
  margin-left: 1rem;
  font-size: 0.9rem;
  color: rgba(251, 251, 250, 0.4);
  vertical-align: middle;
}

/* Navigation Controls (Bottom Right) */
.form-controls {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 20;
}

.nav-btn {
  background: rgba(251, 251, 250, 0.1);
  border: none;
  border-radius: 8px;
  color: var(--paper);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(251, 251, 250, 0.2);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 767px) {
  .apply-header {
    padding: 1.5rem;
  }
  .question-title {
    font-size: 2rem;
  }
  .typeform-input, .typeform-textarea {
    font-size: 1.5rem;
  }
  .form-controls {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
