/*
  Riva Health remote working landing page sketch (UK health practitioners).
  Riva has no logo or palette yet, so this uses a text wordmark and the
  Abihealth tokens (Riva is part of Abihealth): white and blue, Raleway
  headings, Hind body, #E3E9F2 borders. No gradients, no shadows, no pills.
*/
/* Self-hosted fonts (SIL Open Font License), so no visitor data goes to Google */
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/raleway-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/raleway-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Hind"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/hind-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hind"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/hind-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Hind"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/hind-latin-700-normal.woff2") format("woff2"); }

:root {
  --blue: #223d8b;
  --blue-hover: #1a2f6d;
  --brand: #2377bd;
  --brand-tint: #eef4fb;
  --ink: #161c2d;
  --muted: #5a6b85;
  --line: #e3e9f2;
  --line-strong: #c5d0e0;
  --white: #ffffff;
  --soft: #f7f9fc;
  --radius: 6px;
  --head: "Raleway", Arial, Helvetica, sans-serif;
  --body: "Hind", Arial, Helvetica, sans-serif;
  --focus: 0 0 0 3px var(--white), 0 0 0 5px var(--brand);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--white); color: var(--ink); font: 17px/1.6 var(--body); font-variant-numeric: lining-nums; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); }

h1, h2, h3 { font-family: var(--head); font-weight: 600; color: var(--blue); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.5em; font-variant-numeric: lining-nums; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.label { font-family: var(--head); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin: 0 0 0.8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; background: var(--blue); color: var(--white); padding: 10px 16px; border-radius: var(--radius); z-index: 20; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius); font: 600 1rem var(--head); text-decoration: none; border: 1px solid var(--blue); cursor: pointer; transition: background 0.15s; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-secondary { background: var(--white); color: var(--blue); }
.btn-secondary:hover { background: var(--brand-tint); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: var(--white); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.wordmark { font: 700 1.55rem/1 var(--head); letter-spacing: 0.06em; color: var(--blue); text-decoration: none; margin: 0; white-space: nowrap; }
.wordmark span { font-weight: 600; letter-spacing: 0; color: var(--brand); }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--brand); }
.head-cta { min-height: 42px; padding: 0 18px; white-space: nowrap; }
@media (max-width: 900px) { .site-nav { display: none; } }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 4; background: var(--soft); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.hero-media img.on { opacity: 1; }
.slide-pause { position: absolute; right: 12px; bottom: 12px; min-height: 40px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--white); background: rgba(22, 28, 45, 0.7); color: var(--white); font: 600 0.9rem var(--head); cursor: pointer; }
.stock-tag { position: absolute; left: 12px; bottom: 12px; font-size: 0.75rem; color: var(--white); background: rgba(22, 28, 45, 0.7); padding: 2px 8px; border-radius: 4px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.hero-points li { padding-left: 28px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } .hero { padding-top: 40px; } }

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section.soft { background: var(--soft); }
.section-head { max-width: 46em; margin-bottom: 44px; }

/* Problem */
.problem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.problem div { border-top: 2px solid var(--brand); padding-top: 18px; }
@media (max-width: 800px) { .problem { grid-template-columns: 1fr; } }

/* Flow diagram */
.flow { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 32px 24px; }
.flow svg { width: 100%; height: auto; display: block; }
.flow .node { fill: var(--white); stroke: var(--line-strong); stroke-width: 1.5; }
.flow .node-main { fill: var(--brand-tint); stroke: var(--brand); }
.flow .t1 { font: 600 15px var(--head); fill: var(--blue); }
.flow .t2 { font: 400 13px var(--body); fill: var(--muted); }
.flow .wire { stroke: var(--brand); stroke-width: 2; fill: none; }
.flow .tunnel { stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.flow-mobile { display: none; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.flow-mobile li { counter-increment: s; padding: 14px 0 14px 48px; position: relative; border-bottom: 1px solid var(--line); }
.flow-mobile li:last-child { border-bottom: 0; }
.flow-mobile li::before { content: counter(s); position: absolute; left: 0; top: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--brand); color: var(--blue); font: 700 0.95rem/29px var(--head); text-align: center; }
.flow-mobile strong { display: block; font-family: var(--head); color: var(--blue); }
@media (max-width: 760px) { .flow svg { display: none; } .flow-mobile { display: block; } .flow { padding: 8px 20px; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; list-style: none; padding: 0; counter-reset: st; }
.steps li { counter-increment: st; }
.steps li::before { content: "Step " counter(st); display: block; font: 700 0.78rem var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Included */
.included { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.included > div { background: var(--white); padding: 28px; }
.included ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.included li { margin-bottom: 4px; }
@media (max-width: 900px) { .included { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .included { grid-template-columns: 1fr; } }

/* Audience cards: sliding row */
.row-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.row-head .section-head { margin-bottom: 0; }
.row-ctrl { display: flex; gap: 8px; }
.row-ctrl button { width: 48px; height: 48px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--white); color: var(--blue); font-size: 1.2rem; cursor: pointer; }
.row-ctrl button:hover { background: var(--brand-tint); }
.cards { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.cards::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.card-img { aspect-ratio: 3 / 2; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 22px 24px 26px; }
.card-body p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .cards { grid-auto-columns: 70%; } }
@media (max-width: 560px) { .cards { grid-auto-columns: 86%; } .row-ctrl { display: none; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 28px 24px; display: flex; flex-direction: column; }
.plan-best { border: 2px solid var(--blue); }
.plan-flag { font: 700 0.78rem var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin: 0 0 8px; }
.plan h3 { margin-bottom: 14px; }
.price { font: 600 2.4rem/1 var(--head); color: var(--blue); letter-spacing: -0.02em; margin: 0 0 6px; font-variant-numeric: lining-nums; }
.per { color: var(--muted); margin: 0 0 18px; }
.price-notes { margin: 28px 0 0; padding-left: 1.1em; color: var(--muted); max-width: 46em; }
.price-notes li { margin-bottom: 4px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .plans { grid-template-columns: 1fr; } }

/* Security */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 600 1rem var(--head); color: var(--blue); }
.facts dd { margin: 0; color: var(--muted); }
.note { background: var(--brand-tint); border-left: 3px solid var(--brand); padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0; }
.note p:last-child { margin: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* FAQs */
.faqs { max-width: 50em; border-top: 1px solid var(--line); }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 600 1.05rem var(--head); color: var(--blue); }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: "+"; position: absolute; right: 8px; top: 16px; font: 400 1.6rem var(--body); color: var(--brand); }
.faqs details[open] summary::after { content: "\2212"; }
.faqs details p { color: var(--muted); padding-right: 40px; }

/* Contact form */
.form { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--white); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; }
.field .hint { font-size: 0.9rem; color: var(--muted); margin: -4px 0 2px; }
.field input, .field select, .field textarea { font: inherit; padding: 10px 12px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.choices label { font-weight: 400; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.choices input { width: 20px; height: 20px; min-height: 0; accent-color: var(--blue); }
.form .btn { margin-top: 24px; }
.form-done { display: none; }
.book .btn { margin-top: 8px; }
.book .privacy { margin-top: 18px; }
.form.sent .fields, .form.sent .btn, .form.sent .privacy { display: none; }
.form.sent .form-done { display: block; }
.privacy { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } .form { padding: 22px; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0; font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; }
.site-foot .wordmark { font-size: 1.25rem; }
.contact-line { margin-top: -0.4em; }
.site-foot p { margin: 0 0 0.6em; }
@media (max-width: 700px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* Gentle fade-in */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { transition: none; }
  .card-img img { transition: none; }
  .card:hover .card-img img { transform: none; }
}
.steps.steps-stack { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }

/* Raleway defaults to old-style figures; the font shorthand resets this, so restate it */
.btn, .slide-pause, .flow .t1, .steps li::before, .flow-mobile li::before, .faqs summary, .facts dt { font-variant-numeric: lining-nums; }

/* Enquiry form */
[hidden] { display: none !important; }
#enquiry h3, #enquiry-done h3 { margin-bottom: 18px; }
.form-error { border-left: 3px solid #b3261e; background: #fbeeed; color: #161c2d; padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 18px; }
.form-error ul { margin: 6px 0 0; padding-left: 1.1em; }
.form-error a { color: #8c1d18; }
.field [aria-invalid="true"], fieldset.invalid .choices { outline: 2px solid #b3261e; outline-offset: 2px; border-radius: var(--radius); }
.checks { gap: 10px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checks input { width: 20px; height: 20px; min-height: 0; margin-top: 3px; flex: none; accent-color: var(--blue); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#enquiry .btn[disabled] { opacity: 0.6; cursor: progress; }
#enquiry > .hint { margin-top: 16px; }

/* Get set up: heading, then the form, then the steps on phones; form beside both on desktop */
.contact-grid { grid-template-areas: "head form" "steps form"; grid-template-rows: auto 1fr; row-gap: 8px; }
.contact-head { grid-area: head; }
.contact-steps { grid-area: steps; }
.get-started { grid-area: form; }
.steps-title { margin: 8px 0 0; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; grid-template-areas: "head" "form" "steps"; grid-template-rows: none; row-gap: 32px; }
}
