/* Garoa — "o filme da noite" composition for car project pages */

.gp-skip { position: absolute; left: -999px; top: 8px; z-index: 90; background: var(--gr-led); color: var(--gr-night); padding: 8px 12px; }
.gp-skip:focus { left: 8px; }
.gp-wrap { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .gp-wrap { padding: 0 40px; } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.gp-center { text-align: center; }

/* ---------- photo wall ---------- */
.gr-wall { position: fixed; inset: -6%; z-index: -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  filter: blur(6px) brightness(.26) saturate(.6); transform: scale(1.1); pointer-events: none; }
@media (min-width: 900px) { .gr-wall { grid-template-columns: repeat(6, 1fr); } }
.gr-wall img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }

/* ---------- top bar ---------- */
.gp-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 16px; transition: background var(--gr-t-ui), backdrop-filter var(--gr-t-ui); }
@media (min-width: 900px) { .gp-bar { padding: 0 40px; } }
.gp-bar.is-scrolled { background: var(--gr-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gr-line); }
.gp-bar__tc { text-align: center; }
.gp-bar__btn { justify-self: end; min-height: 44px; padding: 0 14px; background: none; color: var(--gr-led); border: 1px solid var(--gr-line); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .gp-bar__btn:hover { border-color: var(--gr-teal); color: var(--gr-teal); } }

.gp-chapters { position: fixed; inset: 0; z-index: 60; background: rgba(5,6,8,.94); display: grid; place-content: center; padding: 24px; }
.gp-chapters[hidden] { display: none; }
.gp-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gp-chapters a { display: flex; align-items: baseline; gap: 18px; padding: 8px 0; color: var(--gr-led); text-decoration: none;
  font: 500 clamp(2rem, 9vw, 3.5rem)/1 var(--gr-font-title); text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) { .gp-chapters a:hover { color: var(--gr-sodium); } }
.gp-chapters__close { position: absolute; top: 6px; right: 16px; min-height: 44px; background: none; border: 0; color: var(--gr-mute); cursor: pointer; }

/* ---------- 1 · abertura ---------- */
.gp-open { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.gp-open__bg { position: absolute; inset: 0; z-index: -2; }
.gp-open__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.35) saturate(.8); transform: scale(1.2); }
.gp-open__inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 88px 16px 72px; display: grid; gap: 28px; }
.gp-open__text { display: grid; gap: 10px; align-content: end; }
.gp-open__model { color: var(--gr-mute); }
.gp-open .gr-title { font-size: clamp(3.25rem, 16vw, 8.5rem); overflow-wrap: anywhere; }
.gp-open .gr-title em { font-style: normal; color: var(--gr-sodium); }
.gp-open__sub { margin: 0; color: var(--gr-mute); font-style: italic; }
.gp-open__cta { justify-self: start; margin-top: 10px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; color: var(--gr-night); background: var(--gr-led); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .gp-open__cta:hover { background: var(--gr-sodium); } }
.gp-open__card { max-width: 520px; width: 100%; justify-self: center; }
.gp-cap { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px 7px; background: var(--gr-night); color: var(--gr-led); }
.gp-open__card .gr-grade img { transform: scale(1.06); transition: transform 6s cubic-bezier(.22,.61,.36,1); }
.gp-open__card .gr-grade.is-rolling img { transform: none; }
@media (min-width: 900px) {
  .gp-open__inner { grid-template-columns: 1.1fr .9fr; align-items: center; padding: 96px 40px 80px; gap: 48px; }
  .gp-open__text { order: 0; }
  .gp-open__card { transform: perspective(1400px) rotateY(-7deg) rotateZ(-1deg); max-height: 76svh; width: auto; }
  .gp-open__card .gr-grade img { max-height: calc(76svh - 40px); width: auto; }
  .gp-open .gr-title { font-size: clamp(4rem, 8.4vw, 8.5rem); }
}
@media (max-width: 899px) { .gp-open__card { order: -1; margin-top: 8px; } }

/* letterbox bars */
.gp-letterbox span { position: absolute; left: 0; right: 0; height: 7svh; background: #000; z-index: 3; transition: height var(--gr-t-cam); pointer-events: none; }
.gp-letterbox span:first-child { top: 0; }
.gp-letterbox span:last-child { bottom: 0; }
.gp-letterbox.is-closed span { height: 50svh; }
@media (max-width: 899px) { .gp-letterbox span { height: 3svh; } }

/* rain */
.gp-rain { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.gp-rain i { position: absolute; top: -130px; width: 1px; background: linear-gradient(transparent, rgba(238,242,244,.35)); transform: rotate(8deg);
  animation: gr-fall linear infinite; }
@keyframes gr-fall { to { transform: translate(-14vh, 120svh) rotate(8deg); } }
.gp-rain b { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(238,242,244,.35), rgba(127,182,217,.08) 60%, transparent 70%); filter: blur(1px); }
.gp-rain.is-paused i { animation-play-state: paused; }

/* rack focus */
.gp-focus { transition: filter var(--gr-t-focus); }
.gp-focus.is-soft { filter: blur(10px) brightness(.6); }

/* ---------- sections ---------- */
.gp-sec { padding: 96px 0; position: relative; }
.gp-sec .gr-h2 { margin: 8px 0 36px; }

/* ---------- 2 · credits ---------- */
.gr-credits { display: grid; gap: 44px; max-width: 760px; margin: 0 auto; }
.gr-credits__group h3 { margin: 0 0 16px; text-align: center; color: var(--gr-sodium); }
.gr-credits__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 5px 0; position: relative; }
.gr-credits__row dt { text-align: right; color: var(--gr-mute); font: 400 .9375rem/1.4 var(--gr-font-body); }
.gr-credits__row dd { margin: 0; font: 400 1.0625rem/1.35 var(--gr-font-title); text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
.gr-credits dl { margin: 0; }
@media (max-width: 599px) {
  .gr-credits__row { grid-template-columns: 1fr; gap: 0; text-align: center; padding: 7px 0; }
  .gr-credits__row dt { text-align: center; font-size: .8125rem; }
}

/* ---------- 3 · rings ---------- */
.gp-rings-wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .gp-rings-wrap { grid-template-columns: 1fr 1fr; } }
.gp-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gp-legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; background: var(--gr-glass); border-left: 1px solid var(--gr-line); }
.gp-legend i { width: 10px; height: 10px; border-radius: 50%; }
.gp-legend b { font: 500 clamp(1.75rem, 6vw, 2.5rem)/1 var(--gr-font-title); font-variant-numeric: tabular-nums; }
.gp-legend small { margin-left: 6px; color: var(--gr-mute); font: 500 .75rem/1 var(--gr-font-title); letter-spacing: .12em; }
.gr-rings { position: relative; width: min(100%, 420px); aspect-ratio: 1; justify-self: center; }
.gr-rings svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gr-rings circle { fill: none; stroke-width: 8; }
.gr-rings .t { stroke: var(--gr-line); }
.gr-rings .a { stroke-linecap: round; transition: stroke-dashoffset var(--gr-t-cam); }
.gr-rings__mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--gr-mute); }

/* ---------- 4 · scenes ---------- */
.gp-scenes { display: grid; gap: 64px; }
.gr-scene { margin: 0; }
.gr-scene__frame { position: relative; background: #000; padding: clamp(10px, 3.2vw, 34px) 0; }
.gr-scene__frame .gr-grade { aspect-ratio: 2.39 / 1; }
.gr-scene__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gr-scene__tc { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); z-index: 2; }
.gr-scene__frame > .gr-tc { position: absolute; left: 12px; top: 0; height: clamp(10px, 3.2vw, 34px); display: flex; align-items: center; z-index: 2; }
.gr-scene figcaption { background: #000; padding: 4px 16px 22px; text-align: center; }
.gr-scene figcaption p { margin: 0 auto; max-width: 62ch; color: var(--gr-led); font-weight: 500; }
.gr-scene figcaption p::before { content: "— "; color: var(--gr-sodium); }
@media (min-width: 900px) {
  .gr-scene:nth-child(even) { margin-left: 8%; }
  .gr-scene:nth-child(odd) { margin-right: 8%; }
}

/* ---------- 5 · reel ---------- */
.gp-reel-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 32px; }
.gp-reel-head .gr-h2 { margin: 0; }
.gr-reel { display: grid; gap: 24px; }
@media (min-width: 900px) { .gr-reel { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 40px; } }
.gr-reel__feature { display: block; width: 100%; max-width: 520px; justify-self: center; border: 0; padding: 3px; background: var(--gr-teal); cursor: zoom-in; }
.gr-reel__feature .gr-grade { display: block; }
.gr-reel__feature img { width: 100%; height: auto; display: block; transition: opacity var(--gr-t-ui); }
.gr-reel__feature.is-swapping img { opacity: 0; }
.gr-reel__side { min-width: 0; display: grid; gap: 16px; }
.gr-reel-bar { position: relative; height: 26px; }
.gr-reel-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: repeating-linear-gradient(90deg, var(--gr-mute) 0 1px, transparent 1px calc(10% - 0px)), var(--gr-line); }
.gr-reel-bar i { position: absolute; left: 0; top: 11px; height: 4px; width: 0; background: var(--gr-rank); transition: width var(--gr-t-ui); }
.gr-reel-bar b { position: absolute; top: 0; transform: translateX(-50%); display: grid; place-items: center; width: 30px; height: 26px; color: var(--gr-night); background: var(--gr-rank);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); transition: left var(--gr-t-ui); }
.gr-reel__alt { margin: 0; color: var(--gr-mute); min-height: 1.65em; }
.gr-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 14px 0;
  background: #000; background-image: repeating-linear-gradient(90deg, transparent 0 8px, rgba(238,242,244,.22) 8px 16px), repeating-linear-gradient(90deg, transparent 0 8px, rgba(238,242,244,.22) 8px 16px);
  background-size: 100% 5px, 100% 5px; background-position: 0 4px, 0 calc(100% - 4px); background-repeat: repeat-x; }
.gr-strip::-webkit-scrollbar { display: none; }
.gr-strip button { flex: none; scroll-snap-align: start; width: 112px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .6; transition: opacity var(--gr-t-ui), border-color var(--gr-t-ui); }
.gr-strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gr-strip button[aria-current="true"] { opacity: 1; border-color: var(--gr-teal); }
@media (hover: hover) and (pointer: fine) { .gr-strip button:hover { opacity: 1; } }
@media (min-width: 900px) { .gr-strip { flex-wrap: wrap; overflow: visible; } .gr-strip button { width: calc(20% - 5px); } }

/* lightbox */
.gr-lb { overscroll-behavior: contain; width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: #000; color: var(--gr-led); }
.gr-lb[open] { display: grid; grid-template-rows: 1fr auto; }
.gr-lb::backdrop { background: #000; }
.gr-lb__stage { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 5svh 12px 12px; overflow: hidden; }
.gr-lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.gr-lb__bar { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.gr-lb__btn { min-width: 48px; min-height: 48px; border: 1px solid var(--gr-line); background: none; color: var(--gr-led); font: 400 1.5rem/1 var(--gr-font-title); cursor: pointer; }
.gr-lb__count { min-width: 80px; text-align: center; }
@media (hover: hover) and (pointer: fine) { .gr-lb__btn:hover { border-color: var(--gr-teal); color: var(--gr-teal); } }

/* ---------- 6 · fim ---------- */
.gp-end { text-align: center; padding-bottom: 48px; }
.gr-clap { max-width: 640px; margin: 0 auto; text-align: left; background: var(--gr-asphalt); border: 1px solid var(--gr-line); }
.gr-clap__stick { height: 34px; transform-origin: 0 100%; transition: transform 180ms cubic-bezier(.5,0,.75,0);
  background: repeating-linear-gradient(-45deg, var(--gr-led) 0 22px, #000 22px 44px); }
.gr-clap__stick.is-open { transform: rotate(-16deg); }
.gr-clap__body { display: grid; gap: 20px; padding: 20px; }
@media (min-width: 600px) { .gr-clap__body { grid-template-columns: 1fr 200px; align-items: center; } }
.gr-clap__fields { margin: 0; display: grid; gap: 0; }
.gr-clap__fields div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--gr-line); }
.gr-clap__fields dt { font: 400 .75rem/1.5 var(--gr-font-mono); color: var(--gr-mute); text-transform: uppercase; }
.gr-clap__fields dd { margin: 0; font: 400 .9375rem/1.4 var(--gr-font-mono); overflow-wrap: anywhere; }
.gr-clap__url { color: var(--gr-sodium); }
.gr-clap__qr { background: #fff; padding: 10px; width: min(200px, 60vw); justify-self: center; }
.gr-clap__qr img { display: block; width: 100%; height: auto; }
.gp-end__fim { margin: 72px 0 12px; color: var(--gr-led); letter-spacing: .3em; }
.gp-credit { margin: 0; color: var(--gr-mute); font-size: .9375rem; }
.gp-credit a { color: var(--gr-sodium); }
