/* emloop — estilos da landing page. Depende de tokens.css e emloop.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans);
  font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 16px; border-radius: var(--radius-full); }
.skip:focus { left: 8px; }

.eyebrow { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-2); }

/* ---------- Header ---------- */
/* Logo completo: mínimo de 80px de largura (manual). 28px de altura = ~83px. */
.site-header .el-header__logo svg { height: 28px; }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: transparent;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s ease; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.menu-toggle { display: none; }
/* Celular: logo + botão Menu numa linha; menu abre em tela cheia (manual: "se o menu crescer, troque por um botão Menu") */
@media (max-width: 720px) {
  .site-header { padding: 12px 20px; gap: 12px; flex-wrap: nowrap; }
  .menu-toggle { display: inline-flex; min-width: 76px; }
  .el-nav { position: absolute; top: 100%; left: 0; right: 0; height: 100svh;
    flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 0;
    padding: var(--space-4) 20px; background: var(--paper); border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
  .site-header.is-open .el-nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
  .site-header.is-open { background: var(--paper); border-bottom-color: var(--line); }
  .el-nav a:not(.el-btn) { width: 100%; font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em;
    padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
  .el-nav a:not(.el-btn):hover { border-bottom-color: var(--line); color: var(--ink-muted); }
  .el-nav a.el-btn { margin-top: var(--space-4); min-height: 56px; padding: 0 32px; font-size: 18px; }
}
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  padding: 140px 0 120px; }
.hero__inner { position: relative; z-index: 2; }

.hero__loop { position: absolute; z-index: 1; top: 50%; right: -14vw; width: min(70vw, 1100px);
  transform: translate3d(var(--mx, 0px), calc(-50% + var(--my, 0px) + var(--sy, 0px)), 0) rotate(var(--rot, 0deg));
  pointer-events: none; will-change: transform; }
.loop-svg { width: 100%; height: auto; display: block; overflow: visible; }
.loop-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.loop-svg__base { stroke: var(--line); stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.2s cubic-bezier(.65,0,.35,1) .2s forwards; }
.loop-svg__run { stroke: var(--ink); stroke-width: 2.6; stroke-dasharray: .16 .84; stroke-dashoffset: 0; opacity: 0;
  animation: run 5s linear infinite, fade-in .8s ease 2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes run { to { stroke-dashoffset: -1; } }
@keyframes fade-in { to { opacity: 1; } }


.hero__title { font-size: clamp(52px, 10.5vw, 152px); line-height: .92; font-weight: 600; letter-spacing: -.045em; margin-bottom: var(--space-4); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { to { transform: translateY(0); } }

.hero__title .line > .rotator { position: relative; display: inline-grid; }
.rotator__word { grid-area: 1 / 1; display: block; white-space: nowrap; transform: translateY(100%); opacity: 0;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
.rotator__word.is-on { transform: translateY(0); opacity: 1; }
.rotator__word.is-out { transform: translateY(-100%); opacity: 0; }

.hero__lead { max-width: 38ch; color: var(--ink-muted); margin-bottom: var(--space-4); }
.hero__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.magnetic { transition: transform .3s cubic-bezier(.2,.8,.2,1), background-color .15s ease; }

.hero__scroll { position: absolute; left: 50%; bottom: 32px; z-index: 2; width: 26px; height: 42px; margin-left: -13px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-full); }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--ink); animation: scroll-hint 1.8s ease-in-out infinite; }
@keyframes scroll-hint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 900px) {
  .hero { align-items: flex-end; padding-top: 120px; }
  .hero__loop { top: 26%; right: -30vw; width: 130vw; }
  .hero__scroll { display: none; }
}

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--paper); }
.marquee__track { display: flex; align-items: center; gap: 40px; width: max-content; animation: marquee 32s linear infinite; }
.marquee__track span { font-size: clamp(24px, 3.4vw, 44px); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.marquee__track i { display: inline-flex; color: var(--ink-muted); }
.marquee__track i svg { height: 22px; width: auto; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Seções ---------- */
.section { padding: var(--space-8) 0; }
.section--surface { background: var(--surface); }
.section__head { max-width: 640px; margin-bottom: var(--space-8); }
.section__title { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; margin-bottom: var(--space-2); }
.section__intro { color: var(--ink-muted); font-size: 18px; line-height: 28px; }
@media (max-width: 600px) { .section__head { margin-bottom: 40px; } }

/* ---------- Projetos ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-4); }
.projects .el-card:nth-child(even) { margin-top: 96px; }
@media (max-width: 800px) {
  .projects { grid-template-columns: 1fr; gap: 48px; }
  .projects .el-card:nth-child(even) { margin-top: 0; }
}

.ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-strong);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--surface);
  transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.section--surface .ph { background-color: var(--paper); }
.ph__sym svg { width: 88px; height: auto; transition: transform .6s cubic-bezier(.2,.8,.2,1), color .3s ease; }
.ph__num { position: absolute; top: 16px; left: 20px; font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.ph__label { position: absolute; bottom: 16px; left: 20px; font-size: 13px; font-weight: 500; color: var(--ink-muted); }
a.el-card:hover .ph { transform: scale(1.03); }
a.el-card:hover .ph__sym svg { color: var(--ink); transform: rotate(180deg); }

/* ---------- Serviços ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.service { padding: var(--space-4) var(--space-4) var(--space-4) 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.service + .service { padding-left: var(--space-4); border-left: 1px solid var(--line); }
.service::before { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--ink); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.service:hover::before { width: 100%; }
.service__num { font-size: 14px; font-weight: 600; color: var(--ink-muted); margin-bottom: var(--space-2); }
.service p { color: var(--ink-muted); }
@media (max-width: 800px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: var(--space-4) 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Processo ---------- */
.process { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); padding-top: 12px; }
.process__line { position: absolute; top: 0; left: 0; width: 100%; height: 24px; overflow: visible; }
.process__line path { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.65,0,.35,1); }
.process.is-in .process__line path { stroke-dashoffset: 0; }
.step { position: relative; padding-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.step p { color: var(--ink-muted); max-width: 32ch; }
.step__dot { position: absolute; top: 3px; left: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); }
.step:nth-child(3) .step__dot { transition-delay: .4s; }
.step h3 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
@media (max-width: 800px) {
  .process { grid-template-columns: 1fr; padding-top: 0; padding-left: 36px; }
  .process__line { display: none; }
  .process::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line-strong); }
  .step { padding-top: 0; padding-bottom: var(--space-4); }
  .step__dot { left: -36px; }
}

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-8); align-items: center; }
.about__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.about__text { display: flex; flex-direction: column; gap: var(--space-2); }
.about__text p:not(.eyebrow):not(.body-lg) { color: var(--ink-muted); max-width: 56ch; }
.about__tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; gap: 40px; } .about__photo { max-width: 420px; } }

/* ---------- Contato ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
.contact__intro .body-lg { color: var(--ink-muted); max-width: 34ch; }
.contact__social { display: inline-block; margin-top: var(--space-4); color: var(--ink); font-weight: 600; font-size: 18px; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.contact__social:hover { color: var(--ink-muted); }
.contact__social:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.contact__form { display: grid; gap: var(--space-4); }
.contact__form .el-field { max-width: none; }
.form-status { font-size: 14px; color: var(--ink-muted); min-height: 20px; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Footer ---------- */
.el-footer { padding: 0; }
.footer { padding: var(--space-4) 0 76px; } /* espaço extra: o botão flutuante fica nesse canto */
.footer__top { display: grid; grid-template-columns: 1fr auto; gap: var(--space-4); align-items: start; }
.el-footer__cta { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.03em; max-width: 14ch; margin-bottom: var(--space-2); }
.footer__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.footer__btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.footer__btn:hover { background: var(--ink); color: var(--paper); }
.footer__btn--ghost { background: transparent; color: var(--paper); border-color: var(--ink-muted); }
.footer__btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.footer__wa { width: 22px; height: 22px; }

.footer__nav { display: flex; flex-direction: column; gap: 7px; min-width: 140px; }
.footer__nav-title { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.footer__nav a { color: var(--paper); text-decoration: none; font-size: 15px; width: fit-content;
  border-bottom: 1.5px solid transparent; }
.footer__nav a:hover { border-bottom-color: var(--paper); }

.footer__mark { display: block; color: var(--paper); margin: var(--space-4) 0 var(--space-2); }
.footer__mark svg { width: auto; height: clamp(26px, 3.4vw, 40px); display: block; }

.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap;
  padding-top: var(--space-2); border-top: 1px solid var(--ink-muted); font-size: 14px; color: var(--ink-muted); }
.footer__sign { color: var(--ink-muted); }
.el-footer a:focus-visible { outline-color: var(--paper); }

@media (max-width: 800px) {
  .footer__top { grid-template-columns: 1fr; gap: var(--space-4); }
  .footer__nav { flex-flow: row wrap; gap: 8px 20px; align-items: center; }
  .footer__nav-title { display: none; }
  .footer__mark { margin: var(--space-4) 0; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- WhatsApp flutuante ---------- */
.whatsapp { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; justify-content: center; gap: 0; min-width: 56px; height: 56px; padding: 0 15px; border-radius: var(--radius-full);
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); opacity: 0; transform: translateY(16px) scale(.9);
  animation: wa-in .6s cubic-bezier(.2,.8,.2,1) 1.2s forwards; transition: background-color .15s ease; }
.whatsapp svg { width: 26px; height: 26px; flex: none; }
.whatsapp__label { max-width: 0; margin-left: 0; overflow: hidden; white-space: nowrap; transition: max-width .35s cubic-bezier(.2,.8,.2,1), margin-left .35s cubic-bezier(.2,.8,.2,1); }
.whatsapp:hover { background: var(--ink-muted); }
.whatsapp:hover .whatsapp__label, .whatsapp:focus-visible .whatsapp__label { max-width: 100px; margin-left: 10px; }
.whatsapp:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.whatsapp::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--ink);
  animation: wa-ring 2.4s ease-out 2s infinite; pointer-events: none; }
@keyframes wa-in { to { opacity: 1; transform: none; } }
@keyframes wa-ring { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
body.menu-open .whatsapp { visibility: hidden; }
@media (max-width: 720px) { .whatsapp { min-width: 52px; height: 52px; padding: 0 13px; } }

/* ---------- Reveal ao rolar ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .35s; }
.hero .hero__lead.reveal { transition-delay: .5s; }
.hero .hero__actions.reveal { transition-delay: .65s; }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .loop-svg__run { display: none; }
  .marquee__track { animation: none; }
  .hero__loop { transform: translateY(-50%); }
  /* Cards: com movimento reduzido, só o sublinhado do título (manual) */
  a.el-card:hover .ph, a.el-card:hover .ph__sym svg { transform: none; color: var(--line-strong); }
}
