/* ============================================================
   KUKA AMP Careers — site layout
   Design tokens & component primitives come from css/kuka.css
   (KUKA AMP Design System). This file only lays out the pages.
   Breakpoints: 760px (tablet), 520px (phone).
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

a { color: var(--kuka-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Button-shaped links never underline */
a.kuka-btn-primary:hover, a.kuka-btn-secondary:hover, a.kuka-btn-ghost:hover { text-decoration: none; }
a.kuka-btn-secondary { color: var(--fg-primary); }
a.kuka-btn-ghost { color: var(--fg-tertiary); }
a.kuka-btn-ghost:hover { color: var(--fg-primary); }

/* Spacing utilities (heading rhythm) */
.mt-8 { margin: 8px 0 0; }
.mt-10 { margin: 10px 0 0; }
.mt-16 { margin: 16px 0 0; }
.no-m { margin: 0; }
.measure { max-width: 460px; }

/* Accessibility: skip link, visible only when focused */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bg-surface); color: var(--fg-primary);
  padding: 8px 16px; border-radius: var(--radius); font-size: var(--text-sm);
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header / navigation ---------- */
.site-header {
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
/* Full-bleed: brand sits flush left, Careers flush right, padded off the
   viewport edges. Padding tracks the hero/section gutters at each breakpoint. */
.site-nav {
  height: 48px; width: 100%; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-wordmark { display: block; height: 15px; width: auto; }

/* ---------- Landing: hero ---------- */
.hero { position: relative; background: url('../assets/kuka_robot.jpg') center/cover; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.7); }
.hero-inner { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 120px 32px 128px; }
.hero-inner h1 { margin: 18px 0 0; max-width: 760px; }
.hero-sub { font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, 0.78); max-width: 560px; margin: 16px 0 0; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }

/* ---------- Landing: content sections ---------- */
.section { border-bottom: 1px solid var(--border); }
.section-surface { background: var(--bg-surface); }
.section-inner { max-width: 1040px; margin: 0 auto; padding: 72px 32px; }
.section-cta { margin-top: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.gap-40 { gap: 40px; }
.section-photo { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); display: block; }

/* Rotating hero word (landing only) */
.rotator { margin: 28px 0 0; font-size: 24px; font-weight: 700; color: var(--fg-primary); line-height: 1.35; }
@keyframes wordFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
#rotating-word, #rotating-word span {
  color: var(--kuka-orange); display: inline-block;
  animation: wordFadeIn 900ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ---------- Careers: positions list ---------- */
.page-narrow { max-width: 860px; margin: 0 auto; padding: 56px 32px 72px; }
.job-list { list-style: none; margin: 28px 0 0; padding: 0; overflow: hidden; }
.job-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  background: var(--bg-surface); transition: background 150ms var(--easing);
}
.job-list li:last-child .job-row { border-bottom: none; }
.job-row:hover { background: var(--bg-page); text-decoration: none; }
.job-row-main { display: block; min-width: 0; }
.job-row-title { display: block; }
.job-row-meta { display: block; margin-top: 4px; }
.job-row-side { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.job-row-chevron { color: var(--fg-tertiary); font-size: 16px; }
.list-note { margin-top: 16px; }
.meta-dot { color: var(--kuka-light-gray); }

/* ---------- Job detail ---------- */
.page-job { max-width: 760px; margin: 0 auto; padding: 40px 32px 72px; }
.back-link { margin-left: -8px; }
.job-detail { margin-top: 16px; padding: 40px 48px; }
.job-title { margin: 8px 0 0; }
.job-meta-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; flex-wrap: wrap; }
.job-about { margin: 24px 0 0; }
.job-detail h2 { margin: 32px 0 0; }
.job-detail h3 { margin: 22px 0 0; color: var(--fg-secondary); }
.job-points { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.job-points li { font-size: 15px; line-height: var(--leading-normal); color: var(--fg-secondary); }
.apply-row {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border); padding: 20px 24px; }
.footer-inner { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Responsive: tablet and below ---------- */
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .hero-inner { padding: 72px 24px 80px; }
  .section-inner { padding: 48px 24px; }
  .page-narrow, .page-job { padding: 32px 20px 56px; }
  .site-nav { padding: 0 24px; }
}

/* ---------- Responsive: phones ---------- */
@media (max-width: 520px) {
  .site-nav { padding: 0 16px; }
  .job-row { flex-wrap: wrap; padding: 16px 18px; }
  .job-detail { padding: 24px 20px; }
  .rotator { font-size: 20px; }
}
