/* ---------- tokens ---------- */
:root {

  --night-a: #081B33;
  --night-b: #0B2545;
  --indigo-deep: #13315C;
  --brass: #B68A46;
  --brass-soft: #C9A56C;
  --paper: #EAE5D8;
  --paper-a: #F2F1EF;
  --paper-b: #F1ECE1;
  --paper-c: #E0D9CC;
  --paper-raised: #F1EDE3;
  --paper-ink: #201C16;
  --paper-ink-soft: #4A443A;
  --rosewood: #7C3F3A;
  --rosewood-hover: #954A44;

  --night-text: #EFECE3;
  --night-text-soft: #CAC6BB;
/* colors of the past
  --night-a: #1D1E2C;
  --night-b: #232236;
  --indigo-deep: #2A2E48;
  --brass: #B68A46;
  --brass-soft: #C9A56C;
  --paper: #EAE5D8;
  --paper-a: #EAE5D8;
  --paper-b: #F1ECE1;
  --paper-c: #DFD3BA;
  --paper-raised: #F1EDE3;
  --paper-ink: #201C16;
  --paper-ink-soft: #4A443A;
  --rosewood: #7C3F3A;
  --rosewood-hover: #954A44;

  --night-text: #EFECE3;
  --night-text-soft: #CAC6BB;
*/
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h: 64px;
  --content-max: 1080px;
  --narrow-max: 1080px;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--night-text);
  background: var(--night-a);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 200;
  transition: top 0.2s ease;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus { top: 1rem; }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass-soft);
  outline-offset: 3px;
}

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(29, 30, 44, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(182, 138, 70, 0.25);
}
.nav-inner {
  max-width: var(--content-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
}
.nav-brand img { opacity: 0.92; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--night-text-soft);
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--paper); border-color: var(--brass); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 1.5px; width: 22px; background: var(--paper); margin: 0 auto; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- sections & layout ---------- */
.section { padding: 72px 24px; }
.section--hero { padding-top: 112px; padding-bottom: 56px; position: relative; overflow: hidden; }
.wrap { max-width: var(--content-max); margin: 0 auto; position: relative; z-index: 1; }
.wrap--narrow { max-width: var(--narrow-max); margin: 0 auto; }

.hero-motif {
  display: none;
  position: absolute;
  top: 50%;
  right: 48px;
  width: 260px;
  height: 260px;
  transform: translateY(-50%);
  opacity: 0.13;
  pointer-events: none;
}
@media (min-width: 1360px) {
  .hero-motif { display: block; }
}

.section--night { background: var(--night-a); }
.section--night-a { background: var(--night-a); }
.section--night-b { background: var(--night-b); }
.section--indigo { background: var(--indigo-deep); }
.section--paper { background: var(--paper-a); color: var(--paper-ink); }
.section--paper-a { background: var(--paper-a); }
.section--paper-b { background: var(--paper-b); }
.section--paper-c { background: var(--paper-c); }
.section--contact { padding-top: 64px; padding-bottom: 64px; }

/* ---------- type scale ---------- */
.display-xl {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 28px 0 44px;
  color: var(--paper);
}
.display-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 32px;
  color: var(--paper);
}
.display-sm {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 28px;
}
.section--paper .display-sm { color: var(--paper-ink); }
.section--night .display-sm { color: var(--paper); }

/* ---------- prose ---------- */
.prose { max-width: 85ch; }
.prose p { font-size: 17px; line-height: 1.75; margin: 0 0 20px; }
.prose--night p { color: var(--night-text-soft); }
.prose--night p:first-child { color: var(--night-text); }
.prose--paper p { color: var(--paper-ink-soft); }
.prose em { font-family: var(--font-display); font-style: italic; font-weight: 500; }

.pull-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--brass-soft);
  max-width: 22ch;
  margin: 8px 0 20px;
  line-height: 1.3;
}
.pull-line--sm { font-size: clamp(1.25rem, 2vw, 1.6rem); max-width: 26ch; color: var(--brass-soft); }
.section--indigo .pull-line--sm { color: var(--brass-soft); }

.lede { font-size: 18px; color: var(--night-text-soft); max-width: 70ch; line-height: 1.6; margin: 0; }

/* ---------- hero rule motif ---------- */
.hero-rule {
  width: 96px;
  height: 2px;
  background: var(--brass);
  margin: 0;
  transform-origin: right center;
  animation: rule-settle 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rule-settle {
  from { transform: translateX(56px) scaleX(0.25); opacity: 0; }
  to { transform: translateX(0) scaleX(1); opacity: 1; }
}

/* ---------- section divider motif ---------- */
.motif { width: 100%; padding: 30px 0; }
.motif-inner { display: flex; align-items: center; justify-content: center; gap: 14px; width: min(220px, 60%); margin: 0 auto; }
.motif-inner span { flex: 1; height: 1px; background: rgba(182, 138, 70, 0.4); }
.motif-inner i { display: block; width: 6px; height: 6px; background: var(--brass); transform: rotate(45deg); flex-shrink: 0; font-style: normal; }
.motif--night, .motif--night-a { background: var(--night-a); }
.motif--night-b { background: var(--night-b); }
.motif--indigo { background: var(--indigo-deep); }
.motif--paper, .motif--paper-a { background: var(--paper-a); }
.motif--paper-b { background: var(--paper-b); }
.motif--paper-c { background: var(--paper-c); }
.motif--paper .motif-inner span,
.motif--paper-a .motif-inner span,
.motif--paper-b .motif-inner span,
.motif--paper-c .motif-inner span { background: rgba(124, 63, 58, 0.25); }
.motif--paper .motif-inner i,
.motif--paper-a .motif-inner i,
.motif--paper-b .motif-inner i,
.motif--paper-c .motif-inner i { background: var(--rosewood); }

/* ---------- catalog split (section 3) ---------- */
.catalog-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 44px 0 40px;
  border-top: 1px solid rgba(182, 138, 70, 0.3);
}
.catalog-col { padding: 32px 32px 8px 0; border-bottom: 1px solid rgba(182, 138, 70, 0.3); }
.catalog-col:last-child { padding-left: 32px; padding-right: 0; border-left: 1px solid rgba(182, 138, 70, 0.3); }
.catalog-col h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--paper); margin: 0 0 12px; }
.catalog-col p { color: var(--night-text-soft); font-size: 16px; line-height: 1.65; margin: 0; }

/* ---------- eyebrow / small labels (content-based, sentence case) ---------- */
.eyebrow-plain { font-size: 23px; color: var(--paper-ink-soft); margin: 0 0 8px; font-style: italic; font-family: var(--font-display); }
.prose-note { max-width: 74ch; color: var(--paper-ink-soft); font-size: 15.5px; line-height: 1.7; margin-top: 40px; }

/* ---------- book plate (section 6) ---------- */
.book-plate { margin: 40px 0 0; max-width: 780px; }
.book-plate__frame {
  border: 1px solid var(--brass);
  padding: 44px 40px;
  position: relative;
  background: var(--paper);
  display: flex;
  align-items: flex-start;
  gap: 36px;
}
.book-plate__frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(182, 138, 70, 0.45);
  pointer-events: none;
}
.book-plate__cover {
  flex: 0 0 200px;
  display: block;
  box-shadow: 0 6px 18px rgba(32, 28, 22, 0.28);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.book-plate__cover:hover { box-shadow: 0 8px 22px rgba(32, 28, 22, 0.36); transform: translateY(-2px); }
.book-plate__cover img { width: 100%; height: auto; }
.book-plate__body { flex: 1 1 auto; min-width: 0; }
.book-plate__kicker { font-size: 13px; letter-spacing: 0.03em; color: var(--rosewood); margin: 0 0 14px; }
.book-plate__title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 10px; color: var(--paper-ink); }
.book-plate__title a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
.book-plate__title a:hover, .book-plate__title a:focus-visible { border-color: var(--brass); }
.book-plate__byline { font-size: 16px; color: var(--paper-ink); margin: 0 0 4px; }
.book-plate__translator { font-size: 14.5px; color: var(--paper-ink-soft); font-style: italic; margin: 0 0 24px; }
.book-plate__desc { font-size: 16.5px; line-height: 1.65; color: var(--paper-ink-soft); max-width: 56ch; margin: 0 0 18px; }
.book-plate__desc strong { font-weight: 600; color: var(--paper-ink); }
.book-plate__format { font-size: 14.5px; color: var(--paper-ink-soft); margin: 0 0 28px; }

/* ---------- book page ---------- */
.book-page {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
}
.book-page__cover { margin: 0; box-shadow: 0 10px 28px rgba(32, 28, 22, 0.3); }
.book-page__cover img { width: 100%; height: auto; }
.book-page__title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.1; margin: 0 0 14px; color: var(--paper-ink); }
.book-page__byline { font-size: 18px; color: var(--paper-ink); margin: 0 0 4px; }
.book-page__translator { font-size: 15.5px; color: var(--paper-ink-soft); font-style: italic; margin: 0 0 32px; }
.book-page__desc { font-size: 17px; line-height: 1.75; color: var(--paper-ink-soft); max-width: 60ch; margin: 0 0 20px; }
.book-page__desc strong { font-weight: 600; color: var(--paper-ink); }
.book-page__format { font-size: 14.5px; color: var(--paper-ink-soft); margin: 12px 0 28px; }
.buy-block { border-top: 1px solid rgba(124, 63, 58, 0.25); padding-top: 28px; margin-top: 32px; }
.buy-block__label { font-size: 13px; letter-spacing: 0.03em; color: var(--rosewood); margin: 0 0 14px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; }
.back-link { display: inline-block; margin-top: 40px; font-size: 15px; color: var(--paper-ink-soft); text-decoration: none; border-bottom: 1px solid rgba(124, 63, 58, 0.4); }
.back-link:hover { color: var(--paper-ink); border-color: var(--rosewood); }

/* ---------- offer list (section 7) ---------- */
.offer-list { list-style: none; margin: 32px 0 40px; padding: 0; max-width: 74ch; }
.offer-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 18px;
  font-size: 16.5px;
  line-height: 1.65;
}
.offer-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--rosewood);
  transform: rotate(45deg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--rosewood); color: #F5EDEA; }
.btn--primary:hover { background: var(--rosewood-hover); }
.btn--outline {
  background: transparent;
  border-color: var(--paper-ink);
  color: var(--paper-ink);
}
.btn--outline:hover { background: var(--paper-ink); color: var(--paper); }

/* ---------- contact ---------- */
.contact-block { font-style: normal; }
.contact-block p { margin: 0 0 10px; font-size: 16.5px; color: var(--night-text-soft); }
.contact-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--paper); margin-bottom: 16px !important; }
.contact-block a { text-decoration: none; border-bottom: 1px solid rgba(182, 138, 70, 0.5); }
.contact-block a:hover { color: var(--paper); border-color: var(--brass); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--night-a);
  border-top: 1px solid rgba(182, 138, 70, 0.2);
  padding: 22px 24px 32px;
  text-align: center;
}
.site-footer p { margin: 0; font-size: 13px; color: var(--night-text-soft); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .book-page { grid-template-columns: 1fr; gap: 36px; }
  .book-page__cover { max-width: 300px; }
  .catalog-split { grid-template-columns: 1fr; }
  .catalog-col, .catalog-col:last-child { padding: 28px 0; border-left: none; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--night-a);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid rgba(182, 138, 70, 0.25);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid rgba(182, 138, 70, 0.12); }
  .nav-toggle { display: flex; }

  .section { padding: 52px 20px; }
  .section--hero { padding-top: 88px; padding-bottom: 44px; }
  .note-panel { padding: 28px 24px; }
  .book-plate__frame { padding: 32px 24px; flex-direction: column; align-items: center; gap: 28px; }
  .book-plate__cover { flex: 0 0 auto; width: 180px; }
  .book-plate__body { width: 100%; }
}
