/* ============================================================
   MathBall Brochure — Landscape (web-only) layout
   Isolated under @media screen + html.layout-landscape
   Portrait styles.css remains authoritative for portrait + PDF
   ============================================================ */

@media screen {
  html.layout-landscape {
    /* 16:9 presentation canvas (scaled by viewer.js to fill stage) */
    --page-width: 1280px;
    --page-height: 720px;
    --ls-pad-x: 36px;
    --ls-pad-y: 28px;
    --ls-gap: 28px;
    --ls-copy: 0.38fr;
    --ls-visual: 0.62fr;
  }

  html.layout-landscape .brochure-page {
    width: var(--page-width);
    height: var(--page-height);
    min-width: var(--page-width);
    min-height: var(--page-height);
    max-width: var(--page-width);
    max-height: var(--page-height);
  }

  html.layout-landscape .brochure-page__inner {
    padding: var(--ls-pad-y) var(--ls-pad-x) 18px;
  }

  /* Shared intel 2-column composition (Pages 4–8, 10–11 base) */
  html.layout-landscape .intel-page .brochure-page__inner {
    display: grid;
    grid-template-columns: var(--ls-copy) var(--ls-visual);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px var(--ls-gap);
    align-items: stretch;
    padding-top: 26px;
    padding-bottom: 16px;
  }

  html.layout-landscape .intel-page .intel-intro {
    grid-column: 1;
    grid-row: 1;
    max-height: none;
    overflow: visible;
    margin: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  html.layout-landscape .intel-page .intel-page-meta {
    position: static;
    align-self: flex-start;
    margin-bottom: 8px;
  }

  html.layout-landscape .intel-page .intel-intro .page-title {
    font-size: 42px;
    line-height: 1.12;
    margin-bottom: 12px;
    padding-right: 0;
  }

  html.layout-landscape .intel-page .intel-intro .page-subtitle {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 500;
  }

  html.layout-landscape .intel-page .intel-intro .accent-rule {
    margin: 12px 0 16px;
    width: 56px;
  }

  html.layout-landscape .intel-page .intel-copy {
    font-size: 15px;
    line-height: 1.55;
    max-width: none;
  }

  html.layout-landscape .intel-page .intel-copy p + p {
    margin-top: 8px;
  }

  html.layout-landscape .intel-page .intel-stage,
  html.layout-landscape .intel-page .platform-hub,
  html.layout-landscape .intel-page .timeline-hero,
  html.layout-landscape .intel-page .page-09-stage,
  html.layout-landscape .intel-page .data-tree-hero {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    align-self: stretch;
  }

  html.layout-landscape .intel-page .page-footer {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
  }

  /* ============================================================
     PAGE 1 — Cover (widescreen cinematic)
     ============================================================ */

  html.layout-landscape .page-cover .brochure-page__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
    grid-template-rows: auto 1fr auto;
    gap: 0 40px;
    padding: 40px 48px 28px;
    position: relative;
    z-index: 2;
  }

  html.layout-landscape .page-cover .cover-top {
    grid-column: 1;
    grid-row: 1;
  }

  html.layout-landscape .page-cover .cover-hero {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    padding-bottom: 12px;
    justify-content: center;
  }

  html.layout-landscape .page-cover .cover-hero .page-title {
    font-size: 54px;
  }

  html.layout-landscape .page-cover .cover-hero .page-subtitle {
    font-size: 20px;
    margin-top: 18px;
  }

  html.layout-landscape .page-cover .cover-footer {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  html.layout-landscape .page-cover .brand-logo--cover {
    width: 360px;
  }

  html.layout-landscape .page-cover .cover-bg {
    background:
      radial-gradient(ellipse 62% 78% at 78% 48%, rgba(55, 72, 82, 0.34) 0%, transparent 70%);
  }

  html.layout-landscape .page-cover .cover-bg__pitch {
    right: -2%;
    top: 4%;
    width: 62%;
    height: 88%;
    opacity: 0.78;
    filter: drop-shadow(0 0 28px rgba(78, 205, 196, 0.14));
  }

  html.layout-landscape .page-cover .cover-bg__grid {
    width: 48%;
    height: 56%;
    opacity: 0.45;
  }

  html.layout-landscape .page-cover .cover-dot {
    right: 40px;
    bottom: 36px;
  }

  /* ============================================================
     PAGE 2 — Football Has Changed
     ============================================================ */

  html.layout-landscape .page-02 .brochure-page__inner {
    display: flex;
    flex-direction: column;
    padding: 28px 40px 18px;
  }

  html.layout-landscape .page-02 .page-header {
    margin-bottom: 8px;
  }

  html.layout-landscape .page-02 .page-changed-layout {
    grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
    gap: 32px;
    align-items: center;
  }

  html.layout-landscape .page-02 .page-changed-copy {
    max-width: none;
  }

  html.layout-landscape .page-02 .page-changed-copy .page-title {
    font-size: 44px;
  }

  html.layout-landscape .page-02 .page-changed-copy .page-subtitle {
    font-size: 18px;
  }

  html.layout-landscape .page-02 .page-changed-copy .page-body {
    font-size: 15px;
    max-width: none;
    line-height: 1.55;
  }

  html.layout-landscape .page-02 .fragment-scene {
    min-height: 520px;
    height: 100%;
  }

  html.layout-landscape .page-02 .fragment-scene__svg {
    transform: scale(1.18);
    transform-origin: 55% 48%;
  }

  html.layout-landscape .page-02 .fragment-scene__glow {
    transform: translate(-50%, -50%) scale(1.15);
    width: 100%;
    height: 100%;
  }

  /* ============================================================
     PAGE 3 — Understanding / convergence
     ============================================================ */

  html.layout-landscape .page-03 .brochure-page__inner {
    display: flex;
    flex-direction: column;
    padding: 28px 40px 18px;
  }

  html.layout-landscape .page-03 .page-header-block {
    margin-bottom: 10px;
  }

  html.layout-landscape .page-03 .page-title {
    font-size: 40px;
  }

  html.layout-landscape .page-03 .page-subtitle {
    font-size: 18px;
  }

  html.layout-landscape .page-03 .page-understanding-layout {
    grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
    gap: 32px;
    align-items: center;
  }

  html.layout-landscape .page-03 .understanding-copy {
    max-width: none;
  }

  html.layout-landscape .page-03 .understanding-copy__lead,
  html.layout-landscape .page-03 .understanding-copy__sources,
  html.layout-landscape .page-03 .understanding-copy p {
    font-size: 15px;
    line-height: 1.55;
  }

  html.layout-landscape .page-03 .transform-scene {
    min-height: 500px;
    height: 100%;
  }

  /* ============================================================
     PAGES 4–8 — Product screenshots as visual heroes
     ============================================================ */

  html.layout-landscape .page-04 .intel-intro .page-title,
  html.layout-landscape .page-05 .intel-intro .page-title,
  html.layout-landscape .page-06 .intel-intro .page-title,
  html.layout-landscape .page-07 .intel-intro .page-title,
  html.layout-landscape .page-08 .intel-intro .page-title {
    font-size: 44px;
  }

  html.layout-landscape .page-04 .intel-copy,
  html.layout-landscape .page-05 .intel-copy,
  html.layout-landscape .page-06 .intel-copy,
  html.layout-landscape .page-07 .intel-copy,
  html.layout-landscape .page-08 .intel-copy {
    font-size: 15.5px;
    line-height: 1.58;
  }

  html.layout-landscape .page-04 .intel-stage.page-04-stage,
  html.layout-landscape .page-05 .intel-stage.page-05-stage,
  html.layout-landscape .page-06 .intel-stage.page-06-stage,
  html.layout-landscape .page-07 .intel-stage.page-07-stage,
  html.layout-landscape .page-08 .intel-stage.page-08-stage {
    padding: 4px 0;
    justify-content: center;
    align-items: stretch;
  }

  html.layout-landscape .page-04-product,
  html.layout-landscape .page-05-product,
  html.layout-landscape .page-06-product,
  html.layout-landscape .page-07-product,
  html.layout-landscape .page-08-product {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    justify-content: center;
  }

  html.layout-landscape .page-04-product__frame,
  html.layout-landscape .page-05-product__frame,
  html.layout-landscape .page-06-product__frame,
  html.layout-landscape .page-07-product__frame,
  html.layout-landscape .page-08-product__frame {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  html.layout-landscape .page-04-product__shot,
  html.layout-landscape .page-05-product__shot,
  html.layout-landscape .page-06-product__shot,
  html.layout-landscape .page-07-product__shot,
  html.layout-landscape .page-08-product__shot {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }

  /* Slightly more visual weight for denser screenshots */
  html.layout-landscape .page-05 .brochure-page__inner,
  html.layout-landscape .page-06 .brochure-page__inner,
  html.layout-landscape .page-07 .brochure-page__inner {
    grid-template-columns: minmax(0, 0.35fr) minmax(0, 0.65fr);
  }

  html.layout-landscape .page-07 .intel-copy p + p,
  html.layout-landscape .page-08 .intel-copy p + p {
    margin-top: 7px;
  }

  /* ============================================================
     PAGE 9 — AI Intelligence
     ============================================================ */

  html.layout-landscape .page-09 .brochure-page__inner {
    grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  }

  html.layout-landscape .page-09 .page-09-intro .page-title {
    font-size: 42px;
  }

  html.layout-landscape .page-09 .page-09-intro .page-subtitle {
    font-size: 18px;
  }

  html.layout-landscape .page-09 .page-09-intro .intel-copy {
    font-size: 14.5px;
    line-height: 1.5;
  }

  html.layout-landscape .page-09-stage {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    overflow: hidden;
  }

  html.layout-landscape .page-09 .ai-flow {
    grid-template-columns: 1fr 18px 1fr 18px 1fr 18px 1fr;
    gap: 6px;
    flex: 0 0 auto;
  }

  html.layout-landscape .page-09 .ai-flow__step {
    padding: 10px 10px 12px;
  }

  html.layout-landscape .page-09 .ai-flow__visual {
    height: 96px;
  }

  html.layout-landscape .page-09 .ai-flow__label {
    font-size: 12px;
  }

  html.layout-landscape .page-09 .ai-flow__caption {
    font-size: 10px;
    line-height: 1.3;
  }

  html.layout-landscape .page-09 .ai-examples {
    min-height: 0;
    overflow: hidden;
  }

  html.layout-landscape .page-09 .ai-examples__heading {
    font-size: 12px;
    margin-bottom: 6px;
  }

  html.layout-landscape .page-09 .ai-examples__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  html.layout-landscape .page-09 .ai-card__visual {
    height: 72px;
  }

  html.layout-landscape .page-09 .ai-card__title {
    font-size: 11px;
  }

  html.layout-landscape .page-09 .ai-card__note {
    font-size: 10px;
  }

  html.layout-landscape .page-09 .ai-reco {
    flex-shrink: 0;
  }

  html.layout-landscape .page-09 .ai-closing {
    font-size: 12px;
    margin: 0;
  }

  /* ============================================================
     PAGE 10 — Platform hub
     ============================================================ */

  html.layout-landscape .page-10 .platform-hub {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }

  html.layout-landscape .page-10 .platform-hub svg {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  /* ============================================================
     PAGE 11 — Heritage timeline
     ============================================================ */

  html.layout-landscape .page-11 .brochure-page__inner {
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy timeline"
      "footer footer";
    column-gap: 32px;
    row-gap: 14px;
    align-items: stretch;
  }

  html.layout-landscape .page-11 .intel-intro {
    grid-area: copy;
    align-self: stretch;
    justify-content: flex-start;
    padding-top: 4px;
    padding-bottom: 8px;
    gap: 0;
  }

  html.layout-landscape .page-11 .intel-page-meta {
    margin-bottom: 10px;
  }

  html.layout-landscape .page-11 .intel-intro .page-title {
    font-size: 42px;
    line-height: 1.12;
    margin-bottom: 12px;
  }

  html.layout-landscape .page-11 .intel-intro .page-subtitle {
    font-size: 18px;
    margin-bottom: 0;
  }

  html.layout-landscape .page-11 .intel-intro .accent-rule {
    margin: 12px 0 16px;
  }

  /* Swap portrait/landscape copy blocks (screen landscape only) */
  html.layout-landscape .page-11 .page-11-portrait-copy,
  html.layout-landscape .page-11 .page-11-portrait-callout {
    display: none !important;
  }

  html.layout-landscape .page-11 .page-11-landscape-copy {
    display: block !important;
    margin-top: 0;
  }

  html.layout-landscape .page-11 .page-11-landscape-copy p {
    font-size: 15px;
    line-height: 1.55;
  }

  html.layout-landscape .page-11 .page-11-landscape-copy p + p {
    margin-top: 11px;
  }

  html.layout-landscape .page-11 .page-11-landscape-callout {
    display: block !important;
    text-align: left;
    padding: 18px 0 8px;
    margin-top: 4px;
  }

  html.layout-landscape .page-11 .page-11-landscape-callout .heritage-callout__years {
    font-size: 24px;
    margin-bottom: 6px;
  }

  html.layout-landscape .page-11 .page-11-landscape-callout .heritage-callout__emphasis {
    font-size: 15px;
    margin-top: 0;
    font-weight: 700;
  }

  html.layout-landscape .page-11 .timeline-hero {
    grid-area: timeline;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 8px 4px;
    min-height: 0;
  }

  html.layout-landscape .page-11 .timeline-hero svg {
    width: 100%;
    height: auto;
    max-height: 100%;
  }

  html.layout-landscape .page-11 .page-footer {
    grid-area: footer;
    margin-top: 0;
  }

  /* ============================================================
     PAGE 12 — Closing
     ============================================================ */

  html.layout-landscape .page-12.page-closing .brochure-page__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "copy visual"
      "contact visual"
      "footer footer";
    gap: 10px 36px;
    padding: 28px 40px 16px;
  }

  html.layout-landscape .page-12 .intel-intro {
    grid-area: copy;
    align-self: center;
  }

  html.layout-landscape .page-12 .intel-intro .page-title {
    font-size: 40px;
  }

  html.layout-landscape .page-12 .intel-intro .page-subtitle {
    font-size: 17px;
  }

  html.layout-landscape .page-12 .intel-copy {
    font-size: 15px;
  }

  html.layout-landscape .page-12 .data-tree-hero {
    grid-area: visual;
    padding: 0;
  }

  html.layout-landscape .page-12 .data-tree-hero svg {
    width: 96%;
    max-height: 78%;
  }

  html.layout-landscape .page-12 .data-tree-brand {
    margin-top: 10px;
  }

  html.layout-landscape .page-12 .data-tree-brand__name {
    font-size: 22px;
  }

  html.layout-landscape .page-12 .closing-contact {
    grid-area: contact;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 0;
    padding: 8px 0 0;
  }

  html.layout-landscape .page-12 .closing-contact__cta {
    align-items: flex-start;
    text-align: left;
  }

  html.layout-landscape .page-12 .page-footer {
    grid-area: footer;
  }
}
