@font-face {
  font-family: "PT Serif";
  src: url("assets/pt-serif.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("assets/pt-serif-italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --ink: #272d29;
  --green: #294c3b;
  --rust: #aa5035;
  --rule: #d4d4c8;
  --serif: "PT Serif", Georgia, serif;
  --gutter: clamp(1.25rem, 5.5vw, 5rem);
  --width: min(74rem, calc(100% - 2 * var(--gutter)));
}

* { box-sizing: border-box; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 Roboto, system-ui, sans-serif;
}

.wrap { width: var(--width); margin-inline: auto; }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: clamp(4.75rem, 11vh, 6.75rem);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--green);
  font: 1.65rem/1 var(--serif);
  letter-spacing: -.055em;
  text-decoration: none;
}

.book-mark {
  position: relative;
  width: 1.2rem;
  height: 1.55rem;
  border-radius: 2px 4px 4px 2px;
  background: linear-gradient(90deg, var(--green) 17%, #81a18b 17% 22%, var(--green) 22%);
}

.book-mark::after {
  content: "";
  position: absolute;
  right: 19%;
  bottom: -11%;
  width: 23%;
  height: 30%;
  background: #bf694a;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.cover {
  flex: 1;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3.5rem, 9vh, 6rem);
}

h1 { margin: 0; font: 400 3rem/1.08 var(--serif); letter-spacing: -.05em; }
.intro h1 { font-size: clamp(3rem, 5.35vw, 4.8rem); }
.intro h1 em { display: block; color: var(--green); font-size: 1.22em; }

.intro p {
  max-width: 24em;
  margin: 1.7rem 0 0;
  color: #555c54;
  font-size: clamp(1.02rem, 1.45vw, 1.23rem);
  line-height: 1.65;
}

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 3rem;
  padding: .65rem 1.4rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  font: inherit;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.primary { background: var(--green); color: #fffdf6; }
.secondary { min-width: 6rem; border-color: #929f92; color: var(--green); }
.arrow { font-size: 1.18em; line-height: 1; }

@media (hover: hover) {
  .primary:hover { background: #1c392c; }
  .secondary:hover { background: #e6ebdf; }
  .back:hover { text-decoration: underline; }
}

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

.photo {
  position: relative;
  margin: .5rem .5rem .5rem 0;
  padding: clamp(.35rem, .6vw, .55rem);
  transform: rotate(2deg);
  background: #fffdf8;
  box-shadow: 0 1px 3px #302c212b, 0 12px 26px -12px #302c2155;
}

.photo img { display: block; width: 100%; height: auto; }

.photo::before {
  content: "";
  position: absolute;
  width: 21%;
  height: 1.65rem;
  top: -.55rem;
  left: 39%;
  transform: rotate(-7deg);
  background: #e1d6b8d9;
  clip-path: polygon(2% 0, 100% 0, 98% 18%, 100% 35%, 98% 62%, 100% 94%, 0 100%, 2% 74%, 0 44%, 2% 25%);
}

.home::after {
  content: "";
  width: var(--width);
  height: 25px;
  margin: 0 auto clamp(1.5rem, 6vh, 4rem);
  background: repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 12px);
}

.back { padding-block: .65rem; color: var(--green); font-size: .92rem; text-decoration: none; }
.back span { margin-right: .25rem; }
.form-page { flex: 1; display: grid; place-items: center; padding-block: 3rem 4rem; }

.sheet {
  position: relative;
  width: min(100%, 27.5rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: #fffdf8;
  box-shadow: 0 3px 0 -1px #eeeade, 0 4px 0 -1px var(--rule), 0 10px 24px -18px #38362470;
}

.sheet::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 1.65rem;
  width: .9rem;
  height: 1.65rem;
  background: var(--rust);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.sheet h1 { margin-bottom: 1.75rem; font-size: clamp(2rem, 5vw, 2.65rem); }
.sheet label { display: block; margin-bottom: .4rem; font-size: .95rem; font-weight: 550; }
.sheet input {
  display: block;
  width: 100%;
  height: 2.85rem;
  margin-bottom: 1.2rem;
  padding-inline: .8rem;
  border: 1px solid #9eaa9d;
  border-radius: .3rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.sheet .button { width: 100%; margin-top: .35rem; }
.error {
  display: none;
  margin: 1rem 0 0;
  padding: .65rem .8rem;
  border-left: 3px solid var(--rust);
  background: #f7eae2;
  color: #87381f;
}
.error.visible, .error:target { display: block; }

@media (max-width: 46rem) {
  .cover { grid-template-columns: minmax(0, 1fr); gap: 2.7rem; padding-block: 2.75rem; }
  .intro h1 { font-size: clamp(2.45rem, 8.2vw, 3.8rem); }
  .intro p { margin-top: 1.25rem; }
  .actions { margin-top: 1.5rem; }
  .photo { width: min(96%, 30rem); margin: 0 auto; }
  .home::after { height: 13px; }
}
