/* ads.css: the Google & Facebook Ads page's own placing and sizing. Components and tokens come from design\. Every
   glass layer sits on its photo's calm side at every width, its words at full size (Lessons 1-3, 11-12). */

/* ---------- 1. the header: the photo panel bleeding off the left, the words on night at the right ---------- */
.adhead { display: grid; }
.adhead__media { position: relative; overflow: hidden; height: 600px; margin: 0 var(--gutter); border-radius: var(--radius-xl); background: var(--c-night-3); }
.adhead__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 67% 50%; }
.adhead__scene { position: absolute; inset: 0; }
.adhead__media .stop { top: auto; bottom: 14px; right: 14px; }
.adhead__copy { display: grid; gap: 16px; align-content: center; padding: 28px var(--gutter) 32px; }
.adhead .phead__line { margin-top: 0; }
@media (max-width: 999px) { .adhead__copy { grid-row: 1; } .adhead__media { grid-row: 2; margin-bottom: 24px; } }
/* on a phone the lead card spans the panel's foot: the stop sits just over it */
@media (max-width: 599px) { .adhead__media .stop { bottom: 88px; } }
@media (min-width: 1000px) {
  .adhead { grid-template-columns: 56% minmax(0, 1fr); min-height: calc(100svh - var(--header-h)); }
  .adhead__media { height: auto; min-height: 600px; margin: 0; border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
  .adhead__photo { object-position: 55% 50%; }
  .adhead__copy { max-width: 620px; padding: 36px max(var(--gutter), calc((100vw - var(--max-w)) / 2)) 36px 56px; }
  .adhead .phead__title { font-size: min(clamp(2.5rem, 1.6rem + 3.4vw, 4.75rem), 7.6vh); }
}

/* ---------- a part with its words at one side and its picture bleeding off the other edge ---------- */
.bleed { position: relative; display: grid; padding-block: var(--section-y); }
.bleed__copy { display: grid; gap: 20px; align-content: center; padding: 0 var(--gutter) 32px; }
.bleed__copy .head__line { margin: 0; }
.bleed__media { position: relative; overflow: hidden; height: 600px; margin: 0 var(--gutter); border-radius: var(--radius-xl); background: var(--c-night-3); box-shadow: var(--shadow-l); }
.bleed__fill { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.bleed__scene { position: absolute; inset: 0; }
.bleed__media .stop { top: 14px; right: 14px; bottom: auto; }
@media (min-width: 1000px) {
  .bleed { --side: max(var(--gutter), calc((100% - var(--max-w)) / 2)); align-items: center; }
  .bleed--right { grid-template-columns: var(--side) minmax(0, 4.5fr) minmax(0, 7.5fr); }
  .bleed--right .bleed__copy { grid-column: 2; padding: 0 56px 0 0; }
  .bleed--right .bleed__media { grid-column: 3; height: 620px; margin: 0; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
  .bleed--left { grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr) var(--side); }
  .bleed--left .bleed__media { grid-column: 1; grid-row: 1; height: 620px; margin: 0; border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
  .bleed--left .bleed__copy { grid-column: 2; grid-row: 1; padding: 0 0 0 56px; }
}

/* 2. Google Ads: the roofer at the right of the frame, the sky (and the glass) at its left */
.gads .bleed__fill { object-position: 0% 50%; }
@media (max-width: 999px) { .gads .bleed__fill { object-position: 69% 50%; } }

/* ---------- 3. calls, not clicks: the type is the picture ---------- */
.cnc { --ground-x: 50%; --ground-y: 0%; text-align: center; }
.cnc__title { font-size: clamp(3.25rem, 1rem + 8.4vw, 8.75rem); line-height: 0.98; letter-spacing: -0.035em; padding: 0.12em 0.04em 0.1em; }
.cnc__line { margin: 22px auto 0; text-align: center; }
.cnc .wrap { position: relative; }
.cnc .stop { top: 0; right: var(--gutter); bottom: auto; }

/* ---------- 4. Local Services Ads: her face at the panel's inner edge, the panel at her free side ---------- */
.lsa .bleed__fill { object-position: 30% 40%; }
@media (max-width: 999px) { .lsa .bleed__fill { object-position: 100% 30%; } }

/* ---------- 5. Facebook and Instagram: a framed photo, the glass on its right ---------- */
.sads__in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 1000px) { .sads__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; } }
.sads__copy { display: grid; gap: 20px; }
.sads__copy .head__line { margin: 0; }
.sads__media { position: relative; overflow: hidden; height: 560px; border-radius: var(--radius-xl); background: var(--c-night-3); box-shadow: var(--shadow-l); }
.sads__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 30% 50%; }
.sads__scene { position: absolute; inset: 0; }
.sads__media .stop { top: 14px; left: 14px; right: auto; bottom: auto; }
@media (max-width: 999px) { .sads__copy { grid-row: 1; } }
@media (max-width: 759px) { .sads__media { height: 620px; } }

/* ---------- 6. every job traced, the signature ---------- */
.traced { --ground-x: 85%; --ground-y: 100%; }
.traced__head { margin-inline: auto; text-align: center; justify-items: center; }
.traced__stage { position: relative; max-width: 820px; margin: 0 auto; padding-top: 48px; }
.traced__scene { position: relative; }
/* the stop sits in its own row over the board's corner, clear of the month's total */
.traced__stage .stop { top: 0; right: 0; bottom: auto; }

/* ---------- 7. the close: the box at the left over the wash, the booking card over the roof at the right ---------- */
.adclose__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 30% 40%; }
.adclose__card { position: absolute; z-index: 1; right: max(var(--gutter), 7%); top: 14%; }
@media (max-width: 759px) {
  .adclose { padding-top: 0; }
  .adclose .close__media { position: relative; inset: auto; z-index: 0; height: 320px; margin-bottom: 28px; }
  .adclose .close__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 13, 15, 0) 62%, var(--c-night) 100%); }
  .adclose::before { display: none; }
  .adclose__photo { object-position: 79% 40%; }
  .adclose__card { right: 16px; top: auto; bottom: 26px; }
}
