/* The sample books (pages/exemple.html, T1026-66): the look of /ambasadori (ambasadori.css): full-width bands in turn,
   a navy hero with real covers as hardcovers and Mio, a grid of book cards, big coloured tiles, a navy close. A card
   opens its book in a modal (<dialog>) with the site's flipbook. The bands touch: the main's gap and hairlines are off. */
.main:has(.ex-hero) { gap: 0; padding-bottom: 0; }
.main:has(.ex-hero) > section + section::before { content: none; }
.ex-band { padding-block: clamp(56px, 7vw, 104px); }
.ex-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.ex-h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -0.02em; color: var(--navy); }
.ex-sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 36em; }
.ex-hl { color: var(--yellow); }

/* a cover as a hardcover: the spine's shadow on the left, rounded fore-edge, a soft drop shadow */
.ex-hc { position: relative; display: block; overflow: hidden; border-radius: 4px 12px 12px 4px; background: #fff; box-shadow: 0 18px 34px rgba(20, 30, 60, 0.28); }
.ex-hc img { display: block; width: 100%; height: auto; }
.ex-hc::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0, rgba(0, 0, 0, 0.08) 3%, rgba(255, 255, 255, 0.22) 4.2%, rgba(255, 255, 255, 0) 7%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0.08) 100%); }

/* ---------- hero ---------- */
.ex-hero { position: relative; overflow: hidden; padding-block: clamp(28px, 4vw, 56px) clamp(56px, 7vw, 96px); background: var(--navy); color: #fff; }
.ex-hero::after { content: ""; position: absolute; right: -12vw; top: -20vw; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)); pointer-events: none; }
.ex-hero .crumbs, .ex-hero .crumbs a { color: rgba(255, 255, 255, 0.7); }
.ex-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr 0.95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.ex-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.ex-kicker { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--pink); color: var(--navy); font-size: 14px; font-weight: 700; }
.ex-hero__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 3.5vw, 52px); line-height: 1.05; letter-spacing: -0.025em; color: #fff; }
.ex-hero__lead { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: rgba(255, 255, 255, 0.86); max-width: 32em; }
.ex-hero__actions { margin-top: 4px; }
.ex-hero__art { position: relative; min-height: clamp(380px, 40vw, 560px); }
.ex-hero__book { position: absolute; padding: 0; border: 0; cursor: pointer; box-shadow: 0 26px 44px rgba(5, 10, 30, 0.5); transition: translate 250ms ease, rotate 250ms ease; }
.ex-hero__book--sofia-steaua { width: 40%; left: -2%; top: 24%; rotate: -10deg; z-index: 1; }
.ex-hero__book--luca-ghetute { width: 44%; left: 28%; top: 4%; rotate: 2deg; z-index: 3; }
.ex-hero__book--eva-luna { width: 40%; right: -2%; top: 32%; rotate: 9deg; z-index: 2; }
.ex-hero__book:hover, .ex-hero__book:focus-visible { translate: 0 -8px; }
.ex-hero__mio { position: absolute; width: 16%; left: 34%; bottom: 2%; rotate: -6deg; z-index: 4; filter: drop-shadow(0 14px 22px rgba(5, 10, 30, 0.45)); }
.ex-hero__mio .face { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .ex-hero__book--sofia-steaua { animation: ex-float 12s ease-in-out infinite; }
  .ex-hero__book--luca-ghetute { animation: ex-float 13s ease-in-out -4s infinite; }
  .ex-hero__book--eva-luna { animation: ex-float 11.5s ease-in-out -7s infinite; }
}
@keyframes ex-float { 50% { transform: translateY(-10px); } }

/* ---------- the books ---------- */
.ex-shelf { background: var(--bg); scroll-margin-top: 60px; }
.ex-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); }
.ex-card { margin: 0; scroll-margin-top: 90px; }
.ex-card__open { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; height: 100%; padding: 14px 14px 22px; border: 0; border-radius: 26px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 14px 30px rgba(36, 59, 121, 0.10); transition: translate 200ms ease, box-shadow 200ms ease; }
.ex-card__open:hover, .ex-card__open:focus-visible { translate: 0 -4px; box-shadow: 0 22px 40px rgba(36, 59, 121, 0.16); }
.ex-card__pic { display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 0.86; padding: 9% 14%; border-radius: 18px; background: var(--mist); }
.ex-card:nth-child(3n+2) .ex-card__pic { background: #fdf0c2; }
.ex-card:nth-child(3n) .ex-card__pic { background: #fbe1ef; }
.ex-card__pic .ex-hc { width: 100%; max-width: 300px; rotate: -2deg; transition: rotate 250ms ease; }
.ex-card:nth-child(even) .ex-card__pic .ex-hc { rotate: 2deg; }
.ex-card__open:hover .ex-hc { rotate: 0deg; }
.ex-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 6px 0; }
.ex-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; }
.ex-chip--soft { background: var(--yellow); color: var(--navy); }
.ex-card__title { margin: 2px 6px 0; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--navy); }
.ex-card__line { margin: 0 6px; font-size: 15.5px; line-height: 1.5; color: var(--text-2); }
.ex-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% - 12px); margin: auto 6px 0; padding-top: 6px; }
.ex-card__kid { font-size: 14px; font-weight: 600; color: var(--text-3); }
.ex-card__go { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--mist); color: var(--navy); font-size: 14px; font-weight: 700; transition: background 200ms ease; }
.ex-card__open:hover .ex-card__go { background: var(--yellow); }

/* ---------- what to notice ---------- */
.ex-notice { background: var(--pink); }
.ex-notice .ex-h2 { color: var(--navy); }
.ex-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ex-tile { display: flex; flex-direction: column; gap: 12px; min-height: 240px; margin: 0; padding: clamp(24px, 3vw, 36px); border-radius: 32px; }
.ex-tile:nth-child(odd) { rotate: -1deg; }
.ex-tile:nth-child(even) { rotate: 1deg; translate: 0 14px; }
.ex-tile--yellow { background: var(--yellow); }
.ex-tile--navy { background: var(--navy); color: #fff; }
.ex-tile--pink { background: #fff; }
.ex-tile__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2vw, 28px); line-height: 1.1; color: var(--navy); }
.ex-tile__body { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--navy); opacity: 0.85; }
.ex-tile--navy .ex-tile__title, .ex-tile--navy .ex-tile__body { color: #fff; }

/* ---------- the words ---------- */
.ex-words { background: var(--bg); }
.ex-words__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.ex-words__book { border-radius: 22px; background: #fff; box-shadow: 0 8px 20px rgba(36, 59, 121, 0.06); }
.ex-words__book summary { display: grid; gap: 2px; padding: 18px 56px 18px 22px; cursor: pointer; list-style: none; position: relative; }
.ex-words__book summary::-webkit-details-marker { display: none; }
.ex-words__book summary::after { content: "+"; position: absolute; right: 22px; top: 16px; font-size: 26px; line-height: 1; color: var(--navy); }
.ex-words__book[open] summary::after { content: "−"; }
.ex-words__title { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--navy); }
.ex-words__who { font-size: 14px; color: var(--text-3); }
.ex-words__about { margin: 0; padding: 0 22px 4px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.ex-words__pages { display: grid; gap: 14px; padding: 0 22px 22px; }
.ex-words__page { padding-top: 14px; border-top: 1px solid var(--border); }
.ex-words__page p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.6; color: var(--text); }

/* ---------- close ---------- */
.ex-close { background: var(--navy); color: #fff; }
.ex-close__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.ex-close__text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ex-close__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(38px, 4.8vw, 66px); line-height: 1; letter-spacing: -0.03em; color: #fff; }
.ex-close__lead { margin: 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: rgba(255, 255, 255, 0.9); max-width: 32em; }
.ex-close__sub { margin: 0; font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.ex-close__art { position: relative; min-height: 340px; }
.ex-close__book { position: absolute; width: 58%; box-shadow: 0 26px 44px rgba(0, 0, 0, 0.45); }
.ex-close__book--radu-lumanari { left: 0; top: 4%; rotate: -8deg; }
.ex-close__book--maria-scoica { right: 0; top: 30%; rotate: 7deg; }

/* ---------- the book, in a modal ---------- */
.ex-modal { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 32px; background: var(--bg); color: var(--text); box-shadow: 0 40px 90px rgba(10, 18, 45, 0.45); overflow: auto; }
.ex-modal::backdrop { background: rgba(14, 22, 52, 0.72); }
.ex-modal[open] { animation: ex-modal-in 280ms ease-out both; }
@keyframes ex-modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .ex-modal[open] { animation: none; } }
html:has(.ex-modal[open]) { overflow: hidden; }
.ex-modal__box { padding: clamp(16px, 2.4vw, 28px); }
.ex-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.ex-modal__meta { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--text-3); }
.ex-modal__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; color: var(--navy); }
.ex-modal__close { flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; }
.ex-modal__close svg { width: 22px; height: 22px; }
.ex-modal__close:hover { background: #1d3166; }
.ex-modal .fb__full { display: none; }
/* the whole book, the bar and the button under it inside the screen's height */
.ex-modal .fb { width: 100%; max-width: max(520px, calc((100dvh - 450px) * 2 + 112px)); margin-inline: auto; }
.ex-modal .fb__under { margin-top: 12px; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1000px) {
  .ex-cards { grid-template-columns: repeat(2, 1fr); }
  .ex-tiles { grid-template-columns: 1fr; }
  .ex-tile, .ex-tile:nth-child(n) { rotate: none; translate: none; min-height: 0; }
}
@media (max-width: 900px) {
  .ex-hero__grid, .ex-close__grid { grid-template-columns: 1fr; }
  .ex-hero__art { min-height: 0; aspect-ratio: 1 / 0.82; margin-top: 8px; }
  .ex-close__art { min-height: 0; aspect-ratio: 1 / 0.7; order: -1; }
}
@media (max-width: 600px) {
  .ex-band { padding-block: 52px; }
  .ex-hero { padding-top: 16px; }
  .ex-hero__title { font-size: 34px; }
  .ex-hero .btn--lg, .ex-close .btn--lg { width: 100%; justify-content: space-between; }
  .ex-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ex-card__open { padding: 8px 8px 14px; gap: 7px; border-radius: 20px; }
  .ex-card__pic { padding: 10% 12%; border-radius: 14px; }
  .ex-card__chips { margin: 4px 2px 0; gap: 4px; }
  .ex-chip { height: 22px; padding: 0 8px; font-size: 11px; }
  .ex-card__title { margin: 0 2px; font-size: 16.5px; }
  .ex-card__line { margin: 0 2px; font-size: 13.5px; }
  .ex-card__foot { width: calc(100% - 4px); margin: auto 2px 0; }
  .ex-card__kid { font-size: 12.5px; }
  .ex-card__go { display: none; }
  .ex-tile { border-radius: 26px; }
  /* the modal as the whole screen: the book as wide as the phone */
  .ex-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .ex-modal__box { min-height: 100%; padding: 14px 10px 24px; }
  .ex-modal__head { padding: 0 4px; }
  .ex-modal .fb { max-width: none; }
  /* the end card in the book's right half on a phone: the line, the price, the date and the button */
  .ex-modal .fb__end { gap: 6px; padding: 0 6px 0 10px; }
  .ex-modal .fb__end-title { font-size: 14px; }
  .ex-modal .fb__end-price { font-size: 12.5px; }
  .ex-modal .fb__end-date { font-size: 11px; line-height: 1.3; }
  .ex-modal .fb__end-again { display: none; }
  .ex-modal .fb__end .btn { --h: 34px; font-size: 12.5px; }
}
@media (max-width: 900px) { .ex-words__list { grid-template-columns: 1fr; } }
