@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&family=Young+Serif&display=swap");

* {
  box-sizing: border-box;
}

:root {
  --paper: rgb(255 255 255);
  --ink: oklch(17% 0.009 74);
  --muted: oklch(39% 0.012 74);
  --rule: oklch(17% 0.009 74 / 0.34);
  --rule-strong: oklch(17% 0.009 74);
  --accent: oklch(43% 0.082 38);
  --field: rgb(255 255 255);
}

html {
  min-height: 100%;
  background-color: rgb(255 255 255);
  color-scheme: light;
}

body {
  min-height: 100%;
  margin: 0;
  background-color: rgb(255 255 255);
  color: var(--ink);
  font-family: "Manrope", Arial, Helvetica, sans-serif;
  font-size: clamp(17px, 1.15vw, 19px);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

header,
main,
footer {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  background-color: rgb(255 255 255);
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(18px, 3vw, 30px);
  border-bottom: 1px solid var(--rule-strong);
  font-size: 0.95rem;
}

header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

main {
  padding-top: clamp(28px, 5vw, 62px);
  padding-bottom: clamp(34px, 6vw, 72px);
}

.home-main {
  padding-top: clamp(0px, 1vh, 10px);
}

.home-resource-link {
  position: absolute;
  top: clamp(18px, 3vw, 34px);
  right: max(20px, calc((100vw - 1080px) / 2));
  z-index: 1;
  font-size: 0.95rem;
}

footer {
  padding-top: 0;
  padding-bottom: clamp(30px, 5vw, 56px);
}

footer nav {
  border-top: 1px solid var(--rule-strong);
  padding-top: 22px;
  font-size: 0.95rem;
}

.footer-note {
  margin-top: 18px;
  font-size: 0.95rem;
  font-style: normal;
  color: var(--muted);
}

.page-narrow {
  width: min(100% - 40px, 760px);
}

.page-title {
  font-size: clamp(44px, 6vw, 72px);
}

.resource-list h2 {
  font-size: clamp(28px, 3.6vw, 42px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  padding-bottom: clamp(38px, 6vw, 74px);
  border-bottom: 1px solid var(--rule-strong);
}

.image-placeholder {
  display: grid;
  min-height: clamp(320px, 44vw, 520px);
  place-items: center;
  border: 1px solid var(--rule-strong);
  background: var(--field);
}

.hero-image {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: clamp(320px, 44vw, 520px);
  margin: 0;
  border: 0;
  object-fit: cover;
  object-position: center 24%;
}

section,
article {
  padding: clamp(38px, 6vw, 72px) 0;
  border-bottom: 1px solid var(--rule);
}

h1,
h2 {
  margin: 0 0 0.45em;
  line-height: 0.98;
  letter-spacing: 0;
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
}

h1 {
  max-width: 11.5em;
}

h1,
.hero-title {
  font-size: clamp(50px, 7.2vw, 92px);
}

h2 {
  font-size: clamp(30px, 4.2vw, 48px);
}

p {
  max-width: 720px;
  margin: 0 0 0.9em;
}

p:has(> a:only-child):last-child {
  margin-top: 1.35em;
}

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

a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 300px;
  width: 100%;
  height: auto;
  margin: 28px 0;
  border: 1px solid var(--rule-strong);
}

.section-visual {
  max-width: 860px;
  margin: clamp(24px, 4vw, 42px) 0;
}

.section-visual img {
  max-width: 100%;
  margin: 0;
}

form {
  display: grid;
  gap: 14px;
  max-width: 620px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
}

input,
textarea,
select,
button {
  border: 1px solid var(--rule-strong);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  width: fit-content;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
}

dialog {
  width: min(820px, calc(100% - 32px));
  border: 1px solid var(--rule-strong);
  padding: clamp(18px, 3vw, 28px);
  background: var(--paper);
  color: var(--ink);
}

dialog::backdrop {
  background: oklch(17% 0.009 74 / 0.38);
}

dialog form {
  margin-top: 0;
}

.dialog-close {
  float: right;
  margin-bottom: 8px;
  padding: 7px 9px;
  background: var(--field);
  color: var(--ink);
}

.dialog-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(22px, 4vw, 38px);
  margin-top: 24px;
}

.dialog-split section {
  padding: 0;
  border-bottom: 0;
}

.dialog-split h3,
.contact-card h3 {
  margin: 0 0 0.45em;
  font: inherit;
  font-weight: 700;
}

.contact-card {
  margin-top: clamp(22px, 4vw, 34px);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  header,
  main,
  footer {
    width: min(100% - 28px, 1080px);
  }

  header {
    align-items: baseline;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 16px;
  }

  header nav {
    gap: 10px;
    justify-content: flex-end;
  }

  main {
    padding-top: 18px;
    padding-bottom: 20px;
  }

  .home-main {
    padding-top: 18px;
  }

  .home-resource-link {
    top: 14px;
    right: 14px;
  }

  .dialog-split {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    padding-bottom: 34px;
  }

  .image-placeholder {
    order: -1;
    justify-self: start;
    width: min(74vw, 330px);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    height: auto;
    margin: 4px 0 8px;
  }

  .hero-image {
    min-height: 0;
    height: 100%;
    object-position: center 28%;
  }

  .hero-title {
    font-size: clamp(48px, 16vw, 76px);
    line-height: 1;
  }

  section,
  article {
    padding: 32px 0;
  }

  h1 {
    max-width: 10em;
  }
}
