@font-face {
  font-family: Rye;
  src: url("/fonts/rye-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Fredoka;
  src: url("/fonts/fredoka-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fff6e4;
  --paper-raised: #fffaf0;
  --ink: #1c140f;
  --ink-soft: #4a3024;
  --line: #e4c48a;
  --clay: #8f1d1d;
  --denim: #1e4f86;
  --denim-deep: #16324f;
  --sun: #ffe56a;
  --sky: #7ec8f0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a120e;
    --paper-raised: #2a1c14;
    --ink: #fff4df;
    --ink-soft: #f3d7b0;
    --line: #6b4a2e;
    --clay: #ffb4a2;
    --denim: #8eb4e0;
    --denim-deep: #102033;
    --sun: #ffe56a;
    --sky: #24577a;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, var(--sky) 0 280px, #f3d7a1 280px 340px, #c4894a 340px);
  color: var(--ink);
  font-family: Fredoka, "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  font-weight: 520;
  line-height: 1.55;
  overflow-x: clip;
}

.sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: 280px;
  pointer-events: none;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 18px;
  right: 8vw;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 10px rgb(255 229 106 / 45%);
}

.cloud {
  position: absolute;
  height: 46px;
  border-radius: 999px;
  background: #fff;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: #fff;
}

.cloud-a {
  top: 54px;
  left: 8vw;
  width: 140px;
}

.cloud-a::before {
  width: 54px;
  height: 54px;
  left: 18px;
}

.cloud-a::after {
  width: 36px;
  height: 36px;
  left: 62px;
}

.cloud-b {
  top: 96px;
  left: 42vw;
  width: 110px;
  opacity: 0.9;
}

.cloud-b::before {
  width: 42px;
  height: 42px;
  left: 16px;
}

.page {
  position: relative;
  width: min(72rem, calc(100% - clamp(1rem, 4vw, 3rem)));
  margin-inline: auto;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5;
  padding: 0.7rem 1rem;
  background: var(--sun);
  color: #1c140f;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.2rem;
  margin-top: max(0.8rem, env(safe-area-inset-top));
  padding: 0.7rem 1rem;
  border: 4px solid var(--sun);
  border-radius: 999px;
  background: var(--denim-deep);
  box-shadow: 0 8px 0 #8f1d1d;
}

.brand,
.brand:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: #fff6e4;
  text-decoration: none;
}

.monogram {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: #1c140f;
  font-family: Rye, Georgia, serif;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 3px #8f1d1d;
}

.brand-name {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-underline-offset: 0.22em;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a,
.nav-list a:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.55rem;
  color: #fff6e4;
  font-weight: 650;
  text-decoration-color: var(--sun);
  text-underline-offset: 0.25em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.9fr);
  gap: 0.5rem 1rem;
  align-items: end;
  margin-top: 1.2rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin-bottom: 1.5rem;
  color: #1c140f;
  padding: 1.3rem 1.35rem 1.45rem;
  border-radius: 1.6rem 1.6rem 1.2rem 0.4rem;
  background:
    linear-gradient(#fff 0 0) padding-box,
    repeating-linear-gradient(90deg, #c1121f 0 18px, #fff6e4 18px 36px) border-box;
  border: 10px solid transparent;
  box-shadow: 0 12px 0 rgb(28 20 15 / 12%);
}

.kicker {
  margin: 0 0 0.35rem;
  color: #8f1d1d;
  font-family: Rye, Georgia, serif;
  font-size: 0.95rem;
}

h1,
h2 {
  font-family: Rye, Georgia, serif;
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw + 0.6rem, 4.8rem);
  line-height: 0.98;
}

h1 .line {
  display: block;
}

.lede {
  max-width: 22ch;
  margin: 0.8rem 0 0;
  font-size: clamp(1.25rem, 0.5vw + 1.05rem, 1.55rem);
  font-weight: 600;
  line-height: 1.35;
}

.hero-art {
  margin: 0;
  justify-self: center;
}

.hero-art img {
  display: block;
  width: min(100%, 26rem);
  height: auto;
  filter: drop-shadow(0 16px 0 rgb(28 20 15 / 12%));
}

.rug {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: -0.4rem;
  padding: 1.3rem;
  border-radius: 1.2rem;
  background-color: #fff6e4;
  background-image:
    linear-gradient(45deg, #c1121f 25%, transparent 25%),
    linear-gradient(-45deg, #c1121f 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #c1121f 75%),
    linear-gradient(-45deg, transparent 75%, #c1121f 75%);
  background-size: 32px 32px;
  background-position: 0 0, 0 16px, 16px -16px, -16px 0;
  box-shadow: inset 0 0 0 8px #f3d7a1;
}

.frame {
  padding: 0.7rem;
  border-radius: 0.8rem;
  background: linear-gradient(#e7b56a, #a86b32);
  box-shadow: 0 8px 0 #6b3e1c;
  scroll-margin-top: 1.25rem;
}

.frame-card {
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 0.4rem;
  background: #fffaf0;
  color: #1c140f;
}

.frame-card h2,
.frame-card p {
  margin: 0;
}

.frame-card h2 {
  color: #8f1d1d;
  font-size: clamp(1.4rem, 1vw + 1rem, 1.9rem);
}

.frame-card p {
  margin-top: 0.35rem;
  color: #4a3024;
}

section:target .frame,
.frame:target {
  outline: 4px solid var(--sun);
  outline-offset: 4px;
}

.site-footer {
  margin-top: 1.4rem;
  padding: 0.4rem 0.2rem 1.6rem;
  color: #3d2414;
}

.site-footer p {
  margin: 0;
}

.footer-home,
.footer-home:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1c140f;
  font-family: Rye, Georgia, serif;
  font-size: 1.15rem;
  text-decoration-color: #8f1d1d;
}

.footnote {
  max-width: 36ch;
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.missing .hero-copy h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3.3rem);
}

.back,
.back:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.4rem;
  color: var(--clay);
  font-weight: 750;
}

a:any-link {
  color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--clay);
}

.site-header .brand,
.site-header .brand:visited,
.site-header .brand-name,
.site-header .nav-list a,
.site-header .nav-list a:visited {
  color: #fff6e4;
}

:focus {
  outline: none;
}

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

::selection {
  background: var(--sun);
  color: #1c140f;
}

@media (max-width: 800px) {
  body {
    background: linear-gradient(180deg, var(--sky) 0 220px, #f3d7a1 220px 270px, #c4894a 270px);
  }

  .sky {
    height: 220px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .hero-art img {
    width: min(18rem, 78vw);
    margin-inline: auto;
  }

  .hero-copy {
    margin-top: -2.5rem;
    margin-bottom: 0.4rem;
  }

  .rug {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .sky,
  .sun,
  .cloud {
    display: none;
  }

  .site-header,
  .hero-copy,
  .frame {
    border: 2px solid CanvasText;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  .sky,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
