.home-formats {
  --format-control-size: 52px;
  --format-gap: 16px;
  --format-accent: #d9233f;
  max-width: 1240px;
  padding-inline: 40px;
  padding-top: 48px;
  scroll-margin-top: 108px;
}
.home-formats-heading { margin-bottom: 20px; }
.home-formats-heading h2 { margin: 0; font-size: 32px; line-height: 1.2; }
.home-formats-stage { position: relative; }
.home-formats [hidden] { display: none; }
.home-formats-arrow {
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  margin-top: calc(var(--format-control-size) / -2);
  z-index: 5;
  width: var(--format-control-size);
  height: var(--format-control-size);
  padding: 0;
  border: 1px solid var(--format-accent);
  border-radius: 50%;
  background: var(--format-accent);
  color: white;
  cursor: pointer;
}
.home-formats-prev { left: -26px; }
.home-formats-next { right: -26px; }
.home-formats-arrow:hover { border-color: #ad1730; background: #ad1730; color: white; }
.home-formats-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  align-items: start;
  gap: var(--format-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 20px;
}
.home-formats-track::-webkit-scrollbar { display: none; }
.home-format {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, .36fr) minmax(0, .64fr);
  position: relative;
  isolation: isolate;
  aspect-ratio: 2.78;
  overflow: hidden;
  align-items: center;
  gap: 0;
  padding: 0 52px;
  border: 1px solid var(--line);
  border-radius: 20px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.home-format-intro { min-width: 0; }
.home-format h3 { margin: 0 0 12px; font-size: clamp(23px, 2.3vw, 30px); line-height: 1.2; }
.home-format p { margin: 0; max-width: 300px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.home-format-demo { position: relative; min-width: 0; width: 100%; height: 100%; justify-self: end; }
.home-format[data-format="homework"] { --format-decoration: var(--promo-gold); border-color: #faeee7; background: linear-gradient(110deg, #fcf3ed, #fff8f3 58%, #fff0e3); }
.home-format-backdrop { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; fill: var(--format-decoration); pointer-events: none; }
.home-format[data-format="homework"] .home-format-intro { padding-block: 20px; }
.home-format[data-format="homework"] .home-format-demo { position: relative; height: 100%; min-height: 0; max-width: none; padding: 0; }
.home-format-catalog { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 36px; padding: 12px 24px; border: 1px solid var(--format-accent); border-radius: 12px; background: #fff; color: var(--format-accent); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; transition: background-color .2s, color .2s; }
.home-format-catalog:hover { background: var(--format-accent); color: #fff; }
/* All three complete PDF pages remain static; the dialogue is the front sheet. */
.home-format-paper-fan { position: relative; width: 100%; height: 100%; isolation: isolate; }
.home-format-paper-fan figure { position: absolute; height: 76%; aspect-ratio: 1247 / 1800; margin: 0; transform-origin: center 80%; }
.home-format-paper-fan figure:nth-child(1) { height: 92%; left: 24%; top: 4%; z-index: 2; transform: rotate(-6deg); }
.home-format-paper-fan figure:nth-child(2) { left: 2%; top: 16%; transform: rotate(-12deg); }
.home-format-paper-fan figure:nth-child(3) { right: 8%; top: 14%; transform: rotate(13deg); }
.home-format-paper-fan a { display: block; height: 100%; padding: 5px; background: white; box-shadow: 0 10px 14px rgb(102 58 24 / 20%); border-radius: 10px; }
.home-format-paper-fan img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.home-format-paper-fan figure:focus-within { z-index: 3; }
.home-format-editorial .home-format-intro { position: relative; z-index: 3; padding-block: 20px; }
.home-format.home-format-editorial h3 { margin-bottom: 6px; font-size: clamp(24px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.045em; line-height: 1.1; }
.home-format[data-format="homework"] h3 { margin-bottom: 0; line-height: 1.07; letter-spacing: -.04em; }
.home-format.home-format-editorial h3 span { color: var(--format-accent); }
.home-format-editorial p { color: #665773; }
.home-formats-footer { display: flex; align-items: center; justify-content: center; position: relative; min-height: 44px; margin-top: 8px; }
.home-formats-dots { display: flex; }
.home-formats-dots button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.home-formats-dots span { display: block; width: 8px; height: 8px; border-radius: 50%; background: #c6bfc5; transition: background-color .2s; }
.home-formats-dots [aria-current] span, .home-formats-dots button:hover span { background: var(--format-accent); }
.home-formats :focus-visible { outline: 3px solid #a51a31; outline-offset: 3px; }
.home-format[data-format="presentation"] { display: block; padding: 0; border-color: #faeee7; background: linear-gradient(110deg, #fcf3ed, #fff8f3); }
.home-presentation-backdrop { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; fill: #ffb536; pointer-events: none; }
.home-format[data-format="presentation"] .home-format-intro { position: absolute; left: 4.2%; top: 50%; width: 33%; padding: 0; transform: translateY(-50%); text-align: left; }
.home-format[data-format="presentation"] .home-format-subtitle { color: var(--ink); font-size: clamp(18px, 2.1vw, 27px); font-weight: 400; line-height: 1.25; letter-spacing: -.02em; }
.home-presentation-cards { position: absolute; inset: 0; }
.home-presentation-card { position: absolute; margin: 0; transform-origin: center; transition: transform .2s; }
.home-presentation-card--metro { left: 47%; top: 9%; width: 26%; z-index: 3; transform: rotate(-8deg); }
.home-presentation-card--ronaldo { left: 43.5%; top: 51%; width: 26%; z-index: 1; transform: rotate(-4deg); }
.home-presentation-card--colours { left: 69%; top: 41%; width: 26%; z-index: 2; transform: rotate(10deg); }
.home-presentation-card a { display: block; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 3px 5px rgb(91 49 20 / 20%), 0 8px 15px rgb(91 49 20 / 22%); }
.home-presentation-card img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 719; border-radius: 2px; }
/* Match the hero HSK covers: lift 8px, straighten, bring to the front. */
.home-presentation-card:focus-within { z-index: 4; transform: translateY(-8px) rotate(0); }
@media (hover: hover) and (pointer: fine) {
  .home-presentation-card:hover { z-index: 4; transform: translateY(-8px) rotate(0); }
}
.home-format[data-format="progressme"] { display: block; padding: 0; border-color: #faeee7; background: #fcf3ed; }
.home-progressme-backdrop { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; fill: #ffb536; pointer-events: none; }
.home-format[data-format="progressme"] .home-format-intro { position: absolute; right: 4.2%; top: 50%; width: 28%; padding: 0; transform: translateY(-50%); text-align: right; }
.home-format[data-format="progressme"] h3 { line-height: 1.15; letter-spacing: -.035em; }
.home-format[data-format="progressme"] h3 .home-progressme-name { display: block; margin-top: 6px; color: inherit; font-size: clamp(18px, 2.1vw, 27px); font-weight: 400; line-height: 1.25; letter-spacing: -.02em; }
.home-progressme-orbit {
  --orbit-centre: translate(150%, -50%) scale(1.7);
  --orbit-front: translate(8%, -32%) scale(.9);
  --orbit-back: translate(-6%, -45%) scale(.82);
  --orbit-present: translate(75%, -18%) scale(1.2);
  --orbit-return: translate(75%, -78%) scale(1.2);
  position: absolute; inset: 0; border-radius: 16px; pointer-events: none;
}
.home-progressme-orbit figure { position: absolute; left: 8%; top: 50%; width: 20%; margin: 0; padding: 6px; box-sizing: border-box; background: #fff; border-radius: 10px; transform-origin: center; transition: transform .8s cubic-bezier(.4, 0, .2, 1); filter: drop-shadow(0 5px 5px rgb(68 41 20 / 22%)); pointer-events: auto; }
.home-progressme-orbit img { display: block; width: 100%; height: auto; border-radius: 4px; }
.home-progressme-orbit [data-orbit-slot="0"] { z-index: 3; transform: var(--orbit-centre); }
.home-progressme-orbit [data-orbit-slot="1"] { z-index: 2; transform: var(--orbit-front); }
.home-progressme-orbit [data-orbit-slot="2"] { z-index: 1; transform: var(--orbit-back); }
.home-progressme-orbit .is-presenting { animation: progressme-orbit-present .8s cubic-bezier(.4, 0, .2, 1) both; }
.home-progressme-orbit .is-returning { animation: progressme-orbit-return .8s cubic-bezier(.4, 0, .2, 1) both; }
.home-progressme-orbit.is-resetting figure { transition: none; }
@keyframes progressme-orbit-present {
  0% { transform: var(--orbit-front); }
  50% { transform: var(--orbit-present); }
  100% { transform: var(--orbit-centre); }
}
@keyframes progressme-orbit-return {
  0% { z-index: 4; transform: var(--orbit-centre); }
  40% { z-index: 4; transform: var(--orbit-return); }
  41% { z-index: 1; }
  100% { z-index: 1; transform: var(--orbit-back); }
}
.home-format .home-format-subtitle { max-width: none; color: var(--muted); font-size: clamp(17px, 2.1vw, 27px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
@media (max-width: 700px) {
  .home-formats { --format-control-size: 44px; padding-top: 36px; padding-inline: 22px; }
  .home-formats-heading { margin-bottom: 16px; }
  .home-formats-heading h2 { font-size: 27px; }
  .home-format { grid-template-columns: 1fr; grid-template-rows: 150px minmax(0, 1fr); height: calc(180px + (100vw - 60px) / 1.1); aspect-ratio: auto; gap: 0; padding: 24px 8px 16px; }
  .home-format-backdrop { inset: auto -12% 0 auto; width: 185%; height: 65%; }
  .home-format[data-format="presentation"] { height: calc(210px + (100vw - 60px) * .95); }
  .home-format[data-format="presentation"] .home-format-intro { left: 24px; right: 24px; top: 24px; width: auto; max-width: none; transform: none; padding: 0; }
  .home-presentation-backdrop { inset: auto 0 0; height: 60%; }
  .home-presentation-cards { inset: auto 0 18px; height: calc((100vw - 60px) * .95); }
  .home-presentation-card--metro { left: 19%; top: 9%; width: 57%; }
  .home-presentation-card--ronaldo { left: 5%; top: 49%; width: 57%; }
  .home-presentation-card--colours { left: 44%; top: 40%; width: 51%; }
  .home-presentation-card a { padding: 5px; border-radius: 7px; }
  .home-format[data-format="presentation"] .home-format-subtitle { font-size: 19px; }
  .home-format .home-format-intro { padding: 0 16px; align-self: start; }
  .home-format[data-format="homework"] .home-format-demo { padding: 0 16px 0; }
  .home-format-paper-fan figure:nth-child(1) { left: 22%; }
  .home-format-paper-fan figure:nth-child(2) { left: 5%; }
  .home-format-paper-fan figure:nth-child(3) { right: 3%; }
  .home-format-catalog { margin-top: 20px; }
  .home-format.home-format-editorial h3 { font-size: clamp(25px, 7.3vw, 32px); margin-bottom: 6px; }
  .home-format[data-format="homework"] h3 { margin-bottom: 0; }
  .home-format .home-format-subtitle { font-size: 19px; }
  .home-format[data-format="progressme"] { height: calc(180px + (100vw - 60px) * .9); }
  .home-format[data-format="progressme"] .home-format-intro { left: 24px; right: 24px; top: 24px; width: auto; transform: none; padding: 0; }
  .home-format[data-format="progressme"] h3 .home-progressme-name { font-size: 19px; }
  .home-progressme-orbit {
    --orbit-centre: translate(85%, -50%) scale(1.8);
    --orbit-front: translate(0, -14%) scale(.85);
    --orbit-back: translate(-12%, -30%) scale(.75);
    --orbit-present: translate(38%, 4%) scale(1.15);
    --orbit-return: translate(38%, -85%) scale(1.15);
    inset: auto 0 22px; height: calc((100vw - 60px) * .8);
  }
  .home-progressme-orbit figure { left: 5%; width: 33%; }
  .home-progressme-backdrop { top: auto; bottom: 0; height: 75%; }
  .home-formats-arrow { top: calc(100% + 8px); margin-top: 0; }
  .home-formats-prev { left: 0; }
  .home-formats-next { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home-formats-dots span, .home-format-catalog, .home-presentation-card { transition: none; }
  .home-presentation-card:hover, .home-presentation-card:focus-within { transform: none; }
  .home-progressme-orbit figure { transition: none; animation: none; }
}

