/* TPI Careers static site. Colors match the live Craft site's :root tokens. */
:root {
  --blue: #005287;
  --blue-dark: #003b73;
  --text: #425363;
  --gray: #666;
  --muted: #6c757d;
  --line: rgba(0, 0, 0, 0.1);
  --sidebar: 280px;
  --font: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --head: Ubuntu, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font: 18px/1.5 var(--font);
  color: var(--text);
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
a:focus-visible { outline: 3px solid #f1a722; outline-offset: 2px; }

h1, h2, h3 { font-family: var(--head); margin: 0; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff; padding: 8px 14px;
}
.skip-link:focus { top: 8px; color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header / sidebar ---------- */
.site-header {
  background: #fff;
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.1);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.logo { display: block; width: 90px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.main-nav a {
  display: block; padding: 6px 0;
  font-size: 14px; line-height: 1.6; font-weight: 700;
  color: var(--gray); text-decoration: none;
}
.main-nav a:hover { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 16px; text-align: center; font-size: 14px; }
.social { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.social a { color: var(--gray); font-weight: 700; text-decoration: none; }
.social a:hover { color: var(--blue); text-decoration: underline; }
.tagline-img { width: 200px; margin: 0 auto 16px; }
.copyright { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--blue) url("../img/tpi-49.jpg") center top / 100% auto no-repeat;
  padding-top: 43%; /* photo area; the blue title box sits below it on phones */
}
.hero-content { background: var(--blue); color: #fff; padding: 18px 16px; }
.hero h1 { font-size: 24px; line-height: 1.1; font-weight: 700; }
.hero p { margin: 4px 0 0; font-size: 15px; line-height: 1.2; }

/* ---------- Main content ---------- */
.main-content { padding: 28px 16px 8px; }
.intro h2 { font-size: 30px; line-height: 1.2; font-weight: 400; margin-bottom: 14px; }
.intro p { font-family: var(--head); font-size: 20px; line-height: 1.6; margin: 0 0 24px; }

.job-count { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.job a {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  color: var(--blue); text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.job a:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.job-text { flex: 1; min-width: 0; }
.job-title { font-size: 18px; line-height: 1.6; font-weight: 400; margin-bottom: 4px; }
.job-meta { display: block; font-size: 14px; line-height: 1.6; color: var(--muted); }
.job-meta time { white-space: nowrap; }
.job-meta strong { color: var(--blue); font-weight: 600; }
.job-cta { font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 14px; }
.job-cta::after {
  content: ""; width: 11px; height: 11px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
@media (max-width: 599px) {
  .job-cta { font-size: 0; }
}

.all-jobs { text-align: center; margin: 40px 0; }
.all-jobs h2 { font-size: 22px; line-height: 1.5; font-weight: 600; }

.contact { text-align: center; margin: 0 0 48px; }
.contact h2 { font-family: var(--font); font-size: 20px; font-weight: 400; margin-bottom: 18px; }
.button {
  display: inline-block;
  background: var(--text); color: #fff;
  font-family: var(--head); font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  padding: 14px 28px; border-radius: 4px; text-decoration: none;
}
.button:hover { background: var(--blue); color: #fff; }

/* 404 */
.notfound { padding: 64px 16px; }
.notfound h1 { font-size: 40px; font-weight: 400; margin-bottom: 12px; }

/* ---------- Tablet ---------- */
@media (min-width: 600px) {
  .logo { width: 120px; }
  .hero { padding-top: 0; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
  .hero h1 { font-size: 27px; }
  .hero-content { position: absolute; left: 0; bottom: 0; width: min(500px, 70%); padding: 28px 24px; }
  .main-content { padding: 36px 32px 8px; }
  .intro h2 { font-size: 40px; }
  .intro p { font-size: 24px; }
  .all-jobs h2 { font-size: 27px; }
}

/* ---------- Desktop: fixed left sidebar like the live site ---------- */
@media (min-width: 992px) and (min-height: 640px) {
  .site-header {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar);
    padding: 25px; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0;
  }
  .logo { width: 150px; margin-bottom: 8px; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 10px; }
  .site-footer {
    position: fixed; left: 0; bottom: 0; width: var(--sidebar);
    padding: 25px; text-align: left; z-index: 2;
  }
  .social { justify-content: flex-start; }
  .tagline-img { margin-left: 0; }
  main { margin-left: var(--sidebar); }
  .hero { aspect-ratio: auto; height: 535px; }
  .main-content { padding: 36px 48px 8px; }
  .intro p { font-size: 27px; }
}
