/* ============================================================
   APPLY NOW PAGE — apply-now.css
   Reuses global.css tokens/utilities (variables, .btn, .section-eyebrow,
   .reveal-fade/.reveal-right/.reveal-up). Page-specific classes
   prefixed "apply-".
   ============================================================ */

/* ============ HERO ============ */
.apply-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  width: 100%;
  padding: calc(var(--nav-h) + 60px) clamp(40px, 6vw, 120px) 70px;
  overflow: hidden;
}

.apply-hero__bg { position: absolute; inset: 0; z-index: -1; }
.apply-hero__glow {
  position: absolute;
  top: -25%;
  right: -8%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c-copper) 0%, transparent 70%);
  filter: blur(120px);
  opacity: 0.36;
  animation: auroraFloat 17s ease-in-out infinite;
  will-change: transform;
}
.apply-hero__noise {
  position: absolute; inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
}

.apply-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.apply-hero__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.18;
  color: var(--c-text-1);
  margin-top: 18px;
}
.apply-hero__slogan {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--c-rose-gold);
  margin-top: 16px;
}
.apply-hero__desc {
  margin-top: 18px;
  max-width: 460px;
  color: var(--c-text-2);
  font-size: 0.98rem;
  line-height: 1.75;
}
.apply-hero__actions { margin-top: 30px; }

.apply-hero__visual { display: flex; align-items: center; justify-content: center; }
.apply-hero__composition {
  position: relative;
  width: min(360px, 92%);
  aspect-ratio: 1/1;
}

.apply-hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(217,155,110,0.3);
}
.apply-hero__ring--1 { inset: 12%; animation: applyRingSpin 26s linear infinite; }
.apply-hero__ring--2 {
  inset: -2%;
  border-style: dashed;
  border-color: rgba(227,172,130,0.2);
  animation: applyRingSpin 36s linear infinite reverse;
}
@keyframes applyRingSpin { to { transform: rotate(360deg); } }

.apply-hero__resume {
  position: absolute;
  top: 8%;
  left: 8%;
  width: 118px;
  padding: 16px 14px;
  border-radius: 10px;
  background: var(--c-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  animation: applyResumeFloat 6.5s ease-in-out infinite;
  will-change: transform;
}
.apply-hero__resume-fold {
  position: absolute; top: 0; right: 0; width: 14px; height: 14px;
  background: rgba(217,155,110,0.18);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.apply-hero__resume-line { display: block; height: 4px; border-radius: 2px; background: rgba(217,155,110,0.25); }
.apply-hero__resume-line--wide { width: 90%; }
.apply-hero__resume-line--mid { width: 65%; }
.apply-hero__resume-line--narrow { width: 45%; }
@keyframes applyResumeFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

.apply-hero__icon-badge {
  position: absolute;
  bottom: 10%;
  right: 8%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--c-line);
  box-shadow: 0 16px 32px rgba(0,0,0,0.35);
  animation: applyBadgeFloat 5.5s ease-in-out infinite;
  will-change: transform;
}
.apply-hero__icon-badge svg {
  width: 24px; height: 24px; fill: none; stroke: var(--c-copper-light);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes applyBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.apply-hero__usa {
  position: absolute;
  bottom: 4%;
  left: 12%;
  width: 130px;
  opacity: 0.7;
  animation: applyUsaFloat 7s ease-in-out infinite;
  will-change: transform;
}
.apply-hero__usa svg {
  width: 100%;
  fill: none;
  stroke: rgba(217,155,110,0.5);
  stroke-width: 1.4;
}
.apply-hero__usa-label {
  display: block;
  text-align: center;
  margin-top: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--c-copper-light);
}
@keyframes applyUsaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============ APPLICATION FORM ============ */
.apply-form-section {
  position: relative;
  width: 100%;
  padding-block: 0 140px;
  padding-inline: clamp(40px, 6vw, 120px);
}

.apply-form-section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}
.apply-form-section__header .section-eyebrow { justify-content: center; }
.apply-form-section__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--c-text-1);
  margin-top: 14px;
}

.apply-form-panel {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 52px);
  border-radius: 22px;
  background: var(--c-glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--c-line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.apply-form { display: flex; flex-direction: column; gap: 20px; }
.apply-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.apply-form__field { display: flex; flex-direction: column; gap: 6px; }
.apply-form__field--full { grid-column: 1 / -1; }

.apply-form__field label {
  font-size: 0.84rem;
  color: var(--c-text-2);
}
.apply-form__field label span {
  color: var(--c-text-3);
  font-size: 0.74rem;
}


/* ---- Center Glass Container w/ Brand Logo ---- */
.apply-hero__center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.85); /* Dark Glass Backdrop for maximum crispness */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(217, 155, 110, 0.4); /* Premium Copper Ring Border */
  box-shadow: 0 0 45px rgba(217, 155, 110, 0.3),
              0 15px 35px rgba(0, 0, 0, 0.7),
              inset 0 1px 2px rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 5;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med), box-shadow var(--dur-med);
}

.apply-hero__brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Soft Backlight Glow to pop the logo out cleanly */
  filter: drop-shadow(0 0 12px rgba(217, 155, 110, 0.35)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  transition: transform var(--dur-fast) var(--ease-out);
}

/* Hover Effect */
.apply-hero__composition:hover .apply-hero__center-logo {
  transform: translate(-50%, -52%) scale(1.06);
  border-color: rgba(217, 155, 110, 0.7);
  box-shadow: 0 0 60px rgba(217, 155, 110, 0.45),
              0 20px 40px rgba(0, 0, 0, 0.8);
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .apply-hero__center-logo {
    width: 90px;
    height: 90px;
    padding: 15px;
  }
}

.apply-form__field input,
.apply-form__field select,
.apply-form__field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-s);
  color: var(--c-text-1);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.apply-form__field textarea { resize: vertical; min-height: 90px; }
.apply-form__field input:focus,
.apply-form__field select:focus,
.apply-form__field textarea:focus {
  outline: none;
  border-color: var(--c-copper-light);
  background: rgba(217, 155, 110, 0.05);
  box-shadow: 0 0 0 3px rgba(217, 155, 110, 0.14);
}
.apply-form__field input.is-invalid,
.apply-form__field textarea.is-invalid {
  border-color: rgba(224, 105, 92, 0.7);
}

.apply-form__error {
  font-size: 0.76rem;
  color: #e0695c;
  min-height: 1em;
}
.apply-form__error:empty { display: none; }

/* checkbox */
.apply-form__field--checkbox { margin-top: 4px; }
.apply-form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: var(--c-text-2);
  font-size: 0.9rem;
  line-height: 1.5;
}
.apply-form__checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.apply-form__checkbox-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.apply-form__checkbox-box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid var(--c-black);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.apply-form__checkbox-label input[type="checkbox"]:checked + .apply-form__checkbox-box {
  background: var(--grad-copper-soft);
  border-color: var(--c-copper-light);
}
.apply-form__checkbox-label input[type="checkbox"]:checked + .apply-form__checkbox-box::after {
  transform: rotate(45deg) scale(1);
}
.apply-form__checkbox-label input[type="checkbox"]:focus-visible + .apply-form__checkbox-box {
  box-shadow: 0 0 0 3px rgba(217, 155, 110, 0.25);
}
.apply-form__field--checkbox.is-invalid .apply-form__checkbox-box {
  border-color: rgba(224, 105, 92, 0.7);
}

.apply-form__submit { margin-top: 6px; justify-content: center; width: 100%; }

/* ============ SUCCESS POPUP ============ */
.apply-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 4, 3, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s var(--ease-out);
}
.apply-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.apply-popup {
  position: relative;
  width: min(460px, 90vw);
  max-height: 88vh;
  overflow-y: auto;
  text-align: center;
  background: var(--c-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(217, 155, 110, 0.3);
  border-radius: 22px;
  padding: clamp(36px, 5vw, 48px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 60px rgba(217, 155, 110, 0.14);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}
.apply-popup-overlay.is-open .apply-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.apply-popup__success-icon { position: relative; width: 88px; height: 88px; margin: 0 auto 26px; }
.apply-popup__success-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(217, 155, 110, 0.4);
}
.apply-popup__success-glow {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 155, 110, 0.35), transparent 70%);
  filter: blur(18px);
  animation: applySuccessGlowPulse 2.4s ease-in-out infinite;
}
@keyframes applySuccessGlowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.apply-popup__success-check {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 22px;
  fill: none;
  stroke: var(--c-copper-light);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: applyCheckDraw 0.6s var(--ease-out) 0.25s forwards, applyIconFloat 3s ease-in-out 0.9s infinite;
}
@keyframes applyCheckDraw { to { stroke-dashoffset: 0; } }
@keyframes applyIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.apply-popup__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--c-text-1);
  margin-bottom: 14px;
}
.apply-popup__desc {
  color: var(--c-text-2);
  font-size: 0.94rem;
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto 28px;
}
.apply-popup__actions { display: flex; justify-content: center; }
.apply-popup__actions .btn { min-width: 160px; justify-content: center; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .apply-hero { padding-inline: 40px; text-align: center; }
  .apply-hero__inner { grid-template-columns: 1fr; gap: 46px; }
  .apply-hero__desc { margin-inline: auto; }
  .apply-hero__actions { display: flex; justify-content: center; }
  .apply-hero__visual { order: -1; }
  .apply-form-section { padding-inline: 40px; }
}
@media (max-width: 640px) {
  .apply-hero { padding-inline: 20px; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 50px; min-height: auto; }
  .apply-hero__composition { width: min(280px, 88%); }
  .apply-form-section { padding-inline: 20px; padding-block: 0 100px; }
  .apply-form-panel { padding: 26px 20px; }
  .apply-form__row { grid-template-columns: 1fr; }
}