/* On phones the background is the original photograph with the approved
   portrait crop and tonal treatment. All copy and controls are separate. */
@media (max-width: 760px) {
  main.fold {
    --gutter: clamp(18px, 6.154vw, 38px);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter);
    grid-template-areas:
      ". brand ."
      ". copy ."
      ". art ."
      ". event ."
      ". score ."
      ". action .";
    grid-template-rows: auto auto minmax(178px, 1fr) auto auto auto;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    overflow: hidden;
    padding: max(env(safe-area-inset-top), clamp(14px, 4.15svh, 38px)) 0
             max(env(safe-area-inset-bottom), clamp(12px, 3.7svh, 34px));
    background: #01172e;
    color: white;
  }

  /* Align the complete portrait plate to the art row. This keeps the car
     between the introduction and event details if either block grows. */
  .fold .scene {
    position: absolute;
    z-index: -1;
    grid-column: 1 / -1;
    grid-row: art;
    left: 0;
    right: 0;
    bottom: auto;
    top: -68.6%;
    width: 100%;
    height: 263.75%;
    max-width: none;
    object-fit: cover;
    object-position: 50% 48%;
    display: block;
    pointer-events: none;
  }

  .fold .ambient-shade { display: none; }
  .fold .brands, .fold .intro, .fold .emblem, .fold .event, .fold .score,
  .fold .action-block {
    position: relative;
    inset: auto;
    transform: none;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  .fold .brands {
    display: block;
    grid-area: brand;
    width: clamp(142px, 41.8vw, 195px);
    height: auto;
  }
  .fold .intro {
    grid-area: copy;
    width: auto;
    padding-top: clamp(17px, 4.8svh, 42px);
  }
  .fold .intro h1 { margin: 0; line-height: 0; }
  .fold .intro h1 img { display: block; width: min(100%, 440px); height: auto; }
  .fold .intro p {
    margin: clamp(12px, 2.55svh, 23px) 0 0;
    font-size: 1rem;
    line-height: 1.32;
    max-width: 100%;
    letter-spacing: -.012em;
  }
  .fold .emblem {
    grid-area: art;
    align-self: start;
    justify-self: center;
    /* Original lockup sits slightly to the right of geometric center. */
    left: min(3.3vw, 15px);
    margin-top: clamp(12px, 2.35svh, 22px);
    width: min(82%, 320px);
    line-height: 0;
  }
  .fold .emblem img { width: 100%; height: auto; display: block; }

  .fold .event {
    grid-area: event;
    display: flex;
    width: auto;
    gap: clamp(13px, 4.1vw, 19px);
    align-items: center;
    padding: 0;
  }
  .fold .day { display: grid; width: min(28.94%, 118px); gap: 3px; }
  .fold .day img { display: block; width: 100%; height: auto; }
  .fold .place {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: clamp(12px, 4.2vw, 18px);
    border-left: 2px solid #27b2df;
    min-height: 36px;
  }
  .fold .place img:first-child { width: clamp(15px, 4.9vw, 21px); height: auto; }
  .fold .place img:last-child { width: clamp(95px, 32.8vw, 150px); height: auto; }

  .fold .score {
    grid-area: score;
    width: 100%;
    padding-top: clamp(14px, 3.55svh, 31px);
    color: white;
  }
  .fold .track { display: block; height: 3px; background: rgb(229 246 254 / 42%); }
  .fold .track i { display: block; height: 100%; background: white; }
  .fold .category { margin: 8px 0 0; font-size: .875rem; line-height: 1.3; }
  .fold .balance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin: 0; }
  .fold .balance strong {
    font-size: 3.25rem; font-weight: 700; line-height: 1.16;
    letter-spacing: -.045em; color: #59e3ff;
  }
  .fold .balance span { font-size: 1.0625rem; line-height: 1.25; letter-spacing: -.014em; }
  .fold .action-block { grid-area: action; width: 100%; margin-top: clamp(12px, 2.55svh, 23px); }
  .fold .action-block button {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; min-width: 0; min-height: 53px;
    gap: 10px; padding: 12px 18px;
    font-size: 1.1875rem; line-height: 1.25; letter-spacing: -.018em;
    white-space: normal;
  }
  .fold .action-block small {
    display: block; font-size: .8125rem; line-height: 1.27; max-width: 46ch;
    margin: 10px 0 0; color: #e4eef7;
  }
  @media (max-height: 720px) {
    main.fold { grid-template-rows: auto auto minmax(158px, 1fr) auto auto auto; }
    .fold .intro { padding-top: 14px; }
    .fold .intro p { margin-top: 9px; }
    .fold .emblem { width: min(65%, 226px); margin-top: 6px; }
    .fold .score { padding-top: 14px; }
    .fold .balance strong { font-size: 2.7rem; }
    .fold .action-block { margin-top: 8px; }
    .fold .action-block button { min-height: 48px; }
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .fold .scene {
    animation: race-photo-arrival 700ms cubic-bezier(.18,.66,.24,1) 1;
  }
  @keyframes race-photo-arrival {
    from { transform: translate3d(-1%, .3%, 0) scale(1.055); }
    to { transform: none; }
  }
}
