/* ============ Tokens ============ */
:root {
  --ink: #1e1838;
  --ink-2: #3f3957;
  --muted: #4f4966;
  --bg: #fbf8f3;
  --paper: #ffffff;
  --tint: #f3eefa;
  --brand: #7a2f8f;
  --brand-2: #2f7fd1;
  --accent: #f6a81c;
  --line: rgba(30, 24, 56, .1);
  --night: #1b1535;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(30, 24, 56, .06), 0 12px 32px -12px rgba(30, 24, 56, .18);
  --display: 'Fredoka', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html.reader-open { overflow: hidden; }
body { margin: 0; font: 400 17px/1.6 var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.3vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 18px; height: 3px; border-radius: 3px; background: currentColor; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: #fff; padding: 8px 12px; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 600 .98rem/1 var(--body); padding: 15px 24px; border-radius: 999px; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(122, 47, 143, .7); }
.btn--primary:hover { background: #69257c; }
.btn--accent { background: var(--accent); color: var(--ink); box-shadow: 0 10px 24px -10px rgba(246, 168, 28, .8); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn--light { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.btn--sm { padding: 10px 16px; font-size: .88rem; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; }

/* ============ Header ============ */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.header.is-scrolled { background: rgba(251, 248, 243, .92); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header__bar { display: flex; align-items: center; gap: 20px; height: 80px; }
.header__logo { flex: none; }
.header__logo img { height: 50px; width: auto; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav > a, .nav__trigger { white-space: nowrap; font: 500 .94rem/1 var(--body); text-decoration: none; padding: 12px 14px; border-radius: 999px; color: var(--ink); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav > a:hover, .nav__trigger:hover, .nav__item.is-open .nav__trigger { background: rgba(30, 24, 56, .06); }
.nav__trigger svg { transition: transform .2s; }
.nav__item { position: relative; }
.nav__item.is-open .nav__trigger svg { transform: rotate(180deg); }
.header__cta { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; font: 600 .8rem/1 var(--body); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); padding: 3px; }
.lang a { padding: 7px 9px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang a[aria-current] { background: var(--ink); color: #fff; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; border-radius: 12px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; border-radius: 2px; transition: transform .25s, opacity .25s; }

/* Mega menu */
.mega { position: fixed; left: 0; right: 0; top: 80px; background: var(--paper); box-shadow: 0 24px 60px -20px rgba(30, 24, 56, .3); border-top: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega__inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; padding: 32px 0 36px; }
.mega__cycles { display: grid; grid-template-columns: auto auto auto; justify-content: start; gap: 40px; }
.mega__cycle h4 { font: 600 1rem/1 var(--display); color: var(--ink); margin-bottom: 14px; }
.mega__books { display: flex; gap: 14px; }
.mega__book { text-decoration: none; width: 74px; text-align: center; font: 700 .9rem/1.2 var(--body); }
.mega__book img { width: 74px; height: 104px; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: -3px 0 0 var(--c) inset, 0 8px 18px -8px rgba(0, 0, 0, .45); margin-bottom: 8px; transition: transform .25s; }
.mega__book:hover img { transform: translateY(-5px) rotate(-2deg); }
.mega__side { border-left: 1px solid var(--line); padding-left: 32px; display: flex; flex-direction: column; gap: 12px; min-width: 240px; }
.mega__side a { text-decoration: none; display: block; padding: 12px 14px; border-radius: 12px; background: var(--tint); }
.mega__side a:hover { background: #ebe2f6; }
.mega__side strong { display: block; font-size: .95rem; }
.mega__side span { font-size: .84rem; color: var(--muted); }

/* ============ Hero ============ */
.hero { position: relative; padding: 140px 0 80px; overflow: hidden; min-height: min(900px, 100vh); display: flex; align-items: center; }
.hero::before { content: ''; position: absolute; inset: 0; background:
  radial-gradient(600px 400px at 85% 30%, rgba(122, 47, 143, .16), transparent 70%),
  radial-gradient(500px 380px at 65% 85%, rgba(47, 127, 209, .14), transparent 70%),
  radial-gradient(400px 300px at 10% 10%, rgba(246, 168, 28, .14), transparent 70%); }
.hero:has(.arc) { height: 100vh; min-height: 680px; align-items: flex-start; padding-top: 120px; }
.hero__center { position: relative; z-index: 1; text-align: center; max-width: 900px; }
.hero__center .lead { margin-inline: auto; }
.hero__logo { display: block; width: auto; height: clamp(64px, 13vh, 140px); margin: 0 auto 6px; }
/* side by side: logo on the left, headline + intro + buttons on the right, a thin rule between them */
.hero__center--split { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: clamp(28px, 4vw, 56px); row-gap: 22px; max-width: 1120px; text-align: left; }
.hero__center--split .hero__logo { height: clamp(110px, 21vh, 210px); margin: 0; }
.hero__center--split .hero__text { padding-left: clamp(28px, 4vw, 56px); border-left: 2px solid var(--line); }
.hero__center.hero__center--split .lead { margin-inline: 0; }
.hero__center.hero__center--split .hero__ctas { grid-column: 1 / -1; justify-content: center; margin-top: 4px; } /* own row, centred on the screen */
@media (max-width: 760px) {
  .hero__center--split { grid-template-columns: 1fr; gap: 6px; text-align: center; }
  .hero__center--split .hero__logo { height: 70px; margin: 0 auto; }
  .hero__center--split .hero__text { padding: 0; border: 0; }
  .hero__center.hero__center--split .hero__ctas { justify-content: center; }
}
.hero__center .hero__ctas { justify-content: center; }
/* rotating arc of covers (js heroArc) */
.arc { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; touch-action: pan-y; }
.arc__card { position: absolute; left: 50%; top: 0; cursor: pointer; user-select: none; -webkit-user-select: none; will-change: transform; }
.arc__card .b3d { perspective: 900px; }
.arc__card .b3d__front { box-shadow: 0 24px 36px -16px rgba(30, 24, 56, .45); }
.arc__card .b3d__front img { pointer-events: none; }
.arc__card:focus-visible { outline: none; }
.arc__card:focus-visible .b3d__front { outline: 3px solid var(--brand-2); outline-offset: 3px; }
.arc__card.is-off { visibility: hidden; }
.arc__group { position: absolute; left: 50%; top: 0; white-space: nowrap; font: 600 .95rem/1 var(--display); color: var(--ink-2); letter-spacing: .02em; pointer-events: none; will-change: transform; }
.arc__group.is-off { visibility: hidden; }
.arc.is-small .arc__group { font-size: .8rem; }
.arc.is-small .arc__nav { gap: 10px; height: 40px; }
.arc.is-small .arc__nav button { width: 38px; height: 38px; font-size: 1.3rem; }
.arc.is-small .arc__name { min-width: 140px; font-size: 1.05rem; }
.arc.is-small .arc__disk { padding-top: 18px; }
.arc.is-dragging, .arc.is-dragging .arc__card { cursor: grabbing; }
.arc__disk { position: absolute; left: 50%; z-index: 200; border-radius: 50%; background: var(--bg); box-shadow: 0 -14px 40px -24px rgba(30, 24, 56, .35); display: flex; justify-content: center; padding-top: clamp(22px, 4vh, 44px); pointer-events: none; }
.arc__nav { display: flex; align-items: center; gap: 18px; height: 46px; pointer-events: auto; }
.arc__nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: 600 1.5rem/1 var(--body); cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; transition: transform .2s; }
.arc__nav button:hover { transform: scale(1.08); }
.arc__name { min-width: 170px; text-align: center; font: 600 1.25rem/1 var(--display); color: var(--c, var(--ink)); transition: color .3s; }
.hero h1 span { color: var(--brand); position: relative; white-space: nowrap; }
.hero h1 span::after { content: ''; position: absolute; left: 0; right: 0; bottom: .05em; height: .22em; background: var(--accent); opacity: .45; z-index: -1; border-radius: 4px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 36px; }

/* ============ 3D closed book ============ */
.b3d { width: var(--w); height: var(--h); perspective: 1200px; }
.b3d__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.b3d__face { position: absolute; }
.b3d__front { inset: 0; transform: translateZ(calc(var(--d) / 2)); border-radius: 2px 5px 5px 2px; overflow: hidden; background: var(--c); }
.b3d__front img { width: 100%; height: 100%; object-fit: cover; }
.b3d__front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(255, 255, 255, .25) 2.5%, rgba(0, 0, 0, .06) 5%, transparent 9%, transparent 80%, rgba(255, 255, 255, .12)); pointer-events: none; }
.b3d__back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); background: var(--c); border-radius: 5px 2px 2px 5px; }
.b3d__spine { width: var(--d); height: 100%; left: calc(50% - var(--d) / 2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .15) 40%, rgba(0, 0, 0, .15)), var(--c); display: grid; place-items: center; overflow: hidden; }
.b3d__spine span { writing-mode: vertical-rl; transform: rotate(180deg); color: #fff; font: 600 calc(var(--d) * .55)/1 var(--display); letter-spacing: .06em; white-space: nowrap; }
.b3d__edge { width: var(--d); height: calc(100% - 6px); top: 3px; left: calc(50% - var(--d) / 2); transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px)); background: repeating-linear-gradient(90deg, #fbfaf6 0 1px, #e3ded3 1px 2px); }
.b3d__top, .b3d__bottom { width: calc(100% - 4px); height: var(--d); left: 1px; top: calc(50% - var(--d) / 2); background: repeating-linear-gradient(0deg, #fbfaf6 0 1px, #e3ded3 1px 2px); }
.b3d__top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 2px)); }
.b3d__bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 2px)); }

/* ============ Library / shelves ============ */
.library { background: linear-gradient(180deg, var(--bg), #f1ebf7); }
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 40px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; font: 600 .95rem/1 var(--body); padding: 12px 18px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected='true'] { background: var(--ink); color: #fff; }
#shelves, .shelves-grid { display: grid; grid-template-columns: 3fr 1.3fr; column-gap: 28px; }
#shelves .shelf[data-cycle='primaire'], #shelves .shelf[data-cycle='english'], #shelves.is-filtered .shelf { grid-column: 1 / -1; }
.shelf { position: relative; margin-bottom: 110px; min-width: 0; }
.shelf__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; padding: 0 8px; }
.shelf__label h3 { margin: 0; }
/* face-out display rack: back wall, books leaning back, a glass lip in front, a ledge below */
.rack { position: relative; padding: 46px 24px 0; border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .9) 70%, #efe7f5);
  box-shadow: inset 0 1px 0 #fff, inset 0 -40px 50px -30px rgba(60, 30, 90, .18); }
.shelf__row { display: flex; gap: clamp(18px, 3vw, 40px); justify-content: center; align-items: flex-end; position: relative; z-index: 1; }
.rack__lip { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, #fff, #f3edf8 60%, #e9e0f1);
  border-radius: 4px 4px 0 0; box-shadow: 0 -1px 0 rgba(60, 30, 90, .1), 0 -10px 18px -10px rgba(60, 30, 90, .28); }
.shelf__plank { height: 18px; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #e2d6ec, #cdbcdc); box-shadow: 0 24px 34px -18px rgba(60, 30, 90, .5); position: relative; }
.shelf__plank::after { content: ''; position: absolute; left: 4%; right: 4%; top: 100%; height: 16px; background: linear-gradient(180deg, rgba(60, 30, 90, .14), transparent); border-radius: 0 0 50% 50%; }
.sbook { position: relative; background: none; border: 0; padding: 0; cursor: pointer; text-align: center; color: inherit; font: inherit; display: flex; flex-direction: column; align-items: center; margin-bottom: 4px; }
.sbook .b3d { perspective: 900px; perspective-origin: 50% 20%; }
.sbook .b3d__inner { transform-origin: 50% 100%; transform: rotateX(13deg) rotateY(-4deg); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.sbook .b3d__front { box-shadow: 0 14px 22px -10px rgba(40, 20, 70, .45); }
.sbook:hover .b3d__inner, .sbook:focus-visible .b3d__inner { transform: translateY(-38px) translateZ(46px) rotateX(-3deg) rotateY(-10deg); }
.sbook:hover .b3d__front, .sbook:focus-visible .b3d__front { box-shadow: 0 40px 50px -20px rgba(40, 20, 70, .55); }
.sbook:focus-visible { outline: none; }
.sbook:focus-visible .sbook__label { text-decoration: underline; }
.sbook__label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 40px; white-space: nowrap; font: 600 1rem/1.2 var(--display); color: var(--ink); transition: color .2s; }
.sbook:hover .sbook__label { color: var(--c); }
.b3d--thin .b3d__spine span { display: none; }
.library__note { text-align: center; color: var(--muted); font-size: .92rem; margin-top: -24px; }
.shelf[hidden] { display: none; }

/* ============ Edition ============ */
.edition__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.ecard { background: var(--paper); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); position: relative; }
.ecard img { height: 72px; width: auto; margin-bottom: 18px; object-fit: contain; }
.ecard p { margin: 0; font-size: .97rem; color: var(--ink-2); }

/* ============ Method ============ */
.method__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 72px; }
.video { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow); background: #000; }
.video img, .video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video button { position: absolute; inset: 0; border: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .35), transparent 50%); cursor: pointer; display: grid; place-items: center; }
.video button span { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 12px rgba(255, 255, 255, .25); transition: transform .2s; }
.video button:hover span { transform: scale(1.08); }
.video__cap { position: absolute; left: 20px; bottom: 16px; color: #fff; font-weight: 600; pointer-events: none; }
.pillars { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.pillars li { display: flex; gap: 12px; align-items: flex-start; }
.pillars li::before { content: '✓'; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .8rem; margin-top: 1px; }
.domains { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.domain { background: var(--paper); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.domain__img { height: 120px; display: grid; place-items: center; margin-bottom: 18px; background: var(--tint); border-radius: 12px; padding: 12px; }
.domain__img img { max-height: 96px; max-width: 100%; width: auto; object-fit: contain; }
.domain h3 { font-size: 1.08rem; }
.domain p { font-size: .92rem; color: var(--ink-2); margin: 0; }

/* ============ Platform ============ */
.platform { background: var(--night); color: #fff; overflow: hidden; }
.platform .eyebrow { color: var(--accent); }
.platform .lead { color: rgba(255, 255, 255, .72); }
.platform__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.platform__img { position: relative; }
.platform__img::before { content: ''; position: absolute; inset: 10% 5%; background: radial-gradient(closest-side, rgba(47, 127, 209, .55), transparent); filter: blur(30px); }
.platform__img img { position: relative; }
.ptabs { display: flex; gap: 6px; margin: 28px 0 20px; }
.ptabs button { display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 8px 18px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font: 600 .95rem/1 var(--body); }
.ptabs button img { width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: contain; padding: 3px; }
.ptabs button[aria-selected='true'] { background: #fff; color: var(--ink); }
.plist { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.plist li { padding-left: 26px; position: relative; color: rgba(255, 255, 255, .86); font-size: .97rem; }
.plist li::before { content: ''; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 4px; background: var(--accent); }

/* ============ Robots ============ */
.robots__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.robot { background: var(--paper); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); text-align: center; transition: transform .3s; }
.robot:hover { transform: translateY(-6px); }
.robot__img { height: 190px; display: grid; place-items: center; margin-bottom: 14px; background: radial-gradient(closest-side, var(--tint), transparent); }
.robot__img img { max-height: 180px; max-width: 100%; width: auto; }
.robot p { font-size: .93rem; color: var(--ink-2); margin: 0; }
.robot--lego .robot__img { font: 700 2.6rem/1 var(--display); color: #e3262e; letter-spacing: .02em; }
.robot--lego .robot__img span { background: #ffd500; padding: 12px 18px; border-radius: 10px; box-shadow: 0 6px 0 #d9a900; }

/* ============ Support ============ */
.support__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.support__item { background: var(--paper); padding: 30px 28px; }
.support__item h3 { font-size: 1.12rem; }
.support__item p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ============ Competitions ============ */
.competitions { background: linear-gradient(180deg, var(--bg), #fff4e0); }
.comp__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.comp { background: var(--paper); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.comp__photo { aspect-ratio: 16 / 9; background: #f3eefa center / cover; position: relative; display: grid; place-items: center; }
.comp__photo--logo { background: linear-gradient(135deg, #2b1f58, #7a2f8f); }
.comp__photo--logo img { max-width: 70%; max-height: 46%; background: #fff; padding: 14px 20px; border-radius: 16px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.5); }
.comp__body { padding: 22px 24px 26px; }
.comp__body img { height: 54px; width: auto; margin-bottom: 14px; }
.comp__body p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ============ Partners ============ */
/* belt: the track holds the list twice and slides by half its width, so it loops without a seam */
.belt { overflow: hidden; padding: 16px 0 8px; margin-inline: calc(50% - 50vw); /* full screen width */ -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.belt__track { display: flex; width: max-content; animation: belt calc(var(--n) * 5s) linear infinite; }
.belt:hover .belt__track, .belt:focus-within .belt__track { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }
.partner { flex: none; width: 250px; margin-right: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.partner__logo { width: 100%; height: 150px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; padding: 18px 22px; transition: transform .25s; }
.partner:hover .partner__logo { transform: translateY(-4px); }
.partner__logo img { max-width: 100%; max-height: 108px; width: auto; object-fit: contain; }
.partner__name { max-width: 230px; text-align: center; font: 600 .98rem/1.3 var(--body); color: var(--ink); }
.partners--empty { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.partner--empty { width: 250px; height: 150px; border-radius: 20px; border: 2px dashed rgba(30, 24, 56, .14); }
@media (max-width: 640px) {
  .partner { width: 190px; margin-right: 14px; }
  .partner__logo { height: 120px; }
  .partner__logo img { max-height: 86px; }
  .partner__name { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .belt { -webkit-mask-image: none; mask-image: none; }
  .belt__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 22px; }
  .belt__track > [aria-hidden] { display: none; }
}

/* ============ Testimonials ============ */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: var(--paper); padding: 28px; border-radius: 24px; box-shadow: var(--shadow); }
.quote p { font-size: 1.05rem; }
.quote footer { color: var(--muted); font-size: .9rem; }

/* ============ Contact ============ */
.contact { background: var(--night); color: #fff; }
.contact .eyebrow { color: var(--accent); }
.contact__grid { display: grid; grid-template-columns: 1.5fr 0.5fr; gap: 56px; }
.contact__info p { color: rgba(255, 255, 255, .72); }
.contact__list { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 14px; }
.contact__list a { text-decoration: none; font-weight: 600; }
.form { background: var(--paper); color: var(--ink); border-radius: 24px; padding: clamp(22px, 4vw, 36px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font: 600 .85rem/1.2 var(--body); }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea, .form select { font: 400 1rem/1.4 var(--body); padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font: 600 .85rem/1.2 var(--body); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; gap: 0; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-size: .86rem; transition: background .15s; }
.chips input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* ============ Footer ============ */
.footer { background: #120e26; color: rgba(255, 255, 255, .7); padding: 56px 0 30px; font-size: .92rem; }
.products { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 44px; }
.products a { background: #fff; border-radius: 14px; padding: 10px 16px; height: 70px; width: 150px; display: grid; place-items: center; transition: transform .2s; }
.products a:hover { transform: translateY(-3px); }
.products img { max-height: 50px; width: auto; }
.footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 26px; }
.footer__bar img { height: 46px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: #fff; }
.footer h4 { color: #fff; text-align: center; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }

/* ============ Reader (open book) ============ */
@property --rc { syntax: '<color>'; inherits: true; initial-value: #5a3a8a; }
.reader { --rc: #5a3a8a; transition: --rc .8s ease; }
.reader { position: fixed; inset: 0; z-index: 200; display: none; color: #fff; overflow: hidden; }
.reader.is-open { display: block; }
.reader__backdrop { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--rc) 70%, #000) 0%, color-mix(in srgb, var(--rc) 35%, #0b0a12) 60%, color-mix(in srgb, var(--rc) 12%, #050508) 100%);
  backdrop-filter: blur(6px); animation: fade .4s; transition: background .4s; }
.reader.is-leaving .reader__backdrop, .reader.is-leaving .reader__top, .reader.is-leaving .reader__nav, .reader.is-leaving .reader__shelf { opacity: 0; transition: opacity .4s; }
.reader__shelf { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px); animation: fade .6s .5s both; }
.reader__thumbs { display: flex; gap: 14px; overflow-x: auto; padding: 14px 4px 4px; scrollbar-width: none; }
.reader__thumbs::-webkit-scrollbar { display: none; }
.reader__group { display: flex; gap: 6px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .15); }
.reader__group:first-child { border: 0; padding-left: 0; }
.reader__thumb { flex: none; border: 0; padding: 0; background: none; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 .72rem/1 var(--body); opacity: .8; transition: opacity .2s, transform .25s cubic-bezier(.2, .7, .2, 1); }
.reader__thumb img { width: 34px; height: 48px; object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: -2px 0 0 var(--c) inset, 0 6px 14px -6px rgba(0, 0, 0, .7); }
.reader__thumb:hover, .reader__thumb:focus-visible { opacity: 1; transform: translateY(-6px); }
.reader__thumb[aria-current] { opacity: 1; transform: translateY(-10px); }
.reader__thumb[aria-current] img { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes fade { from { opacity: 0; } }
.reader__top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px clamp(16px, 3vw, 28px); gap: 12px; animation: fade .6s .3s both; }
.reader__title strong { display: inline-block; vertical-align: middle; font: 600 1.25rem/1.1 var(--display); margin-right: 12px; }
.reader__sample { display: block; margin-top: 4px; font: 500 .88rem/1.3 var(--body); color: rgba(255, 255, 255, .82); }
.reader__actions { display: flex; gap: 10px; align-items: center; }
.reader__close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.reader__close:hover { background: rgba(255, 255, 255, .22); }
.reader__stage { position: absolute; inset: 72px 76px 92px; perspective: 2400px; display: grid; place-items: center; cursor: pointer; touch-action: pan-y; user-select: none; }
.reader__stage::after { content: ''; position: absolute; left: 50%; bottom: 2%; width: 60%; max-width: 900px; height: 40px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.rfly { transform-style: preserve-3d; position: relative; z-index: 1; }
.rbook { --shift: 0; --tilt: 6deg; position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; transform: translateX(calc(var(--shift) * var(--w))) rotateX(var(--tilt)); transition: transform .9s cubic-bezier(.45, .05, .3, 1); }
.leaf { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; }
/* shading while a page stands up during a turn */
.leaf.is-turning .leaf__face { animation: leafShade .85s cubic-bezier(.55, .05, .3, 1); }
.leaf--cover.is-turning .leaf__face { animation-duration: 1.15s; }
@keyframes leafShade { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(.72); } }
.leaf__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #fff; }
.leaf__face img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.leaf__front { border-radius: 0 4px 4px 0; }
.leaf__back { transform: rotateY(180deg); border-radius: 4px 0 0 4px; }
.leaf__front::after, .leaf__back::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.leaf__front::after { background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .04) 6%, transparent 14%); }
.leaf__back::after { background: linear-gradient(270deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .04) 6%, transparent 14%); }
.leaf--cover .leaf__front { border-radius: 2px 6px 6px 2px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.leaf--cover .leaf__front::after { background: linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(255, 255, 255, .25) 2%, transparent 6%); }
.rbook.is-closed .leaf--cover .leaf__front { box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .8); }
.rbook__stack { position: absolute; top: 0; bottom: 0; width: var(--w); background: #f4f1ea; pointer-events: none; transition: box-shadow .9s; }
.rbook__stack--r { left: 0; border-radius: 0 4px 4px 0; box-shadow: calc(var(--right) * .5) calc(var(--right) * .5) 0 -.5px #e6e1d6, var(--right) var(--right) 0 -1px #d9d2c4; }
.rbook__stack--l { left: calc(var(--w) * -1); border-radius: 4px 0 0 4px; box-shadow: calc(var(--left) * -.5) calc(var(--left) * .5) 0 -.5px #e6e1d6, calc(var(--left) * -1) var(--left) 0 -1px #d9d2c4; }
.rbook__stack { transition: opacity .35s .55s, box-shadow .9s; }
.rbook.is-closed .rbook__stack--l, .rbook:not(.is-open):not(.is-closed) .rbook__stack--r { opacity: 0; transition: opacity .2s, box-shadow .9s; }
.pg { position: absolute; inset: 0; background: #fffdf8; }
.pg--inside { background: color-mix(in srgb, var(--c) 14%, #fffdf8); display: grid; place-content: center; text-align: center; color: var(--ink); padding: 10%; gap: 6px; }
.pg--inside img { width: 55%; margin: 0 auto 10px; }
.pg--inside p { margin: 0; font: 600 1.25rem/1.2 var(--display); color: var(--c); }
.pg--inside small { color: var(--muted); }
.pg--note { display: grid; place-content: center; text-align: center; color: var(--ink); padding: 12%; gap: 4px; background: linear-gradient(160deg, #fffdf8, color-mix(in srgb, var(--c) 12%, #fffdf8)); }
.pg--note h4 { font-size: clamp(1rem, 2vw, 1.5rem); color: var(--c); }
.pg--note p { font-size: clamp(.8rem, 1.2vw, .95rem); color: var(--ink-2); }
.pg--note .btn { justify-self: center; }
.pg--backcover { background: var(--c); display: grid; place-content: center; text-align: center; gap: 8px; color: #fff; }
.pg--backcover img { width: 50%; margin: 0 auto; filter: brightness(0) invert(1); }
.reader__nav { position: absolute; top: calc(50% - 10px); z-index: 2; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.3rem; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); animation: fade .6s .4s both; transition: transform .2s, opacity .2s; }
.reader__nav:hover:not(:disabled) { transform: scale(1.08); }
.reader__prev { left: 14px; }
.reader__next { right: 14px; }
.reader__nav:disabled { opacity: .3; cursor: default; }
.reader__count { display: inline-block; vertical-align: middle; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); font: 700 .82rem/1 var(--body); }

/* ============ Level page ============ */
.lhero { padding: 140px 0 80px; position: relative; overflow: hidden; background: radial-gradient(700px 500px at 25% 45%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--bg); }
.lhero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.lhero__book { height: 540px; display: grid; place-items: center; perspective: 1400px; }
.lhero__book .b3d { cursor: pointer; }
.lhero__book .b3d__inner { transform: rotateY(-24deg) rotateX(6deg); }
.lhero__book .b3d:hover .b3d__inner { transform: rotateY(-8deg) rotateX(4deg) translateZ(20px); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.lbadge { display: inline-flex; align-items: center; gap: 10px; background: var(--c); color: #fff; padding: 8px 16px 8px 8px; border-radius: 999px; font: 600 .9rem/1 var(--body); margin-bottom: 18px; }
.lbadge b { background: #fff; color: var(--c); border-radius: 999px; padding: 6px 10px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.topics span { padding: 8px 14px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; font-size: .9rem; }
.pagestrip { display: flex; gap: 16px; overflow-x: auto; padding: 10px 4px 26px; scroll-snap-type: x mandatory; }
.pagestrip button { flex: none; width: 170px; border: 0; padding: 0; background: none; cursor: pointer; scroll-snap-align: start; text-align: center; font: 500 .82rem/1 var(--body); color: var(--muted); }
.pagestrip img { width: 170px; height: 240px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); margin-bottom: 10px; transition: transform .25s; }
.pagestrip button:hover img { transform: translateY(-6px); }
.included { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.included div { background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.included b { display: block; font: 600 1.05rem/1.2 var(--display); margin-bottom: 8px; }
.included p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.others { display: flex; gap: 22px; overflow-x: auto; padding: 20px 4px 30px; }
.others a { flex: none; text-decoration: none; text-align: center; font: 600 .9rem/1.2 var(--display); }
.others img { width: 110px; height: 156px; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: 0 12px 20px -10px rgba(0, 0, 0, .5); margin-bottom: 10px; transition: transform .25s; }
.others a:hover img { transform: translateY(-6px) rotate(-2deg); }
.others a[aria-current] { opacity: .4; pointer-events: none; }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }


/* ============ Responsive ============ */
@media (max-width: 1280px) {
  .lang { display: none; }
  .nav > a, .nav__trigger { padding: 12px 10px; }
}
@media (max-width: 1100px) {
  .edition__grid, .domains { grid-template-columns: repeat(3, 1fr); }
  .robots__grid, .included { grid-template-columns: repeat(2, 1fr); }
  .header__cta .btn--ghost { display: none; }
}
@media (max-width: 960px) {
  .burger { display: block; }
  .header__bar { gap: 12px; }
  .nav { position: fixed; inset: 80px 0 0; background: var(--paper); flex-direction: column; padding: 20px 16px 40px; gap: 0; overflow-y: auto; transform: translateX(100%); transition: transform .3s; margin: 0; }
  .header.menu-open .nav { transform: none; }
  .header.menu-open { background: var(--paper); }
  .header.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header.menu-open .burger span:nth-child(2) { opacity: 0; }
  .header.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav > a, .nav__trigger { font-size: 1.15rem; padding: 16px 8px; border-bottom: 1px solid var(--line); border-radius: 0; width: 100%; justify-content: space-between; }
  .header__logo { margin-right: auto; }
  .header__cta .btn--accent { display: none; }
  .mega { position: static; box-shadow: none; border: 0; display: none; opacity: 1; visibility: visible; transform: none; }
  .nav__item.is-open .mega { display: block; }
  .mega__inner { grid-template-columns: 1fr; padding: 16px 0; }
  .mega__cycles { grid-template-columns: 1fr; gap: 20px; }
  .mega__books { flex-wrap: wrap; }
  .mega__side { border: 0; padding: 0; }
  .method__grid, .platform__grid, .contact__grid, .lhero__grid { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .lhero__book { height: 420px; order: -1; }
  .comp__grid, .quotes { grid-template-columns: 1fr; }
  .support__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .reader__shelf { left: 0; right: 0; transform: none; max-width: none; justify-content: flex-start; padding: 0 12px; }
  /* phones: one page fills the width; the arrows sit in a row under it */
  .reader__stage { inset: 84px 8px 146px; }
  .reader__nav { top: auto; bottom: 92px; margin: 0; width: 46px; height: 46px; }
  .reader__prev { left: 14px; }
  .reader__next { right: 14px; }
  /* compact top bar: name + page count and close on one line, the extract notice under it */
  .reader__top { padding: 10px 12px; align-items: flex-start; }
  .reader__title strong { font-size: 1.05rem; margin-right: 8px; }
  .reader__count { font-size: .74rem; padding: 4px 9px; }
  .reader__sample { font-size: .74rem; }
  .reader__sheet { display: none; }
  .reader__close { width: 38px; height: 38px; font-size: 1.4rem; }
  /* the specimen button sits between the page arrows */
  .reader__specimen { position: fixed; left: 50%; bottom: 98px; transform: translateX(-50%); padding: 11px 16px; font-size: .86rem; }
  .reader.is-leaving .reader__specimen { opacity: 0; }
  .reader__thumb { min-width: 40px; }
  body { font-size: 16px; }
  .edition__grid, .domains, .robots__grid, .support__grid, .included, .plist { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .header__logo img { height: 42px; }
  .lang { display: none; }
      .tabs button { padding: 10px 12px; font-size: .88rem; }
  #shelves, .shelves-grid { grid-template-columns: 1fr; }
  .shelf { margin-bottom: 64px; }
  .rack { padding: 0; margin: 0 -16px; border-radius: 0; }
  .shelf__row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 60px 24px 0; gap: 22px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .shelf__row::-webkit-scrollbar { display: none; }
  .sbook { scroll-snap-align: center; flex: none; }
  .shelf__plank { margin: 0 -16px; border-radius: 0; }
  .rack__lip { display: none; }
  .shelf__row { padding-bottom: 12px; }
  .sbook__label { position: static; transform: none; margin-top: 14px; font-size: .9rem; }
    }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
