/* ==========================================================================
   Allied Radiology Solutions (ARX): Optimising Diagnostics
   Palette from the brand hero image: deep navy, electric blue, cyan glow,
   red vertebrae, coral slogan. Editorial serif (Cormorant) + Montserrat caps.
   ========================================================================== */
:root {
  --navy-950: #010A16;
  --navy-900: #020D1C;
  --navy-800: #04254A;
  --navy-700: #08396A;
  --blue: #1D7FD0;
  --glow: #3DDDFE;
  --red: #DC214A;
  --coral: #E05A63;
  --ink: #0A1C35;
  --muted: #5A6A80;
  --line: #E4EAF2;
  --bg: #FFFFFF;
  --bg-soft: #F6F8FB;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --caps: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .15, 1);
  --wrap: 1240px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
a { color: inherit; }
strong { font-weight: 600; }
::selection { background: var(--navy-800); color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 48px; } }
.narrow { max-width: 1000px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; color: var(--ink); padding: 10px 14px; z-index: 50; }

/* ---------- Shared type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font: 600 .72rem/1 var(--caps); letter-spacing: .28em; text-transform: uppercase;
  color: var(--red); margin: 0 0 26px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow.on-dark { color: var(--coral); }
.display {
  font: 500 clamp(2.3rem, 4.6vw, 3.9rem)/1.06 var(--serif);
  color: var(--navy-800); letter-spacing: -.01em; margin-bottom: 22px;
}
.display em, .manifesto-text em, .pillar h3 em, .contact-title em { font-style: italic; color: var(--coral); }
.display.on-dark { color: #fff; }
.muted { color: var(--muted); }
.small { font-size: .9rem; color: var(--muted); }
.section-head { max-width: 760px; margin-bottom: 64px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .5s var(--ease), box-shadow .5s var(--ease), height .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(10, 28, 53, .07); height: 66px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.brand { position: relative; display: block; height: 54px; width: 162px; }
.brand img { position: absolute; inset: 0; height: 100%; width: auto; transition: opacity .4s var(--ease); }
.brand .logo-on-light { opacity: 0; }
.scrolled .brand .logo-on-light { opacity: 1; }
.scrolled .brand .logo-on-dark { opacity: 0; }
.nav { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative; text-decoration: none; color: rgba(255, 255, 255, .86);
  font: 500 .74rem/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; transition: color .3s;
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a:hover { color: #fff; }
.nav-cta { padding: 12px 20px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; transition: background .3s, color .3s, border-color .3s; }
.nav-cta:hover { background: #fff; color: var(--navy-900) !important; border-color: #fff; }
.scrolled .nav a { color: var(--navy-800); }
.scrolled .nav-cta { background: var(--navy-800); border-color: var(--navy-800); color: #fff !important; }
.scrolled .nav-cta:hover { background: var(--navy-900); }
@media (max-width: 720px) {
  .nav-hide-sm { display: none; }
  .nav { gap: 18px; }
  .nav a { letter-spacing: .14em; font-size: .68rem; }
  .nav-cta { padding: 10px 14px; }
  .brand { width: 132px; height: 44px; }
}
.nav a { white-space: nowrap; }
@media (max-width: 400px) { .nav { gap: 14px; } .nav a { letter-spacing: .1em; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--navy-900); color: #C8D8EC;
  min-height: max(660px, 100svh); display: flex; align-items: center;
}
.hero-media-wrap { position: absolute; inset: 0; }
.hero-media {
  width: 100%; height: 100%; object-fit: cover; object-position: left center;
  transform: scale(1.08); animation: heroZoom 2.8s var(--ease) .05s forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 38%, rgba(2, 13, 28, .35) 62%, rgba(2, 13, 28, .55)),
    linear-gradient(180deg, rgba(2, 13, 28, .55) 0%, transparent 18%, transparent 80%, rgba(2, 13, 28, .7) 100%);
}
.hero-inner { position: relative; width: 100%; max-width: none; display: flex; justify-content: flex-end; padding-top: var(--header-h); padding-bottom: 60px; }
@media (min-width: 768px) { .hero-inner { padding-right: clamp(48px, 7vw, 140px); } }
.hero-copy { width: min(580px, 42%); text-align: center; }
.hero-kicker { font: 500 .7rem/1 var(--caps); letter-spacing: .32em; text-transform: uppercase; color: var(--glow); margin-bottom: 34px; opacity: .9; }
.hero-title {
  font: 500 clamp(2rem, 4.1vw, 3.9rem)/1.14 var(--caps); color: #fff;
  letter-spacing: .2em; text-transform: uppercase; margin-right: -.2em; /* balances trailing tracking */
}
.hero-rule { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 30px auto 22px; width: min(320px, 80%); }
.hero-rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5)); }
.hero-rule span:last-child { background: linear-gradient(90deg, rgba(255, 255, 255, .5), transparent); }
.hero-rule i { width: 7px; height: 7px; background: var(--red); transform: rotate(45deg); box-shadow: 0 0 14px rgba(220, 33, 74, .9); }
.hero-slogan { font: italic 500 clamp(1.7rem, 2.7vw, 2.5rem)/1.1 var(--serif); color: var(--coral); letter-spacing: .01em; margin-bottom: 26px; }
.lead { font-size: 1.02rem; color: #AFC4DD; max-width: 440px; margin: 0 auto; font-weight: 300; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 40px; }

/* Intro animation (hero) */
.intro { opacity: 0; transform: translateY(22px); animation: rise 1.2s var(--ease) var(--d, 0s) forwards; }
.hero-title.intro { transform: none; letter-spacing: .34em; filter: blur(6px); animation: titleIn 1.8s var(--ease) var(--d) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes titleIn { to { opacity: 1; letter-spacing: .2em; filter: blur(0); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none;
  font: 500 .62rem/1 var(--caps); letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .55);
  opacity: 0; animation: rise 1s var(--ease) 1.6s forwards;
}
.scroll-cue i { position: relative; width: 1px; height: 46px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--glow); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font: 600 .74rem/1 var(--caps); letter-spacing: .2em; text-transform: uppercase;
  padding: 19px 30px; border-radius: 999px; transition: background .35s, color .35s, border-color .35s, box-shadow .35s, transform .35s var(--ease);
}
.btn-primary { background: #fff; color: var(--navy-900); box-shadow: 0 10px 40px rgba(61, 221, 254, .18); }
.btn-primary:hover { box-shadow: 0 14px 50px rgba(61, 221, 254, .35); transform: translateY(-2px); }
.btn-primary .arrow { transition: transform .35s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(5px); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }

/* Phone / tablet hero: image banner above, copy below */
@media (max-width: 900px) {
  .hero { display: block; min-height: 0; }
  .hero-media-wrap { position: relative; height: 54svh; min-height: 320px; max-height: 520px; }
  .hero-media-wrap::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, var(--navy-900)); }
  .hero-shade { display: none; }
  .hero-inner { justify-content: center; padding-top: 8px; padding-bottom: 72px; }
  .hero-copy { width: 100%; max-width: 560px; }
  .hero-kicker { margin-bottom: 24px; letter-spacing: .22em; }
  .scroll-cue { display: none; }
}
@media (max-width: 420px) { .hero-title { letter-spacing: .14em; } @keyframes titleIn { to { opacity: 1; letter-spacing: .14em; filter: blur(0); } } }

/* ---------- Scroll reveals (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(100px, 13vw, 170px) 0 clamp(90px, 10vw, 140px); text-align: center; }
.manifesto .eyebrow { justify-content: center; }
.manifesto .eyebrow::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .7; }
.manifesto-text { font: 400 clamp(1.9rem, 3.9vw, 3.3rem)/1.22 var(--serif); color: var(--navy-800); letter-spacing: -.005em; margin: 0 auto; max-width: 900px; }
.pillars { display: grid; gap: 0; margin-top: clamp(70px, 8vw, 110px); text-align: left; }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { padding: 34px 34px 10px 0; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .pillar + .pillar { padding-left: 34px; border-left: 1px solid var(--line); } }
.pillar .num { display: block; font: 600 .7rem/1 var(--caps); letter-spacing: .24em; color: var(--red); margin-bottom: 22px; }
.pillar h3 { font: 500 1.85rem/1.15 var(--serif); color: var(--navy-800); margin-bottom: 12px; }
.pillar p { color: var(--muted); font-size: .98rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 11vw, 150px) 0; scroll-margin-top: 60px; }
.section.soft { background: var(--bg-soft); }
#manifesto, #app, #contact { scroll-margin-top: 60px; }

/* Services */
.services { display: grid; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service { position: relative; padding: 44px 36px 46px 0; border-bottom: 1px solid var(--line); transition: background .5s var(--ease); }
@media (min-width: 860px) { .service { border-bottom: 0; padding: 48px 40px 52px; } .service + .service { border-left: 1px solid var(--line); } .service:first-child { padding-left: 0; } }
.service::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--navy-800); transition: width .8s var(--ease); }
.service:hover::before { width: 100%; }
.service-index { display: block; font: italic 500 2.6rem/1 var(--serif); color: var(--coral); margin-bottom: 30px; }
.service h3 { font: 600 .82rem/1.3 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--navy-800); margin-bottom: 14px; }
.service p { color: var(--muted); margin: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 46px; position: relative; }
@media (min-width: 860px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 48px; }
  .timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 1px; background: var(--line); }
  .timeline::after { content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 1px; background: linear-gradient(90deg, var(--navy-800), var(--blue), var(--glow)); transform: scaleX(0); transform-origin: left; transition: transform 2s var(--ease) .2s; }
  .timeline.in::after { transform: scaleX(1); }
}
.timeline li { position: relative; padding-left: 76px; }
@media (min-width: 860px) { .timeline li { padding-left: 0; } }
.timeline .dot {
  position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 53px; height: 53px; border-radius: 50%;
  background: #fff; border: 1px solid var(--navy-800); font: italic 500 1.45rem/1 var(--serif); color: var(--navy-800); z-index: 1;
}
@media (min-width: 860px) { .timeline .dot { position: relative; margin-bottom: 30px; } }
.timeline h3 { font: 500 1.75rem/1.15 var(--serif); color: var(--navy-800); margin-bottom: 10px; padding-top: 10px; }
@media (min-width: 860px) { .timeline h3 { padding-top: 0; } }
.timeline p { color: var(--muted); margin: 0; max-width: 340px; }

/* App showcase (dark) */
.showcase { position: relative; overflow: hidden; padding: clamp(100px, 12vw, 160px) 0; color: #A9BDD6;
  background: radial-gradient(ellipse 60% 70% at 85% 40%, rgba(29, 127, 208, .28), transparent 70%), linear-gradient(160deg, var(--navy-900), var(--navy-800)); }
.showcase::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.showcase-inner { position: relative; z-index: 1; display: grid; gap: 70px; align-items: center; }
@media (min-width: 980px) { .showcase-inner { grid-template-columns: 1.05fr 1fr; gap: 90px; } }
.feature-list { list-style: none; margin: 40px 0 44px; padding: 0; }
.feature-list li { display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
@media (min-width: 640px) { .feature-list li { grid-template-columns: 220px 1fr; gap: 24px; } }
.feature-list strong { font: 600 .74rem/1.6 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: #fff; }
.feature-list span { font-size: .97rem; }
.text-link { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font: 600 .74rem/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid currentColor; }
.text-link.on-dark { color: var(--glow); }
.text-link span { transition: transform .35s var(--ease); }
.text-link:hover span { transform: translateX(5px); }

/* Patients */
.two-col { display: grid; gap: 50px; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 90px; } }
.panel { background: #fff; border-radius: 18px; padding: 40px; box-shadow: 0 30px 80px rgba(10, 28, 53, .08), 0 0 0 1px rgba(10, 28, 53, .04); }
.panel h3 { font: 500 1.75rem/1.2 var(--serif); color: var(--navy-800); margin-bottom: 20px; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 6px; border-left: 1.5px solid var(--coral); border-bottom: 1.5px solid var(--coral); transform: rotate(-45deg); }

/* Contact */
.contact { position: relative; overflow: hidden; text-align: center; color: #A9BDD6; padding: clamp(110px, 14vw, 190px) 0;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.contact-glow { position: absolute; left: 50%; top: 10%; width: 900px; height: 600px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(29, 127, 208, .32), transparent); filter: blur(20px); }
.contact-inner { position: relative; }
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .7; }
.contact-title { font: 400 clamp(2.6rem, 6.6vw, 5.6rem)/1.04 var(--serif); color: #fff; letter-spacing: -.015em; margin-bottom: 24px; }
.contact-sub { max-width: 520px; margin: 0 auto 50px; }
.contact-email {
  display: inline-flex; align-items: center; gap: 16px; text-decoration: none; color: #fff;
  font: italic 400 clamp(1.7rem, 3.6vw, 2.8rem)/1.2 var(--serif); position: relative; padding-bottom: 10px; overflow-wrap: anywhere;
}
.contact-email::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--glow), transparent); transform: scaleX(.6); transition: transform .6s var(--ease); }
.contact-email:hover::after { transform: scaleX(1); }
.contact-email span { font-style: normal; font-size: .7em; color: var(--glow); transition: transform .4s var(--ease); }
.contact-email:hover span { transform: translateX(6px); }

/* Footer */
.site-footer { background: var(--navy-950); color: #6E84A3; font-size: .88rem; }
.footer-top { display: grid; gap: 36px; padding-top: 70px; padding-bottom: 50px; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, .07); }
@media (min-width: 900px) { .footer-top { grid-template-columns: auto 1fr auto; gap: 50px; } }
.footer-brand img { height: 56px; width: auto; display: block; }
.footer-title { font: 500 .78rem/1 var(--caps); letter-spacing: .26em; text-transform: uppercase; color: #fff; margin-bottom: 8px; }
.footer-slogan { font: italic 500 1.3rem/1 var(--serif); color: var(--coral); margin: 0; }
.footer-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; font: 500 .68rem/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: #9FB2CC; transition: color .3s; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 30px; }
.footer-bottom p { margin: 0; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .intro, .scroll-cue { opacity: 1; transform: none; filter: none; }
}
