/* RadFlux landing page — "Wave" style: dark navy surfaces, a teal accent, the wave mark.
   Plain CSS, no build step, no web fonts (system UI stack), no scripts.
   Colours come from the Wave dark palette; every text pair is 4.5:1 or better (see README). */

:root {
  --surface: #0b1526;
  --surface-low: #0f1b30;
  --card: #13213a;
  --card-border: #2f3d58;
  --text: #f1f4fa;
  --text-muted: #b4bfd4;
  --teal: #6ed3c6;
  --on-teal: #00302a;
  --word-rad: #f4f6fa;
  --focus: #8fe0d4;
  --outline: #7d8aa3;
  --radius: 14px;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3rem);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse 70% 45% at 85% 0%, rgba(91, 141, 239, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(110, 211, 198, 0.16), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* ── Layout ─────────────────────────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 72rem;
  margin: 0 auto;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.5rem, 1.5rem + 4vh, 5.5rem);
  padding: clamp(2rem, 0.75rem + 5vh, 6rem) 0;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.lockup-link {
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.mark {
  flex-shrink: 0;
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lockup-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}

.wordmark .rad { color: var(--word-rad); }
.wordmark .flux { color: var(--teal); }

.caption {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--teal);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-solid {
  background: var(--teal);
  color: var(--on-teal);
}
.btn-solid:hover { background: var(--focus); border-color: var(--focus); }

.btn-outline,
.btn-ghost {
  background: transparent;
  color: var(--teal);
}
.btn-outline:hover,
.btn-ghost:hover { background: rgba(110, 211, 198, 0.12); }

.btn-ghost { border-color: var(--outline); color: var(--text); }
.btn-ghost:hover { border-color: var(--teal); }

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

/* ── Hero ───────────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(2.125rem, 1.2rem + 3.6vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem);
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ── Pillars ────────────────────────────────────────────────────────── */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  background: rgba(19, 33, 58, 0.88);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.icon {
  display: block;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Contact ────────────────────────────────────────────────────────── */

.contact h2 {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.contact p {
  margin: 0;
  color: var(--text-muted);
}

.mail {
  color: var(--teal);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.mail:hover { text-decoration-thickness: 2px; }

/* ── Footer ─────────────────────────────────────────────────────────── */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.foot p { margin: 0; }

/* ── Decorative wave behind everything ──────────────────────────────── */

.backdrop {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: min(48vh, 34rem);
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.16;
  pointer-events: none;
}

/* ── Helpers ────────────────────────────────────────────────────────── */

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: var(--on-teal);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ── Sizes ──────────────────────────────────────────────────────────── */

/* Phones: the hero actions take the full width, one per row on the narrowest. */
@media (max-width: 30rem) {
  .actions .btn { flex: 1 1 100%; }
  .wordmark { font-size: 1.375rem; }
}

/* Narrow phones: keep the header on one row by dropping the caption's tracking. */
@media (max-width: 23.5rem) {
  .caption { letter-spacing: 0.04em; }
}

/* Laptops and up: four cards in a row. */
@media (min-width: 64rem) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}

/* Between tablet and laptop widths, and on portrait monitors: two by two. */
@media (min-width: 56rem) and (max-width: 63.99rem), (min-width: 56rem) and (orientation: portrait) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Tall portrait monitors (radiology reading rooms run them on their side). Centred content would
   float in the middle of 2,000+ px with a void above it, so here the content starts a tenth of the
   way down, the type steps up, and the wave fills the lower part of the screen. */
@media (min-width: 56rem) and (orientation: portrait) and (min-height: 100rem) {
  body { font-size: 1.25rem; }
  main { justify-content: flex-start; padding-top: 10vh; gap: 5.5rem; }
  .mark { width: 68px; height: 36px; }
  .wordmark { font-size: 1.875rem; }
  .caption { font-size: 0.875rem; }
  .eyebrow { font-size: 1rem; }
  h1 { font-size: clamp(3.75rem, 2rem + 3.4vw, 5.5rem); }
  .lead { max-width: 46rem; font-size: 1.5rem; }
  .btn { min-height: 52px; padding: 0.75rem 1.6rem; font-size: 1.125rem; }
  .card { padding: 2.25rem; }
  .card .icon { width: 36px; height: 36px; }
  .card h3 { font-size: 1.5rem; }
  .card p { font-size: 1.1875rem; }
  .contact h2 { font-size: 1.75rem; }
  .backdrop { height: min(42vh, 64rem); }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .card { border: 1px solid CanvasText; }
}
