/* TechTown — light-themed skin for server-rendered form pages (e.g. /apply).
   The Orbit homepage itself is mostly light (see light-override.css) — dark
   is reserved for its cinematic opening/finale moments, not for content-heavy
   pages. A long form in full dark space-mode reads as gloomy, so this page
   uses the same white/violet palette as the rest of the live site.
   Aliases the legacy v3 variable names used by the existing apply-input /
   apply-chips components so no Blade markup needs to change. */

:root {
  --violet: #68559f;
  --blue: #4b62a7;
  --cyan: #4a9aa5;

  --v: var(--violet);
  --v2: rgba(104, 85, 159, 0.35);
  --b: var(--blue);
  --c: var(--cyan);
  --ink: #1a0f3e;
  --ink2: #3d3558;
  --ink3: #7b74a0;
  --ln: rgba(104, 85, 159, 0.14);
  --ln2: rgba(104, 85, 159, 0.20);

  --font-heading: 'Expo Arabic', 'Titillium Web', sans-serif;
  --font: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
  background: #f3effa;
  color: var(--ink2);
}

.of-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ─────────────────────────────────────────
   The nav + footer are now the shared homepage marks (.site-nav / .site-footer
   from styles.css + light-override.css). The homepage nav is position:fixed, so
   the first section needs clearance for it. */

/* ── Page hero — a homepage section header ─────────────────────────
   Reuses .section-eyebrow / .section-heading / .section-subheading from
   styles.css so this reads exactly like "A Nation Ready for Digital Growth":
   left-aligned, dash-prefixed eyebrow, last word in violet. */
.apply-hero {
  padding: 136px 0 4px;
}

/* Match the form container width below so the heading's left edge lines up
   with the form sections' border (not indented by a narrower .wrap). */
.apply-hero .wrap {
  max-width: 1320px;
}

.apply-hero .section-subheading {
  margin-top: 2px;
}

/* ── Scroll-reveal (JS toggles .of-visible; see layout script) ── */
.apply-hero,
.apply-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.apply-hero.of-visible,
.apply-section.of-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .apply-hero, .apply-section { opacity: 1; transform: none; transition: none; }
}

/* ── Shared layout ───────────────────────────────── */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

section.s { padding: 12px 0 100px; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--violet);
}

.s-title {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 700;
}

/* ── Form sections read like soft cards on the white page ── */
.apply-section {
  background: #ffffff;
  border: 1px solid var(--ln);
  border-radius: 16px;
  padding: 32px clamp(20px, 4vw, 40px) !important;
  margin-top: 20px !important;
  box-shadow: 0 2px 20px rgba(104, 85, 159, 0.05);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease), opacity 0.7s var(--ease);
}

.apply-section:hover {
  border-color: var(--ln2);
  box-shadow: 0 8px 32px rgba(104, 85, 159, 0.10);
  transform: translateY(-2px);
}

.apply-section:first-child { margin-top: 0 !important; }

/* ── Form fields ──────────────────────────────────── */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink2);
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  background: #fbfaff;
  border: 1px solid var(--ln);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color 0.2s, background 0.2s;
}

.field textarea { resize: vertical; min-height: 90px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--violet);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(104, 85, 159, 0.10);
}

.field select option { background: #ffffff; color: var(--ink); }

/* ── "need" multi-select checkboxes (Section 07) ──────────────────
   Selection is already communicated by the chip's own active state
   (background/border tint), so the native checkbox glyph is redundant —
   suppress it entirely and rely on a focus ring for keyboard users. */
.apply-chip-group[data-multiple="1"] .apply-chip input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0 8px 0 0;
  border: 1px solid var(--ln2);
  border-radius: 3px;
  background: transparent;
  vertical-align: middle;
  cursor: pointer;
}

.apply-chip-group[data-multiple="1"] .apply-chip input[type="checkbox"]:checked {
  border-color: var(--v);
  background: transparent;
}

.apply-chip-group[data-multiple="1"] .apply-chip input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(104, 85, 159, 0.35);
}

/* ── Submit button (violet, still the page's one bold accent) ─── */
.btn.btn-fill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 46px;
  border: none;
  border-radius: 60px;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  background-size: 200% 200%;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 4px 24px rgba(104, 85, 159, 0.25);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: of-btn-glow 3.5s ease-in-out infinite;
}

.btn.btn-fill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(104, 85, 159, 0.4);
  animation-play-state: paused;
}

@keyframes of-btn-glow {
  0%, 100% { box-shadow: 0 4px 24px rgba(104, 85, 159, 0.25); background-position: 0% 50%; }
  50% { box-shadow: 0 4px 30px rgba(104, 85, 159, 0.4); background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn.btn-fill { animation: none; }
}

/* ── Back to top (bottom-left; WhatsApp FAB sits bottom-right, like the homepage) ── */
.of-to-top {
  position: fixed;
  bottom: 28px;
  inset-inline-start: 28px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--ln2);
  background: #ffffff;
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(104, 85, 159, 0.18);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s, color 0.2s;
}

.of-to-top svg { width: 20px; height: 20px; }

.of-to-top.of-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.of-to-top:hover {
  background: var(--violet);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .of-to-top { transition: opacity 0.2s; }
}

@media (max-width: 768px) {
  .of-to-top { bottom: 20px; inset-inline-start: 16px; }
}

/* Footer is the shared homepage .site-footer — pin it to the bottom on
   short pages (the page is a flex column via .of-page). */
.of-page > .site-footer { margin-top: auto; }
