/* Studio Dolci book worlds V10 */

html[data-book-theme="catorce"] {
  --book-bg: #09163c;
  --book-surface: #14275a;
  --book-ink: #f7f2ed;
  --book-accent: #f4a9cc;
  --book-accent-2: #9cc9ed;
  --book-paper: #e8f1f6;
}

html[data-book-theme="poem"] {
  --book-bg: #08090c;
  --book-surface: #161318;
  --book-ink: #fff7ee;
  --book-accent: #ef7447;
  --book-accent-2: #55c8c3;
  --book-paper: #f2ece4;
}

html[data-book-theme="spensierati"] {
  --book-bg: #f3c63f;
  --book-surface: #f8dc79;
  --book-ink: #155d86;
  --book-accent: #fff7d8;
  --book-accent-2: #216e98;
  --book-paper: #fff8df;
}

html[data-color-mode="dark"][data-book-theme="spensierati"] {
  --book-bg: #171414;
  --book-surface: #2c261d;
  --book-ink: #ffe982;
  --book-accent: #286b97;
  --book-accent-2: #9bcff0;
  --book-paper: #211d19;
}

html[data-color-mode="dark"][data-book-theme="catorce"] {
  --book-bg: #050b22;
  --book-surface: #0d1940;
  --book-paper: #0e1835;
}

html[data-color-mode="dark"][data-book-theme="poem"] {
  --book-bg: #050507;
  --book-surface: #100e12;
  --book-paper: #181419;
}

.v10-book-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--book-bg);
  color: var(--book-ink);
  transition: background 600ms ease, color 450ms ease;
}

.v10-book-page * { box-sizing: border-box; }
.v10-book-page a { color: inherit; }

.v10-book-wipe {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--book-bg);
  color: var(--book-ink);
  transform-origin: top;
  pointer-events: none;
}

.v10-book-wipe span {
  max-width: 12ch;
  font-family: var(--wide);
  font-size: clamp(42px, 8vw, 128px);
  letter-spacing: -.07em;
  line-height: .8;
  text-align: center;
  text-transform: uppercase;
}

.v11-book-loader > div {
  display: grid;
  width: min(70vw, 560px);
  place-items: center;
}

.v11-book-loader-mark {
  width: 100%;
  aspect-ratio: 720 / 520;
}

.v11-book-loader > div > span:not(.v11-book-loader-mark) {
  margin-top: -8%;
  font-size: clamp(24px, 3vw, 44px);
}

.v11-book-loader > div > i {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(13px, 1.2vw, 19px);
  font-style: italic;
  text-align: center;
}

html[data-book-theme="catorce"] .v11-book-loader .v10-brand-brown,
html[data-book-theme="poem"] .v11-book-loader .v10-brand-brown { opacity: 0; }
html[data-book-theme="catorce"] .v11-book-loader .v10-brand-cream,
html[data-book-theme="poem"] .v11-book-loader .v10-brand-cream { opacity: 1; }

.v10-book-header {
  position: fixed;
  z-index: 200;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  min-height: 72px;
  padding: 8px clamp(14px, 2.8vw, 42px);
  grid-template-columns: 150px 1fr auto auto;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, currentColor 23%, transparent);
  background: color-mix(in srgb, var(--book-bg) 90%, transparent);
  backdrop-filter: blur(18px);
}

.v10-book-header > a:first-child {
  display: block;
  width: 146px;
  height: 48px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 999px;
}

.v10-book-brand {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.v10-book-brand img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 420ms ease;
}

.v10-brand-cream { opacity: 0; }
html[data-color-mode="dark"] .v10-brand-brown { opacity: 0; }
html[data-color-mode="dark"] .v10-brand-cream { opacity: 1; }
html[data-book-theme="catorce"] .v10-brand-brown,
html[data-book-theme="poem"] .v10-brand-brown { opacity: 0; }
html[data-book-theme="catorce"] .v10-brand-cream,
html[data-book-theme="poem"] .v10-brand-cream { opacity: 1; }

.v10-book-header nav {
  display: flex;
  justify-self: end;
  gap: 4px;
}

.v10-book-header nav a {
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
}

.v10-book-header nav a[aria-current="page"] { border-color: currentColor; }

.v10-book-header button {
  display: flex;
  min-width: 80px;
  min-height: 36px;
  padding: 0 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
}

.v10-book-header button i {
  position: relative;
  width: 14px;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.v10-book-header button i::after {
  position: absolute;
  inset: 1px 1px 1px 50%;
  border-radius: 0 99px 99px 0;
  background: currentColor;
  content: "";
}

.v10-book-header button span,
.v10-book-header > a:last-child {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.v10-book-hero {
  position: relative;
  display: grid;
  min-height: max(760px, 100svh);
  padding: clamp(118px, 13vw, 190px) clamp(22px, 5vw, 82px) clamp(46px, 6vw, 92px);
  grid-template-columns: minmax(360px, .9fr) minmax(390px, 1.1fr);
  grid-template-rows: 1fr auto;
  gap: 36px clamp(42px, 7vw, 120px);
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.v10-book-hero::before,
.v10-book-hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.v10-book-hero::before {
  top: 50%;
  right: 6%;
  width: min(47vw, 690px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  transform: translateY(-50%);
}

.v10-book-hero::after {
  top: 14%;
  right: 14%;
  width: min(24vw, 360px);
  aspect-ratio: 1;
  background: var(--book-accent-2);
  filter: blur(90px);
  opacity: .26;
}

.v10-book-hero-copy { position: relative; z-index: 3; }
.v10-book-hero-copy > p:first-child,
.v10-book-world-copy > span,
.v10-book-story > p,
.v10-book-responsible > span,
.v10-book-related header > span {
  color: var(--book-accent-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.v10-book-hero-copy h1 {
  max-width: 10ch;
  margin: 22px 0;
  font-family: var(--wide);
  font-size: clamp(58px, 7.5vw, 136px);
  font-weight: 400;
  letter-spacing: -.08em;
  line-height: .76;
  overflow-wrap: normal;
  word-break: normal;
  text-transform: uppercase;
}

html[data-book-theme="spensierati"] .v10-book-hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(52px, 6.2vw, 108px);
}

.v20-unbreakable-title {
  display: inline-block;
  font-size: .93em;
  letter-spacing: -.095em;
  white-space: nowrap;
}

.v10-book-hero-copy > em {
  display: block;
  max-width: 30ch;
  margin-bottom: 22px;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 34px);
  line-height: 1.28;
}

.v10-book-hero-copy > p:not(:first-child) {
  max-width: 57ch;
  margin: 0;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.8;
}

.v10-book-hero-copy > div {
  display: flex;
  margin-top: 32px;
  gap: 9px;
  flex-wrap: wrap;
}

.v10-book-hero-copy > div a,
.v10-book-cta a {
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  transition: background 240ms ease, color 240ms ease, transform 240ms ease;
}

.v10-book-buy { background: var(--book-ink); color: var(--book-bg) !important; }
.v10-book-hero-copy > div a:hover,
.v10-book-cta a:hover { transform: translateY(-3px); }

.v10-book-cover-stage {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  perspective: 1200px;
}

.v10-book-cover-stage > span {
  position: absolute;
  width: min(43vw, 610px);
  aspect-ratio: 1;
  border: 1px dashed color-mix(in srgb, currentColor 38%, transparent);
  border-radius: 50%;
}

.v10-book-cover-stage > span::after {
  position: absolute;
  inset: 14%;
  border: 1px solid color-mix(in srgb, var(--book-accent-2) 55%, transparent);
  border-radius: 50%;
  content: "";
}

.v10-book-cover-stage img {
  position: relative;
  z-index: 2;
  width: min(54%, 360px);
  height: auto;
  max-height: min(68svh, 660px);
  object-fit: contain;
  box-shadow: 0 36px 80px rgba(0, 0, 0, .34);
  transform: rotateY(-7deg) rotateZ(2deg);
  transform-style: preserve-3d;
}

.v10-book-cover-stage > i {
  position: absolute;
  right: 1%;
  bottom: 8%;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.v10-book-facts {
  display: grid;
  margin: 0;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}

.v10-book-facts div {
  min-height: 76px;
  padding: 16px;
  border-right: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}

.v10-book-facts dt {
  color: var(--book-accent-2);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.v10-book-facts dd {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.2vw, 20px);
  font-style: italic;
}

.v10-book-world {
  position: relative;
  display: grid;
  min-height: 120svh;
  padding: clamp(92px, 9vw, 150px) clamp(22px, 5vw, 82px);
  grid-template-columns: minmax(440px, 1.15fr) minmax(360px, .85fr);
  gap: clamp(42px, 7vw, 120px);
  align-items: center;
  overflow: hidden;
  background: var(--book-paper);
  color: var(--book-ink);
}

.v10-book-world-media {
  position: relative;
  height: min(82svh, 900px);
  overflow: hidden;
  box-shadow: 0 34px 90px color-mix(in srgb, var(--book-bg) 28%, transparent);
}

.v10-book-world-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v10-book-world-copy h2,
.v10-book-story h2,
.v10-book-responsible h2,
.v10-book-related h2,
.v10-book-cta h2 {
  margin: 22px 0;
  font-family: var(--wide);
  font-size: clamp(54px, 7vw, 124px);
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .79;
  text-transform: uppercase;
}

.v10-book-world-copy p,
.v10-book-story article > p,
.v10-book-responsible > p {
  max-width: 55ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.55vw, 26px);
  line-height: 1.58;
}

.v19-book-editions {
  min-height: 92svh;
  padding: clamp(94px, 9vw, 150px) clamp(22px, 5vw, 82px);
  background: var(--book-bg);
  color: var(--book-ink);
}

.v19-book-editions > header {
  display: grid;
  margin-bottom: clamp(42px, 7vw, 92px);
  grid-template-columns: minmax(110px, .24fr) minmax(280px, 1.1fr) minmax(260px, .66fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}

.v19-book-editions > header > span {
  color: var(--book-accent-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.v19-book-editions h2 {
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(52px, 6.5vw, 116px);
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .8;
  text-transform: uppercase;
}

.v19-book-editions header p {
  max-width: 48ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 21px);
  line-height: 1.55;
}

.v19-book-editions > div {
  display: grid;
  max-width: 1400px;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(18px, 3vw, 44px);
}

.v19-book-editions figure {
  display: grid;
  width: 100%;
  max-width: 600px;
  margin: 0;
  justify-self: center;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  background: var(--book-surface);
  overflow: hidden;
}

.v19-book-editions figure img {
  width: 100%;
  height: min(60svh, 700px);
  padding: clamp(16px, 2.5vw, 36px);
  object-fit: contain;
  transition: transform 700ms cubic-bezier(.22, 1, .36, 1);
}

.v19-book-editions figure:hover img { transform: scale(1.025); }

.v19-book-editions figcaption {
  display: flex;
  min-height: 58px;
  padding: 14px 16px;
  align-items: center;
  gap: 14px;
  border-top: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.v19-book-editions figcaption span { color: var(--book-accent-2); }

.v10-book-story {
  display: grid;
  min-height: 92svh;
  padding: clamp(100px, 11vw, 180px) clamp(22px, 5vw, 82px);
  grid-template-columns: minmax(120px, .25fr) minmax(500px, 1.75fr);
  gap: clamp(36px, 8vw, 140px);
  align-items: center;
  background: var(--book-surface);
}

.v10-book-story h2 { max-width: 12ch; }
.v10-book-story ul {
  display: flex;
  margin: 38px 0 0;
  padding: 0;
  gap: 8px;
  list-style: none;
  flex-wrap: wrap;
}

.v10-book-story li {
  padding: 9px 13px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.v10-book-responsible {
  display: grid;
  min-height: 72svh;
  padding: clamp(100px, 11vw, 180px) clamp(22px, 5vw, 82px);
  place-items: center;
  align-content: center;
  background: var(--book-accent);
  color: var(--book-bg);
  text-align: center;
}

.v10-book-responsible h2 { max-width: 11ch; }
.v10-book-responsible p { max-width: 52ch; }

.v10-book-related {
  min-height: 90svh;
  padding: clamp(100px, 11vw, 180px) clamp(22px, 5vw, 82px);
  background: var(--book-bg);
}

.v10-book-related header {
  display: grid;
  margin-bottom: 62px;
  grid-template-columns: .3fr 1.7fr;
  gap: 40px;
  align-items: end;
}

.v10-book-related h2 { max-width: 11ch; margin: 0; }
.v10-book-related > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 66px);
}

.v10-book-related > div a {
  display: grid;
  min-height: 560px;
  padding: clamp(20px, 3vw, 46px);
  place-items: center;
  background: var(--book-surface);
  transition: transform 500ms cubic-bezier(.22, 1, .36, 1);
}

.v10-book-related > div a:hover { transform: translateY(-9px); }
.v10-book-related img { width: min(60%, 330px); max-height: 500px; object-fit: contain; filter: drop-shadow(0 25px 35px rgba(0, 0, 0, .28)); }
.v10-book-related a span { justify-self: stretch; padding-top: 18px; border-top: 1px solid color-mix(in srgb, currentColor 24%, transparent); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.v10-book-cta {
  display: grid;
  min-height: 82svh;
  padding: clamp(100px, 11vw, 180px) clamp(22px, 5vw, 82px);
  place-items: center;
  align-content: center;
  overflow: hidden;
  background: var(--book-surface);
  text-align: center;
}

.v10-book-cta > p { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 39px); font-style: italic; }
.v10-book-cta h2 { max-width: 12ch; }
.v10-book-cta > div { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }

.v10-book-footer {
  display: grid;
  min-height: 330px;
  padding: clamp(54px, 6vw, 86px) clamp(22px, 5vw, 82px) 28px;
  grid-template-columns: minmax(220px, .6fr) minmax(320px, 1.4fr);
  grid-template-rows: 1fr auto;
  gap: 40px;
  align-items: center;
  background: #0b0909;
  color: #fff3b7;
}

.v10-book-footer > a { width: min(320px, 100%); height: 110px; }
.v10-book-footer nav { display: flex; justify-content: end; gap: 8px; flex-wrap: wrap; }
.v10-book-footer nav a { padding: 9px 12px; border: 1px solid rgba(255, 243, 183, .36); border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.v10-book-footer > p { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid rgba(255, 243, 183, .22); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .v10-book-header { grid-template-columns: 120px 1fr auto auto; }
  .v10-book-header > a:first-child { width: 118px; }
  .v10-book-header > a:last-child { display: none; }
  .v10-book-hero { grid-template-columns: 1fr; }
  .v10-book-hero-copy { text-align: center; }
  .v10-book-hero-copy h1,
  .v10-book-hero-copy > em,
  .v10-book-hero-copy > p:not(:first-child) { margin-right: auto; margin-left: auto; }
  .v10-book-hero-copy > div { justify-content: center; }
  .v10-book-cover-stage { min-height: 620px; }
  .v10-book-cover-stage > span { width: min(84vw, 590px); }
  .v10-book-cover-stage img { width: min(55vw, 350px); }
  .v10-book-world { min-height: auto; grid-template-columns: 1fr; }
  .v10-book-world-media { height: 75svh; }
  .v19-book-editions > header { grid-template-columns: 1fr; }
  .v10-book-story { grid-template-columns: 1fr; }
  .v10-book-related header { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .v10-book-header { min-height: 64px; padding: 6px 9px; grid-template-columns: 102px 1fr auto; gap: 8px; }
  .v10-book-header > a:first-child { width: 102px; height: 40px; padding: 6px 9px; }
  .v10-book-header nav { justify-self: end; }
  .v10-book-header button { min-width: 36px; width: 36px; padding: 0; justify-content: center; }
  .v10-book-header button span { display: none; }
  .v10-book-hero { padding-top: 106px; }
  .v10-book-hero-copy h1 { font-size: clamp(50px, 15vw, 84px); }
  .v10-book-cover-stage { min-height: 500px; }
  .v10-book-cover-stage img { width: min(62vw, 290px); }
  .v10-book-cover-stage > i { display: none; }
  .v10-book-facts { grid-template-columns: 1fr 1fr; }
  .v10-book-world { padding-right: 16px; padding-left: 16px; }
  .v10-book-world-media { height: 64svh; }
  .v10-book-world-copy h2,
  .v19-book-editions h2,
  .v10-book-story h2,
  .v10-book-responsible h2,
  .v10-book-related h2,
  .v10-book-cta h2 { font-size: clamp(48px, 14vw, 76px); }
  .v10-book-related > div { grid-template-columns: 1fr; }
  .v10-book-related > div a { min-height: 500px; }
  .v19-book-editions figure img { height: min(64svh, 560px); }
  .v10-book-footer { grid-template-columns: 1fr; }
  .v10-book-footer nav { justify-content: start; }
}

/* ORIGEN∞ viewport-fit pass: wide screens with standard browser height keep
   the entire cover, narrative and primary actions visible at 100% zoom. */
@media (min-width: 901px) and (max-height: 950px) {
  .v10-book-hero {
    min-height: max(700px, 100svh);
    padding: calc(72px + clamp(24px, 4svh, 38px)) clamp(24px, 5vw, 76px) clamp(24px, 4svh, 38px);
    gap: clamp(18px, 3svh, 28px) clamp(42px, 6vw, 96px);
  }

  .v10-book-hero-copy h1 {
    margin: clamp(12px, 2svh, 18px) 0;
    font-size: clamp(54px, min(6.4vw, 11svh), 112px);
  }

  html[data-book-theme="spensierati"] .v10-book-hero-copy h1 {
    font-size: clamp(48px, min(5.2vw, 9svh), 78px);
  }

  .v10-book-hero-copy > em {
    margin-bottom: clamp(12px, 2svh, 18px);
    font-size: clamp(18px, min(1.8vw, 3.2svh), 29px);
  }

  .v10-book-hero-copy > div { margin-top: clamp(18px, 3svh, 28px); }
  .v10-book-cover-stage { min-height: clamp(440px, calc(100svh - 230px), 620px); }
  .v10-book-cover-stage img { max-height: min(58svh, 540px); }
  .v10-book-facts div { min-height: 66px; padding: 12px 15px; }

  .v10-book-world,
  .v19-book-editions,
  .v10-book-story,
  .v10-book-responsible,
  .v10-book-related,
  .v10-book-cta {
    padding-top: clamp(70px, 10svh, 112px);
    padding-bottom: clamp(70px, 10svh, 112px);
  }

  .v10-book-world { min-height: 100svh; }
  .v10-book-world-media { height: min(70svh, 680px); }
  .v10-book-world-copy h2,
  .v19-book-editions h2,
  .v10-book-story h2,
  .v10-book-responsible h2,
  .v10-book-related h2,
  .v10-book-cta h2 { font-size: clamp(48px, min(6.2vw, 11svh), 102px); }

  .v10-book-related header { margin-bottom: clamp(34px, 5svh, 54px); }
  .v10-book-related > div a { min-height: min(60svh, 520px); }
  .v10-book-related img { max-height: min(44svh, 400px); }
}

@media (prefers-reduced-motion: reduce) {
  .v10-book-page *,
  .v10-book-page *::before,
  .v10-book-page *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .v10-book-wipe { display: none; }
  .v10-book-cover-stage img { transform: none !important; }
}
