/*
Theme Name: SWBD Jobs
Theme URI: https://jobs.swbd.ca
Author: Jiho Park
Author URI: https://swbd.ca
Description: A Theme for SWBD Jobs website
Text Domain: swbdjobs
*/


:root {
  --plum-950: #2a1240;   /* ink / darkest */
  --plum-800: #4b1f78;   /* deep purple (badge top) */
  --violet-600: #7b2fa8; /* mid violet */
  --magenta-500: #c4198f;/* badge magenta */
  --pink-400: #e23fae;   /* gradient hot end */
  --paper: #f7f4fb;      /* lilac-tinted background */
  --card: #ffffff;
  --line: #e6ddf2;
  --muted: #6f6383;

  --grad: linear-gradient(135deg, var(--plum-800) 0%, var(--violet-600) 45%, var(--magenta-500) 100%);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(42, 18, 64, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--plum-950);
  line-height: 1.6;
  font-size: 16px;
}

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

a { color: var(--magenta-500); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--pink-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--plum-950);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }

/* Shield mark — echoes the price-lock badge shape */
.shield {
  width: 30px;
  height: 34px;
  background: var(--grad);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.shield span {
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  transform: translateY(-2px);
}

.header-link {
  color: #e8ddf5;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--grad);
  color: #fff;
  padding: 48px 0 56px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 50% 100%, 0 calc(100% - 24px));
}

.hero .eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero p {
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- Job list ---------- */

.jobs {
  padding: 36px 0 64px;
}

.jobs-count {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.job-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.job-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--grad);
}
.job-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.job-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.job-card .dept {
  display: inline-block;
  background: #f6e4f1;
  color: var(--magenta-500);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.job-card .view {
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--magenta-500);
}

/* ---------- Job detail ---------- */

.detail-hero {
  background: var(--grad);
  color: #fff;
  padding: 32px 0 44px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 50% 100%, 0 calc(100% - 20px));
}

.back-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.back-link:hover { color: #fff; }

.detail-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5.5vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-body {
  padding: 32px 0 64px;
}

.jd {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  margin-bottom: 26px;
}

.jd h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--plum-800);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}
.jd h2:first-child { margin-top: 0; }

.jd p { margin-bottom: 10px; }

.jd ul {
  padding-left: 2px;
  list-style: none;
}
.jd li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}
.jd li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 11px;
  background: var(--grad);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
}

/* ---------- Application form ---------- */

.apply {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.apply > h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.apply > .sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field .req { color: var(--magenta-500); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  background: #fdfcff;
  color: var(--plum-950);
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--magenta-500);
  box-shadow: 0 0 0 3px rgba(196, 25, 143, 0.15);
}

.field .hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 5px;
}

/* File upload */
.upload {
  border: 2px dashed var(--violet-600);
  border-radius: 12px;
  background: #faf6fd;
  padding: 18px 16px;
}
.upload input[type="file"] {
  width: 100%;
  font-size: 0.9rem;
  color: var(--plum-950);
}
.upload input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  margin-right: 12px;
  cursor: pointer;
}

.btn-submit {
  display: block;
  width: 100%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  margin-top: 6px;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-submit:hover { filter: brightness(1.08); }
.btn-submit:active { transform: scale(0.99); }

.consent {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--plum-950);
  color: #cbbadf;
  font-size: 0.85rem;
  padding: 26px 0;
  text-align: center;
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .jd, .apply { padding: 32px 30px; }
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
