@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --ink-950: #05070d;
  --ink-900: #090d16;
  --snow: #f3f7ff;
  --steel: #9aa3b2;
  --line: transparent;
  --accent: #e3002d;
  --accent-soft: #e3002d;
  --container: min(1220px, calc(100vw - 56px));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(circle at 15% 0%, #101726 0%, var(--ink-950) 55%), var(--ink-950);
  color: var(--snow);
  font-family: 'Space Grotesk', sans-serif;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; }

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

.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: var(--container);
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.45);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand img { width: clamp(108px, 12vw, 170px); height: auto; }

.nav {
  display: flex;
  gap: clamp(10px, 2vw, 24px);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav a {
  color: rgba(255, 255, 255, 0.9);
}

.page-hero {
  padding: clamp(120px, 16vh, 180px) 0 34px;
}

.kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .68rem;
  color: rgba(255,255,255,.72);
}

.page-title {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  line-height: .92;
  letter-spacing: .04em;
  font-size: clamp(2.8rem, 9vw, 7rem);
}

.page-intro {
  margin: 12px 0 0;
  max-width: 62ch;
  color: rgba(243,247,255,.8);
}

.book-controls {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 14px;
}

.book-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-filter {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(243,247,255,.86);
  border-radius: 999px;
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .66rem;
  cursor: pointer;
}

.book-filter.is-active {
  border-color: var(--accent);
  background: rgba(227, 0, 45, 0.22);
  color: #fff;
  box-shadow: 0 8px 18px rgba(227, 0, 45, 0.26);
}

.book-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  padding-bottom: 70px;
}

.book-card {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(152deg, rgba(13, 20, 34, 0.92), rgba(8, 12, 20, 0.86));
  transition: transform .25s ease;
}

.book-card:hover { transform: translateY(-4px); }

.book-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.book-media img { width: 100%; height: 100%; object-fit: cover; }
.book-media img {
  object-fit: contain;
  object-position: 50% 50%;
  transform: none;
}

.book-open {
  position: absolute;
  inset: auto auto 12px 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(6, 9, 17, 0.8);
  color: #fff;
  font-size: .67rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.book-meta { padding: 12px 14px 14px; }

.book-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.book-chip {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(243,247,255,.75);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  padding: 4px 8px;
}

.book-meta h3 { margin: 0 0 6px; font-size: 1.03rem; }
.book-meta p { margin: 0; color: var(--steel); font-size: .9rem; line-height: 1.45; }

.book-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(243,247,255,.58);
}

.book-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255,255,255,.24);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.book-empty h3 { margin: 0 0 6px; }
.book-empty p { margin: 0; color: var(--steel); }

.book-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.book-modal.is-open { opacity: 1; pointer-events: auto; }

.book-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,5,10,.84);
  backdrop-filter: blur(4px);
}

.book-modal-panel {
  position: relative;
  width: min(980px, calc(100vw - 36px));
  margin: 5vh auto 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(145deg, rgba(12, 18, 30, 0.96), rgba(8, 12, 22, 0.95));
}

.book-modal-image,
.book-modal-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.book-modal-video { display: none; }
.book-modal-video.is-visible { display: block; }
.book-modal-image.is-hidden { display: none; }

.book-modal-meta { padding: 14px 16px 16px; }
.book-modal-kicker {
  margin: 0 0 8px;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: rgba(243,247,255,.64);
}
.book-modal-title { margin: 0 0 8px; font-size: 1.3rem; }
.book-modal-description { margin: 0; color: var(--steel); }

.book-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(8,12,22,.76);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .64rem;
  cursor: pointer;
}

.page-footer {
  border-top: none;
  background: #16181d;
}

.page-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 22px;
  padding: 34px 0 24px;
}

.page-footer-brand {
  display: grid;
  gap: 12px;
}

.page-footer-logo-wrap {
  width: 132px;
  padding: 8px;
  border-radius: 8px;
  background: #16181d;
}

.page-footer-logo-wrap img {
  width: 100%;
  height: auto;
}

.page-footer-brand p {
  margin: 0;
  color: rgba(243, 247, 255, 0.64);
  max-width: 32ch;
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-footer-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.page-footer-column h4 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 247, 255, 0.62);
}

.page-footer-column a,
.page-footer-column p {
  margin: 0;
  color: rgba(243, 247, 255, 0.88);
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icons a {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(243, 247, 255, 0.86);
  background: rgba(255, 255, 255, 0.03);
}

.social-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.page-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 24px;
  border-top: none;
}

.page-footer-bottom p {
  margin: 0;
  color: rgba(243,247,255,.58);
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.page-footer-legal {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-footer-legal a {
  color: rgba(243,247,255,.68);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.modal-open { overflow: hidden; }

.gdpr-widget {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 130;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.gdpr-panel {
  width: min(320px, calc(100vw - 36px));
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(227, 0, 45, 0.16) 0%, rgba(227, 0, 45, 0) 34%),
    linear-gradient(145deg, rgba(11, 17, 29, 0.96), rgba(7, 11, 20, 0.94));
  backdrop-filter: blur(14px) saturate(1.05);
  box-shadow:
    0 24px 46px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 13px 13px 12px;
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.gdpr-title {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
}

.gdpr-text {
  margin: 7px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(243, 247, 255, 0.8);
}

.gdpr-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.gdpr-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.gdpr-btn-ghost {
  color: rgba(243, 247, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.gdpr-btn-solid {
  color: #fff;
  border-color: rgba(227, 0, 45, 0.64);
  background: linear-gradient(120deg, rgba(227, 0, 45, 0.9), rgba(227, 0, 45, 0.9));
}

.gdpr-fab {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(140deg, rgba(14, 21, 36, 0.96), rgba(9, 14, 24, 0.94));
  backdrop-filter: blur(12px);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gdpr-cookie-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(243, 247, 255, 0.95);
}

.gdpr-cookie-icon::before,
.gdpr-cookie-icon::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.gdpr-cookie-icon::before {
  width: 8px;
  height: 8px;
  right: -3px;
  top: -2px;
  background: rgba(9, 14, 24, 0.98);
}

.gdpr-cookie-icon::after {
  width: 2.6px;
  height: 2.6px;
  left: 4px;
  top: 4px;
  background: rgba(243, 247, 255, 0.95);
  box-shadow:
    6px 1px 0 rgba(243, 247, 255, 0.95),
    3px 7px 0 rgba(243, 247, 255, 0.95),
    8px 8px 0 rgba(243, 247, 255, 0.95);
}

.gdpr-widget:not(.is-closed) .gdpr-fab {
  opacity: 0;
  pointer-events: none;
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 80px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(9, 14, 24, 0.94);
  color: rgba(243, 247, 255, 0.94);
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 130;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gdpr-widget.is-closed .gdpr-panel {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Borderless direction for all secondary pages (book/legal/privacy). */
.topbar,
.book-controls,
.book-filter,
.book-chip,
.book-empty,
.book-modal-panel,
.book-modal-close,
.social-icons a,
.gdpr-panel,
.gdpr-btn,
.gdpr-fab,
.gdpr-cookie-icon,
.scroll-top {
  border: none !important;
}

.topbar,
.book-controls,
.book-card,
.book-modal-panel,
.book-modal-close,
.social-icons a,
.gdpr-panel,
.gdpr-btn,
.gdpr-fab,
.scroll-top {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1100px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .page-footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  :root { --container: min(1220px, calc(100vw - 34px)); }
  .topbar {
    top: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav { gap: 10px; font-size: .66rem; flex-wrap: wrap; }
  .book-grid { grid-template-columns: 1fr; }
  .page-footer-grid { grid-template-columns: 1fr; }
  .page-footer-bottom { flex-direction: column; align-items: flex-start; }
  .gdpr-widget { left: 10px; bottom: 10px; }
  .scroll-top { right: 10px; bottom: 72px; }
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 64px;
}

.reference-card {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(6, 10, 20, 0.7);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.reference-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

@supports not (aspect-ratio: 16 / 9) {
  .book-media,
  .reference-media {
    height: 240px;
  }
}

.reference-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  transform: none;
}

.reference-media::after {
  content: none;
}

.reference-chip {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(7, 12, 24, 0.75);
  color: rgba(255, 255, 255, 0.96);
  font-weight: 700;
  line-height: 1;
}

.reference-card h3 {
  margin: 12px;
  font-size: 1rem;
  line-height: 1.3;
}

@media (max-width: 980px) {
  .references-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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