/* Locum DBA: "duty board" design. Light, teal, rounded. */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f4f8f7;
  --white: #ffffff;
  --ink: #0f2b31;
  --muted: #4d6469;
  --teal: #0c7b70;
  --teal-dark: #0a5f57;
  --teal-mid: #4fa69c;
  --teal-soft: #cde8e3;
  --teal-wash: #eef4f3;
  --signal: #ffb01f;
  --rule: #d6e3e0;
  --error: #b42318;
  --ok: #0a5f57;
  --radius: 18px;
  --radius-l: 22px;
  --shadow: 0 1px 0 var(--rule), 0 24px 60px rgba(15, 43, 49, 0.1);
  --wrap: 75rem;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.45rem + 3.6vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.9rem, 1.45rem + 1.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.008em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

main {
  flex: 1 0 auto;
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--teal);
  color: var(--white);
}

.button-primary:hover {
  background: var(--teal-dark);
  color: var(--white);
}

.button-quiet {
  background: transparent;
  color: var(--teal-dark);
}

.button-quiet:hover {
  background: var(--teal-wash);
  color: var(--teal-dark);
}

.button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* Header */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
}

.brand-name {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.012em;
}

.brand-tag {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.75rem;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--teal-dark);
}

.site-nav .nav-cta {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
}

.site-nav .nav-cta:hover {
  background: var(--teal-dark);
  color: var(--white);
}

/* Hero */

.hero {
  padding: 4.5rem 0 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding: 0.35rem 0.9rem 0.35rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
}

.live-badge[hidden] {
  display: none;
}

.live-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.is-best .live-dot {
  background: var(--teal-mid);
}

.lead {
  max-width: 33em;
  margin: 1.5rem 0 2.1rem;
  color: var(--muted);
  font-size: 1.25rem;
}

/* Duty board (cover rota) */

.board {
  padding: 1.75rem;
  border-radius: var(--radius-l);
  background: var(--white);
  box-shadow: var(--shadow);
}

.board-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.board-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.board-sub {
  color: var(--muted);
  font-size: 0.875rem;
}

.rota-grid {
  --day-col: 3.1rem;
  margin-top: 1rem;
}

.rota-axis,
.rota-row {
  display: grid;
  grid-template-columns: var(--day-col) minmax(0, 1fr);
  align-items: center;
}

.rota-axis-track {
  position: relative;
  height: 1.3rem;
  font-size: 0.75rem;
  color: #6f8589;
}

.rota-axis-track span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.rota-axis-track span:first-child {
  transform: none;
}

.rota-axis-track span:last-child {
  transform: translateX(-100%);
}

.rota-row {
  margin-top: 0.55rem;
}

.rota-day {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.rota-day.is-today {
  color: var(--ink);
}

.rota-track {
  position: relative;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--teal-wash);
}

.seg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
}

/* Solid = 2-hour response, stripes = 4-hour response, pale = best efforts.
   Pattern as well as shade, so the bands differ without relying on colour. */
.seg-two,
.swatch-two {
  background: var(--teal);
}

.seg-four,
.swatch-four {
  background: repeating-linear-gradient(-45deg, var(--teal) 0 5px, var(--teal-mid) 5px 10px);
}

.seg-best,
.swatch-best {
  background: var(--teal-soft);
}

.now-marker {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--signal);
}

.on-duty {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.4rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--paper);
}

.on-duty-icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 50%;
  background: var(--teal-soft);
}

.on-duty-icon span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--teal);
}

.is-best .on-duty-icon span {
  background: var(--teal-mid);
}

.rota-now strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.rota-now span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.rota-key {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.rota-key li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.swatch {
  display: block;
  width: 1.4rem;
  height: 0.7rem;
  margin-top: 0.36em;
  border-radius: 999px;
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot {
    animation: pulse 2.4s ease-out infinite;
  }

  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(12, 123, 112, 0.45); }
    70% { box-shadow: 0 0 0 9px rgba(12, 123, 112, 0); }
    100% { box-shadow: 0 0 0 0 rgba(12, 123, 112, 0); }
  }
}

/* Sections */

.section {
  padding: 5rem 0;
}

.section-white {
  background: var(--white);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.25rem;
}

.section-head p {
  margin-top: 0.9rem;
  color: var(--muted);
}

/* Services */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--teal-soft);
}

.icon-tile svg {
  width: 1.5rem;
  height: 1.5rem;
}

.card p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Prices */

.price-card {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  background: var(--white);
}

.prices {
  width: 100%;
  border-collapse: collapse;
}

.prices th,
.prices td {
  padding: 1.15rem 1.5rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.prices tr:last-child th,
.prices tr:last-child td {
  border-bottom: 0;
}

.prices thead th {
  background: var(--teal-wash);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.prices tbody th {
  width: 24%;
  font-weight: 600;
}

.prices .price {
  width: 34%;
  color: var(--teal-dark);
  font-weight: 600;
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.price-card + .note {
  margin-top: 1rem;
}

/* MSP band */

.band-teal {
  background: var(--teal-dark);
  color: var(--white);
}

.band-teal a {
  color: var(--white);
}

.msp-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}

.msp-grid p {
  color: #d6ece8;
}

.tick-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.tick-list li {
  position: relative;
  padding-left: 2.1rem;
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-7' fill='none' stroke='%230a5f57' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.95rem no-repeat;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--rule);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
}

.steps p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Scope */

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.scope-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--rule);
}

.scope-card ul {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.scope-card li {
  position: relative;
  padding-left: 2rem;
}

.scope-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
}

.scope-yes li::before {
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-7' fill='none' stroke='%230a5f57' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.9rem no-repeat;
}

.scope-no li::before {
  background: #e7ecec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6.5 6.5 7 7m0-7-7 7' fill='none' stroke='%234d6469' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
}

/* Questions */

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 52rem;
}

.faq-list details {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--white);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  font-size: 1.0625rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 50%;
  background: var(--teal-wash);
  color: var(--teal-dark);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "\2212";
}

.faq-list details p {
  padding: 0 1.35rem 1.2rem;
  color: var(--muted);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3.5rem;
  align-items: start;
}

.contact-grid .section-head p + p {
  margin-top: 0.75rem;
}

.contact-form {
  padding: 2rem;
  border-radius: var(--radius-l);
  background: var(--white);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 1.15rem;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 0.4rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #b9cbc7;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--teal);
  outline-offset: 1px;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}

fieldset.field {
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
}

.field .choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0;
  font-weight: 400;
}

.field .choice input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--teal);
}

.field-error {
  margin-top: 0.35rem;
  color: var(--error);
  font-size: 0.9375rem;
}

.field-error:empty {
  display: none;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .note {
  margin: 0.25rem 0 1.25rem;
}

.form-status {
  margin-top: 1rem;
  font-weight: 600;
}

.form-status.is-ok {
  color: var(--ok);
}

.form-status.is-fail {
  color: var(--error);
}

/* Footer */

.site-footer {
  padding: 2.75rem 0 3rem;
  background: var(--ink);
  color: #cfe0dd;
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.footer-brand:hover {
  color: var(--white);
}

.footer-brand svg {
  width: 1.9rem;
  height: 1.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--white);
}

.site-footer :focus-visible {
  outline-color: var(--white);
}

/* Plain pages (privacy, 404) */

.page {
  padding: 3.5rem 0 5rem;
}

.page-card {
  max-width: 50rem;
  padding: 2.5rem;
  border-radius: var(--radius-l);
  background: var(--white);
  box-shadow: var(--shadow);
}

.page h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  margin-bottom: 1.25rem;
}

.page h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.6rem;
}

.page p + p {
  margin-top: 0.75rem;
}

.page .actions {
  margin-top: 1.75rem;
}

/* Utility */

.nowrap {
  white-space: nowrap;
}

/* Responsive */

@media (max-width: 64rem) {
  .hero-grid,
  .msp-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .cards,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 45rem) {
  body {
    font-size: 1.0625rem;
  }

  .wrap {
    padding: 0 1.25rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .site-nav ul {
    gap: 0.5rem 1.25rem;
  }

  .hero {
    padding: 2.75rem 0 3.5rem;
  }

  .lead {
    font-size: 1.125rem;
  }

  .board,
  .contact-form,
  .page-card {
    padding: 1.25rem;
  }

  .rota-grid {
    --day-col: 2.6rem;
  }

  /* Narrow tracks: drop the 00:00 and 24:00 labels so 06:00 and 18:00 never collide */
  .rota-axis-track span:first-child,
  .rota-axis-track span:last-child {
    display: none;
  }

  .section {
    padding: 3.5rem 0;
  }

  .cards,
  .steps,
  .scope-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .prices thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .prices,
  .prices tbody,
  .prices tr,
  .prices th,
  .prices td {
    display: block;
    width: auto;
  }

  .prices tr {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--rule);
  }

  .prices tr:last-child {
    border-bottom: 0;
  }

  .prices th,
  .prices td,
  .prices tbody th,
  .prices .price {
    width: auto;
    padding: 0;
    border: 0;
  }

  .prices tbody th {
    font-size: 1.125rem;
  }

  .prices .price {
    margin: 0.3rem 0;
  }
}

.msp-intro {
  margin-top: 1rem;
  font-size: 1.1875rem;
}

/* Phones: stacked buttons share one width so their edges line up */
@media (max-width: 30rem) {
  .actions .button {
    flex: 1 1 100%;
  }
}
