/* ═══════════════════════════════════════════════════════════════
   OCARIUS — Careers Page Styles (Swiss Editorial Lookbook)
   Integrates with Paper #FAFBF7 · Ink #0A0F1D · Slate #080D1A
   ═══════════════════════════════════════════════════════════════ */

/* ─── Global Scrollbar Removal ─── */
*, *::before, *::after {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-track {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ─── Hero Section (Paper Ground) ─── */
.careers-hero {
  position: relative;
  padding: clamp(56px, 7vw, 96px) 0 clamp(52px, 6.5vw, 88px);
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.careers-hero-main {
  max-width: 960px;
  margin-inline: auto;
  text-align: center;
}

.careers-hero-title {
  font-size: clamp(2.8rem, 6.2vw, 5.8rem);
  font-weight: 900;
  letter-spacing: var(--track);
  line-height: 0.98;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 24px;
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
}

.careers-hero-title em {
  font-family: var(--serif-accent);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--sand);
}

.careers-hero-sub {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  color: var(--fg-2);
  line-height: 1.6;
  max-width: 38em;
  margin-inline: auto;
  margin-bottom: 0;
  text-align: center;
  text-wrap: balance;
}

.careers-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3.5vw, 52px);
  row-gap: 24px;
  margin-top: clamp(40px, 5vw, 68px);
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  list-style: none;
  padding-left: 0;
  text-align: center;
}

.careers-badges li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.careers-badges .n {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: var(--caps);
  color: var(--sand);
}

.careers-badges strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.3;
}

.careers-badges span:last-child {
  font-size: 0.92rem;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 260px;
}

/* ─── Positions Section (Studio Ground) ─── */
.careers-section {
  padding: clamp(64px, 8vw, 112px) 0;
  background: var(--studio);
  border-bottom: 1px solid var(--rule);
}

.careers-section .s-bar {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.careers-section .s-head {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.careers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: clamp(24px, 2.5vw, 36px);
}

/* ─── Job Card (Pure White on Studio) ─── */
.job-card {
  background: #FFFFFF;
  border: 1px solid var(--hair);
  padding: clamp(28px, 3.2vw, 40px);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.job-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 16px 36px rgba(10, 15, 29, 0.06);
}

.job-card-dept {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 14px;
}

.job-card-dept-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand);
}

.job-card-title {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 20px;
}

.job-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  border: 1px solid var(--hair);
  background: var(--paper);
  padding: 4px 10px;
}

.job-card-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--fg-3);
  flex-shrink: 0;
}

.job-card-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg-2);
  margin-bottom: 28px;
  flex-grow: 1;
}

.job-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.job-card-cta svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.job-card:hover .job-card-cta svg {
  transform: translateX(4px);
}

/* ─── Empty State ─── */
.careers-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: clamp(60px, 8vw, 100px) 24px;
  border: 1px dashed var(--hair);
  background: #FFFFFF;
}

.careers-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.7;
}

.careers-empty h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.careers-empty p {
  font-size: 0.98rem;
  color: var(--fg-2);
  max-width: 440px;
  margin: 0 auto;
}

/* ─── Spontaneous Application Section (Paper Ground) ─── */
.careers-spontaneous {
  padding: clamp(64px, 8vw, 112px) 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.careers-spontaneous .s-bar {
  margin-bottom: clamp(36px, 4vw, 56px);
}

.spontaneous-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
  row-gap: 36px;
  align-items: center;
}

.spontaneous-copy {
  grid-column: 1 / span 7;
}

.spontaneous-copy .s-title {
  grid-column: auto;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  margin-bottom: 18px;
}

.spontaneous-copy .s-sub {
  grid-column: auto;
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  color: var(--fg-2);
  line-height: 1.6;
  max-width: 34em;
}

.spontaneous-actions {
  grid-column: 8 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-self: end;
  width: 100%;
  max-width: 380px;
}

.spontaneous-actions .btn {
  width: 100%;
}

/* ─── Modals ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 13, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-detail {
  background: #FFFFFF;
  border: 1px solid var(--ink);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(32px, 4.5vw, 56px);
  position: relative;
  margin: auto;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 24px 64px rgba(8, 13, 26, 0.28);
}

.modal-overlay.active .modal-detail {
  transform: none;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hair);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.modal-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.modal-dept-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 12px;
}

.modal-dept-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand);
}

.modal-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.1;
  text-wrap: balance;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hair);
}

.modal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  border: 1px solid var(--hair);
  background: var(--paper);
  padding: 5px 12px;
}

.modal-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--fg-3);
  flex-shrink: 0;
}

.modal-section {
  margin-bottom: 30px;
}

.modal-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hair);
}

.modal-section p,
.modal-section li {
  font-size: 0.96rem;
  color: var(--fg-2);
  line-height: 1.7;
}

.modal-section ul {
  list-style: none;
  padding: 0;
}

.modal-section ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.modal-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--ink);
  font-weight: 700;
}

.modal-apply-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  margin-top: 24px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.modal-apply-btn:hover {
  background: transparent;
  color: var(--ink);
}

.modal-apply-btn svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.modal-apply-btn:hover svg {
  transform: translateX(4px);
}

/* ─── Tally Form Modal ─── */
.modal-tally {
  background: #FFFFFF;
  border: 1px solid var(--ink);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  position: relative;
  margin: auto;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 24px 64px rgba(8, 13, 26, 0.28);
}

.modal-overlay.active .modal-tally {
  transform: none;
}

.modal-tally-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}

.modal-tally-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  color: var(--ink);
}

.modal-tally-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--hair);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.modal-tally-close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.modal-tally-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.modal-tally iframe {
  width: 100%;
  height: calc(90vh - 65px);
  height: calc(90dvh - 65px);
  border: none;
  display: block;
}

/* ─── Responsive Adjustments ─── */
@media (max-width: 960px) {
  .careers-badges {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }
  .careers-badges span:last-child {
    max-width: 100%;
  }
  .spontaneous-layout {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
  .spontaneous-copy {
    grid-column: 1 / -1;
  }
  .spontaneous-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .careers-grid {
    grid-template-columns: 1fr;
  }
  .modal-overlay {
    padding: 16px;
  }
  .modal-detail {
    padding: 28px 20px;
  }
  .modal-close {
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
}
