/* Medinex brochure site. Colours are named by role; the blues come from the Medinex mark. */

@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --brand: #071a3a;
  --brand-2: #0d2a59;
  --on-brand: #ffffff;
  --on-brand-muted: #c3d1e6;
  --accent: #3fb4fb;        /* on dark surfaces */
  --accent-ink: #0a55c9;    /* on light surfaces */
  --button: #0b62e4;
  --button-hover: #0953c4;
  --ink: #0d1b2e;
  --ink-soft: #40516a;
  --paper: #f3f6fb;
  --white: #ffffff;
  --line: #d6dfeb;
  --line-dark: rgba(255, 255, 255, 0.16);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 24px 60px -24px rgba(7, 26, 58, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--sans); font-size: 1.125rem; line-height: 1.6; color: var(--ink); background: var(--white); }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-ink); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }
.narrow { max-width: 820px; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: 0.75rem 1rem; background: var(--white); color: var(--ink); border-radius: 8px; }
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(7, 26, 58, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); }
.top-in { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: 0.01em; color: var(--on-brand); text-decoration: none; }
.logo img { width: 34px; }
.nav { display: none; margin-left: auto; gap: 0.25rem; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem; font-size: 1rem; color: var(--on-brand-muted); text-decoration: none; border-radius: 8px; }
.nav a[aria-current] { color: var(--on-brand); background: rgba(255, 255, 255, 0.1); }
.top .btn-cta { display: none; }

/* Phones and tablets: a Menu button that opens the links under the header. Works without JavaScript. */
.menu { margin-left: auto; }
.menu summary { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0 1.1rem; font-size: 1rem; font-weight: 600; color: var(--on-brand); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
.menu[open] summary::before { display: none; }
.menu .m-close, .menu[open] .m-open { display: none; }
.menu[open] .m-close { display: inline; }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--brand); border-bottom: 1px solid var(--line-dark); box-shadow: 0 30px 40px -24px rgba(3, 10, 28, 0.6); }
.menu-panel .wrap { display: grid; padding-block: 0.25rem 1.5rem; }
.menu-panel a:not(.btn) { display: flex; align-items: center; min-height: 54px; font-size: 1.125rem; color: var(--on-brand); text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.menu-panel a[aria-current] { color: var(--accent); }
.menu-panel .btn { margin-top: 1.25rem; }
.top :focus-visible, .band-dark :focus-visible, .hero :focus-visible, .foot :focus-visible { outline-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.5rem; font: 600 1.0625rem/1.2 var(--sans); text-decoration: none; border: 1px solid transparent; border-radius: 999px; cursor: pointer; transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--button); color: var(--white); }
.btn-ghost { color: var(--on-brand); border-color: rgba(255, 255, 255, 0.4); }
.btn-small { min-height: 44px; padding: 0 1.1rem; font-size: 1rem; white-space: nowrap; }
.btn-outline { color: var(--accent-ink); border-color: var(--accent-ink); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1100px 520px at 85% 0%, #123a7c 0%, rgba(18, 58, 124, 0) 62%), var(--brand); color: var(--on-brand); }
.hero-in { display: grid; gap: 3rem; padding-block: 3.5rem 4rem; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
.lead { margin-top: 1.4rem; max-width: 34em; font-size: clamp(1.125rem, 2.2vw, 1.3rem); color: var(--on-brand-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* The picture beside the headline: a drawing of a consultant's site, not a real one. */
.mock { width: 100%; max-width: 470px; justify-self: center; background: var(--white); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; font-size: 0.9rem; line-height: 1.35; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #e9eef6; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #b9c5d6; }
.mock-bar span { margin-left: 10px; padding: 3px 12px; font-size: 0.78rem; color: var(--ink-soft); background: var(--white); border-radius: 999px; }
.mock-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.4rem 1.5rem; background: #12305f; color: var(--white); }
.mock-name { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; line-height: 1.1; }
.mock-role { margin-top: 0.3rem; color: #c3d1e6; }
.mock-btn { display: inline-block; margin-top: 0.9rem; padding: 0.45rem 0.9rem; font-size: 0.8rem; font-weight: 600; color: #12305f; background: var(--white); border-radius: 999px; }
.mock-portrait { flex: none; width: 88px; }
.mock-body { padding: 1.1rem 1.4rem 1.3rem; }
.mock-h { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.mock-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); }
.mock-row:first-of-type { margin-top: 0.6rem; }
.mock-row b { font-weight: 400; color: var(--accent-ink); }

/* ---------- Sections ---------- */
.band { padding-block: 4rem; }
.band-paper { background: var(--paper); }
.band-dark { background: var(--brand); color: var(--on-brand); }
.head { max-width: 44rem; margin-bottom: 2.5rem; }
h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5.5vw, 3rem); line-height: 1.1; letter-spacing: -0.005em; text-wrap: balance; }
.head p { margin-top: 1rem; color: var(--ink-soft); }
h3 { font-family: var(--sans); font-size: 1.125rem; font-weight: 700; line-height: 1.3; }

/* What's included: an index under hairlines, not boxed cards. */
.index { display: grid; gap: 0 3rem; }
.index li { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.index p, .points p, .steps p { margin-top: 0.4rem; color: var(--ink-soft); }

.points { display: grid; gap: 2rem 3rem; }
.points > div { padding-top: 1.2rem; border-top: 2px solid var(--accent-ink); }

/* How it works: numbered discs joined by a line. */
.steps { counter-reset: step; display: grid; }
.steps li { counter-increment: step; position: relative; padding: 0 0 2.2rem 4.25rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; font-weight: 700; color: var(--white); background: var(--brand); border-radius: 50%; }
.steps li::after { content: ""; position: absolute; left: calc(1.375rem - 1px); top: 2.75rem; bottom: 0; width: 2px; background: var(--accent-ink); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { padding-top: 0.55rem; }

/* Questions */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 0.75rem 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px; border-right: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(45deg); transition: transform 160ms ease; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 2.5rem 1.4rem 0; color: var(--ink-soft); }

/* ---------- Enquiry ---------- */
.enquire { display: grid; gap: 2.5rem; }
.enquire-text p { margin-top: 1rem; max-width: 30em; color: var(--on-brand-muted); }
.contact { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dark); }
.contact dt { font-size: 1rem; color: var(--on-brand-muted); }
.contact dd { margin-top: 0.2rem; font-size: clamp(0.94rem, 4.7vw, 1.35rem); font-weight: 600; overflow-wrap: anywhere; }
.band-dark a { color: var(--on-brand); }

.form, .form-done { padding: 1.5rem; background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.form { display: grid; gap: 1.1rem; }
.row { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
label { font-size: 1rem; font-weight: 600; }
.opt { font-weight: 400; color: var(--ink-soft); }
input, textarea, select { width: 100%; min-height: 50px; padding: 0.7rem 0.85rem; font: inherit; color: var(--ink); background: var(--white); border: 1px solid #8997ab; border-radius: 8px; }
textarea { resize: vertical; }
.hint { font-size: 1rem; color: var(--ink-soft); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 1px; border-color: var(--accent-ink); }
[aria-invalid="true"] { border-color: #b3261e; }
.field-error { font-size: 1rem; color: #b3261e; }
.form-error { padding: 0.8rem 1rem; color: #7a1a14; background: #fdecea; border-radius: 8px; }
.small { font-size: 1rem; color: var(--ink-soft); }
.form a, .form-done a { color: var(--accent-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done h3 { font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.form-done p { margin-top: 0.5rem; color: var(--ink-soft); }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.foot { padding-block: 2.5rem; background: #05132b; color: var(--on-brand-muted); font-size: 1rem; border-top: 1px solid var(--line-dark); }
.foot-in { display: grid; gap: 1.25rem; }
.foot-brand { display: grid; gap: 0.5rem; }
.foot a { color: var(--on-brand); }
.foot p { overflow-wrap: anywhere; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-nav a[aria-current] { color: var(--accent); }
.foot-small { grid-column: 1 / -1; }

/* ---------- Home: the preview strip ---------- */
.strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.strip-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 2rem; padding-block: 1rem; }
.arrow-link { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; font-weight: 700; color: var(--accent-ink); text-decoration: none; }

/* ---------- Inner page heroes ---------- */
.hero-page h1 { font-size: clamp(2.4rem, 7vw, 3.9rem); }
.hero-page-in { max-width: 52rem; padding-block: 3rem 3.75rem; }
.hero-fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.9rem; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dark); }
.hero-fact strong { font-family: var(--serif); font-size: 3rem; font-weight: 500; line-height: 1; }
.hero-fact span { color: var(--on-brand-muted); }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 3rem; }
.plan { display: flex; flex-direction: column; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.plan-feature { border-top-color: var(--accent-ink); }
h2.plan-name { font-family: var(--sans); font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.price { margin: 0.75rem 0 1rem; font-family: var(--serif); font-size: 3.2rem; line-height: 1; }
.price small { margin-right: 0.4rem; font-family: var(--sans); font-size: 1rem; color: var(--ink-soft); }
.price-text { font-size: 2.2rem; }
.plan > p:not(.price) { color: var(--ink-soft); }
.ticks { margin: 1.2rem 0 1.8rem; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li + li { margin-top: 0.5rem; }
.ticks li::before { content: ""; position: absolute; left: 0.2rem; top: 0.5em; width: 0.6rem; height: 0.32rem; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; align-self: flex-start; }

/* ---------- SEO ---------- */
.prose-cols { display: grid; gap: 2rem 3rem; }
.prose-cols > div { padding-top: 1.2rem; border-top: 2px solid var(--accent-ink); }
.prose-cols p { margin-top: 0.5rem; color: var(--ink-soft); }

/* The AI assistant drawing: a generic chat window, not any real product. site.js rotates the specialty. */
.chat { width: 100%; max-width: 470px; margin: 0; justify-self: center; }
.chat-window { overflow: hidden; color: var(--ink); background: var(--white); border-radius: 16px; box-shadow: var(--shadow); font-size: 0.95rem; line-height: 1.45; }
.chat-top { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.1rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.spark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #5ad8fd, #0a6af2); }
.spark svg { width: 16px; }
.chat-body { display: grid; gap: 1.1rem; padding: 1.2rem 1.1rem 1.3rem; }
.stack { display: grid; }
.stack > * { grid-area: 1 / 1; }
.ghost { visibility: hidden; }
.msg-user { justify-self: end; max-width: 88%; padding: 0.65rem 0.95rem; background: #e9eef6; border-radius: 18px 18px 4px 18px; }
.spec { font-weight: 700; color: var(--accent-ink); }
.typing .spec::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -0.18em; background: currentColor; animation: caret 0.9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.msg-ai { display: flex; gap: 0.7rem; align-items: flex-start; }
.msg-ai .spark { width: 26px; height: 26px; }
.msg-ai .spark svg { width: 14px; }
.ai-text { position: relative; flex: 1; min-width: 0; padding-top: 0.1rem; }
.dots { position: absolute; left: 0; top: 0.55rem; display: flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #8997ab; animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.answer { transition: opacity 250ms ease; }
.answer.is-hidden { opacity: 0; }
.pick { display: grid; gap: 0.1rem; margin-top: 0.7rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 12px; }
.pick strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.pick .role { color: var(--ink-soft); }
.pick .url { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.3rem; font-weight: 600; color: var(--accent-ink); }
.chat-input { display: flex; align-items: center; justify-content: space-between; margin: 0 1.1rem 1.1rem; padding: 0.4rem 0.4rem 0.4rem 1rem; color: #66758c; border: 1px solid var(--line); border-radius: 999px; }
.chat-input i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); }
.chat-input i::after { content: ""; width: 8px; height: 8px; margin-top: 4px; border-left: 2px solid #fff; border-top: 2px solid #fff; transform: rotate(45deg); }
.chat-cap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: 1rem; color: var(--on-brand-muted); }
.chat-pause { flex: none; min-height: 44px; padding: 0 1.1rem; font: 600 1rem var(--sans); color: var(--on-brand); background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; cursor: pointer; }

/* ---------- Text pages (privacy, thank you, not found) ---------- */
.page { padding-block: 3.5rem 4.5rem; }
.page h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 7vw, 3.4rem); line-height: 1.08; }
.page h2 { margin-top: 2.4rem; padding-top: 1.2rem; font-size: 1.6rem; border-top: 2px solid var(--accent-ink); }
.page p, .page ul { margin-top: 1rem; max-width: 42em; }
.page ul { padding-left: 1.2rem; list-style: disc; }
.page li + li { margin-top: 0.4rem; }
.page .btn { margin-top: 2rem; }

/* ---------- Wider screens ---------- */
@media (min-width: 700px) {
  .row { grid-template-columns: 1fr 1fr; }
  .index { grid-template-columns: 1fr 1fr; }
  .points { grid-template-columns: 1fr 1fr; }
  .form, .form-done { padding: 2rem; }
  .foot-in { grid-template-columns: 1fr auto; align-items: start; gap: 1rem 3rem; }
  .points-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .band { padding-block: 6rem; }
  .hero-page-in { padding-block: 4.5rem 5rem; }
  .hero-page .hero-in { padding-block: 4.5rem 5.5rem; }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .prose-cols { grid-template-columns: 1fr 1fr; }
  .chat { justify-self: end; }
  .hero-in { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 4rem; padding-block: 5.5rem 6.5rem; }
  .mock { justify-self: end; }
  .index { grid-template-columns: repeat(3, 1fr); }
  .points { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .steps li { padding: 4rem 0 0; }
  .steps li::after { left: 2.75rem; right: -2rem; top: calc(1.375rem - 1px); bottom: auto; width: auto; height: 2px; }
  .steps h3 { padding-top: 0; }
  .enquire { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; align-items: start; }
  .enquire-text { position: sticky; top: 110px; }
}

@media (min-width: 1000px) {
  .nav { display: flex; }
  .top .btn-cta { display: inline-flex; }
  .menu { display: none; }
}

@media (hover: hover) {
  .btn-outline:hover { background: #eaf1fd; }
  .arrow-link:hover { text-decoration: underline; }
  .btn-primary:hover { background: var(--button-hover); }
  .btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
  .nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq summary::after, .answer { transition: none; }
  .dots i, .typing .spec::after { animation: none; }
}
