/* ═══════════════════════════════════════════════════════════════════════════
   Home — a abertura e as seis seções. Portado do protótipo `home.html`.
   As cores vêm dos tokens de style.css, então tudo aqui vale nos dois temas:
   a abertura acompanha o tema, os capítulos de marca são sempre navy.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Topo sobre a abertura ────────────────────────────────────────────────── */

/* Na home o cabeçalho não é uma barra: fica solto por cima da abertura e sobe
   com ela quando a página rola. */
.home .topo { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom: 0; }
.home .topo__in { max-width: none; padding-inline: var(--gutter); }
@media (max-width: 900px) {
  .js .home .topo__nav { background: var(--surface); padding-inline: var(--gutter); }
}

/* ── Abertura ─────────────────────────────────────────────────────────────── */

.abertura {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  min-height: max(640px, 100svh); padding-top: var(--topo-h);
  background: var(--surface);
  --logo-tinta: var(--ink); /* navy no claro, off-white no escuro: as duas versões oficiais */
}
.abertura__grid {
  position: relative; z-index: 2; flex: 1; display: grid; align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 104px);
  padding-block: clamp(16px, 3vh, 40px) clamp(48px, 7vh, 88px);
}
.abertura__copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.abertura .kicker { margin-bottom: 28px; }
.abertura h1 {
  margin: 0 0 28px; font-size: clamp(2.25rem, 3.35vw, 4rem); line-height: 1.03;
  font-weight: 700; letter-spacing: -.025em; text-wrap: balance;
}
/* o título sobe linha a linha por dentro da máscara */
.abertura h1 .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.abertura h1 .line-inner { display: block; will-change: transform; }
.abertura__lead { margin: 0 0 36px; max-width: 44ch; font-size: clamp(1rem, 1.05vw, 1.2rem); line-height: 1.6; color: var(--muted); }
.abertura__lead strong { color: var(--ink); font-weight: 600; }
.abertura .ctas { margin-bottom: 22px; }
.abertura__fone { margin: 0 0 30px; font-size: 15px; color: var(--muted); }
.abertura__fone a { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.abertura__fone a:hover { text-decoration: underline; }
.abertura__marcas { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.abertura__marcas li { display: flex; align-items: center; gap: 10px; }
/* o marcador é o ponto do "i" do logo: 8,8 × 7,4, no mesmo azul nos dois temas */
.abertura__marcas li::before { content: ''; width: 9px; height: 7.5px; background: var(--azul); }

.abertura__slot { min-width: 0; width: 100%; height: min(62vh, 660px); margin-bottom: 44px; }
/* sem JavaScript a primeira foto entra como imagem comum */
.abertura__slot img { width: 100%; height: 100%; object-fit: cover; }

.abertura__palco { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 1; pointer-events: none; overflow: visible; }

/* Legenda da foto: etiqueta navy por cima da imagem, igual nos dois temas. */
.abertura__legenda {
  position: absolute; z-index: 3; left: 0; top: 0; pointer-events: none; min-width: 240px;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  background: rgb(27 30 40 / 86%); color: var(--offwhite);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
html:not(.js) .abertura__legenda, html:not(.js) .abertura__rever { display: none; }
.cap-bars { display: flex; gap: 6px; }
.cap-bars i { position: relative; display: block; height: 2px; flex: 1; background: rgb(238 243 247 / 20%); overflow: hidden; }
.cap-bars i b { position: absolute; inset: 0; background: var(--offwhite); transform-origin: left center; transform: scaleX(0); }
.cap-row { display: flex; align-items: baseline; gap: 14px; overflow: hidden; }
.cap-n { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: rgb(238 243 247 / 74%); font-variant-numeric: tabular-nums; }
.cap-txt { display: flex; flex-direction: column; gap: 2px; }
.cap-t { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; }
.cap-s { display: block; font-size: 13px; color: rgb(238 243 247 / 74%); white-space: nowrap; }

.abertura__rever {
  all: unset; box-sizing: border-box; position: absolute; z-index: 4; right: var(--gutter); bottom: 18px;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer;
  font: 500 13px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-box);
  transition: color var(--dur-rapida), border-color var(--dur-rapida);
}
.abertura__rever:hover { color: var(--ink); border-color: var(--ink); }
.abertura__rever:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Enquanto a animação não começa, texto e menu esperam escondidos — senão
   apareceriam prontos, sumiriam e entrariam de novo. */
html.intro .abertura__copy, html.intro .topo__in > *, html.intro .abertura__legenda, html.intro .abertura__rever { visibility: hidden; }

@media (max-width: 900px) {
  .abertura { min-height: auto; }
  .abertura__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 8px 72px; }
  .abertura__slot { order: -1; height: auto; aspect-ratio: 4 / 3; margin-bottom: 28px; }
  .abertura h1 { font-size: clamp(2rem, 8.4vw, 2.75rem); }
  .abertura .kicker { margin-bottom: 20px; font-size: 12px; }
  .abertura .btn { min-height: 50px; font-size: 15px; padding-inline: 20px; }
  .abertura__legenda { min-width: 0; padding: 10px 12px; gap: 8px; }
  .cap-s { display: none; }
  .cap-t { font-size: 14px; }
  .abertura__rever { bottom: 16px; }
}

/* ── Seções ───────────────────────────────────────────────────────────────── */

.sec { padding-block: clamp(88px, 11vw, 176px); }
.sec h2 { margin: 0; font-size: clamp(2rem, 4.3vw, 4.25rem); line-height: 1.02; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.sec h3 { margin: 0; }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 96px);
  align-items: end; margin-bottom: clamp(48px, 6vw, 88px);
}
.sec-lead { margin: 0; max-width: 46ch; font-size: clamp(1rem, 1.1vw, 1.15rem); line-height: 1.6; color: var(--muted); }

/* ── Serviços ─────────────────────────────────────────────────────────────── */

.svc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 120px); align-items: start; }
.svc-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.svc-item {
  box-sizing: border-box; width: 100%; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding: clamp(16px, 1.6vw, 24px) 0; border-top: 1px solid var(--line);
  font-size: clamp(1.15rem, 1.75vw, 1.75rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.15;
  color: var(--muted); text-decoration: none; transition: color var(--dur-rapida);
}
.svc-item:hover, .svc-item[aria-current='true'] { color: var(--ink); }
.svc-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.svc-item i {
  font-style: normal; font-size: .8em; opacity: 0; transform: translateX(-10px); color: var(--ink-acento);
  transition: opacity var(--dur-base), transform var(--dur-base) var(--curva-firme);
}
.svc-item[aria-current='true'] i { opacity: 1; transform: none; }
.svc-media { position: sticky; top: 6vh; display: flex; flex-direction: column; gap: 28px; }
.svc-frame { position: relative; width: 100%; aspect-ratio: 6 / 5; }
.svc-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }
/* a foto comum, antes de o balão ser desenhado pelo script */
.svc-frame > img { width: 100%; height: 100%; object-fit: cover; }
.svc-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: end; padding-top: 8px; }
.svc-info[hidden] { display: none; }
.svc-desc { margin: 0 0 14px; font-size: clamp(1rem, 1.15vw, 1.2rem); line-height: 1.55; max-width: 42ch; }
.svc-balcao { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 42ch; }
.svc-balcao a { color: var(--ink); font-weight: 600; text-decoration-thickness: 1px; }

/* ── Por que (manifesto) ──────────────────────────────────────────────────── */

.why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 140px); align-items: start; }
.why-num { position: sticky; top: 8vh; }
/* numeral gigante: peso 800, tracking negativo, entrelinha .8 */
.big30 {
  display: block; margin-left: -.06em; font-size: clamp(9rem, 21vw, 22rem); line-height: .8;
  font-weight: 800; letter-spacing: -.07em; font-variant-numeric: tabular-nums;
}
.big30-cap { display: block; margin-top: 18px; font-size: clamp(1.25rem, 1.8vw, 1.75rem); font-weight: 600; letter-spacing: -.01em; }
.facts { display: flex; flex-direction: column; gap: 12px; margin: 40px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 12px; }
.facts li::before { content: ''; flex: none; width: 9px; height: 7.5px; background: var(--azul); }
.facts b { color: var(--ink); font-weight: 600; }
.creed { list-style: none; margin: 0; padding: 0; }
.creed li { padding: clamp(24px, 2.6vw, 40px) 0; border-top: 1px solid var(--line); }
.creed li:last-child { border-bottom: 1px solid var(--line); }
.creed h3 { margin: 0 0 10px; font-size: clamp(1.6rem, 2.8vw, 2.75rem); line-height: 1.05; font-weight: 700; letter-spacing: -.025em; }
.creed p { margin: 0; max-width: 52ch; font-size: clamp(1rem, 1.1vw, 1.15rem); line-height: 1.6; color: var(--muted); }

/* ── Trabalhos ────────────────────────────────────────────────────────────── */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
html:not(.js) .filters { display: none; }
.chip {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 10px 16px;
  font-size: 14px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  transition: background-color var(--dur-rapida), color var(--dur-rapida), border-color var(--dur-rapida);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); }
.chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.chip small { margin-left: 6px; font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }

.trabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.trab { display: flex; flex-direction: column; min-width: 0; }
/* o filtro apaga quem não é da linha escolhida, sem tirar do lugar */
.trabs .trab.out { opacity: .12; transform: scale(.98); pointer-events: none; transition: opacity var(--dur-base), transform var(--dur-base) var(--curva-firme); }
.trab figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.trab img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-texto) var(--curva-firme); }
.trab:hover img { transform: scale(1.04); }
/* a ficha: canhoto de ordem de serviço */
.ticket { position: relative; margin-top: 16px; padding: 18px 0 0; border-top: 1px dashed var(--line-forte); }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ticket dt { color: var(--muted); font-weight: 500; }
.ticket dd { margin: 0; font-weight: 600; }
.ticket h3 { margin: 0 0 6px; font-size: clamp(1.1rem, 1.35vw, 1.35rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.ticket p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.more-row { display: flex; justify-content: flex-end; margin-top: 40px; }
.who {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px;
  margin: clamp(48px, 6vw, 80px) 0 0; padding-top: 28px; border-top: 1px solid var(--line);
}
.who strong { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.who p { margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.6rem); line-height: 1.4; font-weight: 500; letter-spacing: -.01em; text-wrap: pretty; }

/* ── Como pedir ───────────────────────────────────────────────────────────── */

.how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 140px); align-items: center; }
.passos { list-style: none; margin: 0; padding: 0; }
.passos li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 18px; padding: 22px 0;
  border-top: 1px solid var(--line); transition: opacity var(--dur-entrada) var(--curva-firme);
}
.passos li:last-child { border-bottom: 1px solid var(--line); }
.passos .n { grid-row: 1 / 3; padding-top: 6px; font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.passos h3 { margin: 0; font-size: clamp(1.25rem, 1.8vw, 1.75rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.passos p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
/* os passos acendem conforme a conversa ao lado avança */
html.mo .passos li { opacity: .38; }
html.mo .passos li.on { opacity: 1; }
.passos li.on .n { color: var(--ink); }

.chat-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1.02; max-width: 620px; justify-self: end; }
.chat-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }
.chat { position: absolute; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; overflow: hidden; }
.chat-tag { position: absolute; z-index: 2; top: 18px; left: 20px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* sem o balão desenhado, a conversa fica numa moldura reta */
html:not(.js) .chat-wrap { aspect-ratio: auto; border: 4px solid var(--border); border-radius: var(--radius-box); padding: 48px 18px 18px; }
html:not(.js) .chat { position: static; }
/* bolha do cliente em papel, bolha da Universitária em azul */
.msg { max-width: 78%; padding: 11px 14px; font-size: 15px; line-height: 1.45; border-radius: 14px; transform-origin: bottom left; }
.msg.me { align-self: flex-end; background: var(--offwhite); color: var(--navy); border-bottom-right-radius: 4px; transform-origin: bottom right; }
.msg.us { align-self: flex-start; background: var(--azul); color: var(--offwhite); border-bottom-left-radius: 4px; }
.msg .who-s { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.msg.file { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.msg.file svg { position: static; width: 22px; height: 26px; flex: none; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: rgb(61 90 149 / 55%); border-radius: 14px; border-bottom-left-radius: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--offwhite); opacity: .5; animation: digitando 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes digitando { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
html.mo .msg { opacity: 0; transform: translate3d(0, 14px, 0) scale(.96); transition: opacity var(--dur-entrada) var(--curva-firme), transform var(--dur-entrada) var(--curva-firme); }
html.mo .msg.show { opacity: 1; transform: none; }
.chat-rever {
  all: unset; cursor: pointer; margin-top: 18px; padding-bottom: 2px;
  font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line);
}
.chat-rever:hover { color: var(--ink); }
.chat-rever:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
html:not(.mo) .chat-rever { display: none; }

/* ── Dúvidas ──────────────────────────────────────────────────────────────── */

.duvidas { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 120px); align-items: start; }
.duvidas > :first-child { position: sticky; top: 8vh; }
.duvidas .faq { max-width: none; }

@media (max-width: 900px) {
  .sec-head, .svc, .why, .how, .duvidas, .who { grid-template-columns: minmax(0, 1fr); }
  .svc-media { position: relative; top: auto; order: -1; }
  .svc-info { grid-template-columns: minmax(0, 1fr); }
  .why-num { position: relative; top: auto; }
  .trabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-wrap { justify-self: stretch; max-width: 100%; aspect-ratio: 1 / 1.12; }
  .duvidas > :first-child { position: relative; top: auto; }
}
@media (max-width: 560px) {
  .trabs { gap: 14px; }
  .ticket dl, .ticket p { display: none; }
  .ticket h3 { font-size: 15px; }
  .msg { font-size: 14px; }
}
