/* Marcos Rocha — home page: hero reel, intro, work, services, about, testimonials, booking, video player.
   Loaded after base.css. */

/* Condensed caps (same voice as .display in base.css) */
.hero__title, .card__title, .service__name, .book__email, .player__title { font-stretch: 75%; font-weight: 800; text-transform: uppercase; }

/* Words and lines that rise out of their own baseline (intro text, booking headline) */
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: block; }

/* Small outlined pills: work filters, the quotes pause button, the project-type choices */
.filter, .voices__pause, .field--choices span {
  padding: .6em 1.1em .62em; border-radius: 999px; border: 1.5px solid;
  font-weight: 600; font-size: .9375rem; line-height: 1; transition: background-color .3s, color .3s;
}
.filter, .field--choices span { border-color: var(--lime); }
.voices__pause { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 320vh; }
.hero__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink); }
.hero__media { position: absolute; inset: 0; }
.hero__poster, .hero__video {
  position: absolute; top: 50%; left: 50%;
  width: max(100vw, 177.78vh); height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%); object-fit: cover; border: 0; pointer-events: none; max-width: none;
}
.hero__video { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.hero__video.is-playing { opacity: 1; }
.hero__mask { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero__word {
  font-family: var(--sans); font-stretch: 75%; font-weight: 900;
  font-size: 312px; letter-spacing: -6px;
}
.hero__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 22px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end;
  font-size: .9375rem; font-weight: 500;
}
.hero__foot p:nth-child(2) { text-align: center; }
.hero__cue { text-align: right; }
.hero__cue::after { content: ""; display: inline-block; width: 1px; height: 14px; margin-left: 10px; background: currentColor; vertical-align: -2px; animation: cue 1.8s var(--ease-out) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.hero__over {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(24px, 5vh, 48px);
  display: flex; align-items: end; justify-content: space-between; gap: 2rem;
  color: var(--lime); opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease-out);
}
.hero__over.is-shown, .hero__over:focus-within { opacity: 1; pointer-events: auto; }
/* Darkens the bottom of the reel so the lime headline always clears 4.5:1 */
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease-out);
  background: linear-gradient(to top, rgb(0 0 0 / .78) 0%, rgb(0 0 0 / .45) 30%, transparent 58%);
}
.hero__scrim.is-shown { opacity: 1; }
.hero__pause {
  position: absolute; left: var(--gutter); top: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: .55em;
  padding: .7em 1.05em .72em; border-radius: 999px; border: 1.5px solid var(--lime);
  background: var(--ink); color: var(--lime); font-weight: 600; font-size: .875rem; line-height: 1;
}
.hero__pause[hidden] { display: none; }
.hero__pause svg { width: 14px; height: 14px; fill: currentColor; }
.hero__pause .i-play { display: none; }
.hero__pause[aria-pressed="true"] .i-pause { display: none; }
.hero__pause[aria-pressed="true"] .i-play { display: inline; }
.hero__title { font-size: clamp(2rem, 1.2rem + 3vw, 4.25rem); line-height: .9; letter-spacing: -.005em; }

/* ---------- Intro ---------- */
.intro {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem 6vw; align-items: start;
  padding: clamp(55px, 9vh, 100px) var(--gutter) clamp(45px, 7vh, 80px);
}
.intro__text { font-size: var(--t-lead); font-weight: 500; line-height: 1.14; letter-spacing: -.015em; max-width: 26ch; text-wrap: pretty; }
.intro__text .line { display: inline-block; vertical-align: top; } /* home.js wraps each word */
.intro__index { min-width: 220px; padding-top: .5rem; }
.intro__index li { border-top: 1.5px solid var(--ink); }
.intro__index li:last-child { border-bottom: 1.5px solid var(--ink); }
.intro__index a { display: flex; justify-content: space-between; padding: .7rem 0; font-weight: 600; text-decoration: none; }
.intro__index a::after { content: ""; width: 10px; height: 10px; margin-top: .45em; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); transition: transform .4s var(--ease-out); }
.intro__index a:hover::after { transform: translateX(4px) rotate(-45deg); }

/* ---------- Work ---------- */
.work { padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(48px, 7vw, 96px); }
.work__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 64px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter[aria-pressed="true"], .filter:hover { background: var(--lime); color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(16px, 1.6vw, 24px); }
.card--feature { grid-column: 1 / -1; }
.cards.is-filtered .card--feature { grid-column: auto; }
.card[hidden] { display: none; }

.card__media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-media); background: #000; isolation: isolate;
}
.card--feature .card__media { aspect-ratio: 2.2 / 1; }
.cards.is-filtered .card--feature .card__media { aspect-ratio: 16 / 9; }
.card__media img {
  position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.card__media:hover img { transform: scale(1.045); }
.card__play {
  position: absolute; left: 16px; bottom: 16px; z-index: 3;
  padding: .55em 1em .57em; border-radius: 999px; background: var(--lime); color: var(--ink);
  font-size: .875rem; font-weight: 700; line-height: 1;
  transform: translateY(8px); opacity: 0; transition: transform .5s var(--ease-out), opacity .3s;
}
.card__media:hover .card__play, .card__media:focus-visible .card__play { transform: none; opacity: 1; }
.card__media:focus-visible { outline-color: var(--lime); }

/* Hover preview: a muted clip that fades in over the poster (desktop) */
.preview {
  position: absolute; top: 50%; left: 50%; z-index: 2; border: 0; pointer-events: none; max-width: none;
  width: 100%; aspect-ratio: 16 / 9; min-height: 100%; min-width: calc(100% * var(--fill, 1));
  transform: translate(-50%, -50%) scale(var(--zoom, 1.06)); opacity: 0; transition: opacity .8s var(--ease-out);
}
.card--feature .preview { --fill: 1.24; }
.preview.is-youtube { --zoom: 1.5; } /* crops YouTube's title bar and captions */
.preview.is-on { opacity: 1; }

.card__meta { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1rem; align-items: center; padding-top: 18px; }
.tag {
  justify-self: start; padding: .42em .9em .44em; border-radius: 999px; border: 1.5px solid currentColor;
  font-size: .8125rem; font-weight: 600; line-height: 1;
}
.card__title { grid-column: 1 / -1; font-size: var(--t-card); line-height: .92; letter-spacing: -.005em; }
.card--feature .card__title { font-size: clamp(2rem, 1.2rem + 2.6vw, 4rem); }
.cards.is-filtered .card--feature .card__title { font-size: var(--t-card); }
.card__desc { grid-column: 1 / -1; max-width: 46ch; opacity: .78; font-size: 1rem; }

/* ---------- Services ---------- */
.services { position: relative; height: 320vh; margin: calc(var(--svc-pull-top, 0px) * -1) 0 calc(var(--svc-pull-bottom, 0px) * -1); }
.services__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4vw; align-items: center;
  padding: 90px var(--gutter) 40px;
}
.services__label { font-size: .9375rem; font-weight: 600; margin-bottom: 2rem; }
.service { padding: .6rem 0; }
.service__name {
  font-size: clamp(3rem, 1.4rem + 5.8vw, 8rem); line-height: .86; letter-spacing: -.012em;
  opacity: .45; transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
  transform-origin: left center;
}
.service.is-active .service__name { opacity: 1; }
.service__body {
  max-height: 0; overflow: hidden; max-width: 44ch; font-size: 1.0625rem; opacity: 0;
  transition: max-height .7s var(--ease-out), opacity .5s, margin .7s var(--ease-out);
}
.service.is-active .service__body { max-height: 10em; opacity: 1; margin: .9rem 0 .4rem; transition: max-height .8s var(--ease-out), opacity .6s .1s, margin .8s var(--ease-out); }
.services__frames { position: relative; aspect-ratio: 4 / 5; max-height: 76vh; justify-self: end; width: 100%; border-radius: var(--radius-panel); overflow: hidden; background: var(--ink); }
.frame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(100% 0 0 0); transform: scale(1.12);
  transition: clip-path 1.1s cubic-bezier(.77, 0, .18, 1), transform 1.6s var(--ease-out);
}
.frame.is-active { clip-path: inset(0 0 0 0); transform: scale(1); z-index: 1; }

/* ---------- About ---------- */
.about {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem 20px; align-items: center;
  padding: clamp(28px, 4vw, 56px);
}
.about__portrait { grid-column: 1 / 6; }
.about__mask { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-media); }
.about__mask img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; }
.about__copy { grid-column: 7 / 13; display: grid; gap: 1.4rem; }
.about__copy .display { font-size: clamp(2.8rem, 1.4rem + 4.4vw, 6.5rem); margin-bottom: .6rem; }
.about__lead { font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); font-weight: 500; line-height: 1.25; max-width: 32ch; }
.about__copy > p:not(.about__lead) { max-width: 46ch; opacity: .8; }
.facts { margin-top: .8rem; }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .75rem 0; border-top: 1px solid color-mix(in srgb, var(--lime) 40%, transparent); }
.facts div:last-child { border-bottom: 1px solid color-mix(in srgb, var(--lime) 40%, transparent); }
.facts dt { opacity: .7; font-size: .9375rem; }
.facts dd { font-weight: 500; }

/* ---------- Testimonials ---------- */
.voices { padding: clamp(55px, 9vh, 100px) 0; overflow: hidden; }
.voices__head {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap;
  padding: 0 var(--gutter); margin-bottom: clamp(36px, 6vw, 72px);
}
.voices__pause:hover, .voices__pause[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
.voices__pause[hidden] { display: none; }
/* When the quotes scroll sideways (phones, reduced motion), the row takes keyboard focus so arrow keys can scroll it */
.marquee:focus-visible { outline-offset: -2px; border-radius: 0; }
.marquee__track { display: flex; gap: 20px; width: max-content; padding: 0 var(--gutter); will-change: transform; }
.quote {
  width: clamp(300px, 34vw, 480px); flex: none; display: grid; align-content: space-between; gap: 3rem;
  padding: 28px; border-radius: var(--radius-media); border: 1.5px solid var(--ink); min-height: 320px;
}
.quote p { font-size: clamp(1.25rem, 1rem + .7vw, 1.6rem); font-weight: 500; line-height: 1.22; letter-spacing: -.01em; }
.quote figcaption { display: grid; gap: .1rem; font-size: .9375rem; }
.quote strong { font-weight: 700; }

/* ---------- Booking ---------- */
.book { padding: clamp(40px, 6vw, 88px) clamp(24px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.book__title { font-size: clamp(3.6rem, 1.4rem + 9vw, 12rem); margin-bottom: clamp(48px, 7vw, 96px); }
.book__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem 20px; }
.book__direct { grid-column: 1 / 6; display: grid; align-content: start; gap: 1.1rem; }
.book__direct p { max-width: 34ch; opacity: .85; font-size: 1.125rem; }
.book__email {
  justify-self: start; font-size: clamp(1.6rem, 1rem + 2vw, 2.75rem); line-height: 1; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; padding-bottom: .12em;
  transition: background-size .6s var(--ease-out);
}
.book__email:hover { background-size: 0 2px; background-position: 100% 100%; }
.book__phone { justify-self: start; text-decoration: none; font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; }
.book__call { justify-self: start; margin-top: 1.2rem; }
.book__call .pill__icon { width: 18px; height: 18px; fill: none; }

/* Inquiry form: opens the visitor's email app, filled in */
.inquiry { grid-column: 7 / 13; display: grid; gap: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: .35rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field legend { font-size: var(--t-small); opacity: .75; padding: 0; }
.field input:not([type=radio]), .field textarea {
  width: 100%; background: transparent; color: var(--lime); caret-color: var(--lime);
  border: 0; border-bottom: 1.5px solid color-mix(in srgb, var(--lime) 40%, transparent); border-radius: 0;
  padding: .5rem 0 .6rem; font: inherit; font-size: 1.125rem; resize: vertical; transition: border-color .3s;
}
.field input::placeholder { color: color-mix(in srgb, var(--lime) 62%, transparent); }
/* Focused fields get the site's standard ring (from base.css) plus a solid underline */
.field input:focus, .field textarea:focus { border-bottom-color: var(--lime); }
.field input:not([type=radio]):focus-visible, .field textarea:focus-visible { outline-offset: 4px; }
.field [aria-invalid="true"] { border-bottom-color: var(--lime); border-bottom-style: dashed; }
.field--choices { display: flex; flex-wrap: wrap; gap: 8px; }
.field--choices legend { width: 100%; margin-bottom: .5rem; }
.field--choices label { position: relative; }
.field--choices input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.field--choices span { display: inline-block; }
.field--choices input:checked + span { background: var(--lime); color: var(--ink); }
.field--choices input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 3px; }
.inquiry__actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: .4rem; }
.inquiry__note { font-size: var(--t-small); opacity: .7; }
.inquiry__error { font-weight: 500; }

/* ---------- Pop-up player: a card expands into this ---------- */
.player { position: fixed; inset: 0; z-index: 200; }
.player[hidden] { display: none; }
.player__backdrop { position: absolute; inset: 0; background: var(--ink); opacity: 0; }
.player__stage { position: absolute; overflow: hidden; border-radius: var(--radius-media); background: var(--ink); }
.player__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player__stage iframe, .player__stage video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .6s; }
.player__stage .is-ready { opacity: 1; }
.player__title {
  position: absolute; left: var(--gutter); top: 28px; max-width: calc(100% - 140px); color: var(--lime); opacity: 0;
  font-size: 1.375rem; line-height: 1;
}
.player__close {
  position: absolute; right: var(--gutter); top: 16px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lime); color: var(--ink); opacity: 0;
  transition: transform .4s var(--ease-out);
}
.player__close:hover { transform: rotate(90deg); }
.player__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ---------- Responsive ---------- */
/* Phones and tablets, and anyone who prefers less motion: services become a plain list */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .services { height: auto; }
  .services__pin { position: static; height: auto; }
  .service__name { opacity: 1; }
  .service .service__body { max-height: none; opacity: .85; margin: .8rem 0 1.6rem; }
}

@media (max-width: 900px) {
  .hero__foot { grid-template-columns: 1fr; gap: .15rem; }
  .hero__foot p:nth-child(2) { text-align: left; }
  .hero__cue { display: none; }
  .hero__over { flex-direction: column; align-items: start; }
  .intro { grid-template-columns: 1fr; }
  .intro__index { min-width: 0; }
  .cards { grid-template-columns: 1fr; }
  .card--feature .card__media { aspect-ratio: 16 / 9; }
  .card__play { opacity: 1; transform: none; }
  .services__pin { grid-template-columns: 1fr; padding: 55px var(--gutter) 45px; }
  .services__frames { display: none; }
  .about__portrait, .about__copy { grid-column: 1 / -1; }
  .facts div { grid-template-columns: 7rem 1fr; }
  .book__direct, .inquiry { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
  .marquee { overflow-x: auto; scroll-snap-type: x mandatory; }
  .quote { scroll-snap-align: start; width: 82vw; }
}

/* Small phones: the reel's pause control becomes a round icon button (its name stays for screen readers) */
@media (max-width: 600px) {
  .hero__pause { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .hero__pause span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

/* Touch screens: every control gets at least a 44px tap target */
@media (pointer: coarse) {
  .field--choices label { display: inline-flex; }
  .filter, .field--choices span, .voices__pause, .hero__pause { min-height: 44px; display: inline-flex; align-items: center; }
  .book__email, .book__phone { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__pin { position: relative; }
  .hero__mask, .hero__foot { display: none; }
  .hero__over { opacity: 1; pointer-events: auto; }
  .hero__scrim { opacity: 1; }
  .marquee { overflow-x: auto; }
}
