:root {
  --maroon: #800000;
  --sage: #92a89c;
  --nav-blue: #395bac;
  --cream: oldlace;
  --bg: #ffffff;
  --text: #1a1a1a;
  --max-width: 70rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, system-ui, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.6;
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
}

.container {
  width: min(var(--max-width), 92%);
  margin-inline: auto;
}

h1,
h2,
h3 {
  color: var(--maroon);
  line-height: 1.2;
}

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

a:hover,
a:focus {
  color: var(--maroon);
}

em {
  font-weight: 700;
  font-style: normal;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  padding-left: 1.25rem;
}

/* header */
header {
  background: var(--bg);
  border-bottom: 3px solid var(--maroon);
  padding-block: 1rem;
}

header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

header #title h1 {
  margin: 0;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

header nav a {
  color: var(--nav-blue);
  text-decoration: none;
  font-size: 1.25rem;
}

header nav a:hover,
header nav a:focus {
  color: var(--maroon);
}

/* welcome / hero */
#welcome {
  width: min(var(--max-width), 92%);
  margin: 1rem auto 0;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  border-radius: 6px;
  color: var(--cream);
  /* Dark scrim over the photo keeps the cream text legible on any crop.
     Plain url() is the fallback; image-set() upgrades to AVIF/WebP. */
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("../img/8406-dark.jpg");
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    image-set(
      url("../img/8406-dark.avif") type("image/avif"),
      url("../img/8406-dark.webp") type("image/webp"),
      url("../img/8406-dark.jpg") type("image/jpeg")
    );
  background-size: cover;
  background-position: center;
}

#welcome h1,
#welcome h2,
#welcome p {
  color: var(--cream);
  margin: 0.3em 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#welcome h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

#welcome h2 {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 600;
}

#welcome p {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 700;
}

/* main content */
main {
  margin-top: 1.5rem;
}

.box {
  margin-bottom: 2.5rem;
}

#elements {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-top: 1rem;
}

#elements .element-right img {
  width: 100%;
  border-radius: 6px;
}

.dataProperty {
  color: var(--sage);
}

footer {
  margin-top: 2rem;
  padding: 1rem;
  color: var(--sage);
  text-align: center;
  border-top: 1px solid #eee;
}

/* responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  header nav ul {
    justify-content: center;
  }

  #elements {
    grid-template-columns: 1fr;
  }
}
