@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --parchment: #f5efe3;
  --ink: #39291e;
  --soft-ink: #6b5340;
  --gold: #94703a;
  --rule: #d4c2a3;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--parchment);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 40px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("assets/woodland-parchment.png") center / cover no-repeat;
  opacity: 0.7;
}

main {
  width: min(100%, 860px);
  padding-block: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  grid-template-areas: "intro cover" "notice cover" "contact contact";
  column-gap: clamp(48px, 5vw, 72px);
  row-gap: 24px;
  align-items: center;
}

.introduction { grid-area: intro; align-self: end; }

h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  margin: 0;
  font-size: clamp(56px, 6.7vw, 92px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 em {
  display: block;
  color: #79512e;
  font-weight: 500;
}

.subtitle {
  margin: 24px 0 0;
  color: var(--soft-ink);
  font-size: 19px;
  line-height: 1.5;
}

.author { margin: 14px 0 0; font-size: 23px; line-height: 1.4; }

.recognition {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.recognition-title {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}
.recognition-category {
  margin: 6px 0 0;
  color: var(--soft-ink);
  font-size: 16px;
  line-height: 1.5;
}
.recognition-timing {
  margin: 4px 0 0;
  color: var(--soft-ink);
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
}
.recognition-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 2px;
  color: var(--soft-ink);
  font-size: 14px;
  line-height: 1.5;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.recognition-link:hover { color: var(--ink); }

.book {
  grid-area: cover;
  width: 100%;
  align-self: start;
}

.cover-flip {
  display: block;
  width: 100%;
  aspect-ratio: 610 / 952;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  perspective: 1200px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cover-flip:disabled { cursor: default; }
.cover-flip:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.cover-rotation {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(0.2, 0.65, 0.2, 1);
  box-shadow: 2px 4px 8px #39291e24;
}
.cover-flip.is-flipped .cover-rotation { transform: rotateY(180deg); }
.cover {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #39291e;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.cover-back { transform: rotateY(180deg); }
.cover-hint { margin: 16px 0 0; text-align: center; color: var(--soft-ink); font-size: 14px; line-height: 1.5; }
.cover-hint a { color: inherit; }

.amazon-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 26px; }
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--soft-ink);
  font-size: 15px;
  line-height: 1.5;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 160ms ease;
}
.author-link:hover { color: var(--ink); }
.review-link { text-decoration: none; }
.review-label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.book-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: 3px;
  background: #57402a;
  color: #fff8e9;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 160ms ease;
}
.book-link:hover { background: #39291e; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

@media (prefers-reduced-motion: reduce) {
  .cover-rotation { transition: none; }
  a { transition: none; }
}

.announcement { grid-area: notice; align-self: start; }
.ornament { display: block; margin-bottom: 28px; color: var(--gold); }

h2 { margin: 0; font-size: 26px; font-weight: 400; line-height: 1.35; text-wrap: balance; }
.announcement p { margin: 10px 0 0; color: var(--soft-ink); font-size: 17px; line-height: 1.6; }

.release { margin-bottom: 6px; }
.announcement .release-status {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.announcement .release-note { margin: 2px 0 0; font-size: 14px; font-style: italic; line-height: 1.5; }
.formats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 340px);
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.format-link {
  width: 100%;
  min-height: 58px;
  padding: 9px 16px;
  flex-direction: column;
  gap: 0;
  font-size: 17px;
}
.format-link span {
  color: #ead7af;
  font-size: 14px;
  font-variant-numeric: lining-nums;
  line-height: 1.3;
}
.announcement .music-note { max-width: 40ch; margin: -10px 0 0; font-size: 13px; font-style: italic; line-height: 1.5; }

.contact {
  grid-area: contact;
  width: 100%;
  margin-top: 28px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}
.contact-form { max-width: 560px; margin-top: 24px; text-align: left; }
.contact-form fieldset { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-field { display: grid; gap: 8px; }
.contact-field label { font-size: 16px; line-height: 1.5; }
.contact-field input, .contact-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--soft-ink);
  border-radius: 3px;
  background: #fff8e9;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.contact-field textarea { resize: vertical; min-height: 144px; }
.contact-field input:focus-visible, .contact-field textarea:focus-visible,
.contact-form button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.contact-form button { justify-self: start; border: 0; font-family: inherit; cursor: pointer; }
.contact-form button:disabled { background: #6b5340; cursor: not-allowed; }
.contact-note { margin: 16px 0 0; color: var(--soft-ink); font-size: 15px; line-height: 1.5; }
.spam-check { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-footer {
  width: min(100%, 860px);
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.site-footer a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.site-footer a:hover { color: var(--ink); }

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

@media (max-width: 680px) {
  body { padding: 24px; }
  main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "cover" "notice" "contact";
    padding-block: 32px;
    gap: 32px;
    justify-items: center;
    text-align: center;
  }
  h1 { font-size: clamp(50px, 12vw, 68px); }
  .subtitle { margin-top: 18px; font-size: 17px; }
  .author { margin-top: 10px; font-size: 21px; }
  .book { width: min(100%, 260px); }
  .announcement { width: 100%; min-width: 0; }
  .amazon-links { width: 100%; min-width: 0; align-items: center; }
  .release { width: 100%; }
  .formats { width: 100%; }
  .author-link { max-width: 100%; justify-content: center; text-align: center; }
  body::before { background-size: auto 100%; opacity: 0.5; }
  .ornament { margin: 0 auto 20px; }
  h2 { font-size: 23px; }
  .announcement p { font-size: 16px; }
  .announcement .release-status { font-size: 17px; letter-spacing: 0.05em; }
  .announcement .release-note { font-size: 14px; }
  .announcement .music-note { margin-inline: auto; font-size: 13px; }
  .contact { margin-top: 8px; padding-top: 28px; }
  .contact-form { margin-inline: auto; }
}
