/* Cambridge Internet Solutions — static theme.
   Ported 1:1 from the original WordPress theme (tokens, type, components),
   with WordPress-specific rules removed and a few new components added at the end.
   Fonts are self-hosted (SIL Open Font Licence, see fonts/): no third-party requests. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/newsreader-latin-opsz-normal.woff2) format('woff2-variations'), url(fonts/newsreader-latin-opsz-normal.woff2) format('woff2'); }
:root {
  --brand: #113f67; --brand-deep: #0d3152; --ink: #13283a; --accent: #2f7bc0;
  --bg: #f6f8fb; --surface: #ffffff; --muted: #5b6b7a; --border: #dde4ec;
  --shadow: 0 1px 2px rgba(17,63,103,.04), 0 12px 32px rgba(17,63,103,.07);
  --font-display: 'Newsreader', 'Iowan Old Style', Charter, Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'IBM Plex Mono', Menlo, monospace;
  --wrap: 1160px; --gut: clamp(20px, 5vw, 56px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body { font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid rgba(47,123,192,.45); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-top: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.eyebrow--light { color: #9ec3e6; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; color: var(--brand); }
h1 { font-size: clamp(38px, 6vw, 66px); letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.2; }
p { text-wrap: pretty; }
.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink); max-width: 56ch; line-height: 1.5; }
.measure { max-width: 64ch; }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; letter-spacing: .01em; padding: 14px 24px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background .18s, color .18s, border-color .18s, transform .12s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--brand); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--brand); }
.btn--onnavy { background: #fff; color: var(--brand); }
.btn--onnavy:hover { background: #eaf2fb; }
.btn--lineonnavy { background: transparent; color: #fff; border-color: rgba(255,255,255,.34); }
.btn--lineonnavy:hover { border-color: #fff; }
.btn svg { width: 17px; height: 17px; }

.logo { display: inline-flex; align-items: center; gap: 13px; color: var(--brand); }
.logo__mark { width: 38px; height: 38px; flex: 0 0 auto; }
.logo__name { font-family: var(--font-display); font-weight: 500; line-height: 1.02; letter-spacing: -.005em; font-size: 18px; color: inherit; }
.logo__name small { display: block; font-size: .68em; letter-spacing: .02em; color: inherit; opacity: .82; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246,248,251,.86); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__links { display: flex; align-items: center; gap: 10px; }
.nav__menu { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--ink); padding: 9px 14px; border-radius: 7px; transition: background .15s, color .15s; }
.nav__menu a:hover { background: #fff; color: var(--brand); }
.nav__menu a[aria-current="page"] { color: var(--brand); }
.nav__menu a[aria-current="page"]::after { content: ""; display: block; height: 2px; border-radius: 2px; background: var(--accent); margin-top: 4px; }
.nav__links .nav__cta { margin-left: 4px; color: #fff; padding: 11px 14px; }
.nav__toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--brand); margin-inline: auto; position: relative; transition: .2s; }
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }

.hero { position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .lead { margin-block: 22px 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__panel { background: var(--brand); border-radius: 16px; padding: 38px 36px; color: #fff; box-shadow: var(--shadow); position: relative; }
.hero__panel h3 { color: #fff; }
.journey { display: grid; gap: 0; margin-top: 22px; }
.journey__step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding-block: 14px; position: relative; }
.journey__step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: -10px; width: 0; border-left: 2px dotted rgba(255,255,255,.4); }
.journey__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.journey__icon svg { width: 20px; height: 20px; }
.journey__step b { display: block; font-weight: 600; font-size: 15.5px; }
.journey__step span { font-size: 14px; color: #bcd3ea; }

.pagehead { background: var(--brand); color: #fff; }
.pagehead h1 { color: #fff; }
.pagehead .lead { color: #cfe0f1; margin-top: 18px; }
.pagehead .crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8fb6dc; margin-bottom: 16px; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; transition: border-color .18s, box-shadow .18s, transform .18s; display: flex; flex-direction: column; }
.card--link:hover { border-color: #c2d3e6; box-shadow: var(--shadow); transform: translateY(-2px); }
.card__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--accent); }
.card h3 { margin-block: 14px 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card__tag { display: inline-block; margin-top: auto; padding-top: 16px; font-size: 13px; font-weight: 600; color: var(--brand); }
.card__tag svg { width: 14px; height: 14px; display: inline; vertical-align: -2px; margin-left: 4px; }

.feature-list { list-style: none; display: grid; gap: 14px; }
.feature-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--ink); font-size: 16px; }
.feature-list svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.panel-navy .feature-list li { color: #e3eef9; }
.panel-navy .feature-list svg { color: #9ec3e6; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split > div > .lead { margin-block: 22px 30px; }
.panel-navy { background: var(--brand); color: #fff; border-radius: 16px; padding: clamp(30px, 4vw, 52px); }
.panel-navy h2, .panel-navy h3 { color: #fff; }
.panel-navy p { color: #cfe0f1; }

.rail { display: grid; gap: 0; }
.rail__item { display: grid; grid-template-columns: 64px 1fr; gap: 28px; padding-block: 34px; border-top: 1px solid var(--border); }
.rail__item:last-child { border-bottom: 1px solid var(--border); }
.rail__badge { width: 56px; height: 56px; border-radius: 12px; background: #eaf2fb; color: var(--brand); display: grid; place-items: center; }
.rail__badge svg { width: 26px; height: 26px; }
.rail__item h3 { margin: 6px 0 8px; }
.rail__item p { color: var(--muted); max-width: 60ch; }
.rail__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.rail__body { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 18px 40px; align-items: start; }
.rail__body .feature-list li { font-size: 15.5px; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.facts > div { background: var(--surface); padding: 28px; }
.facts dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts dd { font-family: var(--font-display); font-size: clamp(19px, 2.2vw, 23px); color: var(--brand); line-height: 1.2; }

.cta-band { background: var(--brand); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; max-width: 18ch; margin-inline: auto; }
.cta-band p { color: #cfe0f1; max-width: 52ch; margin: 16px auto 30px; }

/* Forms */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; border: 0; }
.field label, .field legend { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,123,192,.15); }
.field--row { grid-template-columns: 1fr 1fr; gap: 18px; display: grid; }
.field .error { font-size: 12.5px; color: #c0392b; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0392b; }
.field.invalid .error { display: block; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 18px; margin-top: 4px; }
.checks label { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 15px; min-height: 40px; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -5000px; }
.form__note { font-size: 13px; color: var(--muted); }
.form__status { display: none; padding: 16px 18px; border-radius: 10px; font-size: 15px; }
.form__status.ok { display: block; background: #eaf6ee; border: 1px solid #bfe3cb; color: #1d6b3a; }
.form__status.info { display: block; background: #eef4fb; border: 1px dashed #c2d3e6; color: var(--brand); }
.form__status.err { display: block; background: #fdeeee; border: 1px solid #f1c4c0; color: #8f2a20; }
.contact-aside { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; }
.contact-aside dl { display: grid; gap: 22px; }
.contact-aside dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.contact-aside dd { color: var(--ink); font-size: 16px; }
.contact-aside dd a { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.9fr); gap: clamp(32px, 5vw, 64px); align-items: start; }

/* Footer */
.site-footer { background: var(--brand-deep); color: #cdddec; }
.site-footer .wrap { padding-block: 56px 30px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #8fb6dc; margin-bottom: 16px; font-weight: 500; }
.site-footer ul { list-style: none; }
.site-footer a { color: #cdddec; font-size: 15px; display: inline-block; padding-block: 5px; }
.site-footer a:hover { color: #fff; }
.site-footer .logo { color: #fff; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-footer p { font-size: 14.5px; color: #9fbcd6; max-width: 38ch; margin-top: 14px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #8fb6dc; }

/* New components */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.section-head h2 { max-width: 22ch; }
.section-head p { max-width: 44ch; color: var(--muted); }
.card--start { background: var(--brand); border-color: var(--brand); color: #fff; }
.card--start h3 { color: #fff; }
.card--start p { color: #cfe0f1; }
.card--start .card__num { color: #9ec3e6; }
.card--start .card__tag { color: #fff; }
.card--start:hover { border-color: var(--brand); }
.card--start .feature-list li { color: #e3eef9; }
.card--start .feature-list svg { color: #9ec3e6; }
.card--start .pill { background: rgba(255,255,255,.14); color: #fff; }
.pill { display: inline-block; align-self: flex-start; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); background: #eaf2fb; border-radius: 999px; padding: 5px 11px; }
.app-tile { aspect-ratio: 16 / 10; border-radius: 10px; background: linear-gradient(160deg, #eaf2fb, #f6f8fb); border: 1px dashed #c2d3e6; display: grid; place-items: center; color: var(--accent); margin-bottom: 18px; }
.app-tile svg { width: 56px; height: 56px; }
.prices { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.prices .card h3 { margin-top: 10px; }
.prices .card .feature-list { margin-top: 18px; }
.prices .card .feature-list li { font-size: 15px; }

/* Apps: Med Stock Reminder */
.app-title { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 60px; height: 60px; border-radius: 14px; background: #1c3a5e; display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }
.app-icon svg { width: 36px; height: 36px; }
.store-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.phone { justify-self: center; width: min(100%, 320px); margin: 0; }
.phone__screen { background: #1c3a5e; border: 10px solid #0d2238; border-radius: 38px; padding: 26px 16px 20px; box-shadow: 0 30px 60px rgba(13,49,82,.25); display: grid; gap: 10px; }
.phone__bar { display: flex; justify-content: space-between; color: #fff; font-weight: 600; font-size: 15px; padding: 0 4px 6px; }
.phone__bar span:last-child { background: rgba(255,255,255,.14); border-radius: 999px; padding: 0 10px; font-size: 13px; }
.phone__row { background: #fff; border-radius: 12px; padding: 13px 14px; display: grid; gap: 7px; }
.phone__row b { font-size: 14.5px; color: var(--ink); }
.phone__row small { font-size: 13px; color: var(--muted); }
.phone__meter { height: 6px; border-radius: 6px; background: #e6edf4; overflow: hidden; }
.phone__meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.phone__row--low { box-shadow: inset 4px 0 0 #e0563f; }
.phone__row--low .phone__meter i { background: #e0563f; }
.phone__row--low small { color: #b23a26; }
.phone__btn { margin-top: 6px; background: #f4c542; color: #1c3a5e; font-weight: 600; text-align: center; border-radius: 10px; padding: 11px; font-size: 14.5px; }
.phone figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink); margin-bottom: 12px; }
.prose ul { padding-left: 1.3em; margin-bottom: 12px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.mt-36 { margin-bottom: 36px; }

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 920px) {
  .hero__grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .grid--3, .prices { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .rail__body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__links { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px var(--gut) 18px; box-shadow: var(--shadow); display: none; }
  .nav__links.open { display: flex; }
  .nav__menu { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav__links a { padding: 13px 12px; }
  .nav__menu a[aria-current="page"]::after { display: none; }
  .nav__links .nav__cta { margin: 6px 0 0; justify-content: center; }
  .nav__toggle { display: grid; place-items: center; }
  .grid--2, .grid--3, .facts, .field--row, .prices, .checks { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 30px; }
  .rail__item { grid-template-columns: 1fr; gap: 14px; }
  .hero__panel { padding: 30px 24px; }
}
