/* ═══════════════════════════════════════════════════════════
   PEAK PERFORMANCE ADVISORS — Recruitment Portal
   Redesigned: Editorial, Dark-Accented, Corporate-Grade
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Tokens ─────────────────────────────────────────── */
:root {
  --brand:        #6C3CF0;
  --brand-dark:   #4E22D4;
  --brand-dim:    rgba(108, 60, 240, 0.12);
  --brand-border: rgba(108, 60, 240, 0.25);

  --ink:          #0D0B14;
  --ink-2:        #1C1829;
  --ink-3:        #2E2A3D;
  --muted:        #7B7590;
  --muted-light:  #A39EBA;

  --surface:      #ffffff;
  --surface-2:    #F7F6FB;
  --surface-3:    #EFEDF8;
  --border:       #E5E2F0;
  --border-strong:#C8C3E0;

  --ff-head: 'Manrope', system-ui, sans-serif;
  --ff-body: 'DM Sans', system-ui, sans-serif;

  --text-xs:   0.6875rem;
  --text-sm:   0.8125rem;
  --text-base: 0.9375rem;
  --text-md:   1.0625rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-4xl:  3.75rem;
  --text-5xl:  5rem;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
  --t-base: 240ms;

  --max-w: 1160px;
  --pad:   1.5rem;

  --sh-card:  0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(13,11,20,0.06);
  --sh-hover: 0 2px 6px rgba(0,0,0,0.06), 0 12px 40px rgba(108,60,240,0.14);
  --sh-modal: 0 8px 16px rgba(0,0,0,0.06), 0 32px 80px rgba(13,11,20,0.24);
}

/* ── 2. Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3 {
  font-family: var(--ff-head);
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
}

/* ── 3. Container ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── 4. Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--ff-head);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.005em;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-fast) var(--ease);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,60,240,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-dim);
}

/* ── 5. Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-name {
  font-family: var(--ff-head);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.nav-link {
  padding: 0.45rem 0.875rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-xs);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.45rem 1rem;
  font-family: var(--ff-head);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-dim);
  border-radius: var(--r-sm);
  border: 1px solid var(--brand-border);
  transition: all var(--t-fast) var(--ease);
}
.nav-cta:hover { background: var(--brand); color: #fff; }

/* ── 6. Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  padding: 6rem 0 5rem;
}

/* Subtle grid overlay — the "signature" element */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,60,240,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,60,240,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero-grid-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,60,240,0.18) 0%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.hero-content { max-width: 680px; }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.hero-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(108,60,240,0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero-heading {
  font-size: clamp(var(--text-3xl), 5.5vw, var(--text-5xl));
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-heading em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(95deg, #A78BFA 0%, #7C3AED 50%, #C4B5FD 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(var(--text-base), 1.6vw, var(--text-md));
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  padding: 0.8rem 1.75rem;
  font-size: var(--text-base);
}
.hero-actions .btn-outline {
  padding: 0.8rem 1.5rem;
  font-size: var(--text-base);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}
.hero-actions .btn-outline:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 1.75rem 2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  width: fit-content;
  backdrop-filter: blur(8px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 2rem;
}

.stat-item:first-child { padding-left: 0; }
.stat-item:last-child  { padding-right: 0; }

.stat-number {
  font-family: var(--ff-head);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-plus {
  color: var(--brand);
  font-size: var(--text-xl);
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ── 7. Openings Section ───────────────────────────────── */
.openings {
  padding: 5rem 0 6rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.openings-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.openings-header-left { display: flex; flex-direction: column; gap: 0.375rem; }

.section-label {
  display: block;
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-heading {
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.3rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: all var(--t-fast) var(--ease);
}
.filter-btn:hover { color: var(--ink); background: var(--surface-2); }
.filter-btn.active {
  background: var(--ink);
  color: #fff;
}
.filter-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Jobs Grid */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* Job Card */
.job-card {
  background: var(--surface);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  transition: background var(--t-base) var(--ease),
              opacity 360ms var(--ease), transform 360ms var(--ease);
  opacity: 0;
  transform: translateY(10px);
  cursor: default;
}

.job-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.job-card:hover { background: var(--surface-2); }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-dept {
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.card-type {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-xs);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.card-type.full-time  { background: #ECFDF5; color: #065F46; }
.card-type.internship { background: #FFF7ED; color: #92400E; }
.card-type.part-time  { background: #EFF6FF; color: #1E40AF; }

.card-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 500;
}

.meta-chip svg { flex-shrink: 0; opacity: 0.7; }

.card-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.card-salary {
  font-family: var(--ff-head);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
}

.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.875rem;
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-dim);
  border: 1px solid var(--brand-border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn-card:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-card svg { transition: transform var(--t-fast) var(--ease); }
.btn-card:hover svg { transform: translateX(2px); }

/* ── 8. States ─────────────────────────────────────────── */
.state-loading {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}

.state-loading[hidden] {
  display: none;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.state-empty, .state-error {
  text-align: center;
  padding: 4rem 2rem;
  font-size: var(--text-base);
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  margin-top: 1px;
}

.state-error { color: #991B1B; background: #FEF2F2; border-color: #FECACA; }

/* ── 9. Why PPA Section ────────────────────────────────── */
.why-us {
  padding: 5rem 0 6rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.why-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 3rem;
  max-width: 480px;
}

.why-header .section-heading {
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-3xl));
}

.perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.perk-card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: background var(--t-base) var(--ease);
}

.perk-card:hover { background: var(--surface-2); }

.perk-number {
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.perk-title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  font-family: var(--ff-head);
}

.perk-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
}

/* ── 10. Modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13,11,20,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 180ms ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--sh-modal);
  border: 1px solid var(--border);
  animation: slideUp 240ms var(--ease);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-dept {
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.modal-close:hover { background: #FEE2E2; color: #DC2626; }
.modal-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.modal-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1.125rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.125rem;
}

.modal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 500;
}

.modal-meta-item svg { opacity: 0.6; flex-shrink: 0; }

.modal-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.125rem;
}

.modal-desc {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.modal-apply {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 0.875rem;
  font-size: var(--text-base);
  border-radius: var(--r-md);
}

/* ── 11. Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-name {
  font-family: var(--ff-head);
  font-size: var(--text-base);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.35);
}

.footer-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.2);
  margin-top: 0.5rem;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.footer-contact-label {
  font-family: var(--ff-head);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.125rem;
}

.footer-link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  transition: color var(--t-fast);
}
.footer-link:hover { color: rgba(255,255,255,0.9); }
.footer-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

/* ── 12. Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
  .jobs-grid  { grid-template-columns: repeat(2, 1fr); }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero { padding: 4rem 0 3.5rem; }

  .hero-stats {
    padding: 1.25rem 1.5rem;
    width: 100%;
    justify-content: space-between;
  }

  .stat-item { padding: 0 1rem; }
  .stat-item:first-child { padding-left: 0; }
  .stat-item:last-child  { padding-right: 0; }
}

@media (max-width: 640px) {
  :root { --pad: 1rem; }

  .header-inner { height: 58px; }
  .brand-tagline { display: none; }

  .nav-link { display: none; }
  .nav-cta  { margin-left: 0; }

  .hero-heading { letter-spacing: -0.025em; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .stat-divider { display: none; }
  .stat-item { padding: 0; }

  .openings-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { width: 100%; }
  .filter-btn { flex: 1; text-align: center; }

  .jobs-grid  { grid-template-columns: 1fr; }
  .perks-grid { grid-template-columns: 1fr; }

  .card-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .btn-card { width: 100%; justify-content: center; }

  .footer-inner   { flex-direction: column; gap: 2rem; }
  .footer-right   { align-items: flex-start; }

  .modal-card { padding: 1.5rem; }
  .modal-title { font-size: var(--text-xl); }
}

/* ── 13. Motion & A11y ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .job-card { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ── 14. Print ─────────────────────────────────────────── */
@media print {
  .site-header, .hero-actions, .filter-bar,
  .site-footer, .modal-overlay { display: none; }
  .hero { background: white; color: black; padding: 2rem 0; }
}