/* Custom Design System & Premium Styles for Nexiora Global */

/* Custom Variables */
:root {
  --radius: 0.875rem;

  /* Brand Theme: Deep Blue + Radiant Green on Dark Navy */
  --background: oklch(0.14 0.04 250);
  --foreground: oklch(0.98 0.005 240);
  --card: oklch(0.18 0.05 252);
  --card-foreground: oklch(0.98 0.005 240);
  --popover: oklch(0.18 0.05 252);
  --popover-foreground: oklch(0.98 0.005 240);

  --primary: oklch(0.62 0.21 252);          /* Radiant deep blue */
  --primary-foreground: oklch(0.99 0 0);
  --primary-glow: oklch(0.72 0.22 250);

  --secondary: oklch(0.22 0.05 250);
  --secondary-foreground: oklch(0.98 0.005 240);

  --accent: oklch(0.78 0.22 155);           /* Radiant green */
  --accent-foreground: oklch(0.14 0.04 250);
  --accent-glow: oklch(0.85 0.22 155);

  --muted: oklch(0.22 0.04 250);
  --muted-foreground: oklch(0.72 0.02 245);

  --destructive: oklch(0.6 0.24 27);
  --destructive-foreground: oklch(0.99 0 0);

  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 12%);
  --ring: oklch(0.78 0.22 155 / 60%);

  --gradient-brand: linear-gradient(135deg, oklch(0.62 0.21 252), oklch(0.78 0.22 155));
  --gradient-hero: radial-gradient(ellipse at 20% 30%, oklch(0.62 0.21 252 / 0.35), transparent 60%),
                   radial-gradient(ellipse at 80% 70%, oklch(0.78 0.22 155 / 0.28), transparent 55%),
                   linear-gradient(180deg, oklch(0.12 0.04 250), oklch(0.14 0.04 250));
  --gradient-surface: linear-gradient(180deg, oklch(1 0 0 / 0.04), oklch(1 0 0 / 0.01));

  --shadow-glow: 0 0 60px -10px oklch(0.62 0.21 252 / 0.5);
  --shadow-glow-accent: 0 0 60px -10px oklch(0.78 0.22 155 / 0.55);
  --shadow-elevate: 0 30px 80px -30px oklch(0 0 0 / 0.6);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse at top, oklch(0.62 0.21 252 / 0.15), transparent 50%),
    radial-gradient(ellipse at bottom, oklch(0.78 0.22 155 / 0.10), transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Custom Keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-20px) translateX(8px); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; filter: blur(40px); }
  50% { opacity: 1; filter: blur(60px); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(140px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(140px) rotate(-360deg); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Custom Animation Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: float 10s ease-in-out infinite;
}

.animate-glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin 30s linear infinite;
}

.animate-fade-up {
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-shimmer {
  animation: shimmer 3s linear infinite;
}

.animate-orbit {
  animation: orbit 20s linear infinite;
}

.animate-ticker {
  animation: ticker 40s linear infinite;
}

/* Custom Design Utilities */
.glass {
  background: linear-gradient(180deg, oklch(1 0 0 / 0.06), oklch(1 0 0 / 0.02));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid oklch(1 0 0 / 0.1);
}

.glass-strong {
  background: linear-gradient(180deg, oklch(1 0 0 / 0.1), oklch(1 0 0 / 0.04));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid oklch(1 0 0 / 0.14);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-brand {
  background: var(--gradient-brand);
}

.bg-gradient-hero {
  background: var(--gradient-hero);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

.shadow-glow-accent {
  box-shadow: var(--shadow-glow-accent);
}

.border-glow {
  position: relative;
}

.border-glow::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.grid-bg {
  background-image:
    linear-gradient(oklch(1 0 0 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Scroll-based Reveal System */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Custom CSS to work nicely with Tailwind classes */
.bg-background {
  background-color: var(--background) !important;
}

.text-foreground {
  color: var(--foreground) !important;
}

.text-muted-foreground {
  color: var(--muted-foreground) !important;
}

.border-border {
  border-color: var(--border) !important;
}

.bg-secondary\/40 {
  background-color: rgb(22 28 47 / 0.4) !important;
}

.bg-card\/50 {
  background-color: rgb(27 34 56 / 0.5) !important;
}

.bg-card\/60 {
  background-color: rgb(27 34 56 / 0.6) !important;
}

/* 3D Pop Logo Effect & Smooth Anti-Aliased Scaling */
.logo-3d {
  filter:
    drop-shadow(0 0 4px rgba(255,255,255,0.25))
    drop-shadow(0 10px 18px rgba(0,0,0,0.5))
    drop-shadow(0 3px 5px rgba(0,0,0,0.35));
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
  transform: perspective(1000px) rotateX(4deg) rotateY(-2deg) translate3d(0,0,0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform, filter;
}

.logo-3d:hover {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(-8px) scale(1.04) translate3d(0,0,0) !important;
  filter:
    drop-shadow(0 0 6px rgba(255,255,255,0.35))
    drop-shadow(0 22px 30px rgba(0,0,0,0.7))
    drop-shadow(0 10px 14px rgba(0,0,0,0.45))
    drop-shadow(0 0 30px rgba(120, 240, 150, 0.25)) !important;
}

.logo-img {
  image-rendering: auto !important; /* Enables standard high-quality browser anti-alias smoothing */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0,0,0) scale(1);
  will-change: transform;
}

/* Story Section Image — Interactive Hover Effects */
.story-image-wrapper {
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
}

.story-image-wrapper:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 30px 80px -15px oklch(0.62 0.21 252 / 0.4),
              0 0 60px -15px oklch(0.78 0.22 155 / 0.3);
  border-radius: 1.25rem;
}

.story-image {
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.story-image-wrapper:hover .story-image {
  transform: scale(1.05);
  filter: brightness(1.08) contrast(1.05);
}

/* Header Area — Fully Transparent Navbar */
header nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
  will-change: transform;
}

header nav:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Elegant growing brand underline for header navigation links */
header nav ul li a {
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform, color;
}

header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  transform: translateX(-50%);
  will-change: width;
}

header nav ul li a:hover {
  color: var(--foreground) !important;
  transform: translateY(-1px);
}

header nav ul li a:hover::after {
  width: 70%;
}

/* ==================== SERVICE MODAL STYLES ==================== */
.service-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.service-modal-overlay.hidden {
  display: none;
}

.service-modal-overlay.active .service-modal-backdrop {
  opacity: 1;
}

.service-modal-overlay.active .service-modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.service-modal-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.08 0.03 250 / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
}

.service-modal-content {
  position: relative;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  border: 1px solid oklch(1 0 0 / 0.12);
  background: linear-gradient(180deg, oklch(0.18 0.05 252 / 0.95), oklch(0.14 0.04 250 / 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 100px -20px oklch(0 0 0 / 0.7),
              0 0 80px -20px oklch(0.62 0.21 252 / 0.25),
              inset 0 1px 0 oklch(1 0 0 / 0.08);
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid oklch(1 0 0 / 0.1);
  background: oklch(1 0 0 / 0.06);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.25s ease;
}

.service-modal-close:hover {
  background: oklch(1 0 0 / 0.12);
  color: var(--foreground);
  border-color: oklch(1 0 0 / 0.2);
  transform: rotate(90deg);
}

.service-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 1.75rem 0;
  flex-shrink: 0;
}

.service-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 0.75rem;
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-glow);
}

.service-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
  margin: 0;
}

.service-modal-body {
  padding: 1.25rem 1.75rem;
  overflow-y: auto;
  flex: 1;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.15) transparent;
}

.service-modal-body::-webkit-scrollbar {
  width: 5px;
}

.service-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.service-modal-body::-webkit-scrollbar-thumb {
  background: oklch(1 0 0 / 0.15);
  border-radius: 10px;
}

.service-modal-body p {
  margin-bottom: 0.85rem;
}

.service-modal-body strong {
  color: var(--foreground);
  font-weight: 600;
}

.service-modal-body .modal-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  background: oklch(0.78 0.22 155 / 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  margin: 0.2rem 0.25rem 0.2rem 0;
  border: 1px solid oklch(0.78 0.22 155 / 0.15);
}

.service-modal-body ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.service-modal-body ul li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.4rem;
  color: var(--muted-foreground);
}

.service-modal-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 8px oklch(0.62 0.21 252 / 0.5);
}

.service-modal-body .modal-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.25rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-modal-body .modal-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

.service-modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  flex-shrink: 0;
  border-top: 1px solid oklch(1 0 0 / 0.08);
}

.service-modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
}

.service-modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 80px -10px oklch(0.62 0.21 252 / 0.6);
}

/* Learn More Button hover styles */
.service-learn-more {
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  z-index: 2;
}

.service-learn-more:hover {
  text-shadow: 0 0 12px oklch(0.78 0.22 155 / 0.5);
}

/* Responsive modal for mobile */
@media (max-width: 640px) {
  .service-modal-container {
    max-height: 90vh;
  }
  .service-modal-content {
    border-radius: 1rem;
    max-height: 90vh;
  }
  .service-modal-header {
    padding: 1.25rem 1.25rem 0;
  }
  .service-modal-body {
    padding: 1rem 1.25rem;
  }
  .service-modal-footer {
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .service-modal-title {
    font-size: 1.15rem;
  }
}

/* ==================== APPLY MODAL STYLES ==================== */
.apply-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.apply-modal-overlay.hidden {
  display: none;
}

.apply-modal-overlay.active .apply-modal-backdrop {
  opacity: 1;
}

.apply-modal-overlay.active .apply-modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.08 0.03 250 / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.apply-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
}

.apply-modal-content {
  position: relative;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  border: 1px solid oklch(1 0 0 / 0.12);
  background: linear-gradient(180deg, oklch(0.18 0.05 252 / 0.97), oklch(0.14 0.04 250 / 0.99));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 100px -20px oklch(0 0 0 / 0.7),
              0 0 80px -20px oklch(0.62 0.21 252 / 0.25),
              inset 0 1px 0 oklch(1 0 0 / 0.08);
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.apply-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid oklch(1 0 0 / 0.1);
  background: oklch(1 0 0 / 0.06);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.25s ease;
}

.apply-modal-close:hover {
  background: oklch(1 0 0 / 0.12);
  color: var(--foreground);
  border-color: oklch(1 0 0 / 0.2);
  transform: rotate(90deg);
}

.apply-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.75rem 1.75rem 0;
  flex-shrink: 0;
}

.apply-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 0.75rem;
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-glow);
}

.apply-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
  margin: 0;
}

.apply-modal-subtitle {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  margin: 0.25rem 0 0;
  line-height: 1.45;
}

.apply-modal-body {
  padding: 1.25rem 1.75rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.15) transparent;
}

.apply-modal-body::-webkit-scrollbar {
  width: 5px;
}

.apply-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.apply-modal-body::-webkit-scrollbar-thumb {
  background: oklch(1 0 0 / 0.15);
  border-radius: 10px;
}

/* Apply Form Grid */
.apply-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

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

.apply-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.apply-field input,
.apply-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid oklch(1 0 0 / 0.1);
  background: oklch(1 0 0 / 0.05);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.apply-field input::placeholder,
.apply-field textarea::placeholder {
  color: var(--muted-foreground);
  opacity: 0.5;
}

.apply-field input:focus,
.apply-field textarea:focus {
  border-color: oklch(0.78 0.22 155 / 0.5);
  background: oklch(1 0 0 / 0.08);
  box-shadow: 0 0 0 3px oklch(0.78 0.22 155 / 0.12);
}

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

/* Shift preference radio row */
.apply-shift-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.apply-shift-choice {
  position: relative;
  cursor: pointer;
}

.apply-shift-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.apply-shift-choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 0.6rem;
  border: 1px solid oklch(1 0 0 / 0.1);
  background: oklch(1 0 0 / 0.04);
  color: var(--muted-foreground);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apply-shift-choice span:hover {
  border-color: oklch(1 0 0 / 0.2);
  background: oklch(1 0 0 / 0.08);
}

.apply-shift-choice input:checked + span {
  border-color: oklch(0.78 0.22 155 / 0.6);
  color: var(--accent);
  background: oklch(0.78 0.22 155 / 0.1);
  box-shadow: inset 0 0 0 1px oklch(0.78 0.22 155 / 0.3);
}

/* Document upload note */
.apply-doc-note {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: oklch(0.78 0.22 155 / 0.08);
  border: 1px solid oklch(0.78 0.22 155 / 0.15);
  color: var(--accent);
}

.apply-doc-note svg {
  flex-shrink: 0;
}

.apply-doc-note span {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.apply-doc-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.apply-doc-note a:hover {
  color: var(--foreground);
}

/* Submit button */
.apply-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.8rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
}

.apply-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 80px -10px oklch(0.62 0.21 252 / 0.6);
}

/* Responsive apply modal */
@media (max-width: 640px) {
  .apply-modal-container {
    max-height: 95vh;
  }
  .apply-modal-content {
    border-radius: 1rem;
    max-height: 95vh;
  }
  .apply-modal-header {
    padding: 1.25rem 1.25rem 0;
  }
  .apply-modal-body {
    padding: 1rem 1.25rem 1.25rem;
  }
  .apply-modal-title {
    font-size: 1.15rem;
  }
  .apply-form-grid {
    grid-template-columns: 1fr;
  }
  .apply-shift-row {
    grid-template-columns: 1fr;
  }
}

/* Success Message Styles */
.apply-success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

.apply-success-message.hidden {
  display: none;
}

.apply-success-message .success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: oklch(0.62 0.21 252 / 0.15);
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.apply-success-message .success-icon svg {
  width: 32px;
  height: 32px;
}

.apply-success-message h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.apply-success-message p {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 400px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom File Upload */
.apply-file-upload {
  position: relative;
}

.apply-file-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1.5px dashed oklch(1 0 0 / 0.15);
  background: oklch(1 0 0 / 0.03);
  color: var(--muted-foreground);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apply-file-label:hover {
  border-color: oklch(0.78 0.22 155 / 0.4);
  background: oklch(1 0 0 / 0.06);
  color: var(--accent);
}

.apply-file-label svg {
  color: var(--accent);
  flex-shrink: 0;
}

.apply-file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Error Message */
.apply-error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

.apply-error-message.hidden {
  display: none;
}

.apply-error-message .error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: oklch(0.65 0.25 25 / 0.15);
  color: oklch(0.7 0.22 25);
  margin-bottom: 1.5rem;
}

.apply-error-message .error-icon svg {
  width: 32px;
  height: 32px;
}

.apply-error-message h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.apply-error-message p {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 400px;
}

/* Consent Text */
.apply-consent-text {
  margin-top: 1.25rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  opacity: 0.7;
}

.apply-consent-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.apply-consent-text a:hover {
  color: var(--foreground);
}

.apply-consent-text strong {
  color: var(--foreground);
  font-weight: 600;
}

/* ==================== IPHONE / SAFARI / MOBILE FIXES ==================== */

/* Fix iOS Safari 100vh issue */
:root {
  --real-vh: 1vh;
}

/* Prevent iOS tap highlight flash */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

a, button, input, textarea, select {
  -webkit-appearance: none;
}

/* Fix iOS input zoom (min 16px font prevents zoom) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
select {
  font-size: 16px !important;
  border-radius: 0;
}

/* Fix iOS Safari flexbox bugs */
.apply-form-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* Fix position: fixed on iOS (modals) */
.apply-modal-overlay {
  position: fixed;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

/* Make modals scroll properly on iPhone */
.apply-modal-body {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
  max-height: 70vh;
}

/* Fix sticky header on iOS Safari */
header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Fix canvas on mobile - hide glitter on touch devices */
#story-glitter-canvas {
  display: none;
}

@media (pointer: fine) {
  #story-glitter-canvas {
    display: block;
  }
}

/* Fix hero section on iPhone */
@media (max-width: 480px) {
  .hero-section, section:first-of-type {
    padding-top: 80px;
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Prevent text overflow */
  h1, h2, h3, h4, h5, h6, p {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Fix button layout on small screens */
  .flex-col-mobile {
    flex-direction: column !important;
  }

  /* Navigation fixes */
  nav {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Logo scaling */
  .logo-img {
    height: 60px !important;
  }

  /* Fix apply modal on mobile */
  .apply-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 1rem 1rem 0 0 !important;
    margin: 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
  }

  .apply-modal-container {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  /* Form grid single column on mobile */
  .apply-form-grid {
    grid-template-columns: 1fr !important;
  }

  .apply-field {
    grid-column: span 1 !important;
  }
}

/* Safe area insets for iPhone X+ (notch/home bar) */
@supports (padding: max(0px)) {
  header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .apply-modal-content {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* Smooth scrolling - use native on iOS */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Touch-friendly tap targets */
a, button, [role="button"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Fix images on iOS */
img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Prevent horizontal scroll on mobile */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fix for iOS Safari animation performance */
.animate-pulse, .animate-bounce, [class*="animate-"] {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Mobile modal full-screen bottom sheet behavior */
@media (max-width: 640px) {
  .apply-modal-overlay {
    align-items: flex-end;
  }

  .apply-modal-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .apply-modal-content {
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }
}
