/* ============================================
   Fifth M – Careers Page Styles (careers.css)
   Dark theme · Red accents · Animated hero
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #0a0a0a;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;
  --accent-red: #e63946;
  --accent-red-light: #ff4d5a;
  --accent-red-dark: #c0232f;
  --accent-red-glow: rgba(230, 57, 70, 0.25);
  --accent-red-glow-strong: rgba(230, 57, 70, 0.45);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --font-primary: 'Sora', sans-serif;
  --font-secondary: 'Space Grotesk', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--accent-red-glow);
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Hero Section ---------- */
.cr-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
}

.cr-hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.cr-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(230, 57, 70, 0.08) 0%, transparent 65%),
              linear-gradient(180deg, transparent 60%, var(--bg-primary) 100%);
  z-index: 2;
  pointer-events: none;
}

.cr-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  max-width: 800px;
}

.cr-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: 100px;
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-red-light);
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  animation: cr-fadeInUp 0.8s ease forwards;
}

.cr-hero-badge .cr-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: cr-pulse 2s ease-in-out infinite;
}

.cr-hero-title {
  font-family: var(--font-primary);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  line-height: 1.08;
  margin-bottom: 20px;
  animation: cr-fadeInUp 0.8s ease 0.15s both;
}

.cr-hero-title span {
  font-weight: 700;
  font-style: italic;
  color: #e63946;
}

.cr-hero-subtitle {
  font-family: var(--font-secondary);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 36px;
  animation: cr-fadeInUp 0.8s ease 0.3s both;
}

.cr-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
  animation: cr-fadeInUp 0.8s ease 0.45s both;
  position: relative;
  overflow: hidden;
}

.cr-hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--accent-red-glow-strong);
}

.cr-hero-cta svg {
  transition: transform var(--transition-fast);
}

.cr-hero-cta:hover svg {
  transform: translateX(4px);
}

.cr-hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: cr-fadeInUp 0.8s ease 0.6s both;
}

.cr-hero-scroll .cr-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-red), transparent);
  animation: cr-scrollPulse 2s ease-in-out infinite;
}

/* ---------- Section Commons ---------- */
.cr-section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.cr-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 16px;
}

.cr-section-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent-red);
  border-radius: 2px;
}

.cr-section-title {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}

.cr-section-desc {
  font-family: var(--font-secondary);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 56px;
}

/* ---------- Culture Section ---------- */
.cr-culture {
  background: var(--bg-primary);
}

.cr-culture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.cr-culture-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.cr-culture-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
}

.cr-culture-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  background: var(--bg-card-hover);
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.cr-culture-card:hover::before {
  transform: scaleX(1);
}

.cr-culture-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.cr-culture-card:hover .cr-culture-icon {
  background: rgba(230, 57, 70, 0.18);
  transform: scale(1.08);
}

.cr-culture-icon svg {
  width: 26px;
  height: 26px;
  color: var(--accent-red);
}

.cr-culture-card h3 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cr-culture-card p {
  font-family: var(--font-secondary);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- Open Positions Section ---------- */
.cr-positions {
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0e0e0e 100%);
}

.cr-positions-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 48px;
}

.cr-positions-count {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

.cr-positions-count strong {
  color: var(--accent-red-light);
  font-weight: 600;
}

.cr-job-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cr-job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-40px);
}

.cr-job-card.cr-revealed {
  opacity: 1;
  transform: translateX(0);
}

.cr-job-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-red);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.cr-job-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(230, 57, 70, 0.15);
  box-shadow: 0 0 40px rgba(230, 57, 70, 0.08);
  transform: translateX(6px);
}

.cr-job-card.cr-revealed:hover {
  transform: translateX(6px);
}

.cr-job-card:hover::after {
  opacity: 1;
}

.cr-job-info h3 {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cr-job-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.cr-job-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

.cr-job-tag.cr-department {
  background: rgba(230, 57, 70, 0.1);
  border-color: rgba(230, 57, 70, 0.2);
  color: var(--accent-red-light);
}

.cr-job-tag svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.cr-job-desc {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cr-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--accent-red);
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--accent-red);
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.cr-apply-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-smooth);
  z-index: 0;
}

.cr-apply-btn:hover {
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 0 24px var(--accent-red-glow);
}

.cr-apply-btn:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.cr-apply-btn span,
.cr-apply-btn svg {
  position: relative;
  z-index: 1;
}

/* Ripple effect */
.cr-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: cr-rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Perks Section ---------- */
.cr-perks {
  background: var(--bg-primary);
  text-align: center;
}

.cr-perks .cr-section-desc {
  margin-left: auto;
  margin-right: auto;
}

.cr-perks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.cr-perk-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  cursor: default;
}

.cr-perk-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(230, 57, 70, 0.15);
  transform: translateY(-4px);
}

.cr-perk-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.08);
  border-radius: 50%;
  transition: var(--transition-bounce);
}

.cr-perk-item:hover .cr-perk-icon {
  transform: scale(1.18);
  background: rgba(230, 57, 70, 0.15);
}

.cr-perk-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-red);
}

.cr-perk-item h4 {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cr-perk-item p {
  font-family: var(--font-secondary);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- CTA Section ---------- */
.cr-cta {
  padding: 100px 24px 120px;
  text-align: center;
  background: var(--bg-primary);
  position: relative;
}

.cr-cta-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 48px;
  background: linear-gradient(145deg, rgba(230, 57, 70, 0.06) 0%, rgba(230, 57, 70, 0.02) 100%);
  border: 1px solid rgba(230, 57, 70, 0.12);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cr-cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(230, 57, 70, 0.04) 0%, transparent 50%);
  animation: cr-rotateSlow 20s linear infinite;
}

.cr-cta-box h2 {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  position: relative;
}

.cr-cta-box p {
  font-family: var(--font-secondary);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  position: relative;
}

.cr-cta-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
}

.cr-cta-email:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--accent-red-glow-strong);
}

/* ---------- Footer ---------- */
.cr-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
  text-align: center;
}

.cr-footer-logo {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cr-footer-logo span {
  color: var(--accent-red);
}

.cr-footer p {
  font-family: var(--font-secondary);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Scroll Reveal ---------- */
.cr-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.cr-reveal.cr-visible {
  opacity: 1;
  transform: translateY(0);
}

.cr-reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.cr-reveal-left.cr-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Keyframes ---------- */
@keyframes cr-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cr-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.6);
  }
}

@keyframes cr-scrollPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.3);
  }
}

@keyframes cr-rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes cr-rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
  .cr-section {
    padding: 72px 20px;
  }

  .cr-culture-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cr-job-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .cr-apply-btn {
    justify-self: start;
  }

  .cr-perks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .cr-positions-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cr-cta-box {
    padding: 40px 24px;
  }

  .cr-hero-scroll {
    display: none;
  }
}

@media (max-width: 480px) {
  .cr-perks-grid {
    grid-template-columns: 1fr;
  }

  .cr-job-meta {
    gap: 8px;
  }

  .cr-job-tag {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
}
