/* ==========================================================================
   Bebusiness — camada de experiência: fotos, movimento, barra de contato,
   WhatsApp, Contato e Sobre. Complementa site.css e pages.css.
   ========================================================================== */

/* ---------- Barra de contato (topo) ---------- */
.topbar { background: var(--ink); color: var(--on-dark-muted); font-size: 0.8rem; position: relative; z-index: 51; }
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 40px; }
.tb-item { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark); opacity: 0.78; transition: opacity 160ms ease; }
.tb-item svg { width: 15px; height: 15px; flex: none; }
a.tb-item:hover { opacity: 1; }
.tb-social { margin-left: auto; display: flex; gap: 20px; }
.tb-social a { color: var(--on-dark); opacity: 0.66; transition: opacity 160ms ease, color 160ms ease; }
.tb-social a:hover { opacity: 1; color: var(--sun); }
@media (max-width: 1180px) { .topbar { display: none; } }

/* ---------- Cabeçalho que some ao descer ---------- */
.site-header { transition: background-color 240ms ease, box-shadow 240ms ease, transform 420ms var(--ease-expo); }
.site-header.is-hidden { transform: translateY(-100%); }
.nav a { transition: color 160ms ease; }
.nav a::before {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform 360ms var(--ease-expo);
}
@media (hover: hover) and (pointer: fine) { .nav a:not([aria-current="page"]):hover::before { transform: scaleX(1); transform-origin: left; } }
@media (max-width: 1320px) { .nav a { padding-inline: 9px; font-size: 0.9rem; } .site-header .wrap { gap: 20px; } }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 60;
  display: inline-flex; align-items: center; height: 60px; min-width: 60px; padding: 0 16px; border-radius: 999px;
  background: #25d366; color: #fff; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 14px 34px -12px rgba(14, 18, 56, 0.55), 0 2px 6px rgba(14, 18, 56, 0.12);
  opacity: 0; transform: translateY(24px) scale(0.8);
  transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-expo), background-color 200ms ease;
}
.wa-float.is-ready { opacity: 1; transform: none; }
.wa-float svg { width: 28px; height: 28px; flex: none; }
.wa-float .wa-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 500ms var(--ease-expo), margin 500ms var(--ease-expo); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #25d366; z-index: -1;
  animation: wa-ping 2.8s var(--ease-out) 1.6s infinite;
}
@keyframes wa-ping { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@media (hover: hover) and (pointer: fine) {
  .wa-float:hover { background: #1ebe5a; }
  .wa-float:hover .wa-label { max-width: 200px; margin-left: 10px; }
}
.wa-float:active { transform: scale(0.96); }

/* ---------- Fotos ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); margin: 0; isolation: isolate; }
.media-in { position: absolute; inset: -8% 0; will-change: transform; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media figcaption {
  position: absolute; left: 16px; bottom: 16px; z-index: 2; max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 12px; font-size: var(--fs-small); font-weight: 500; line-height: 1.35;
  background: rgba(246, 244, 239, 0.92); color: var(--ink); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
/* A cortina fica no miolo: o observador de rolagem ignora alvos 100% recortados */
.js .media[data-media] .media-in { clip-path: inset(100% 0 0 0); transition: clip-path 1300ms var(--ease-expo); }
.js .media[data-media] img { transform: scale(1.22); transition: transform 1800ms var(--ease-expo); }
.js .media[data-media].is-in .media-in { clip-path: inset(0 0 0 0); }
.js .media[data-media].is-in img { transform: scale(1); }
@media (hover: hover) and (pointer: fine) {
  .media.zoom img { transition: transform 900ms var(--ease-expo); }
  .media.zoom:hover img { transform: scale(1.05); }
}

/* ---------- Títulos palavra por palavra ---------- */
.w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.w > span { display: inline-block; }
.js .w > span { transform: translateY(108%); transition: transform 1000ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 45ms + 60ms); }
.js .is-in .w > span, .js .is-in.w > span { transform: none; }

/* ---------- Revelação em sequência ---------- */
.js [data-stagger] > * { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js .page-hero [data-enter] { animation: lift 900ms var(--ease-expo) both; animation-delay: var(--d, 0ms); }

/* ---------- Páginas internas com foto ---------- */
.page-hero--photo { border-bottom: 0; padding-bottom: clamp(32px, 4vw, 56px); }
.page-hero--photo .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: end; }
.page-hero--photo h1 { max-width: 14ch; }
.page-hero--photo .ph-copy { padding-bottom: clamp(8px, 2vw, 24px); }
.page-hero--photo .ph-copy .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ph-media { border-radius: calc(var(--radius) + 8px); }
@media (max-width: 900px) {
  .page-hero--photo .wrap { grid-template-columns: 1fr; }
  .ph-media { aspect-ratio: 4 / 3 !important; }
}

/* ---------- Faixa de foto larga (home) ---------- */
.photo-band { padding-top: clamp(8px, 2vw, 24px); }
.photo-band .media { border-radius: calc(var(--radius) + 10px); }
.photo-band .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 18, 56, 0) 40%, rgba(14, 18, 56, 0.72) 100%); z-index: 1; pointer-events: none; }
.band-copy { position: absolute; z-index: 2; left: clamp(20px, 4vw, 56px); right: clamp(20px, 4vw, 56px); bottom: clamp(20px, 4vw, 48px); display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; color: var(--on-dark); }
.band-copy p { font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 2.3rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; max-width: 22ch; }
.band-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.band-chips span { height: 34px; padding-inline: 14px; border-radius: 999px; display: inline-flex; align-items: center; font-size: var(--fs-small); font-weight: 600; background: rgba(246, 244, 239, 0.14); border: 1px solid rgba(246, 244, 239, 0.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 760px) { .photo-band .media { aspect-ratio: 4 / 5 !important; } }

/* Foto ao lado da introdução de serviços */
.services-intro .media { margin-top: 40px; max-width: 520px; }

/* ---------- Educação (home) ---------- */
.edu { background: var(--paper-2); }
.edu .grid { row-gap: 40px; align-items: center; }
.edu-copy { grid-column: 1 / span 5; }
.edu-copy h2 { margin-top: 18px; max-width: 14ch; }
.edu-copy .lead { margin-top: 24px; }
.edu-copy ul { list-style: none; padding: 0; margin-top: 32px; display: grid; }
.edu-copy li { display: flex; gap: 14px; align-items: baseline; padding-block: 14px; border-top: 1px solid var(--line-strong); font-weight: 500; }
.edu-copy li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); flex: none; transform: translateY(-2px); }
.mosaic { grid-column: 7 / span 6; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.mosaic .media:first-child { grid-row: span 2; }
@media (max-width: 1080px) { .edu-copy, .mosaic { grid-column: 1 / -1; } }

/* ---------- Parceiros em movimento ---------- */
.partners.marquee { display: block; border: 0; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 16px; animation: marquee 42s linear infinite; }
/* padding em px: em % ele seria calculado sobre a faixa inteira (milhares de px) */
.marquee .partner { width: clamp(150px, 16vw, 220px); height: auto; flex: none; aspect-ratio: 1.4; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 26px; }
.marquee .partner img { width: auto; height: auto; max-width: 100%; max-height: 84px; }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee-track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }

/* ---------- Chamada com foto ---------- */
.cta-photo { position: relative; overflow: clip; color: var(--on-dark); background: var(--ink); }
.cta-photo .cta-bg { --radius: 0px; position: absolute; inset: 0; border-radius: 0; opacity: 0.38; }
.cta-photo .cta-bg.media { background: transparent; }
.cta-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 18, 56, 0.95) 30%, rgba(14, 18, 56, 0.4)); pointer-events: none; }
.cta-photo .wrap { position: relative; z-index: 1; }
.cta-photo .btn--ghost { border-color: var(--line-dark); color: var(--on-dark); }
.cta-photo .eyebrow { color: var(--on-dark-muted); }

/* ---------- Cartões com foto (links) ---------- */
.photo-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.photo-card { display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 20px; border-radius: calc(var(--radius) + 4px); background: var(--card); border: 1px solid var(--line); transition: transform 500ms var(--ease-expo), box-shadow 500ms var(--ease-expo), border-color 200ms ease; }
.photo-card .media { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.photo-card h3 { font-size: 1.15rem; padding-inline: 8px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.photo-card h3 svg { width: 18px; height: 18px; transition: transform 300ms var(--ease-out); flex: none; }
.photo-card p { padding-inline: 8px; font-size: 0.95rem; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .photo-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -36px rgba(14, 18, 56, 0.45); border-color: transparent; }
  .photo-card:hover h3 svg { transform: translateX(4px); }
  .photo-card:hover .media img { transform: scale(1.06); transition: transform 900ms var(--ease-expo); }
}
@media (max-width: 1080px) { .photo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .photo-cards { grid-template-columns: 1fr; } }

/* ---------- Sobre ---------- */
.about-lead { row-gap: 48px; align-items: start; }
.about-lead .about-big { grid-column: 1 / span 8; font-size: clamp(1.7rem, 1.1rem + 2vw, 3rem); line-height: 1.12; }
.about-lead .about-big .hl { color: var(--brand-600); }
.about-lead .about-side { grid-column: 9 / span 4; padding-top: 10px; }
.about-lead .about-side p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.5; }
.about-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--ink); }
.about-stats div { padding: 24px 24px 0 0; display: grid; gap: 8px; }
.about-stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.about-stats b { font-family: var(--font-display); font-size: clamp(2.4rem, 1.6rem + 2.6vw, 4.2rem); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.about-stats b small { font-size: 0.5em; letter-spacing: -0.02em; color: var(--brand-600); margin-left: 2px; }
.about-stats span { color: var(--muted); font-size: var(--fs-small); }
@media (max-width: 1080px) { .about-lead .about-big, .about-lead .about-side { grid-column: 1 / -1; } .about-stats { grid-template-columns: 1fr 1fr; } .about-stats div:nth-child(3) { border-left: 0; padding-left: 0; } .about-stats div:nth-child(n+3) { margin-top: 24px; border-top: 1px solid var(--line); } }

.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); position: relative; }
.tl-item { display: flex; flex-direction: column; gap: 18px; }
.tl-item .media { aspect-ratio: 4 / 3; }
.tl-mark { display: flex; align-items: center; gap: 14px; }
.tl-mark span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--sun); font-weight: 600; font-size: var(--fs-small); flex: none; }
.tl-mark i { flex: 1; height: 1px; background: var(--line-strong); transform: scaleX(0); transform-origin: left; transition: transform 1200ms var(--ease-expo) 300ms; }
.is-in .tl-mark i, .tl-item.is-in .tl-mark i { transform: scaleX(1); }
.js [data-stagger].is-in .tl-mark i { transform: scaleX(1); }
.tl-item small { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-600); }
.tl-item h3 { font-size: 1.4rem; margin-top: -6px; }
.tl-item p { color: var(--muted); }
@media (max-width: 900px) { .timeline { grid-template-columns: 1fr; } }

.mv-photo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.mv-photo .media { min-height: 420px; height: 100%; }
.mv-photo .mv { grid-template-columns: 1fr; gap: clamp(28px, 3vw, 44px); align-content: center; }
@media (max-width: 900px) { .mv-photo { grid-template-columns: 1fr; } .mv-photo .media { min-height: 0; aspect-ratio: 4 / 3; } }

.values { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.value { grid-column: span 2; display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 2.6vw, 36px); border-radius: calc(var(--radius) + 4px); background: var(--card); border: 1px solid var(--line); min-height: 260px; transition: transform 500ms var(--ease-expo), box-shadow 500ms var(--ease-expo), background-color 300ms ease, color 300ms ease; }
.value:nth-child(4), .value:nth-child(5) { grid-column: span 3; }
.value .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); color: var(--brand); transition: background-color 300ms ease, color 300ms ease; }
.value .ico svg { width: 24px; height: 24px; }
.value h3 { margin-top: auto; font-size: 1.3rem; }
.value p { color: var(--muted); font-size: 0.97rem; transition: color 300ms ease; }
@media (hover: hover) and (pointer: fine) {
  .value:hover { transform: translateY(-6px); background: var(--ink); color: var(--on-dark); box-shadow: 0 30px 60px -30px rgba(14, 18, 56, 0.5); }
  .value:hover p { color: var(--on-dark-muted); }
  .value:hover .ico { background: var(--sun); color: var(--ink); }
}
@media (max-width: 1080px) { .values { grid-template-columns: 1fr 1fr; } .value, .value:nth-child(4), .value:nth-child(5) { grid-column: span 1; } }
@media (max-width: 600px) { .values { grid-template-columns: 1fr; } .value { min-height: 0; } }

.people { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.people .media:first-child, .mosaic .media:first-child { grid-row: span 2; aspect-ratio: auto !important; height: 100%; min-height: 320px; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr 1fr; } .people .media:first-child { grid-column: 1 / -1; grid-row: auto; } }

/* ---------- Contato ---------- */
.channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.channel { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: calc(var(--radius) + 4px); background: var(--card); border: 1px solid var(--line); min-height: 220px; transition: transform 500ms var(--ease-expo), box-shadow 500ms var(--ease-expo), border-color 200ms ease; }
.channel .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); color: var(--brand); margin-bottom: auto; }
.channel .ico svg { width: 24px; height: 24px; }
.channel small { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 28px; }
.channel strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; overflow-wrap: anywhere; }
.channel--wa { background: #0f5132; background: linear-gradient(160deg, #128c4a, #0b5d33); color: #fff; border-color: transparent; }
.channel--wa .ico { background: rgba(255, 255, 255, 0.16); color: #fff; }
.channel--wa small { color: rgba(255, 255, 255, 0.75); }
@media (hover: hover) and (pointer: fine) { a.channel:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -34px rgba(14, 18, 56, 0.45); } }
@media (max-width: 1080px) { .channels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .channels { grid-template-columns: 1fr; } .channel { min-height: 0; } }

.contact-layout { row-gap: 40px; align-items: start; }
.contact-form-card { grid-column: 1 / span 7; background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(24px, 3.5vw, 48px); }
.contact-form-card h2 { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.5rem); }
.contact-form-card > p { margin-top: 12px; color: var(--muted); max-width: 52ch; }
.contact-form-card .form { margin-top: 32px; }
.contact-form-card .btn--wa { background: #25d366; color: #0b3d22; }
.contact-form-card .btn--wa svg { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { .contact-form-card .btn--wa:hover { background: #1ebe5a; } }
.contact-side { grid-column: 9 / span 4; display: grid; gap: 16px; }
.map { border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); aspect-ratio: 4 / 3.4; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.35) contrast(1.05); }
.addr { padding: 22px 4px 0; display: grid; gap: 6px; }
.addr strong { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.02em; }
.addr span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 1080px) { .contact-form-card, .contact-side { grid-column: 1 / -1; } }

/* ---------- Movimento reduzido: sem deslocamento, só opacidade ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .media[data-media] .media-in { clip-path: none; }
  .js .media[data-media] { opacity: 0; transition: opacity 500ms ease; }
  .js .media[data-media].is-in { opacity: 1; }
  .js .media[data-media] img { transform: none; transition: none; }
  .js .w > span { transform: none; opacity: 0; transition: opacity 500ms ease; }
  .js .is-in .w > span { opacity: 1; }
  .js [data-stagger] > * { transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track > [aria-hidden="true"] { display: none; }
  .wa-float::before { animation: none; }
  .site-header.is-hidden { transform: none; }
}
