/* ============================================================
   Dermot Mallon — Consultant Neuroradiologist
   Shared styles (dark navy). Two text colours only:
     --text   #FBFAF8  white-ish (also the logo + header/footer lines)
     --accent #A9C4DA  light blue
   ============================================================ */

:root {
  --bg:         #0E1A2B;   /* dark navy ground            */
  --bg-2:       #13243A;   /* faintly raised panel        */

  --text:       #FBFAF8;   /* white-ish — matches the logo + lines */
  --accent:     #A9C4DA;   /* light blue                  */
  --flash:      #C97AC4;   /* pinky-purple — anchor/logo highlight */

  --line:       #FBFAF8;   /* header / footer lines = logo colour  */
  --rule:       rgba(251,250,248,0.14);   /* faint inner dividers (tint of text) */
  --rule-soft:  rgba(251,250,248,0.08);
  --rule-strong:rgba(251,250,248,0.34);   /* service tops, form borders         */

  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

a { color: var(--text); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

/* Body / reading text is the light blue; headings stay white-ish */
p { margin: 0 0 1.1em; color: var(--accent); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}

.link {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule-strong);
  transition: color .25s ease, border-color .25s ease, text-shadow .25s ease;
}
.link .arr { transition: transform .25s ease; }
.link:hover { color: #ECD6E8; border-color: #ECD6E8; text-shadow: 0 0 8px rgba(201, 122, 196, 0.4); }
.link:hover .arr { transform: translateX(3px); }

/* Inline text link within a paragraph */
.inline-link {
  color: var(--accent);
  border-bottom: 1px solid var(--rule-strong);
  transition: color .25s ease, border-color .25s ease, text-shadow .25s ease;
}
.inline-link:hover { color: #ECD6E8; border-color: #ECD6E8; text-shadow: 0 0 8px rgba(201, 122, 196, 0.4); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------
   HEADER — brain logo stands on a full-bleed line the colour of
   the logo strokes; the rule runs the whole width of the page.
   --------------------------------------------------------------- */
.site-header {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 106px;
}

.logo { position: relative; z-index: 1; display: block; line-height: 0; }
.logo .mark {
  display: block;
  height: 80px;
  width: auto;
  margin-bottom: -1px;
  transition: filter .25s ease;
}
/* Shift the cream strokes toward pale pink on hover, matching menu item colour tempo.
   sepia() seeds enough chroma for hue-rotate to produce a visible pink. */
.logo:hover .mark {
  filter: sepia(0.4) saturate(6) hue-rotate(290deg) brightness(0.93);
}

.site-nav { position: relative; z-index: 1; padding-bottom: 30px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 34px; }
.nav-list > li { position: relative; }
.nav-list a {
  font-size: 15.5px;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease, text-shadow .25s ease;
}
.nav-list a:hover { color: #ECD6E8; text-shadow: 0 0 8px rgba(201, 122, 196, 0.4); }
.nav-list a[aria-current="page"] { border-color: var(--text); }


.nav-toggle { display: none; }

/* ---------------------------------------------------------------
   SECTIONS
   --------------------------------------------------------------- */
section { padding: clamp(48px, 8vw, 92px) 0; }
.section-rule { border-top: 1px solid var(--rule); }

/* HERO (home) — symmetric vertical padding */
.hero {
  padding: clamp(52px, 9vw, 104px) 0;
  position: relative;
  background-image:
    linear-gradient(to bottom, rgba(14,26,43,0.72) 0%, rgba(14,26,43,0.85) 100%),
    url('workstation.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero .eyebrow { margin-bottom: 1.8rem; }
.hero h1 {
  font-weight: 300;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero .lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.45;
  color: var(--text);
  max-width: 33ch;
  margin: 1.7rem 0 0;
}
.hero .sub { max-width: 56ch; margin-top: 1.6rem; }

/* SERVICES (home) */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
}
.service { border-top: 1px solid var(--rule-strong); padding-top: 26px; }
.service h3 { font-size: clamp(23px, 2.4vw, 28px); font-weight: 400; margin-bottom: 0.7rem; }
.service p { font-size: 16.5px; }
.service .link { margin-top: 1.4rem; }

/* BACKGROUND (home) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}
.bio .lead-line {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.quals { margin-top: 2.6rem; }
.quals .eyebrow { margin-bottom: 0.6rem; }
.qual-row { display: flex; align-items: baseline; gap: 18px; padding: 13px 0; border-top: 1px solid var(--rule); }
.qual-row:last-child { border-bottom: 1px solid var(--rule); }
.qual-deg { flex: 0 0 104px; font-family: var(--serif); font-size: 16px; color: var(--text); }
.qual-inst { flex: 1 1 auto; font-size: 15px; color: var(--accent); }
.qual-year { flex: 0 0 auto; font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------
   INNER PAGES — two-column: title + intro + detail | enquiry form,
   both columns starting at the top.
   --------------------------------------------------------------- */
.page { padding: clamp(52px, 9vw, 104px) 0; }

/* Single-column title block (e.g. thank-you pages) */
.page-head { max-width: 60ch; margin-bottom: clamp(28px, 4vw, 44px); }

.page-head h1,
.page-title {
  font-weight: 300;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.page-head .lead,
.col-content .lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.45;
  color: var(--text);
  margin-top: 1.4rem;
  max-width: 42ch;
}
.col-content .prose { margin-top: clamp(30px, 4vw, 48px); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.prose { max-width: 52ch; }
.prose p { font-size: 16.5px; }

/* The form column carries an eyebrow so it lines up with the title column. */
.col-form .eyebrow { color: var(--accent); }

/* ---------------------------------------------------------------
   FORM
   --------------------------------------------------------------- */
.form-head { margin-bottom: 1.8rem; }
.form-head h2 { font-size: clamp(22px, 2.4vw, 26px); font-weight: 400; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  padding: 12px 14px;
  transition: border-color .2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--accent); opacity: 0.5; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--text); }
.field textarea { min-height: 150px; resize: vertical; }

.field-check { display: flex; align-items: flex-start; gap: 11px; }
.field-check input {
  width: 17px; height: 17px;
  margin-top: 3px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.field-check label { margin: 0; font-size: 15px; color: var(--accent); letter-spacing: 0; }

.field-legend {
  display: block;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 8px;
}
.radio-group { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.radio-group--inline { flex-direction: row; gap: 28px; margin-top: 0; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 15.5px;
  color: var(--accent);
}
.radio-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-box {
  flex: 0 0 17px;
  width: 17px; height: 17px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease;
}
.radio-box::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: transparent;
  transition: background .15s ease;
}
.radio-label input[type="radio"]:checked + .radio-box {
  border-color: var(--text);
}
.radio-label input[type="radio"]:checked + .radio-box::after {
  background: var(--text);
}
.radio-label:hover .radio-box { border-color: var(--text); }

.btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 13px 28px;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: #ECD6E8; border-color: #ECD6E8; color: var(--bg); }

.form-note { font-size: 13.5px; color: var(--accent); opacity: 0.85; margin-top: 1.5rem; max-width: 46ch; }

/* ---------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-size: 14px; color: var(--accent);
}
.footer-inner nav { display: flex; gap: 26px; }
.footer-inner nav a { color: var(--accent); font-size: 14px; }
.footer-inner nav a:hover { color: #ECD6E8; text-shadow: 0 0 8px rgba(201, 122, 196, 0.4); }

/* ---------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 760px) {
  .header-inner { min-height: 92px; align-items: flex-end; }
  .logo .mark { height: 66px; margin-bottom: -1px; }

  .nav-toggle {
    display: inline-flex;
    position: relative; z-index: 2;
    margin-bottom: 18px;
    background: none;
    border: 1px solid var(--rule-strong);
    color: var(--text);
    font-family: var(--sans);
    font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 9px 14px; cursor: pointer;
  }

  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 0;
    background: var(--bg);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    display: none; z-index: 30;
  }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-top: 1px solid var(--rule-soft); }
  .nav-list > li:first-child { border-top: 0; }
  .nav-list a { display: block; padding: 16px var(--gutter); border: 0; }
.services-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: clamp(36px, 9vw, 56px); }
  .qual-deg { flex-basis: 88px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------------------------------------------------------------
   ANCHOR HIGHLIGHT — when a nav link jumps to a section, its
   eyebrow label briefly brightens and glows, then settles back.
   --------------------------------------------------------------- */
@keyframes eyebrow-glow {
  0%   { color: var(--accent); text-shadow: none; }
  18%  { color: #ECD6E8;       text-shadow: 0 0 9px rgba(201, 122, 196, 0.45); }
  50%  { color: #ECD6E8;       text-shadow: 0 0 6px rgba(201, 122, 196, 0.22); }
  100% { color: var(--accent); text-shadow: none; }
}
.eyebrow.is-flash { animation: eyebrow-glow 1.6s ease-out; }

/* Colour/glow highlight (no movement). Under reduced-motion: shorter but not removed. */
@media (prefers-reduced-motion: reduce) {
  .eyebrow.is-flash { animation-duration: 1s; }
}
