/* ===== Fonts (self-hosted, no external CDN at runtime) ===== */
@font-face {
  font-family: "Archivo Black";
  src: url("fonts/archivo-black-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Design tokens ===== */
:root {
  --bg: #0F1117;
  --bg-elev: #171A24;
  --bg-elev-2: #1D212E;
  --border: #262B3A;
  --text: #E8E9ED;
  --text-dim: #A7ABB8;
  --text-faint: #8890A0;
  --accent: #3660FF;
  --accent-text: #8DA3FF;
  --accent-dim: #3558D6;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Archivo Black", "Arial Narrow", sans-serif;

  --container: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Focus states ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Wordmark ===== */
.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .field { color: var(--text); }
.wordmark .sync { color: var(--accent); display: inline-block; transform: skewX(-10deg); }
.footer-brand .wordmark { font-size: 22px; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}
.nav.scrolled {
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 150ms ease;
}
.nav-link:hover { color: var(--text); }
.nav-links .btn { font-size: 14.5px; padding: 9px 18px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 8px 24px -12px rgba(54, 96, 255, 0.55);
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: #333952; }
.btn-lg { padding: 15px 32px; font-size: 16.5px; }

.link-quiet {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 150ms ease, border-color 150ms ease;
}
.link-quiet:hover { color: var(--text); border-color: var(--text-dim); }

/* ===== Section scaffolding ===== */
section { padding: 120px 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-text);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; margin: 0; }
p { color: var(--text-dim); }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ===== Reveal-on-scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Hero ===== */
.hero {
  padding: 96px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(closest-side, rgba(54,96,255,0.18), transparent);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: 1.06;
  margin-bottom: 24px;
}
.hero .subhead {
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 0 36px;
}
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-scroll-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 150ms ease;
}
.hero-scroll-link:hover { color: var(--text); }
.hero-scroll-link svg { transition: transform 150ms ease; }
.hero-scroll-link:hover svg { transform: translateY(2px); }

/* ===== Hero schedule illustration ===== */
.schedule-panel {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.schedule-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.schedule-panel-head .dots { display: flex; gap: 6px; }
.schedule-panel-head .dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border);
}
.schedule-panel-head .label {
  font-size: 12.5px;
  color: var(--text-faint);
  font-weight: 600;
}
.schedule-grid {
  display: grid;
  grid-template-columns: 56px repeat(5, 1fr);
  gap: 6px;
}
.schedule-grid .col-head {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 700;
  text-align: center;
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.schedule-grid .row-label {
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  font-weight: 600;
}
.shift-card {
  border-radius: 8px;
  padding: 8px 7px;
  font-size: 11px;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border: 1px solid transparent;
}
.shift-card .role { font-size: 9.5px; font-weight: 600; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.03em; }
.shift-card.empty { background: transparent; border: 1px dashed var(--border); }
.shift-card.ump { background: rgba(168, 130, 255, 0.14); color: #C9B3FF; border-color: rgba(168,130,255,0.25); }
.shift-card.field { background: rgba(74, 200, 150, 0.14); color: #8FE3C0; border-color: rgba(74,200,150,0.25); }
.shift-card.conc { background: rgba(230, 176, 74, 0.14); color: #F2CE8F; border-color: rgba(230,176,74,0.25); }

.schedule-legend {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.schedule-legend .item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}
.schedule-legend .swatch { width: 9px; height: 9px; border-radius: 3px; }
.schedule-legend .swatch.ump { background: #C9B3FF; }
.schedule-legend .swatch.field { background: #8FE3C0; }
.schedule-legend .swatch.conc { background: #F2CE8F; }

/* ===== Problem section ===== */
.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.problem-list li {
  background: var(--bg-elev);
  padding: 28px 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.problem-list .num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-text);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(54,96,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.problem-list p { margin: 0; color: var(--text-dim); font-size: 16px; line-height: 1.65; }

/* ===== Feature cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-grid-2 { grid-template-columns: repeat(2, 1fr); }
.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.feature-card:hover { border-color: #333952; transform: translateY(-2px); }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(54,96,255,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 10px; }
.feature-card p { font-size: 15px; margin: 0; }

/* ===== Origin / why section ===== */
.why-section {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.why-inner {
  max-width: 720px;
}
.why-inner h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 24px; }
.why-inner p { font-size: 18px; line-height: 1.75; color: var(--text-dim); }

/* ===== Testimonial ===== */
.testimonial {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.testimonial blockquote {
  margin: 0 0 28px;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
}
.testimonial blockquote::before { content: open-quote; color: var(--accent); }
.testimonial blockquote::after { content: close-quote; color: var(--accent); }
.testimonial cite {
  font-style: normal;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 15px;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 24px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p {
  margin: 0 0 22px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
}

/* ===== Final CTA band ===== */
.cta-band {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg));
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(28px, 4.2vw, 42px);
  margin-bottom: 32px;
}
.cta-band-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-faint);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.footer-copy {
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ===== Contact page ===== */
.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 140px 24px 120px;
}
.contact-wrap .eyebrow { display: flex; }
.contact-header { text-align: center; margin-bottom: 48px; }
.contact-header h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 14px; }
.contact-header p { font-size: 16.5px; }

.form-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row { margin-bottom: 22px; }
.form-row:last-of-type { margin-bottom: 0; }
.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-row .optional {
  color: var(--text-faint);
  font-weight: 500;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 150ms ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--text-faint); }
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(54, 96, 255, 0.35);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-submit {
  width: 100%;
  margin-top: 8px;
  padding: 15px 26px;
}
.form-note {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-faint);
  margin-top: 20px;
}
.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}

/* ===== Legal pages ===== */
.legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 24px 120px;
}
.legal-wrap h1 { font-size: clamp(28px, 4.4vw, 40px); margin-bottom: 6px; }
.legal-wrap .updated { color: var(--text-faint); font-size: 13px; margin-bottom: 36px; }
.legal-wrap .legal-note {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.legal-wrap h2 { font-size: 19px; margin: 34px 0 10px; }
.legal-wrap p, .legal-wrap li { color: var(--text-dim); font-size: 15px; }
.legal-wrap ul { padding-left: 22px; margin: 0; }
.legal-wrap a { color: var(--accent-text); }
.back-link:hover { color: var(--text); }

/* ===== Case study ===== */
.case-hero {
  padding: 96px 0 80px;
}
.case-hero h1 {
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 20px;
}
.case-hero .subhead {
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0;
}
.glance-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.glance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}
.glance-item .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.glance-item .value {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
}

/* ===== Blog ===== */
.blog-hero { padding: 96px 0 72px; }
.blog-hero h1 { font-size: clamp(32px, 4.6vw, 54px); max-width: 760px; margin-bottom: 20px; }

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.post-card {
  background: var(--bg-elev);
  padding: 32px;
  display: block;
  text-decoration: none;
  transition: background-color 150ms ease;
}
.post-card:hover { background: var(--bg-elev-2); }
.post-card-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.post-card h2 { font-size: 22px; margin-bottom: 10px; }
.post-card p { margin: 0; font-size: 15.5px; }

.post-hero { padding: 96px 0 56px; }
.post-hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; max-width: 760px; margin-bottom: 16px; }
.post-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-faint);
  font-weight: 600;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

.post-body { max-width: 720px; margin: 0 auto; padding-bottom: 40px; }
.post-body h2 { font-size: 22px; margin: 40px 0 14px; }
.post-body h3 { font-size: 17px; margin: 28px 0 10px; }
.post-body p { font-size: 16px; line-height: 1.75; color: var(--text-dim); margin: 0 0 18px; }
.post-body ul { padding-left: 22px; margin: 0 0 18px; color: var(--text-dim); font-size: 16px; line-height: 1.75; }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--accent-text); }

.post-footer-nav {
  max-width: 720px;
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.post-footer-nav a { color: var(--text-dim); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.post-footer-nav a:hover { color: var(--text); }

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

@media (max-width: 900px) {
  section { padding: 80px 0; }
  .hero { padding: 56px 0 64px; }
  .case-hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .feature-grid { grid-template-columns: 1fr; }
  .glance-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(15,17,23,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
  }
  .nav-links.open .btn { width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  .problem-list li { padding: 22px; }
  .form-two { grid-template-columns: 1fr; }
  .contact-wrap { padding: 108px 20px 80px; }
  .form-card { padding: 26px; }
  .legal-wrap { padding: 108px 20px 80px; }
  .blog-hero { padding: 56px 0 48px; }
  .post-hero { padding: 56px 0 40px; }
  .post-card { padding: 24px; }
}

@media (max-width: 560px) {
  .schedule-grid { grid-template-columns: 34px repeat(5, 1fr); }
  .shift-card { font-size: 9.5px; padding: 6px 4px; min-height: 38px; }
  .shift-card .role { font-size: 8px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .glance-grid { grid-template-columns: 1fr; }
}
