/*
 * v20 homepage-only composition refinements.
 *
 * This file is loaded only by index.html. It deliberately leaves the
 * collection and feature pages on their verified v19 responsive system.
 */

/* Opening hero: use the quiet upper-left of the skyline and finish the copy
   block before the car begins. */
.home-page .hero-media img {
  object-position: 50% 60% !important;
}

.home-page .hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .64) 38%, rgba(0, 0, 0, .08) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .12) 48%, rgba(0, 0, 0, .58) 100%);
}

.home-page .hero-content {
  align-self: start;
  padding-block: clamp(7rem, 12svh, 8.5rem) 0;
}

.home-page .hero h1 {
  max-inline-size: min(52rem, 58vw);
  margin-block-start: clamp(1rem, 2svh, 1.35rem);
  font-size: clamp(3.75rem, 4.8vw, 6rem);
  line-height: .82;
}

.home-page .hero-intro {
  max-inline-size: min(30rem, 42vw);
  margin-block-start: clamp(.8rem, 1.6svh, 1.1rem);
}

.home-page .hero-actions {
  margin-block-start: clamp(.8rem, 1.6svh, 1.1rem);
}

/* The complete 911 location behaves as a single label at every phone size. */
.home-page .access-gt3 .kicker {
  white-space: nowrap;
}

/* The right-hand editorial panels share one exact right edge on desktop. */
@media (min-width: 1025px) and (orientation: landscape) {
  .home-page .access-ferrari .panel-copy,
  .home-page .access-r34 .panel-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .home-page .access-ferrari .panel-copy > *,
  .home-page .access-r34 .panel-copy > * {
    align-self: flex-end;
  }

  .home-page .access-ferrari .panel-copy > p:not(.kicker),
  .home-page .access-r34 .panel-copy > p:not(.kicker) {
    margin-inline: auto 0;
    text-align: right;
  }

  /* Keep the long first line in the concrete negative space to the right of
     the 550 rather than letting the global display scale reach back over it. */
  .home-page .access-ferrari .panel-copy h3 {
    max-inline-size: min(31rem, 100%);
    font-size: clamp(3.65rem, 4.4vw, 5.25rem);
  }
}

/* Final inquiry: keep the complete copy and contact block in the dark upper
   facade, above the car and the illuminated shop gates. */
.home-page .contact-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .28) 42%, rgba(0, 0, 0, .08) 66%),
    linear-gradient(90deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .62) 46%, rgba(0, 0, 0, .18) 82%);
}

.home-page .contact-content {
  align-self: start;
  padding-block: clamp(7.75rem, 13svh, 9rem) 0;
}

.home-page .contact h2 {
  max-inline-size: min(65rem, 72vw);
  margin: clamp(1rem, 2svh, 1.4rem) 0 clamp(1.5rem, 3svh, 2.25rem);
  font-size: clamp(3.25rem, 6.4vw, 6.8rem);
  line-height: .82;
}

.home-page .contact-links a {
  padding-block: clamp(.85rem, 1.8svh, 1.15rem);
}

/* Portrait layouts use the dedicated portrait hero source, retaining its dark
   sky and the complete car while biasing the frame toward the quieter left. */
@media (orientation: portrait) {
  .home-page .hero-media img {
    object-position: 32% 100% !important;
  }

  .home-page .hero h1 {
    max-inline-size: min(46rem, 78vw);
  }

  .home-page .hero-intro {
    max-inline-size: min(30rem, 62vw);
  }
}

/* Phone portrait -------------------------------------------------------- */
@media (max-width: 479px) and (orientation: portrait) {
  .home-page .hero-content {
    inline-size: 90vw;
    padding-block: clamp(5.75rem, 12svh, 6.4rem) 0;
  }

  .home-page .hero .kicker {
    font-size: clamp(.48rem, 2vw, .54rem);
    letter-spacing: .22em;
  }

  .home-page .hero h1 {
    max-inline-size: 88vw;
    margin-block-start: .8rem;
    font-size: clamp(2.6rem, 10.9vw, 3rem);
    line-height: .82;
  }

  .home-page .hero-intro {
    max-inline-size: 86vw;
    margin-block-start: .9rem;
    font-size: clamp(.76rem, 3.2vw, .86rem);
    line-height: 1.48;
  }

  .home-page .hero-actions {
    gap: .5rem;
    margin-block-start: .9rem;
  }

  .home-page .hero .button {
    padding-block: .72rem;
  }

  .home-page .access-gt3 .panel-copy {
    inline-size: 90vw;
  }

  .home-page .access-gt3 .kicker {
    font-size: clamp(.43rem, 1.85vw, .5rem);
    letter-spacing: .15em;
  }

  .home-page .access-gt3 .panel-copy h3 {
    max-inline-size: 84vw;
  }

  /* The 3:2 source becomes a compact portrait editorial frame: the source
     height is kept, and the horizontal slice leaves breathing room beyond the
     22B's rear wing and front bumper. */
  .home-page .access-22b {
    block-size: auto;
    min-block-size: 0;
    aspect-ratio: 7 / 10;
  }

  .home-page .access-22b > img {
    object-fit: cover;
    object-position: 62% 56% !important;
  }

  .home-page .access-22b .panel-copy {
    margin: clamp(4.75rem, 9svh, 5.5rem) 0 0 5vw;
  }

  .home-page .access-22b .panel-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, .76) 0%, rgba(0, 0, 0, .18) 43%, transparent 62%);
  }

  .home-page .contact-content {
    inline-size: 90vw;
    padding-block: clamp(5.6rem, 11.5svh, 6.25rem) 0;
  }

  .home-page .contact h2 {
    max-inline-size: 90vw;
    margin: .85rem 0 1.35rem;
    font-size: clamp(2.85rem, 11.7vw, 3.3rem);
    line-height: .84;
  }

  .home-page .contact-links a {
    padding-block: .72rem;
  }
}

/* Phone and tablet landscape ------------------------------------------ */
@media (max-width: 1024px) and (orientation: landscape) {
  .home-page .hero {
    min-block-size: max(100svh, 62vw);
  }

  .home-page .hero-media img {
    object-position: 50% 55% !important;
  }

  .home-page .hero-content {
    inline-size: 92vw;
    padding-block: clamp(5.25rem, 10vw, 6.25rem) 0;
  }

  .home-page .hero .kicker {
    font-size: clamp(.42rem, 1vw, .5rem);
    letter-spacing: .2em;
  }

  .home-page .hero h1 {
    max-inline-size: min(48vw, 27rem);
    margin-block-start: .6rem;
    font-size: clamp(2rem, 4.1vw, 2.6rem);
    line-height: .8;
  }

  .home-page .hero-intro {
    max-inline-size: min(46vw, 25rem);
    margin-block-start: .65rem;
    font-size: clamp(.68rem, 1.45vw, .78rem);
    line-height: 1.4;
  }

  .home-page .hero-actions {
    max-inline-size: min(48vw, 27rem);
    gap: .45rem;
    margin-block-start: .65rem;
  }

  .home-page .hero .button {
    min-inline-size: 0;
    padding: .65rem .7rem;
    font-size: .46rem;
  }

  .home-page .access-gt3 .panel-copy {
    inline-size: 90vw;
    margin: 0 0 clamp(3rem, 8vw, 5.25rem) var(--edge);
  }

  .home-page .access-gt3 .kicker {
    font-size: clamp(.45rem, 1.05vw, .58rem);
    letter-spacing: .17em;
  }

  .home-page .access-gt3 .panel-copy h3 {
    max-inline-size: min(44vw, 26rem);
  }

  .home-page .contact {
    block-size: auto;
    min-block-size: 0;
    aspect-ratio: 3 / 2;
  }

  .home-page .contact > img {
    object-position: 50% 42%;
  }

  .home-page .contact-content {
    inline-size: 92vw;
    padding-block: clamp(5.25rem, 10vw, 6rem) 0;
  }

  .home-page .contact h2 {
    max-inline-size: 76vw;
    margin: .65rem 0 1rem;
    font-size: clamp(2.35rem, 5.2vw, 3.35rem);
    line-height: .8;
  }

  .home-page .contact-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-inline-size: min(76vw, 46rem);
  }

  .home-page .contact-links a {
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
    padding: .7rem .8rem;
    font-size: clamp(.7rem, 1.7vw, .9rem);
  }

  .home-page .contact-links a:first-child {
    border-inline-end: 1px solid rgba(255, 255, 255, .25);
  }

  .home-page .contact-links a span {
    grid-column: auto;
  }
}
