/* Universal layouts "Library welcome" and "Photo beside the form" (docs/phases/site-layouts.md;
   App\Site\Layouts\LibraryLanding, SignInSplit): Medicimage's stylesheet (site/medicimage/medicimage.css)
   with the brand kit's colours, fonts and capitals as custom properties, so the "medicimage" preset
   draws the same pages. Fonts come from /site/fonts/fonts.css and kit.css. */

:root {
  /* Brand kit (set inline per page: --primary, --on-primary, --accent, --on-accent, --dark, --caps,
     --font*, --head*, --highlight, --footer-accent); the rest are neutral greys. */
  --primary-deep: color-mix(in srgb, var(--primary) 82%, #000);
  --accent-hover: color-mix(in srgb, var(--accent) 80%, #fff);
  --ink: #000;
  --muted: #4d5358;
  --nav-muted: #696969;
  --surface: #F7F8F9;
  --line: #d9dde1;
  --white: #fff;
  --error: #b3261e;

  /* perfect fourth from 16 px, fluid between 375 and 1440 px */
  --step-1: clamp(1.0625rem, 0.967rem + 0.407vw, 1.333rem);
  --step-2: clamp(1.375rem, 1.234rem + 0.604vw, 1.777rem);
  --step-3: clamp(1.5rem, 1.194rem + 1.305vw, 2.369rem);
  --step-4: clamp(1.75rem, 1.255rem + 2.113vw, 3.157rem);
  --step-5: clamp(2.125rem, 1.392rem + 3.127vw, 4.209rem);

  --header-h: 80px;
  --container: 1400px;
  --gutter: 20px;
  --radius: 4px;
  --shadow-header: 0 2px 18px rgb(0 0 0 / 18%);
  --focus: 3px solid var(--primary);
  color-scheme: light;
}
@media (max-width: 1024px) { :root { --header-h: 64px; } }
@media (max-width: 767px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--white); scroll-padding-top: calc(var(--header-h) + 16px); }
body.ul { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); font-size: 1rem; line-height: 1.7;
  color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
  overflow-wrap: break-word; }
:where(.ul) :is(a, button, label) { -webkit-tap-highlight-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.ul main { flex: 1 0 auto; }
/* resets without weight (:where), so the component rules below always win */
:where(.ul) img { display: block; max-width: 100%; height: auto; }
:where(.ul) picture { display: block; }
:where(.ul) a { color: inherit; }
:where(.ul) :is(h1, h2, p) { margin: 0; }
:where(.ul) ul { margin: 0; padding: 0; list-style: none; }
:where(.ul) :focus-visible { outline: var(--focus); outline-offset: 3px; }
.ul-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius);
  background: var(--dark); color: var(--white) !important; font-weight: 600; text-decoration: none; }
.ul-skip:focus { top: 12px; }
.ul-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ul-icon { width: 1em; height: 1em; flex: none; }

/* ------------------------------------------------------------ buttons and links */
.ul-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 14px 24px;
  border: 0; border-radius: var(--radius); background: var(--accent); color: var(--on-accent) !important;
  font: var(--font-strong) 0.9375rem/1.3 var(--font); letter-spacing: 0.02em; text-decoration: none; text-transform: var(--caps); cursor: pointer;
  touch-action: manipulation; transition: background-color .2s ease, transform .2s ease; }
.ul-btn:hover { background: var(--accent-hover); transform: scale(1.04); }
.ul-hero .ul-btn:focus-visible { outline-color: var(--on-primary); }
.ul-link { font-weight: 600; color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ul-link:hover { color: var(--primary-deep); text-decoration-thickness: 2px; }

/* ------------------------------------------------------------ header (as medicimage.ie) */
.ul-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: var(--shadow-header); }
.ul-header__inner { max-width: var(--container); height: var(--header-h); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ul-logo { display: block; flex: none; width: 180px; line-height: 0; }
.ul-logo img { width: 100%; height: auto; }
.ul-logo .text-logo { display: block; width: 100%; height: auto; }
.ul-logo .wordmark { display: block; color: var(--ink); font: var(--logo-weight) 1.75rem/1.1 var(--logo-font); text-decoration: none; overflow-wrap: anywhere; }
.ul-logo--footer .wordmark { color: var(--white); font-size: 2.25rem; }
.ul-nav ul { display: flex; align-items: center; gap: 35px; }
.ul-nav a { position: relative; display: flex; align-items: center; height: var(--header-h);
  font-size: 0.75rem; font-weight: 500; line-height: 20px; letter-spacing: 0.03em; text-transform: var(--caps); text-decoration: none; color: var(--ink);
  transition: color .2s ease; }
.ul-nav a strong { font-weight: 700; }
.ul-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--accent);
  transform: scaleX(0); transition: transform .25s ease; }
.ul-nav a:hover, .ul-nav a[aria-current="page"] { color: var(--nav-muted); }
.ul-nav a:hover::after, .ul-nav a[aria-current="page"]::after { transform: scaleX(1); }
.ul-nav a:focus-visible { outline-offset: -3px; }
.ul-nav .ul-arrow { margin-right: 6px; font-weight: 400; }
@media (max-width: 1024px) {
  .ul-logo { width: 150px; }
  .ul-nav ul { gap: 22px; }
  .ul-nav a { font-size: 0.8125rem; }
}
@media (max-width: 767px) {
  .ul-hide-phone { display: none !important; }
  .ul-nav a { padding: 0 2px; }
}

/* ------------------------------------------------------------ holding page: hero */
.ul-hero { display: grid; grid-template-columns: 61.9fr 38.1fr; min-height: calc(100vh - var(--header-h)); }
.ul-hero__text { display: flex; flex-direction: column; justify-content: center; gap: 36px;
  padding: clamp(40px, 4.2vw, 64px); color: var(--on-primary); background: var(--primary); }
.ul-hero__title { display: flex; flex-direction: column; gap: 0.3em; max-width: 21em; font-family: var(--head); font-weight: var(--head-heavy); line-height: 1.08; text-transform: var(--caps);
  text-wrap: balance; }
.ul-hero__l1 { font-size: var(--step-3); letter-spacing: 0.01em; }
.ul-hero__l2 { font-size: var(--step-4); letter-spacing: -0.005em; }
.ul-hero__title .accent { color: var(--highlight); }
.ul-hero__intro { max-width: 34em; font-size: var(--step-1); font-weight: 500; line-height: 1.5; text-wrap: pretty; }
.ul-paths { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; max-width: 52rem; }
.ul-path { display: flex; flex-direction: column; align-items: flex-start; padding: 24px 0 28px; border-top: 1px solid color-mix(in srgb, var(--on-primary) 35%, transparent); }
.ul-path h2 { font-family: var(--head); font-size: var(--step-2); font-weight: 600; line-height: 1.2; text-wrap: balance; }
.ul-path p { max-width: 30em; margin: 10px 0 20px; font-size: 1.0625rem; font-weight: 500; line-height: 1.5; }
.ul-path--wide { grid-column: 1 / -1; padding-bottom: 0; }
.ul-path--wide p { margin-bottom: 14px; }
.ul-path .ul-arrow-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--on-primary);
  font-weight: var(--font-strong); font-size: 0.9375rem; letter-spacing: 0.02em; text-transform: var(--caps); text-decoration: underline;
  text-decoration-color: var(--highlight); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ul-path .ul-arrow-link:hover { color: var(--highlight); }
.ul-path .ul-arrow-link:focus-visible { outline-color: var(--on-primary); }
.ul-path .ul-arrow-link .ul-icon { transition: transform .2s ease; }
.ul-path .ul-arrow-link:hover .ul-icon { transform: translateX(4px); }

/* No photo ready (yet): the coloured welcome takes the whole width (v0.12). */
.ul-hero--text { grid-template-columns: minmax(0, 1fr); }
.ul-hero__media { position: relative; display: grid; grid-auto-rows: 1fr; border-left: 1px solid var(--white); background: var(--dark); }
.ul-slot { position: relative; overflow: hidden; min-height: 240px; background: var(--dark); }
.ul-slot + .ul-slot { border-top: 1px solid var(--white); }
.ul-slot > picture { position: absolute; inset: 0; }
.ul-slot img { width: 100%; height: 100%; object-fit: cover; }

/* The page's one moving moment (as medicimage.ie): each photo slot cross-fades slowly between two photos. */
.ul-fade__b { opacity: 0; animation: ul-fade 18s ease-in-out infinite; }
.ul-slot--late .ul-fade__b { animation-delay: 4.5s; }
@keyframes ul-fade { 0%, 40% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } }
.ul-paused .ul-fade__b { animation-play-state: paused; }
.ul-motion { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid rgb(255 255 255 / 70%); border-radius: 50%;
  background: color-mix(in srgb, var(--dark) 55%, transparent); color: var(--white); font-size: 18px; cursor: pointer; touch-action: manipulation; }
.ul-motion:hover { background: color-mix(in srgb, var(--dark) 80%, transparent); }
.ul-motion:focus-visible { outline-color: var(--white); }
.ul-motion .ul-icon--play, .ul-motion[aria-pressed="true"] .ul-icon--pause { display: none; }
.ul-motion[aria-pressed="true"] .ul-icon--play { display: block; }

/* two paths side by side where the text has room: wide desktops, and tablets (hero in one column) */
@media (min-width: 1025px) and (max-width: 1200px) {
  .ul-paths { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .ul-hero { grid-template-columns: 1fr; min-height: 0; }
  .ul-hero__media { grid-auto-rows: auto; grid-template-columns: 1fr 1fr; border-left: 0; }
  .ul-hero__media.ul-one { grid-template-columns: 1fr; }
  .ul-slot { height: clamp(300px, 56vw, 520px); }
  .ul-slot + .ul-slot { border-top: 0; border-left: 1px solid var(--white); }
}
@media (max-width: 767px) {
  .ul-hero__text { padding: 36px var(--gutter) 40px; gap: 26px; }
  .ul-hero__media { grid-template-columns: 1fr; }
  .ul-slot { height: clamp(260px, 80vw, 480px); }
  .ul-slot + .ul-slot { display: none; }
  .ul-paths { grid-template-columns: 1fr; }
  .ul-path { padding: 22px 0 26px; }
  .ul-path .ul-btn { width: 100%; }
}

/* ------------------------------------------------------------ footer (as medicimage.ie) */
.ul-footer { flex: none; background: var(--dark); color: var(--white); font-size: 0.875rem; }
.ul-footer a { text-decoration: none; }
.ul-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ul-footer :focus-visible { outline-color: var(--footer-accent); }
.ul-footer__main { max-width: var(--container); margin: 0 auto; padding: 64px 30px 52px;
  display: grid; grid-template-columns: minmax(0, 474px) minmax(0, 1fr); gap: 40px 100px; }
.ul-logo--footer { width: 235px; margin-bottom: 24px; }
.ul-footer__about p { line-height: 1.6; }
.ul-footer__menus { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: end; gap: 24px 48px; text-align: right; }
.ul-footer__menus h2 { margin-bottom: 12px; color: var(--footer-accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: var(--caps); }
.ul-footer__menus li + li { margin-top: 8px; }
.ul-footer__menus a { display: inline-block; font-size: 0.8125rem; font-weight: 600; line-height: 20px; }
.ul-footer__bottom { max-width: var(--container); margin: 0 auto; padding: 20px 30px; border-top: 1px solid rgb(255 255 255 / 18%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 40px; font-size: 0.8125rem; }
.ul-footer--slim .ul-footer__bottom { border-top: 0; }
.ul-copyright { font-weight: var(--font-light); }
.ul-legal { display: flex; flex-wrap: wrap; gap: 8px 40px; }
@media (max-width: 1024px) {
  .ul-footer__main { grid-template-columns: 1fr; padding: 52px var(--gutter) 40px; }
  .ul-footer__menus { justify-content: start; text-align: left; }
  .ul-footer__bottom { padding: 20px var(--gutter); }
}
@media (max-width: 767px) {
  .ul-footer__main { gap: 36px; }
  .ul-footer__menus { grid-template-columns: 1fr 1fr; }
  .ul-footer__menus a { padding: 4px 0; }
  .ul-footer__bottom { flex-direction: column; align-items: flex-start; padding: 24px var(--gutter) 28px; }
  .ul-legal { flex-direction: column; gap: 6px; }
  .ul-legal a { display: inline-block; padding: 6px 0; }
}

/* ------------------------------------------------------------ sign-in pages: photo half + text half (as "About us") */
.ul-split { display: grid; grid-template-columns: 47.4fr 52.6fr; min-height: calc(100vh - var(--header-h) - 64px); }
.ul-split__photo { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 120px 55px; background: var(--dark); color: var(--white); }
.ul-split__photo > picture { position: absolute; inset: 0; }
.ul-split__photo img { width: 100%; height: 100%; object-fit: cover; }
.ul-split__photo::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 50%); }
.ul-split__title { position: relative; z-index: 1; max-width: 9em; text-align: center; font-size: var(--step-5);
  font-family: var(--head); font-weight: var(--head-black); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
.ul-split__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 110px) clamp(20px, 8vw, 120px);
  background: var(--surface); }
.ul-split__inner { width: 100%; max-width: 30rem; }
.ul-section-title { color: var(--primary); font-family: var(--head); font-size: var(--step-3); font-weight: var(--head-heavy); line-height: 1.08; text-wrap: balance; }
.ul-bar { display: block; width: 64px; height: 10px; margin: 24px 0 28px; background: var(--accent); }
.ul-lead { margin-bottom: 22px; line-height: 1.7; }
.ul-register { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-weight: 500; }
.ul-register a { margin-left: 4px; }
@media (max-width: 767px) {
  .ul-split { grid-template-columns: 1fr; min-height: 0; }
  .ul-split__photo { min-height: 190px; padding: 48px var(--gutter); }
  .ul-split__body { justify-content: flex-start; padding: 36px var(--gutter) 48px; }
  .ul-bar { margin: 18px 0 22px; }
}

/* The shared form partials (resources/views/site/forms) inside .ul-form: labels shown above the fields. */
.ul-form form { display: flex; flex-direction: column; }
.ul-form .sr-only { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
  display: block; margin: 18px 0 8px; font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.ul-form form > .sr-only:first-of-type { margin-top: 0; }
.ul-form .field { display: block; width: 100%; height: auto; min-height: 50px; margin: 0 !important; padding: 12px 14px !important;
  border: 1px solid #8a939b; border-radius: var(--radius); background: var(--white); color: var(--ink);
  font: var(--font-text) 1rem/1.4 var(--font); text-align: left; }
.ul-form select.field { appearance: auto; }
.ul-form textarea.field { min-height: 7rem; resize: vertical; }
.ul-form .field::placeholder { color: transparent; }
.ul-form .field:focus-visible { outline: var(--focus); outline-offset: 1px; border-color: var(--primary); }
.ul-form .submit { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  min-width: 200px; min-height: 50px; margin-top: 24px; padding: 14px 28px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font: var(--font-strong) 0.9375rem/1.3 var(--font); letter-spacing: 0.02em; text-transform: var(--caps);
  cursor: pointer; touch-action: manipulation; transition: background-color .2s ease, transform .2s ease; }
.ul-form .submit:hover { background: var(--accent-hover); transform: scale(1.03); }
.ul-form .keep { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; font-size: 0.9375rem; line-height: 1.45; cursor: pointer; }
.ul-form .keep input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.ul-form .help { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-top: 20px; color: var(--muted); }
.ul-form .help a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; color: var(--primary);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ul-form .help a:first-child { padding-left: 0; }
.ul-form .help a:hover { color: var(--primary-deep); text-decoration-thickness: 2px; }
.ul-form .intro { margin: 0 0 22px; line-height: 1.7; }
.ul-message { margin: 0 0 24px; padding: 14px 16px; border-left: 5px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--white); font-weight: 600; line-height: 1.5; box-shadow: 0 1px 3px rgb(0 0 0 / 8%); }
@media (max-width: 767px) {
  .ul-form .submit { align-self: stretch; width: 100%; }
}

/* ------------------------------------------------------------ motion: page-load sequence (as medicimage.ie, hero only) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ul-rise { from { opacity: .01; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  @keyframes ul-shutter { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
  .ul-hero__l1, .ul-hero__l2, .ul-hero__intro { animation: ul-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .ul-hero__l2 { animation-delay: .1s; }
  .ul-hero__intro { animation-delay: .2s; }
  .ul-path { animation: ul-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .ul-path:nth-child(1) { animation-delay: .3s; }
  .ul-path:nth-child(2) { animation-delay: .42s; }
  .ul-path:nth-child(3) { animation-delay: .54s; }
  .ul-slot { animation: ul-shutter 1.1s cubic-bezier(.65, 0, .15, 1) both; }
  .ul-slot + .ul-slot { animation-delay: .15s; }
  .ul-split__photo { animation: ul-shutter 1.1s cubic-bezier(.65, 0, .15, 1) both; }
  .ul-split__title { animation: ul-rise .9s cubic-bezier(.2, .7, .2, 1) .35s both; }
}
@media (prefers-reduced-motion: reduce) {
  .ul-fade__b { animation: none; }
  .ul-motion { display: none; }
  .ul-btn:hover, .ul-form .submit:hover { transform: none; }
  .ul * { transition-duration: 0.01ms !important; }
}
