/* ============================================================
   Magical Network - Home
   Reformulação 2026 (HTML/CSS/JS puro, sem Webflow)
   Identidade do hub: near-black + teal, tipografia editorial
   ============================================================ */

:root {
  --bg:          #0a0a0d;
  --bg-2:        #0f0f13;
  --surface:     #14141a;
  --surface-2:   #1a1a22;
  --line:        rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);

  --text:        #eaebeb;
  --text-soft:   #b7b8bd;
  --text-dim:    #85868d;

  --brand:       #16cac4;
  --brand-2:     #13aca7;
  --brand-deep:  #0bd1cb;
  --brand-glow:  rgba(22,202,196,.35);

  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --container: 1200px;
  --radius:    18px;
  --radius-lg: 26px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--brand);
  opacity: .7;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}

.section__sub {
  color: var(--text-soft);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-top: 1rem;
}

.prose {
  color: var(--text-soft);
  font-size: 1.04rem;
  margin-bottom: 1.1rem;
}

/* ---------- Botões ---------- */
.btn {
  --btn-fg: #04100f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: -.01em;
  color: var(--btn-fg);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-2));
  border: 1px solid transparent;
  border-radius: 100px;
  padding: .95rem 1.7rem;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  box-shadow: 0 8px 30px -10px var(--brand-glow);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--brand-glow); }
.btn--lg { padding: 1.1rem 2.1rem; font-size: 1.05rem; }
.btn--sm { padding: .7rem 1.35rem; font-size: .92rem; }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,.05); border-color: var(--brand); color: #fff; box-shadow: none; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav.is-scrolled {
  background: rgba(10,10,13,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav.is-scrolled .nav__inner { padding-top: .85rem; padding-bottom: .85rem; }
.nav__logo { height: 34px; width: auto; }
.nav__menu {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  margin-left: auto;
}
.nav__link {
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1.5px;
  background: var(--brand);
  transition: width .3s var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after { width: 100%; }
.nav__cta { flex-shrink: 0; }
.nav__cta-mobile { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(7rem, 14vh, 11rem) 0 0;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: -8% 0 0 0;
  z-index: 0;
  will-change: transform;
}
/* slideshow do hero: cross-fade + Ken Burns (zoom lento contínuo) */
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  opacity: 0;
  transition: opacity 1.8s var(--ease);
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: opacity, transform;
}
.hero__slide.is-active { opacity: 1; }
@keyframes kenburns {
  from { transform: scale(1.05); }
  to   { transform: scale(1.2); }
}
/* grade cinematográfico: escurece base e laterais, mantém brilho no centro-alto */
.hero__grade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,8,11,.62) 0%, rgba(8,8,11,.12) 26%, rgba(8,8,11,.55) 62%, rgba(8,8,11,.94) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(8,8,11,.78) 0%, rgba(8,8,11,.28) 42%, rgba(8,8,11,0) 72%),
    radial-gradient(120% 90% at 50% 12%, transparent 40%, rgba(8,8,11,.5) 100%);
}
.hero__glow {
  position: absolute;
  z-index: 1;
  width: 58vw; height: 58vw;
  max-width: 720px; max-height: 720px;
  left: -14%; bottom: 4%;
  background: radial-gradient(circle, var(--brand-glow), transparent 68%);
  filter: blur(24px);
  opacity: .55;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding-bottom: .5rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.018em;
  max-width: 17ch;
  margin-bottom: 1.6rem;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0,0,0,.35);
}
.hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--brand);
}
.hero__sub {
  color: #d7d8dc;
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  max-width: 52ch;
  margin-bottom: 2.3rem;
  text-shadow: 0 1px 24px rgba(0,0,0,.4);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__stats {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: clamp(2.8rem, 6vh, 4.5rem) auto 0;
  padding: 1.9rem clamp(1.25rem, 4vw, 2.5rem);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 0 clamp(1rem, 2.4vw, 2.2rem);
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 400;
  line-height: 1;
  color: #fff;
  letter-spacing: -.01em;
}
.stat__label { font-size: .88rem; color: var(--text-dim); max-width: 18ch; }

/* indicador de rolagem */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 14px;
  display: none;
}
.hero__scroll span {
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 8px;
  border-radius: 2px;
  background: var(--brand);
  transform: translateX(-50%);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; }
}
@media (min-height: 760px) and (min-width: 821px) { .hero__scroll { display: block; } }

/* ============================================================
   SECTIONS base
   ============================================================ */
.section { position: relative; padding: clamp(4.5rem, 10vh, 8rem) 0; }
.section__head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section--casas { background: var(--bg); }
.section--sobre { background: var(--bg-2); }
.section--servicos { background: var(--bg); }
.section--equipe { background: var(--bg-2); }

/* ---------- Nossas casas ---------- */
.casas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.casa {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
  isolation: isolate;
}
.casa:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
}
.casa__media { aspect-ratio: 4/5; overflow: hidden; }
.casa__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .6s var(--ease);
  filter: saturate(.92);
}
.casa:hover .casa__media img { transform: scale(1.06); filter: saturate(1.05); }
.casa__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,8,11,.85));
  pointer-events: none;
}
.casa__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
}
.casa__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.casa__place { color: var(--text-soft); font-size: .9rem; }
.casa__link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .7rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
  transition: gap .3s var(--ease), color .3s var(--ease);
}
.casa__link i {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  position: relative;
}
.casa__link i::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5px; height: 5px;
  border-top: 1.5px solid var(--brand);
  border-right: 1.5px solid var(--brand);
  transform: translate(-1px,0) rotate(45deg);
}
.casa:hover .casa__link { gap: .75rem; color: #fff; }

/* ---------- Quem somos ---------- */
.sobre-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.sobre__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.sobre__media::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  border-radius: inherit;
}
.sobre__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.sobre__content .btn { margin-top: .8rem; }

/* ---------- Como funciona / serviços ---------- */
.servicos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}
.servico {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.servico:hover { transform: translateY(-5px); border-color: var(--line-strong); background: var(--surface-2); }
.servico__icon {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(22,202,196,.16), rgba(22,202,196,.04));
  border: 1px solid rgba(22,202,196,.22);
  margin-bottom: 1.4rem;
}
.servico__icon img { width: 30px; height: 30px; object-fit: contain; }
.servico__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin-bottom: .7rem;
}
.servico__text { color: var(--text-soft); font-size: .96rem; }

/* ---------- Equipe ---------- */
.equipe-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.socio {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.socio:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.socio__media { aspect-ratio: 1/1; overflow: hidden; background: var(--surface-2); }
.socio__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.15);
  transition: filter .5s var(--ease);
}
.socio:hover .socio__media img { filter: grayscale(0); }
.socio__body { padding: 1.4rem 1.4rem 1.7rem; }
.socio__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: .6rem;
}
.socio__bio { color: var(--text-soft); font-size: .9rem; line-height: 1.55; }
.equipe__note {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  color: var(--text);
  max-width: 60ch;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  text-align: center;
}

/* ---------- CTA ---------- */
.section--cta { padding: clamp(3rem, 7vh, 6rem) 0; background: var(--bg); }
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(22,202,196,.14), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}
.cta__glow {
  position: absolute;
  width: 420px; height: 420px;
  left: 50%; top: 100%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, var(--brand-glow), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  max-width: 22ch;
  margin: 0 auto 2rem;
  position: relative;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 3rem 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__left { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.footer__logo { height: 40px; width: auto; }
.footer__meta { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; color: var(--text-dim); }
.footer__meta a { color: var(--text-soft); transition: color .25s var(--ease); }
.footer__meta a:hover { color: var(--brand); }
.footer__social { display: flex; gap: .8rem; }
.footer__social a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.footer__social a:hover { border-color: var(--brand); transform: translateY(-2px); background: rgba(22,202,196,.08); }
.footer__social img { width: 18px; height: 18px; }

/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 90;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #1eb257);
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.5);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 18px 40px -8px rgba(37,211,102,.6); }

/* ============================================================
   Reveal (animação ao rolar)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 1080px) {
  .casas-grid { grid-template-columns: repeat(2, 1fr); }
  .servicos-grid { grid-template-columns: repeat(2, 1fr); }
  .equipe-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 0; }
  .stat { padding: 0 1.6rem; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: none; }
}

@media (max-width: 820px) {
  .nav__inner { position: relative; }
  .nav.is-open {
    background: rgba(10,10,13,.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--line);
  }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10,10,13,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(0,0,0,.7);
    padding: .5rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__link { padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 1.05rem; }
  .nav__link::after { display: none; }
  .nav__cta { display: none; }
  .nav__cta-mobile { display: inline-flex; margin-top: 1.2rem; justify-content: center; border-bottom: 0; }
  .nav__toggle { display: flex; margin-left: auto; }

  .sobre-grid { grid-template-columns: 1fr; }
  .sobre__media { max-width: 480px; }
  .sobre__media img { aspect-ratio: 16/11; }

  /* no mobile: mantém o assunto centralizado e desliga o Ken Burns (mais leve) */
  .hero__slide { animation: none; transform: scale(1.06); object-position: 50% 30%; }
}

@media (max-width: 560px) {
  .casas-grid { grid-template-columns: 1fr; }
  .servicos-grid { grid-template-columns: 1fr; }
  .equipe-grid { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr 1fr; padding-top: 1.5rem; }
  .stat__num { font-size: 1.7rem; }
  .socio__body { padding: 1.1rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { transform: none !important; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
