@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-600.woff2") format("woff2");
}

:root {
  --paper: #f4efe6;
  --ink: #2a2118;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-weight: 500;
  font-synthesis: none;
}

::selection { background: #e4d5c2; color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.art { position: absolute; }
.art-fit .art-img { position: relative; z-index: 2; display: block; width: 100%; height: auto; }
.side {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  display: none;
}
.side-l { left: 0; }
.side-r { left: 50%; }
.side canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.side .c-guide { z-index: 1; }
.eraser {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  width: 7%;
  height: 4.6%;
  display: none;
  opacity: 0;
  pointer-events: none;
  transform-origin: 22% 50%;
  will-change: transform, opacity;
}
.eraser::before,
.eraser i {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 0.28em;
}
.eraser::before {
  left: 0;
  width: 44%;
  background: linear-gradient(180deg, #fffdf9 0%, #f4efe8 55%, #ddd5cb 100%);
  box-shadow: 0 0.12em 0.35em rgba(60, 45, 35, 0.22), inset 0 0.06em 0 rgba(255, 255, 255, 0.9);
}
.eraser i {
  left: 38%;
  right: 0;
  border-radius: 0.12em 0.28em 0.28em 0.12em;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(90deg, #2c5a96 0%, #2c5a96 62%, #f3efe6 62%, #f3efe6 70%, #2c5a96 70%);
  box-shadow: 0 0.14em 0.4em rgba(40, 35, 30, 0.25);
}
.js-draw .art-img { opacity: 0; }
.js-draw .side { display: block; }
.js-draw .art-fit { background: rgb(250, 241, 232); }
.js-draw .eraser { display: block; }

.art-full { inset: 0; }
.art-fit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(136vw, calc(114dvh * 1280 / 720));
  transform: translate(-50%, -50%);
}
.art-fit img {
  width: 100%;
  height: auto;
}

.sheet {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

main, footer, a, button { pointer-events: auto; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12vh 1.25rem 1rem;
}

.wordmark {
  position: relative;
  z-index: 1;
  padding: 0.72rem 0.4rem 0.85rem;
}
.wordmark::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: calc(100% + 0.35rem);
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(255, 252, 248, 0) 0%,
    rgba(255, 252, 248, 0.28) 6%,
    rgba(255, 252, 248, 0.62) 16%,
    rgba(255, 252, 248, 0.74) 50%,
    rgba(255, 252, 248, 0.62) 84%,
    rgba(255, 252, 248, 0.28) 94%,
    rgba(255, 252, 248, 0) 100%);
}

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.85rem, 6.1vw, 5.15rem);
  line-height: 0.94;
  letter-spacing: -0.022em;
  white-space: nowrap;
}

@media (min-width: 980px) {
  h1 { font-size: clamp(3.15rem, 4.55vw, 4.35rem); }
}

.lede {
  margin: 0.55rem 0 0;
  font-size: clamp(1.08rem, 1.85vw, 1.42rem);
  letter-spacing: 0.012em;
}

footer {
  text-align: center;
  padding: 1.2rem 1rem 1.15rem;
}

.colophon {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.055em;
}

.contacts {
  margin: 0.34rem 0 0;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.contacts a {
  color: inherit;
  text-underline-offset: 0.2em;
}
.contacts .dot { margin: 0 0.42rem; }

@media (max-width: 760px) and (orientation: portrait) {
  .art-fit {
    width: 162vw;
    transform: translate(-50%, -54%);
  }
  footer {
    background: linear-gradient(to top, rgba(244, 239, 230, 0.97) 58%, rgba(244, 239, 230, 0));
  }
  h1 { font-size: clamp(2.2rem, 10.2vw, 3.2rem); }
  .lede { font-size: 1.08rem; padding: 0 0.6rem; }
  main { padding-top: 8vh; }
  .colophon { letter-spacing: 0.03em; font-size: 0.9rem; }
}

@media (orientation: landscape) and (max-height: 520px) {
  h1 { font-size: 2.45rem; }
  .lede { font-size: 1.02rem; margin-top: 0.25rem; }
  main { padding: 0.6rem 1rem 0.2rem; }
  footer { padding: 0.35rem 1rem 0.45rem; }
  .art-fit {
    width: min(112vw, calc(118dvh * 1280 / 720));
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 340px) {
  h1 { white-space: normal; }
}

@media (forced-colors: active) {
  body { background: Canvas; color: CanvasText; }
}
