/**
 * Enterprise polish layer — Stripe / Linear / Deel quality pass.
 * Layout unchanged; depth, rhythm, and component refinement only.
 */

/* ─── Page atmosphere ─── */
.apm-home {
  --apm-polish-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --apm-polish-shadow-hover: 0 24px 56px rgba(15, 23, 42, 0.12);
  --apm-polish-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.apm-home::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.apm-home .apm-section {
  position: relative;
}

.apm-home .apm-section--alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(11, 94, 215, 0.04), transparent 70%);
  pointer-events: none;
}

/* ─── Section headers — eyebrow / title / subtitle ─── */
.apm-home .apm-section__header--split {
  align-items: flex-start;
  margin-bottom: 56px;
  gap: 24px 40px;
}

.apm-home .apm-section__header--split .apm-section__link {
  margin-top: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--apm-primary);
}

.apm-home .apm-section__eyebrow {
  display: block !important;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--apm-primary);
  margin-bottom: 12px;
}

.apm-home .apm-section__header--split .apm-section__title {
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-transform: none;
  margin-bottom: 12px;
}

.apm-home .apm-section__subtitle {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--apm-text-muted);
  max-width: 520px;
  margin: 0;
}

.apm-home .apm-section__header--split .apm-section__subtitle {
  max-width: 560px;
}

/* ─── Gradient text utility ─── */
.apm-text-gradient {
  background: linear-gradient(135deg, #93c5fd 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── HERO polish ─── */
.apm-home .apm-hero.apm-hero--refined {
  min-height: 680px;
  padding: 88px 0 140px;
  overflow: visible;
}

.apm-hero--refined__bg::after {
  background: linear-gradient(
    105deg,
    rgba(10, 37, 64, 0.55) 0%,
    rgba(11, 94, 215, 0.38) 50%,
    rgba(10, 37, 64, 0.5) 100%
  );
}

.apm-hero--refined__grid {
  gap: 48px 72px;
  align-items: center;
}

.apm-hero--refined__title {
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  line-height: 1.12;
  max-width: 14ch;
  letter-spacing: -0.035em;
}

.apm-hero--refined__desc {
  line-height: 1.75;
  max-width: 46ch;
}

.apm-hero--refined__visual {
  position: relative;
  z-index: 2;
}

.apm-hero--refined__image-wrap {
  max-height: 340px;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: none;
  margin-right: 0;
}

.apm-hero--refined__image-wrap::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 65%);
  z-index: -1;
  filter: blur(40px);
}

.apm-hero--refined__decor {
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 120px;
  height: 120px;
  opacity: 0.5;
  pointer-events: none;
}

.apm-search-box--refined {
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.apm-hero-stats--refined {
  margin-top: -72px;
  margin-bottom: -40px;
  border: 1px solid var(--apm-border-light);
  backdrop-filter: blur(8px);
}

.apm-hero-stats--refined strong {
  font-size: 2.25rem;
  letter-spacing: -0.02em;
}

.apm-partners-section--mockup {
  padding-top: 96px;
}

/* ─── Scale-in reveal ─── */
.apm-home .apm-reveal {
  transform: translateY(24px) scale(0.98);
  transition:
    opacity 700ms var(--apm-polish-ease),
    transform 700ms var(--apm-polish-ease);
}

.apm-home .apm-reveal.is-visible {
  transform: translateY(0) scale(1);
}

/* ─── Job cards ─── */
.apm-home .apm-job-card--premium {
  padding: 32px;
  border-radius: 18px;
  box-shadow: var(--apm-polish-shadow);
  transition:
    transform 300ms var(--apm-polish-ease),
    box-shadow 300ms var(--apm-polish-ease);
}

.apm-home .apm-job-card--premium:hover {
  transform: translateY(-10px);
  box-shadow: var(--apm-polish-shadow-hover);
}

.apm-home .apm-job-card--premium .apm-job-card__logo {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(11, 94, 215, 0.08);
}

.apm-home .apm-job-card__salary-block {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  background: linear-gradient(135deg, #ecfdf3 0%, #f0fdf4 100%);
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #15803d;
}

.apm-home .apm-job-card__salary-block svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.apm-home .apm-job-card--premium .apm-job-card__company {
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.apm-home .apm-badge {
  font-size: 0.6875rem;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.apm-home .apm-badge--featured { background: #eff6ff; color: #1d4ed8; }
.apm-home .apm-badge--new { background: #f0fdf4; color: #166534; }
.apm-home .apm-badge--urgent { background: #fef2f2; color: #b91c1c; }

.apm-home .apm-job-card__type-pill {
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
}

.apm-home .apm-btn--apply {
  transition: transform 300ms ease, box-shadow 300ms ease, filter 300ms ease !important;
}

.apm-home .apm-job-card--premium:hover .apm-btn--apply {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ─── Course cards ─── */
.apm-home .apm-course-card--premium {
  border-radius: 18px;
  box-shadow: var(--apm-polish-shadow);
  overflow: hidden;
}

.apm-home .apm-course-card--premium .apm-course-card__thumb {
  aspect-ratio: 16/9;
}

.apm-home .apm-course-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 0.8125rem;
  color: var(--apm-text-muted);
  margin: 8px 0 12px;
}

.apm-home .apm-course-card__meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.apm-home .apm-course-card__progress {
  height: 4px;
  background: var(--apm-border-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.apm-home .apm-course-card__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--apm-primary), var(--apm-secondary));
  border-radius: inherit;
}

.apm-home .apm-course-card__rating-count {
  font-size: 0.75rem;
  color: var(--apm-text-muted);
  margin-left: 6px;
}

.apm-home .apm-course-card__rating {
  display: flex;
  align-items: center;
}

/* ─── Blog magazine ─── */
.apm-home .apm-blog-card--premium {
  border-radius: 18px;
  box-shadow: var(--apm-polish-shadow);
}

.apm-home .apm-blog-card__img {
  aspect-ratio: 16/10;
}

.apm-home .apm-blog-card__excerpt {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--apm-text-muted);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apm-home .apm-blog-card__byline {
  padding-top: 12px;
  border-top: 1px solid var(--apm-border-light);
  margin-bottom: 16px;
}

.apm-home .apm-blog-card__meta .apm-badge {
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── CTA premium ─── */
.apm-home .apm-cta--mockup {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
}

.apm-home .apm-cta--mockup::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 20% 50%, rgba(11, 94, 215, 0.06), transparent);
  pointer-events: none;
}

.apm-home .apm-cta--mockup__inner {
  min-height: 440px;
  padding: 72px 64px;
  background: linear-gradient(135deg, #0a2540 0%, #0B5ED7 42%, #0d9488 100%);
  position: relative;
  overflow: visible;
}

.apm-home .apm-cta--mockup__inner::before,
.apm-home .apm-cta--mockup__inner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.apm-home .apm-cta--mockup__inner::before {
  width: 320px;
  height: 320px;
  background: rgba(59, 130, 246, 0.25);
  top: -80px;
  right: 20%;
}

.apm-home .apm-cta--mockup__inner::after {
  width: 200px;
  height: 200px;
  background: rgba(22, 163, 74, 0.2);
  bottom: -40px;
  left: 10%;
}

.apm-home .apm-cta--mockup__visual {
  position: relative;
  z-index: 2;
}

.apm-home .apm-cta--mockup__visual img {
  transform: translateY(-24px) scale(1.04);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.25);
  border: 4px solid rgba(255, 255, 255, 0.15);
}

.apm-home .apm-cta--mockup h2 {
  font-size: clamp(1.875rem, 3vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* ─── Footer ─── */
.apm-home .apm-footer--premium {
  padding-top: 96px;
}

.apm-home .apm-footer--premium h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.apm-home .apm-footer--premium .apm-footer__brand p {
  line-height: 1.75;
  font-size: 0.9375rem;
}

.apm-home .apm-footer--premium .apm-footer__social a {
  transition: transform 300ms ease, background 300ms ease;
}

.apm-home .apm-footer--premium .apm-footer__social a:hover {
  transform: translateY(-3px);
  background: var(--apm-primary);
}

.apm-home .apm-footer__newsletter {
  margin-top: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.apm-home .apm-footer__newsletter-form input {
  background: rgba(255, 255, 255, 0.95);
}

.apm-home .apm-footer__bottom {
  padding: 24px 0 32px;
  margin-top: 48px;
}

/* ─── Testimonial ─── */
.apm-home .apm-testimonial--featured {
  border-radius: 18px;
  box-shadow: var(--apm-polish-shadow);
  border: 1px solid var(--apm-border-light);
}

/* ─── Service boxes ─── */
.apm-home .apm-service-box--premium {
  border-radius: 18px;
  box-shadow: var(--apm-polish-shadow);
}

/* ─── Tabs ─── */
.apm-home .apm-tabs--pills {
  margin-bottom: 40px;
}

.apm-home .apm-tabs--pills button {
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.875rem;
  transition: all 300ms ease;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .apm-home .apm-hero.apm-hero--refined {
    min-height: auto;
    padding-bottom: 120px;
  }

  .apm-hero--refined__image-wrap {
    transform: none;
    margin-right: 0;
    max-width: 420px;
    margin-inline: auto;
  }

  .apm-hero-stats--refined {
    margin-top: 32px;
    margin-bottom: 0;
  }

  .apm-partners-section--mockup {
    padding-top: 64px;
  }

  .apm-home .apm-cta--mockup__visual img {
    transform: none;
  }
}

@media (max-width: 768px) {
  .apm-home .apm-section {
    padding: 60px 0;
  }

  .apm-home .apm-section__header--split {
    margin-bottom: 40px;
  }

  .apm-home .apm-hero--refined__title {
    max-width: none;
    font-size: 2rem;
  }

  .apm-home .apm-cta--mockup {
    padding: 60px 0;
  }

  .apm-home .apm-cta--mockup__inner {
    padding: 40px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apm-home .apm-reveal {
    transform: none;
    transition: opacity 300ms ease;
  }
}

/* ─── Featured Jobs — mockup layout ─── */
.apm-home .apm-section--jobs {
  padding: 72px 0;
}

.apm-home .apm-section--jobs .apm-section__header--split {
  align-items: center;
  margin-bottom: 28px;
  gap: 16px 24px;
}

.apm-home .apm-section--jobs .apm-section__title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0;
}

.apm-home .apm-section--jobs .apm-section__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--apm-primary);
  white-space: nowrap;
}

.apm-home .apm-section--jobs .apm-section__link:hover {
  color: #0947a8;
  text-decoration: none;
}

.apm-home .apm-section--jobs .apm-tabs--pills {
  margin-bottom: 28px;
  gap: 10px;
  padding-bottom: 4px;
}

.apm-home .apm-section--jobs .apm-tabs--pills button {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  border-color: #e2e8f0;
  background: #fff;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.apm-home .apm-section--jobs .apm-tabs--pills button:hover:not(.is-active) {
  border-color: #cbd5e1;
  color: #334155;
}

.apm-home .apm-section--jobs .apm-tabs--pills button.is-active {
  background: var(--apm-primary);
  border-color: var(--apm-primary);
  color: #fff;
  font-weight: 600;
}

.apm-home .apm-section--jobs .apm-grid--jobs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.apm-home .apm-section--jobs .apm-job-card--premium {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  background: #fff;
}

.apm-home .apm-section--jobs .apm-job-card--premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  border-color: #e2e8f0;
}

.apm-home .apm-section--jobs .apm-job-card__top {
  margin-bottom: 16px;
}

.apm-home .apm-section--jobs .apm-job-card__logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: none;
  background: #f1f5f9;
  color: var(--apm-primary);
}

.apm-home .apm-section--jobs .apm-job-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.apm-home .apm-section--jobs .apm-job-card__bookmark {
  width: auto;
  height: auto;
  padding: 4px;
  background: transparent;
  border-radius: 0;
  color: #94a3b8;
}

.apm-home .apm-section--jobs .apm-job-card__bookmark:hover {
  background: transparent;
  color: var(--apm-primary);
}

.apm-home .apm-section--jobs .apm-job-card__title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}

.apm-home .apm-section--jobs .apm-job-card__title a {
  color: #0f172a;
}

.apm-home .apm-section--jobs .apm-job-card__title a:hover {
  color: var(--apm-primary);
}

.apm-home .apm-section--jobs .apm-job-card__company {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 16px;
}

.apm-home .apm-section--jobs .apm-job-card__details {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apm-home .apm-section--jobs .apm-job-card__detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.4;
}

.apm-home .apm-section--jobs .apm-job-card__detail svg {
  flex-shrink: 0;
  color: #94a3b8;
}

.apm-home .apm-section--jobs .apm-job-card__detail--type {
  align-items: center;
}

.apm-home .apm-section--jobs .apm-job-card__type-pill {
  display: inline-block;
  margin: 0;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.apm-home .apm-section--jobs .apm-job-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.apm-home .apm-section--jobs .apm-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.apm-home .apm-section--jobs .apm-badge--new {
  background: #22c55e;
  color: #fff;
}

.apm-home .apm-section--jobs .apm-badge--featured {
  background: #f87171;
  color: #fff;
}

.apm-home .apm-section--jobs .apm-badge--urgent {
  background: #fef3c7;
  color: #b45309;
}

.apm-home .apm-section--jobs .apm-job-card__footer {
  margin-top: auto;
  padding-top: 0;
  border-top: none;
}

.apm-home .apm-section--jobs .apm-btn--apply {
  background: var(--apm-primary) !important;
  border: none !important;
  text-transform: uppercase;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  padding: 14px 20px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  width: 100%;
  text-align: center;
}

.apm-home .apm-section--jobs .apm-btn--apply:hover {
  background: #0947a8 !important;
  box-shadow: 0 4px 12px rgba(11, 94, 215, 0.3) !important;
  transform: none;
  filter: none;
}

.apm-home .apm-section--jobs .apm-job-card--premium:hover .apm-btn--apply {
  transform: none;
}

/* Hide legacy salary block if present */
.apm-home .apm-section--jobs .apm-job-card__salary-block {
  display: none;
}

@media (max-width: 1280px) {
  .apm-home .apm-section--jobs .apm-grid--jobs {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .apm-home .apm-section--jobs .apm-grid--jobs {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .apm-home .apm-section--jobs {
    padding: 56px 0;
  }

  .apm-home .apm-section--jobs .apm-section__header--split {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .apm-home .apm-section--jobs .apm-grid--jobs {
    grid-template-columns: 1fr;
  }

  .apm-home .apm-section--jobs .apm-tabs--pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .apm-home .apm-section--jobs .apm-tabs--pills::-webkit-scrollbar {
    display: none;
  }
}
