@font-face {
  font-family: Literata;
  src: url("../assets/fonts/literata-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Literata;
  src: url("../assets/fonts/literata-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Golos Text";
  src: url("../assets/fonts/golos-text-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("../assets/fonts/golos-text-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  color-scheme: light;
  --ground: #fbf8f3;
  --paper: #ffffff;
  --ink: #24342e;
  --muted: #5f6f67;
  --green: #4a7c6f;
  --pine: #2f5c50;
  --sage: #edf4ef;
  --rule: rgba(36, 52, 46, 0.11);
  --focus: #c46e50;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-title: Georgia, "Times New Roman", serif;
  --margin: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 1rem/1.55 var(--font-body); }
figure, h1, h2, p { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; }
img { display: block; max-width: 100%; height: auto; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.frame { width: min(67rem, calc(100% - 2 * var(--margin))); margin-inline: auto; }
.skip { position: fixed; top: -8rem; left: var(--margin); padding: 0.75rem; background: var(--paper); z-index: 2; }
.skip:focus { top: 0.5rem; }

.site-header {
  background: rgba(255, 253, 249, 0.92);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
}
.hero { background: linear-gradient(180deg, var(--sage) 0%, var(--ground) 100%); }
.header-row, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
}
.header-row { color: var(--ink); }
.header-row a:focus-visible { outline-color: var(--focus); }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-family: var(--font-title); font-weight: 500; text-decoration: none; }
.brand img { mix-blend-mode: multiply; flex: 0 0 auto; }
nav { display: flex; gap: clamp(1rem, 3vw, 2rem); align-items: center; font-size: 0.94rem; font-weight: 550; }

.hero-inner { padding-block: clamp(1.75rem, 5vw, 3.25rem) clamp(2.25rem, 6vw, 4rem); }
.cover {
  position: relative;
  z-index: 1;
  margin-inline: auto;
  width: min(49rem, 100%);
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px -28px rgba(36, 52, 46, 0.16);
}
h1, h2 { font-family: var(--font-title); font-weight: 500; line-height: 1.12; letter-spacing: -0.025em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.35rem); }
h1 span { display: block; }
.cover p { max-width: 32rem; margin: 1.15rem auto 0; color: var(--muted); }
.cover .release-note { margin-top: 0.75rem; font-size: 0.94rem; }
.button {
  display: inline-flex;
  min-height: 3.1rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 0.95rem;
  background: var(--green);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color 160ms ease, transform 160ms ease;
}
.button:hover { background: var(--pine); transform: translateY(-2px); }
.button:active { transform: translateY(1px); }

.preview { width: min(49rem, 100%); margin: 1.5rem auto 0; }
.preview-spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; }
.preview-spread a {
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 28px -20px rgba(36, 52, 46, 0.22);
  transition: transform 160ms ease;
}
.preview-spread a:hover { transform: translateY(-3px); }
.preview-spread a:focus-visible { outline-color: var(--focus); }
.preview figcaption { margin-top: 1rem; color: var(--muted); text-align: center; font-size: 0.94rem; }

.contents {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3.65rem, 9vw, 7rem);
}
h2 { font-size: clamp(2rem, 4.9vw, 3.5rem); }
.contents-intro p { max-width: 24rem; margin-top: 1.5rem; }
.letter-example { max-width: 25rem; margin-top: 2rem; }
.letter-example img { width: 100%; padding: 0.7rem; background: var(--paper); }
.letter-example figcaption { margin-top: 0.7rem; }
.page-list { list-style-position: outside; margin: 0; padding-left: 1.7rem; }
.page-list li { padding: 0.2rem 0.5rem 0.2rem 0.3rem; }
.page-list li + li { margin-top: 0.9rem; }
.page-list li::marker { color: var(--green); font-weight: 650; }
.page-list strong, .page-list span { display: block; }
.page-list strong { font-family: var(--font-title); font-size: 1.25rem; font-weight: 600; }

.delivery {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  background: var(--sage);
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
  overflow: hidden;
}
.delivery-art { display: grid; place-items: center; padding: 2rem; }
.delivery-art img { width: min(14rem, 100%); height: auto; object-fit: contain; }
.delivery-note { padding: clamp(1.6rem, 5vw, 3.25rem); }
.delivery-note p { margin-top: 1rem; max-width: 32rem; }
.delivery-note code {
  display: block;
  margin-top: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: var(--paper);
  font: inherit;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.footer { margin-block: 1rem; }

.checkout-test { max-width: 60rem; padding-block: clamp(2rem, 6vw, 4rem); }
.checkout-test h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
.checkout-test h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.checkout-lede { max-width: 39rem; margin-top: 1rem; }
.checkout-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.checkout-panel { padding: clamp(1rem, 4vw, 1.75rem); background: var(--paper); }
.checkout-delivery { background: var(--sage); }
.checkout-test form, .checkout-field { display: grid; gap: 0.45rem; }
.checkout-test form { gap: 1rem; margin-top: 1.25rem; }
.checkout-field label { font-weight: 600; }
.checkout-field p { font-size: 0.875rem; }
.checkout-field input, .checkout-field select {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  border: 1px solid var(--green);
  border-radius: 0;
  padding: 0.55rem 0.65rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.checkout-select { position: relative; }
.checkout-select select { appearance: none; padding-inline-end: 2rem; }
.checkout-select::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 0.85rem;
  width: 0.5rem;
  height: 0.5rem;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.checkout-test :is(input, select, button):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.checkout-test .button {
  border: 1px solid var(--green);
  margin-top: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.checkout-test .checkout-secondary { background: transparent; color: var(--green); }
.checkout-test .checkout-secondary:hover { background: var(--ground); }
.checkout-test .button:disabled { opacity: 0.65; cursor: wait; transform: none; }
.checkout-message:not(:empty) { margin-top: 0.85rem; overflow-wrap: anywhere; }
.checkout-file-link { display: inline-block; margin-top: 0.4rem; font-weight: 600; }
.checkout-test [hidden] { display: none; }

@media (max-width: 43rem) {
  .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .checkout-test .checkout-actions { display: grid; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes paper-arrives {
    from { opacity: 0; transform: translateY(0.9rem); }
    to { opacity: 1; transform: translateY(0); }
  }

  .header-row .brand, .header-row nav, .cover-mark, h1, .cover p, .button, .preview-spread a, .preview figcaption {
    animation: paper-arrives 520ms ease-out backwards;
  }
  h1 { animation-delay: 55ms; }
  .cover p { animation-delay: 105ms; }
  .button { animation-delay: 155ms; }
  .preview-spread a { animation-delay: 210ms; }
  .preview-spread a + a { animation-delay: 265ms; }
  .preview figcaption { animation-delay: 310ms; }
}

@media (max-width: 39rem) {
  .header-row { flex-wrap: wrap; gap: 0; min-height: 3.75rem; padding-block: 0.55rem 0.25rem; }
  .header-row nav { flex: 1 0 100%; flex-wrap: wrap; justify-content: space-between; column-gap: 0.6rem; }
  .header-row nav a { display: inline-flex; align-items: center; min-height: 2.65rem; }
  .test-nav { display: none; }
  .contents { grid-template-columns: minmax(0, 1fr); }
  .delivery { grid-template-columns: minmax(0, 1fr); }
  .delivery-art { min-height: 0; }
  .delivery-art img { aspect-ratio: 2 / 1; }
}

@media (max-width: 21rem) {
  .brand { gap: 0.4rem; }
  .header-row { gap: 0.5rem; }
  .header-row a { font-size: 0.875rem; }
  .cover { padding-inline: 0.8rem; }
  h1 { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .preview-spread a { transition: none; transform: none; }
  .button:hover, .button:active, .preview-spread a:hover { transform: none; }
}

.cover .letter-link { display: block; width: fit-content; margin-top: .75rem; color: var(--pine); font-weight: 600; }
