:root {
  --blue: #005CA9;
  --red: #E30613;

  /* Themeable per card. The successor card overrides these with its own
     brand, everything else stays CillART. */
  --brand: var(--blue);
  --brand-underline: rgba(0, 92, 169, .32);
  --accent-from: var(--blue);
  --accent-to: var(--red);
  --ink: #141821;
  --gray: #5A6472;
  --line: #E5EAF1;
  --radius: 18px;
  --shadow: 0 2px 4px rgba(15, 20, 28, .06), 0 18px 44px -14px rgba(15, 20, 28, .34);
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  background: #8A9096;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, .97rem + .18vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The photo fills the viewport and crops itself. Fixed rather than
   background-attachment, which iOS Safari handles badly. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #8A9096 url("images/background.jpg") center 55% / cover no-repeat;
}

/* Scrim. Without it the white cards and the footer fight the photo. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, .48) 0%,
    rgba(255, 255, 255, .26) 38%,
    rgba(255, 255, 255, .3) 62%,
    rgba(255, 255, 255, .56) 100%
  );
}

::selection {
  background: rgba(0, 92, 169, .16);
}

/* width: 100% is required because an auto inline margin cancels the default
   stretch of a flex item, which would collapse this to shrink-to-fit. */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Takes the leftover height and centres the cards in it. Never shrinks below
   its content, so nothing can be clipped out of reach on a short screen. */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1.75rem, 5vh, 3.5rem);
}

.columns {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}

/* Brand signature along the top edge of every card. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
}

.card--narrow {
  max-width: 34rem;
}

/* CillART 2.0 carries its own brand. Sage and gold are their real logo
   colours, used only on the accent bar where contrast does not apply. The
   text colour is a deepened sage, because none of their three brand hexes
   clear 4.5:1 on white. */
.card--successor {
  --brand: #4E6455;
  --brand-underline: rgba(78, 100, 85, .36);
  --accent-from: #ABC5B6;
  --accent-to: #C8A356;
}

/* Capped by height, not width, so the two logos match optically and the
   headings under them line up despite different aspect ratios. */
.logo {
  display: block;
  /* The card is a flex column, so without this the logo stretches to the full
     card width instead of sitting left at its natural size. */
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78px;
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

h1,
h2 {
  margin: 0 0 .7rem;
  color: var(--brand);
  font-size: clamp(1.45rem, 1.2rem + 1.15vw, 2.05rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-wrap: balance;
}

p {
  margin: 0 0 1.1rem;
  max-width: 46ch;
  text-wrap: pretty;
}

.muted {
  color: var(--gray);
}

/* Placeholder note in the card foot, softer than body copy but still 4.5:1. */
.foot-note {
  color: #6B7585;
  font-size: .95em;
  font-style: italic;
}

/* A frosted glass box on the photo: transparent dark tint plus backdrop
   blur, so the image shows through but the white text keeps its contrast.
   Deliberately neutral: no brand colour, since the slogan bridges both
   brands. */
.page-title {
  width: fit-content;
  margin: clamp(1.5rem, 6vh, 4rem) auto clamp(1.75rem, 5vh, 3rem);
  padding: 1em 2em;
  color: #fff;
  font-size: clamp(1rem, .55rem + 2.4vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 3px rgba(15, 20, 28, .35);
  background: rgba(20, 24, 33, .3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 24px;
  box-shadow: 0 18px 50px -20px rgba(15, 20, 28, .5);
}

/* The dots exist only between phrases that share a line. Under 640 every
   phrase is its own line, so they disappear entirely. */
.phrase {
  display: block;
  white-space: nowrap;
}

.sep {
  display: none;
}

/* Two lines: the first two phrases share the top line with their dot, the
   third gets its own. The size tracks the viewport so the pair always fits. */
@media (min-width: 640px) {
  .page-title {
    font-size: min(1.5rem, calc((100vw - 6rem) / 30));
  }
  .phrase,
  .sep-1 {
    display: inline;
  }
  .phrase:last-child {
    display: block;
  }
}

/* One line from 1080 up, both dots visible. */
@media (min-width: 1080px) {
  .page-title {
    white-space: nowrap;
    font-size: min(1.5rem, calc((100vw - 5rem) / 44));
  }
  .phrase:last-child,
  .sep-2 {
    display: inline;
  }
}

/* Anchors the closing link to the card foot, so the two cards share a
   baseline even when their copy runs to different lengths. */
.card-foot {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: clamp(1rem, 2vw, 1.4rem);
}

a {
  color: var(--brand);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* No resting underline. These links all stand on their own line rather than
   sitting inside a sentence, so weight, colour and position identify them.
   The underline returns on hover and focus, which keeps a cue that does not
   depend on colour alone. */
.link {
  font-weight: 600;
  text-decoration: none;
}

.link:hover,
.link:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--brand-underline);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

footer {
  flex: 0 0 auto;
  padding: 0 0 clamp(1.25rem, 3vh, 2rem);
  font-size: .9rem;
}

/* Sits on the photo, so it carries its own contrast rather than relying on
   the scrim alone. */
footer a {
  color: var(--ink);
  text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

address {
  font-style: normal;
  line-height: 1.8;
}

@media (min-width: 760px) {
  .columns {
    grid-template-columns: 1fr 1fr;
  }
}

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