/* ------------------------------------------------------------------
   Colors, fonts and sizes live here. Change a value once and it
   updates everywhere on the page.
------------------------------------------------------------------- */
:root {
  --background: #9fcafb;  /* oat white */
  --text: #20343a;        /* deep blue-slate */
  --name: #3d5f8a;        /* lake blue */
  --link: #9b3c14;        /* rust */
  --frame: #3d5f8a;       /* light green */

  --font-heading: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Spacing, set from measurements of the reference design. Most of it
     is a share of the window width, so the layout keeps its proportions
     as the window grows or shrinks. */
  --gutter: 1.2rem;                       /* left and right edge space */
  --indent: 26.2%;                        /* where the headline and sections start */
  --label-width: 27.2%;                   /* width of the rule-and-label column */
  --column-gap: clamp(1rem, 3.7vw, 3rem); /* gap before the body text */
  --headline-top: clamp(5rem, 15vw, 12rem);
  --headline-bottom: clamp(6rem, 23vw, 15rem);
  --row-gap: clamp(2.25rem, 5.9vw, 4rem);
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 0.7rem + 0.4vw, 1rem);
  line-height: 1.65;
  overflow-wrap: break-word;
}

::selection {
  background: var(--frame);
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* ---------- Top bar: name on the left, one small link on the right ---------- */
:root {
  --page-width: 90rem;
  /* ...existing variables... */
}

.site-header,
main {
  max-width: var(--page-width);
  margin-right: auto;
  margin-left: auto;
}

.site-name {
  color: var(--name);
  font-family: var(--font-heading);
  font-size: 1.6em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.5;
  text-decoration: none;
}

.site-header nav {
  font-size: 0.68em;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

/* ---------- Big headline ---------- */
main {
  padding-bottom: 6rem;
}

.headline {
  max-width: 67%;
  margin: var(--headline-top) 0 var(--headline-bottom) var(--indent);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5.3vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

/* ---------- Sections: short rule and small label, then the text ---------- */
.row {
  display: grid;
  grid-template-columns: var(--indent) var(--label-width) minmax(0, 1fr);
  align-items: start;
  margin-bottom: var(--row-gap);
}

.label {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.80em;
  font-weight: 700;
  line-height: 1.6;
}

/* The short thin rule to the left of each label, sitting just above its middle */
.label::before {
  content: "";
  flex: none;
  width: 37%;
  margin-bottom: 0.5em;
  border-top: 2px solid var(--name);
}

.text {
  grid-column: 3;
  padding-right: var(--gutter);
  padding-left: var(--column-gap);
}

.text p {
  margin: 0 0 1em;
}

.text p:last-child {
  margin-bottom: 0;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item {
  opacity: 0;
  animation: fade-in-up 600ms ease-out forwards;
}

.item:nth-child(1) { animation-delay: 50ms; }
.item:nth-child(2) { animation-delay: 150ms; }
.item:nth-child(3) { animation-delay: 250ms; }
.item:nth-child(4) { animation-delay: 350ms; }
.item:nth-child(5) { animation-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  .item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
}

/* ---------- Phones and small tablets: stack everything ---------- */
@media (max-width: 45rem) {
  :root {
    --indent: 0%;
    --headline-top: 4rem;
    --headline-bottom: 4rem;
    --row-gap: 2.5rem;
  }

  .headline {
    max-width: none;
    margin-right: var(--gutter);
    margin-left: var(--gutter);
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }

  .label,
  .text {
    grid-column: 1;
  }

  .label {
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1.25em;
  }

  .label::before {
    width: 4rem;
  }

  .text {
    padding-right: 0;
    padding-left: 0;
  }
}
