/* Copyright (c) Health Dynamics Consulting Ltd. All rights reserved. Proprietary: see https://workforceplanning.org.uk/terms */
/*
 * Health Dynamics theme for the workforce planning website.
 * Tokens from brand guide v2.3, the same values as the platform's theme.css.
 * Change a value here and it changes everywhere. Light theme only: the guide
 * defines no dark theme.
 */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --cerise: #E20B88;
  --cerise-dark: #C40976;
  --purple: #9E278B;
  --deep-blue: #1B5299;
  --sky: #29ABE2;
  --sky-dark: #1C97CC;
  --orange: #F69323;
  --oxford: #101131;
  --white: #FFFFFF;
  --hero-gradient: linear-gradient(135deg, #FDDEF0 0%, #F7E0F3 30%, #DCE8F9 60%, #E4F4FB 85%, #FEF2E3 100%);
  --palette-stripe: linear-gradient(90deg, var(--cerise), var(--purple), var(--deep-blue), var(--sky), var(--orange));
  --card-stripe: linear-gradient(90deg, var(--cerise), var(--orange));
  --surface: #F6F7FB;
  --border: #DDE0EA;
  --muted: #5B5E7A;
  --oxford-soft: #3A3C5C;
  --tint-pink: #F7E0F3;
  --tint-blue: #DCE8F9;
  --tint-sky: #E4F4FB;
  --tint-peach: #FEF2E3;
  --success: #1E6B45;

  --font-heading: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Montserrat", "Segoe UI", Arial, sans-serif;
  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 17, 49, .06);
  --shadow-md: 0 12px 32px rgba(16, 17, 49, .10);
  --gutter: 24px;
  --header-height: 76px;
  --measure: 1160px;
  --focus: 3px solid var(--sky);
  --motion: 180ms ease;
}

@media (max-width: 639px) {
  :root { --gutter: 16px; --header-height: 64px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + 16px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--oxford);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--cerise); text-underline-offset: 3px; }
a:hover { color: var(--cerise-dark); }
:focus-visible { outline: var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; line-height: 1.2; text-transform: lowercase; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p, ul, ol, table { margin: 0 0 1.1em; }
li + li { margin-top: .35em; }
strong { font-weight: 700; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); color: var(--oxford); padding: 8px 16px; border-radius: var(--radius-pill); font-weight: 700; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--oxford); margin-right: auto; }
.brand img { height: 40px; width: auto; display: block; }
.brand .product { font-family: var(--font-heading); font-weight: 700; text-transform: lowercase; font-size: 1rem; border-left: 1px solid var(--border); padding-left: 12px; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav li + li { margin-top: 0; }
.nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-pill);
  font-family: var(--font-heading); font-weight: 700; text-transform: lowercase;
  color: var(--oxford); text-decoration: none; font-size: .95rem;
}
.nav a:hover { background: var(--surface); color: var(--oxford); }
.nav a[aria-current="page"], .nav a.active-child { color: var(--cerise); }
.menu { display: none; }
@media (max-width: 1023px) {
  .brand .product { display: none; }
  .site-header .nav-desktop, .site-header .header-cta { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; font-family: var(--font-heading); font-weight: 700; padding: 8px 16px; border: 2px solid var(--oxford); border-radius: var(--radius-pill); }
  .menu summary::-webkit-details-marker { display: none; }
  .menu .nav { position: absolute; right: 0; top: calc(100% + 8px); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-md); padding: 8px; min-width: 240px; }
  .menu .nav ul { flex-direction: column; }
}

/* Buttons: lowercase pills with a sliding arrow, no terminal punctuation */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-pill); border: 2px solid var(--cerise);
  background: var(--cerise); color: var(--white);
  font-family: var(--font-heading); font-weight: 700; text-transform: lowercase; text-decoration: none; font-size: 1rem; line-height: 1.2;
  transition: background var(--motion), border-color var(--motion), color var(--motion);
}
.btn:hover { background: var(--cerise-dark); border-color: var(--cerise-dark); color: var(--white); }
.btn .arrow { display: inline-block; transition: transform var(--motion); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--oxford); border-color: var(--oxford); }
.btn-ghost:hover { background: var(--oxford); border-color: var(--oxford); color: var(--white); }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* Hero */
.hero { background: var(--hero-gradient); padding: 72px 0 64px; }
.hero .eyebrow { margin-bottom: 12px; }
.hero h1 { max-width: 20ch; }
.hero .lead { font-size: 1.2rem; font-weight: 500; max-width: 62ch; color: var(--oxford-soft); }
.page-hero { background: var(--hero-gradient); padding: 48px 0 40px; }
.page-hero h1 { margin: 0; display: inline-block; border: 2px solid var(--oxford); border-radius: var(--radius-pill); padding: 4px 24px 8px; font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
@media (max-width: 639px) { .page-hero h1 { border-radius: 24px; padding: 8px 20px 12px; } }
.page-hero .lead { font-size: 1.15rem; font-weight: 500; max-width: 64ch; margin: 20px 0 0; color: var(--oxford-soft); }
.eyebrow { display: block; font-family: var(--font-heading); font-weight: 700; text-transform: lowercase; color: var(--cerise); font-size: .95rem; letter-spacing: .02em; }

/* Sections alternate white and tinted bands, with a cerise stripe on top of tinted ones */
.section { padding: 64px 0; }
.section.tint { background: var(--surface); border-top: 3px solid var(--cerise); }
/* Cerise is 4.5:1 on white only; on the tinted band small text uses cerise dark. */
.section.tint .eyebrow { color: var(--cerise-dark); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head p { color: var(--oxford-soft); font-size: 1.1rem; }

/* Cards */
.cards { display: grid; gap: var(--gutter); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 28px; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--motion), box-shadow var(--motion);
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--card-stripe); opacity: 0; transition: opacity var(--motion); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card:hover::before { opacity: 1; }
.card h3 { color: var(--cerise); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.2em; }
.card .more { font-family: var(--font-heading); font-weight: 700; text-transform: lowercase; text-decoration: none; }

/* Screenshots of the planner */
.shots { display: grid; gap: var(--gutter); grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.shots.wide { grid-template-columns: 1fr; max-width: 1100px; margin-inline: auto; }
.shots + .cards, .cards + .shots { margin-top: var(--gutter); }
.shot { margin: 0; }
.shot a { display: block; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--white); transition: box-shadow var(--motion); }
.shot a:hover, .shot a:focus-visible { box-shadow: var(--shadow-md); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted, inherit); }
.hero-shot { margin-top: 40px; }

/* Free and supported side by side */
.tiers { display: grid; gap: var(--gutter); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tier { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 32px; background: var(--white); }
.tier.featured { border: 2px solid var(--cerise); }
.tier .price { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; text-transform: lowercase; margin: 0 0 4px; }
.tier .for { color: var(--muted); margin-bottom: 20px; }
.tier ul { list-style: none; padding: 0; }
.tier li { padding-left: 28px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 3px solid var(--success); border-bottom: 3px solid var(--success); transform: rotate(-45deg); }
.tier li.no::before { width: 14px; height: 3px; top: .75em; border: 0; background: var(--muted); transform: none; }

.notice { border-left: 4px solid var(--orange); background: var(--tint-peach); padding: 20px 24px; border-radius: 0 var(--radius-card) var(--radius-card) 0; margin: 0 0 1.1em; }
.notice p:last-child { margin: 0; }

/* Request form on the contact page (Grav Form plugin markup) */
#request form { display: grid; gap: 20px; margin-top: 24px; }
#request .form-field { display: grid; gap: 6px; }
#request .form-label, #request .form-label label, #request legend { font-weight: 700; }
#request .required, #request .form-label .required { color: var(--cerise); }
#request input[type="text"], #request input[type="email"], #request input[type="tel"], #request select, #request textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border: 2px solid var(--border); border-radius: 8px;
  background: var(--white); color: var(--oxford); font: inherit;
}
#request input:focus-visible, #request select:focus-visible, #request textarea:focus-visible { outline: var(--focus); outline-offset: 1px; border-color: var(--deep-blue); }
#request .radio, #request .checkboxes, #request .form-input-wrapper label { display: flex; align-items: flex-start; gap: 10px; }
#request input[type="radio"], #request input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cerise); flex: none; }
#request .form-extra-wrapper, #request .hint, #request .form-help, #request .form-description { color: var(--muted); font-size: .92rem; }
#request .form-errors, #request .form-field.has-errors .form-errors { color: #B00020; font-size: .92rem; }
#request .buttons button, #request .button[type="submit"], #request button[type="submit"] {
  justify-self: start; display: inline-flex; align-items: center; padding: 12px 24px; border-radius: var(--radius-pill);
  border: 2px solid var(--cerise); background: var(--cerise); color: var(--white); cursor: pointer;
  font-family: var(--font-heading); font-weight: 700; text-transform: lowercase; font-size: 1rem;
}
#request button[type="submit"]:hover { background: var(--cerise-dark); border-color: var(--cerise-dark); }
#request .notices { border-left: 4px solid var(--success); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius-card) var(--radius-card) 0; }
#request .notices.red, #request .notices.error { border-left-color: #B00020; }

/* Page content from Markdown */
.content { padding: 56px 0 64px; }
.content h2 { margin-top: 1.6em; }
.content h2:first-child { margin-top: 0; }
.content h3 { margin-top: 1.4em; color: var(--cerise); }
.content table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
.content th, .content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.content th { font-family: var(--font-heading); font-weight: 700; text-transform: lowercase; background: var(--surface); }
.content blockquote { margin: 0 0 1.1em; border-left: 4px solid var(--orange); background: var(--tint-peach); padding: 16px 24px; border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.content blockquote p:last-child { margin: 0; }

/* Call to action band */
.cta { background: var(--oxford); color: var(--white); padding: 56px 0; }
.cta h2 { color: var(--white); }
.cta p { max-width: 64ch; color: #E6E7F0; }
.cta .btn-ghost { color: var(--white); border-color: var(--white); }
.cta .btn-ghost:hover { background: var(--white); color: var(--oxford); }

/* Footer: oxford blue with the palette stripe */
.site-footer { background: var(--oxford); color: #E6E7F0; position: relative; padding: 48px 0 32px; font-size: .95rem; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--palette-stripe); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--tint-pink); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 1023px) and (min-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 799px) { .footer-grid { grid-template-columns: 1fr; } }
.wordmark { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; text-transform: lowercase; color: var(--white); margin: 0 0 8px; }
.footer-logo { height: 44px; width: auto; margin-bottom: 12px; }
.site-footer h2 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 6px; }
.footer-line { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 32px; padding-top: 20px; color: #C9CBDA; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}

/* Exactly four cards: four across on wide screens, two by two below, never three and one. */
.cards:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1099px) { .cards:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .cards:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; } }

/* FAQ topics */
.faq-toc ul { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.faq-toc a { display: inline-block; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); text-decoration: none; font-weight: 500; }
.faq-toc a:hover { border-color: var(--cerise); }
.content h3 + p { margin-top: 0; }

/* Glossary definition lists */
.content dl { margin: 0 0 1.5em; }
.content dt { font-weight: 700; margin-top: 1em; }
.content dd { margin: 4px 0 0; }

/* Comparison tables in sections, such as the pricing table: highlighted columns, sideways scroll on small screens */
.table-scroll { overflow-x: auto; margin: 0 0 1.5em; border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-sm); }
.table-scroll:focus-visible { outline: var(--focus); }
table.compare { border-collapse: collapse; width: 100%; min-width: 860px; font-size: .95rem; margin: 0; }
.compare th, .compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { font-family: var(--font-heading); font-weight: 800; text-transform: lowercase; font-size: 1.05rem; background: var(--surface); }
.compare tbody th { font-weight: 700; width: 18%; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .hl-3 { background: var(--tint-pink); }
.compare .hl-4 { background: var(--tint-blue); }
.compare thead .hl-3 { box-shadow: inset 0 4px 0 var(--cerise); }
.compare thead .hl-4 { box-shadow: inset 0 4px 0 var(--deep-blue); }
.compare strong { font-size: 1.1rem; }
