:root {
  --paper: #faf8f3;
  --ink: #161514;
  --muted: #69635d;
  --line: #ded8cf;
  --ivory: #fffdf8;
  --wine: #7a2935;
  --moss: #596844;
  --sea: #50687d;
  --ochre: #c58c47;
  --charcoal: #242221;
  --shadow: 0 24px 60px rgba(30, 26, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(250, 248, 243, 0.86);
  border-bottom: 1px solid rgba(222, 216, 207, 0.8);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(18px, 4vw, 56px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 22px;
}

.language-switch {
  background: #ede7dc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  padding: 3px;
}

.language-button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #4c4742;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
}

.language-button.active {
  background: var(--ivory);
  box-shadow: 0 4px 12px rgba(37, 33, 29, 0.1);
  color: var(--ink);
}

.brand {
  align-items: center;
  display: inline-flex;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--wine);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-family: Inter, sans-serif;
  font-size: 12px;
  height: 36px;
  justify-content: center;
  letter-spacing: 0;
  width: 36px;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: clamp(12px, 2vw, 26px);
  font-size: 14px;
  font-weight: 600;
  color: #34302c;
}

.main-nav a {
  border-bottom: 2px solid transparent;
  padding: 8px 0;
}

.main-nav a:hover {
  border-color: var(--wine);
}

.hero {
  min-height: 92vh;
  overflow: hidden;
  position: relative;
}

.hero-photo {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(19, 16, 14, 0.82) 0%, rgba(19, 16, 14, 0.58) 38%, rgba(19, 16, 14, 0.1) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.34));
  inset: 0;
  position: absolute;
}

.hero-content {
  color: #fffaf2;
  max-width: 720px;
  padding: 22vh clamp(22px, 7vw, 96px) 12vh;
  position: relative;
  z-index: 1;
}

.kicker,
.eyebrow {
  color: var(--ochre);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(52px, 8vw, 112px);
}

h2 {
  font-size: clamp(32px, 4vw, 56px);
}

h3 {
  font-size: 22px;
}

.hero-copy {
  color: rgba(255, 250, 242, 0.9);
  font-size: clamp(18px, 2vw, 24px);
  margin: 26px 0 34px;
  max-width: 660px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--wine);
  color: #fff;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #fff;
}

.button.neutral {
  background: var(--charcoal);
  color: #fff;
}

.button.outline-dark {
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
}

.intro-band,
.quote-band {
  background: var(--charcoal);
  color: #f8f2e8;
}

.intro-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(54px, 8vw, 94px) clamp(22px, 5vw, 56px);
}

.intro-grid p:last-child {
  color: rgba(248, 242, 232, 0.78);
  font-size: 19px;
  margin: 8px 0 0;
}

.section {
  margin: 0 auto;
  max-width: 1240px;
  padding: clamp(58px, 8vw, 100px) clamp(22px, 5vw, 56px);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 34px;
}

.section-heading.compact {
  align-items: start;
}

.filters {
  background: #ede7dc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  padding: 4px;
}

.filter-button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #4c4742;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 13px;
}

.filter-button.active {
  background: var(--ivory);
  box-shadow: 0 6px 16px rgba(37, 33, 29, 0.1);
  color: var(--ink);
}

.book-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.book-card:has(.book-link) {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.book-card:has(.book-link):hover {
  border-color: rgba(122, 41, 53, 0.34);
  box-shadow: 0 18px 44px rgba(30, 26, 22, 0.1);
  transform: translateY(-2px);
}

.cover-wrap {
  background: #ede7dc;
  display: grid;
  min-height: 340px;
  place-items: center;
  padding: 24px;
}

.book-cover {
  aspect-ratio: 0.64;
  border-radius: 3px;
  box-shadow: var(--shadow);
  color: #f9f1df;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 178px;
  overflow: hidden;
  padding: 24px 18px 18px;
  position: relative;
  text-align: center;
  width: 100%;
}

.real-cover {
  aspect-ratio: 0.625;
  border-radius: 3px;
  box-shadow: var(--shadow);
  max-height: 292px;
  object-fit: cover;
  width: auto;
}

.book-cover::before {
  content: "";
  inset: 0;
  opacity: 0.7;
  position: absolute;
}

.book-cover > * {
  position: relative;
  z-index: 1;
}

.cover-author,
.cover-subtitle {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 10px;
}

.cover-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
}

.cover-subtitle {
  font-style: italic;
  line-height: 1.35;
}

.cover-es.sea {
  background: linear-gradient(180deg, #c9d0d0, #839099 44%, #172027);
}

.cover-es.sea::before {
  background: linear-gradient(160deg, transparent 42%, rgba(255, 255, 255, 0.18) 43%, transparent 55%);
}

.cover-wine {
  background: linear-gradient(180deg, #16110f, #5b392b 48%, #191311);
}

.cover-wine::before {
  background: radial-gradient(circle at 70% 62%, rgba(216, 151, 74, 0.35), transparent 28%);
}

.cover-hospital {
  background: linear-gradient(180deg, #47443e, #121414 50%, #2d2c28);
}

.cover-hospital::before {
  background: linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.16) 49%, transparent 51%);
}

.cover-house {
  background: linear-gradient(180deg, #908f89, #4a4d47 48%, #1c1a18);
}

.cover-house::before {
  background: radial-gradient(circle at 50% 72%, rgba(190, 160, 102, 0.34), transparent 24%);
}

.cover-blue {
  background: linear-gradient(180deg, #b4c1d4, #6f879d 48%, #151b25);
}

.cover-brown {
  background: linear-gradient(180deg, #4a3727, #80684d 48%, #18130f);
}

.cover-brown::before {
  background: radial-gradient(circle at 46% 58%, rgba(248, 226, 177, 0.28), transparent 35%);
}

.book-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.language-pill {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 4px 9px;
}

.book-body h3 {
  font-family: Inter, sans-serif;
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.book-body p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}

.book-meta {
  color: var(--wine);
  font-size: 13px;
  font-weight: 700;
  margin-top: auto;
}

.book-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
}

.book-link {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: space-between;
}

.book-link.secondary {
  color: var(--muted);
  font-weight: 700;
}

.book-link::after {
  content: ">";
  color: var(--wine);
  font-weight: 900;
}

.book-detail-main {
  padding-top: 94px;
}

.book-detail-hero {
  background: #f7f3ee;
  border-bottom: 1px solid var(--line);
  padding: clamp(44px, 7vw, 86px) clamp(22px, 5vw, 72px);
}

.book-detail-grid {
  align-items: center;
  display: grid;
  gap: clamp(32px, 6vw, 84px);
  grid-template-columns: minmax(210px, 0.54fr) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1120px;
}

.book-detail-cover {
  background: #efe8df;
  border-radius: 6px;
  box-shadow: 0 22px 46px rgba(40, 31, 24, 0.18);
  padding: clamp(14px, 2vw, 22px);
}

.book-detail-cover img {
  border-radius: 3px;
  display: block;
  width: 100%;
}

.book-detail-copy h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  margin-bottom: 20px;
}

.book-detail-copy .lead {
  color: #423a33;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
  max-width: 780px;
}

.book-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
}

.book-detail-meta span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
}

.book-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.book-detail-section {
  margin: 0 auto;
  max-width: 1040px;
  padding: clamp(44px, 7vw, 82px) clamp(22px, 5vw, 72px);
}

.book-detail-section h2 {
  font-size: clamp(28px, 4vw, 46px);
  margin-bottom: 18px;
}

.book-detail-section h3 {
  font-family: Inter, sans-serif;
  font-size: 18px;
  margin: 30px 0 10px;
}

.book-detail-section p {
  color: #423a33;
  font-size: 18px;
  line-height: 1.75;
}

.book-detail-note {
  background: #f7f3ee;
  border-left: 4px solid var(--wine);
  color: #423a33;
  margin-top: 28px;
  padding: 18px 22px;
}

.book-detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.feature-band {
  align-items: stretch;
  background: #e7e0d6;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.feature-media img {
  height: 100%;
  min-height: 640px;
  object-fit: cover;
  object-position: center 18%;
  width: 100%;
}

.feature-copy {
  align-self: center;
  max-width: 720px;
  padding: clamp(54px, 8vw, 104px) clamp(28px, 7vw, 96px);
}

.feature-copy p {
  color: #4d4740;
  font-size: 18px;
}

blockquote {
  border-left: 4px solid var(--wine);
  color: #302b26;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 21px;
  margin: 30px 0 0;
  padding-left: 20px;
}

.gallery-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 0.8fr 1fr;
}

figure {
  margin: 0;
  overflow: hidden;
  position: relative;
}

figure:first-child {
  grid-row: span 2;
}

figure img {
  aspect-ratio: 4 / 3;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

figure img.portrait-focus-top {
  object-position: center 18%;
}

figure:first-child img {
  aspect-ratio: auto;
}

figcaption {
  display: none;
}

.quote-band {
  display: grid;
  min-height: 320px;
  place-items: center;
  padding: clamp(58px, 8vw, 94px) clamp(24px, 12vw, 180px);
  text-align: center;
}

.quote-band p {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.25;
  margin: 0;
  max-width: 1100px;
}

.contact-section {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
}

.contact-section p {
  color: var(--muted);
  font-size: 18px;
  max-width: 720px;
}

.contact-copy-block .contact-actions {
  margin-top: 24px;
}

.contact-form {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(30, 26, 22, 0.08);
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 28px);
}

.contact-form label {
  color: #3c3731;
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 7px;
}

.contact-form input,
.contact-form textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 12px 13px;
  width: 100%;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--wine);
  outline: 3px solid rgba(122, 41, 53, 0.14);
}

.form-submit {
  border: 0;
  cursor: pointer;
  width: 100%;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.form-status {
  font-size: 14px;
  margin: 0;
  min-height: 22px;
}

.form-status.success {
  color: var(--moss);
}

.form-status.error {
  color: var(--wine);
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 14px;
  gap: 16px;
  justify-content: space-between;
  padding: 26px clamp(22px, 5vw, 56px);
}

.cookie-banner {
  align-items: center;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 20px 54px rgba(30, 26, 22, 0.18);
  display: flex;
  gap: 16px;
  left: 18px;
  max-width: 680px;
  padding: 16px;
  position: fixed;
  right: 18px;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  color: #4d4740;
  flex: 1;
  font-size: 14px;
  margin: 0;
}

.cookie-button {
  border: 0;
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .site-header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    position: absolute;
  }

  .header-actions {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 860px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(19, 16, 14, 0.28), rgba(19, 16, 14, 0.88) 58%, rgba(19, 16, 14, 0.95));
  }

  .hero-content {
    padding-top: 300px;
  }

  .intro-grid,
  .book-detail-grid,
  .feature-band,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .book-detail-main {
    padding-top: 0;
  }

  .book-detail-cover {
    justify-self: start;
    max-width: 330px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-wrap {
    min-height: 300px;
  }

  .feature-media img {
    min-height: 420px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  figure:first-child {
    grid-row: auto;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
  }

  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .book-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    padding-top: 270px;
  }

  .filters {
    width: 100%;
  }

  .filter-button {
    flex: 1;
  }

  .book-detail-actions,
  .book-detail-nav {
    align-items: stretch;
    flex-direction: column;
  }
}
