/* ==========================================================================
   Zupper Labs — Zupper DS + Material 3 Expressive (tema escuro)
   Cores oficiais: Ciano #00C6C9 · Teal Zupper #00AEB1 · Petróleo #037866
   ========================================================================== */

:root {
  /* Zupper DS — tokens de marca */
  --zp-teal-50:#F0FBFB; --zp-teal-100:#DAF4F4; --zp-teal-200:#A8E7E8; --zp-teal-300:#6BD7D9;
  --zp-teal-400:#2CC7CA;
  --zp-teal-500:#00C6C9;   /* OFICIAL — Ciano */
  --zp-teal-600:#00AEB1;   /* OFICIAL — Teal Zupper */
  --zp-teal-700:#048E90;
  --zp-teal-800:#037866;   /* OFICIAL — Petróleo */
  --zp-teal-900:#025C52; --zp-teal-950:#013A34;
  --zp-verde-500:#00AE42; --zp-verde-700:#007A2F; --zp-verde-900:#00481C;
  --zp-dourado-400:#F5CF12; --zp-dourado-500:#E9C600; --zp-dourado-700:#A58900;
  --zp-neutro-900:#16201F;
  --zp-font: 'Poppins','Museo Sans',system-ui,'Arial',sans-serif;

  /* M3 color roles — tema escuro */
  --primary: var(--zp-teal-300);
  --on-primary: var(--zp-teal-950);
  --primary-container: #0B4A44;
  --on-primary-container: var(--zp-teal-100);
  --secondary: var(--zp-teal-400);
  --secondary-container: #12403D;
  --on-secondary-container: #C9F1F2;
  --tertiary-container: #4A3F00;
  --on-tertiary-container: #FFEB8A;
  --success-container: #0F3D22;
  --on-success-container: #B7EBC6;

  --surface: #0E1716;
  --surface-container-low: #121D1C;
  --surface-container: #172322;
  --surface-container-high: #1E2C2B;
  --on-surface: #E3EEED;
  --on-surface-variant: #A9BCBB;
  --outline: #6E8584;
  --outline-variant: #2B3A39;

  /* M3 Expressive — shape scale */
  --shape-xs: 4px; --shape-sm: 8px; --shape-md: 12px; --shape-lg: 16px;
  --shape-lg-inc: 20px; --shape-xl: 28px; --shape-xl-inc: 32px; --shape-xxl: 48px;

  /* M3 Expressive — motion springs */
  --spring-fast: linear(0, 0.18 7%, 0.6 17%, 0.95 28%, 1.07 37%, 1.09 43%, 1.05 55%, 0.99 70%, 1);
  --spring-default: linear(0, 0.1 6%, 0.42 15%, 0.8 26%, 1.03 37%, 1.1 45%, 1.07 55%, 1.01 70%, 0.995 82%, 1);
  --ease-emph: cubic-bezier(.2, 0, 0, 1);
  --dur-fast: 350ms; --dur-default: 550ms;

  --elev-1: 0 1px 2px rgba(0,0,0,.4), 0 1px 3px 1px rgba(0,0,0,.25);
  --elev-3: 0 4px 8px 3px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.4);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--surface); }
body {
  margin: 0;
  font-family: var(--zp-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; border-radius: var(--shape-sm); }

.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1;
  display: inline-block; white-space: nowrap;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  user-select: none;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 18px; border-radius: 22px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* Logo: versão branca sobre fundo escuro (regra do Brand Book) */
.brand__logo { height: 40px; width: auto; filter: brightness(0) invert(1); }

/* Formas M3 Expressive: fallback antes do JS aplicar o clip-path */
[class*="shape-"] { border-radius: 38%; }

/* ---------- Top app bar ---------- */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: box-shadow var(--dur-fast) var(--ease-emph), background-color var(--dur-fast);
}
.top-bar.is-scrolled { box-shadow: var(--elev-1); background: color-mix(in srgb, var(--surface-container) 90%, transparent); }
.top-bar__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__labs {
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  background: var(--primary); color: var(--on-primary);
  padding: 4px 12px; border-radius: 14px 14px 14px var(--shape-xs);
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 10px 20px; border-radius: 22px;
  color: var(--on-surface-variant);
  transition: background-color var(--dur-fast) var(--ease-emph), color var(--dur-fast), border-radius var(--dur-default) var(--spring-default);
}
.nav a:hover { background: var(--surface-container-high); color: var(--on-surface); }
.nav a.is-active { background: var(--secondary-container); color: var(--on-secondary-container); border-radius: var(--shape-md); }

.icon-btn {
  width: 48px; height: 48px; display: inline-grid; place-items: center;
  border: 0; background: transparent; color: var(--on-surface-variant);
  border-radius: 24px; cursor: pointer;
  transition: background-color var(--dur-fast), border-radius var(--dur-fast) var(--spring-fast), transform var(--dur-fast) var(--spring-fast);
}
.icon-btn:hover { background: var(--surface-container-high); color: var(--on-surface); }
.icon-btn:active { border-radius: var(--shape-md); transform: scale(.92); }

/* ---------- Buttons (M3 Expressive: shape morph no press) ---------- */
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px;
  font: 600 15px/1 var(--zp-font); text-decoration: none;
  border: 0; border-radius: calc(var(--h) / 2); cursor: pointer;
  transition: border-radius var(--dur-fast) var(--spring-fast), transform var(--dur-fast) var(--spring-fast),
              box-shadow var(--dur-fast) var(--ease-emph), background-color var(--dur-fast);
}
.btn--lg { --h: 60px; padding: 0 30px; font-size: 16px; }
.btn:hover { box-shadow: var(--elev-1); border-radius: var(--shape-lg); }
.btn:active { border-radius: var(--shape-md); transform: scale(.96); }
.btn--filled { background: var(--primary); color: var(--on-primary); }
.btn--filled:hover { background: var(--zp-teal-200); }
.btn--tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn--tonal:hover { background: #18524E; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  min-height: min(860px, calc(100svh - 72px));
  padding: clamp(48px, 8vw, 120px) var(--gutter) clamp(64px, 9vw, 128px);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.assist-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px 8px 14px; margin-bottom: clamp(28px, 3.5vw, 40px);
  border: 1px solid var(--outline-variant); border-radius: var(--shape-sm);
  font-size: 14px; font-weight: 500; color: var(--on-surface-variant);
}
.assist-chip .ms { font-size: 18px; color: var(--secondary); }

.display {
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  font-weight: 800; letter-spacing: -.025em; line-height: 1.18;
}
.display__accent {
  display: inline-block; white-space: nowrap;
  margin: .08em 0;
  color: var(--on-primary-container);
  background: var(--primary-container);
  padding: .02em .24em .1em;
  line-height: 1.1;
  border-radius: var(--shape-xxl) var(--shape-lg) var(--shape-xxl) var(--shape-lg);
  animation: accent-morph 7s var(--ease-emph) infinite alternate;
}
@keyframes accent-morph {
  0%   { border-radius: 48px 16px 48px 16px; }
  50%  { border-radius: 16px 48px 16px 48px; }
  100% { border-radius: 40px; }
}
.hero__lead {
  margin: clamp(28px, 3.5vw, 40px) 0 clamp(36px, 4.5vw, 52px); max-width: 54ch;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem); line-height: 1.75; color: var(--on-surface-variant);
}

.hero__art { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; justify-self: center; }
.morph { width: 100%; height: 100%; overflow: visible; }
.morph__back { fill: var(--zp-teal-800); }
.morph__front { fill: var(--zp-teal-500); }
.orbit {
  position: absolute; display: grid; place-items: center;
  width: 72px; height: 72px;
  animation: float 6s ease-in-out infinite;
}
.orbit .ms { font-size: 28px; }
.orbit--1 { top: 2%; left: 4%; background: var(--zp-dourado-500); color: var(--zp-neutro-900); }
.orbit--2 { bottom: 6%; left: -2%; background: var(--surface-container-high); color: var(--primary); animation-delay: -2s; }
.orbit--3 { top: 14%; right: -2%; background: var(--zp-verde-700); color: #fff; animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-14px) rotate(12deg); }
}
.hero__badge {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  display: grid; justify-items: center; gap: 4px;
  color: var(--zp-teal-950); pointer-events: none;
}
.hero__badge .ms { font-size: 56px; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 48; }
.hero__badge strong { font-size: 22px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--outline-variant);
  padding: 24px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 40px; width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee span {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -.015em;
  color: var(--on-surface-variant); white-space: nowrap;
}
.marquee i { flex: none; width: 30px; height: 30px; background: var(--zp-teal-500); animation: spin 10s linear infinite; }
.marquee i:nth-of-type(3n+2) { background: var(--zp-teal-800); }
.marquee i:nth-of-type(3n) { background: var(--zp-dourado-500); }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--gutter); }
.section--tight { padding-block: clamp(24px, 4vw, 48px); }
.section__head { margin-bottom: clamp(40px, 5vw, 64px); }
.eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--zp-teal-300); margin-bottom: 16px;
}
.headline { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.section__lead { margin-top: 20px; max-width: 60ch; color: var(--on-surface-variant); font-size: 1.08rem; line-height: 1.75; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.pillar {
  padding: clamp(28px, 3vw, 40px);
  background: var(--surface-container);
  border-radius: var(--shape-xl);
  transition: border-radius var(--dur-default) var(--spring-default), transform var(--dur-default) var(--spring-default), background-color var(--dur-fast);
}
.pillar:hover { border-radius: var(--shape-xxl) var(--shape-md); transform: translateY(-6px); background: var(--surface-container-high); }
.pillar h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; margin: 32px 0 12px; }
.pillar p { color: var(--on-surface-variant); line-height: 1.7; }
.pillar__shape {
  width: 96px; height: 96px; display: grid; place-items: center;
  transition: transform 900ms var(--spring-default);
}
.pillar:hover .pillar__shape { transform: rotate(60deg) scale(1.08); }
.pillar__shape .ms { font-size: 38px; transition: transform 900ms var(--spring-default); }
.pillar:hover .pillar__shape .ms { transform: rotate(-60deg); }
.pillar--exp .pillar__shape { background: var(--primary-container); color: var(--on-primary-container); }
.pillar--test .pillar__shape { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.pillar--disc .pillar__shape { background: var(--success-container); color: var(--on-success-container); }

/* ---------- Manifesto ---------- */
.manifesto {
  max-width: 22ch;
  font-size: clamp(1.9rem, 4.6vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.25;
  color: var(--on-surface-variant);
}
.manifesto em { font-style: normal; color: var(--on-surface); }
.manifesto em:nth-of-type(1) { color: var(--zp-teal-300); }
.manifesto em:nth-of-type(3) { color: var(--zp-dourado-400); }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
  padding: clamp(36px, 5.5vw, 72px);
  background: var(--zp-teal-800); color: #fff;
  border-radius: var(--shape-xxl) var(--shape-xl) var(--shape-xxl) var(--shape-xl);
  position: relative; overflow: hidden; isolation: isolate;
}
.contact__art {
  position: absolute; z-index: -1; pointer-events: none;
  width: 560px; height: 560px;
  right: -140px; top: calc(50% - 280px);
  overflow: visible;
}
.contact__blob--a { fill: var(--zp-teal-600); opacity: .5; }
.contact__blob--b { fill: var(--zp-teal-500); opacity: .3; }
.contact .headline { color: #fff; }
.contact__copy p:last-child { margin-top: 16px; max-width: 46ch; opacity: .92; line-height: 1.7; }
.contact .eyebrow { color: var(--zp-teal-100); }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 6px; }
.contact__mail {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 24px;
  background: #fff; color: var(--zp-teal-950);
  font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
  border-radius: 28px;
  transition: border-radius var(--dur-fast) var(--spring-fast), transform var(--dur-fast) var(--spring-fast);
}
.contact__mail:hover { border-radius: var(--shape-lg); }
.contact__mail:active { transform: scale(.97); border-radius: var(--shape-md); }
.contact__mail .ms { color: var(--zp-teal-800); }
.icon-btn--on-primary { color: #fff; }
.icon-btn--on-primary:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Footer ---------- */
.footer {
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 56px var(--gutter) 120px; color: var(--on-surface-variant); font-size: 14px;
  border-top: 1px solid var(--outline-variant);
}
.footer .brand__logo { height: 36px; margin-bottom: 8px; }
.footer__small { font-size: 12px; }

/* ---------- FAB ---------- */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: inline-flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 24px 0 20px;
  background: var(--zp-dourado-500); color: var(--zp-neutro-900);
  font-weight: 700; text-decoration: none;
  border-radius: var(--shape-lg-inc);
  box-shadow: var(--elev-3);
  transition: border-radius var(--dur-default) var(--spring-default), padding var(--dur-default) var(--spring-default),
              transform var(--dur-default) var(--spring-default), opacity var(--dur-fast);
}
.fab .ms { font-size: 26px; }
.fab:hover { border-radius: 32px; }
.fab:active { transform: scale(.95); border-radius: var(--shape-md); }
.fab__label { overflow: hidden; max-width: 120px; transition: max-width var(--dur-default) var(--spring-default), opacity var(--dur-fast), margin var(--dur-default) var(--spring-default); }
.fab.is-collapsed { padding: 0 19px; }
.fab.is-collapsed .fab__label { max-width: 0; opacity: 0; margin-left: -12px; }
.fab.is-hidden { opacity: 0; transform: scale(.6); pointer-events: none; }

/* ---------- Snackbar ---------- */
.snackbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 140%);
  max-width: calc(100vw - 32px);
  padding: 14px 20px; border-radius: var(--shape-sm);
  background: #E3EEED; color: var(--zp-neutro-900);
  font-size: 14px; box-shadow: var(--elev-3);
  opacity: 0; visibility: hidden;
  transition: transform var(--dur-default) var(--spring-default), opacity var(--dur-fast), visibility 0s linear var(--dur-default);
}
.snackbar.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform var(--dur-default) var(--spring-default), opacity var(--dur-fast); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity var(--dur-default) var(--ease-emph), transform 800ms var(--spring-default); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero > * { min-width: 0; }
  .hero__art { max-width: 340px; order: -1; }
  .pillars { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact__art { width: 420px; height: 420px; right: -160px; top: -160px; }
}
@media (max-width: 600px) {
  .brand__logo { height: 32px; }
  .nav a { padding: 10px 14px; }
  .hero__art { max-width: 270px; }
  .orbit { width: 56px; height: 56px; }
  .orbit .ms { font-size: 24px; }
  .btn-group .btn { width: 100%; }
  .contact__mail { padding: 0 18px; font-size: 14px; }
  .fab { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
