/* ==========================================================================
   DenoCore — site institucional
   Sistema decorativo: circuito (trilhas + nós), herdado do símbolo chip-D
   ========================================================================== */

:root {
  --bg: #0A1220;
  --bg-2: #0F1E3D;
  --surface: #0D1A30;
  --line: rgba(148, 163, 184, 0.14);
  --text: #F4F6F8;
  --muted: #93A1B8;
  --primary: #2563EB;
  --primary-strong: #1D4ED8;
  --primary-soft: #3B82F6;
  --accent: #00D1B2;
  --cyan: #38BDF8;
  --radius: 14px;

  --font: "Manrope", "Segoe UI", Roboto, sans-serif;
  --fs-hero: clamp(2.35rem, 1.6rem + 3.4vw, 3.9rem);
  --fs-h2: clamp(1.7rem, 1.25rem + 2vw, 2.5rem);
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  --space-section: clamp(4.5rem, 3.6rem + 4.5vw, 8rem);
  --container: 1160px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(37, 99, 235, 0.45); }

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

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: var(--text); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-2px); }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.875rem; }
.btn-lg { padding: 1.05rem 2.1rem; font-size: 1.02rem; }

/* ---------- Eyebrow + nó de circuito ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.trace-node {
  position: relative;
  flex: none;
  width: 26px;
  height: 2px;
  background: currentColor;
  opacity: 0.9;
}
.trace-node::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--bg);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand img { height: 64px; width: auto; }
@media (max-width: 900px) {
  .brand img { height: 48px; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.7rem);
}
.site-nav > a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}
.site-nav > a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 2.6rem + 3.5vw, 6rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(56, 189, 248, 0.13) 1px, transparent 1.6px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, black 20%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -15%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.16), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-copy > .eyebrow + .hero-title { margin-top: 1rem; }
.hero-title {
  margin-top: 1.4rem;
  font-size: clamp(2.5rem, 2rem + 3.8vw, 4.3rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.hero-title em { font-style: normal; color: var(--primary-soft); }

.hero-sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero-offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 2rem;
  margin-top: 2.6rem;
  max-width: 600px;
}
.hero-offers li { position: relative; padding-left: 1.15rem; }
.hero-offers li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.hero-offers strong { display: block; font-size: 0.95rem; }
.hero-offers span { font-size: 0.84rem; color: var(--muted); }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-chip {
  width: clamp(280px, 32vw, 440px);
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(14, 165, 233, 0.22));
}
.hero-chip .flow {
  stroke-dasharray: 6 10;
  animation: chip-flow 1.6s linear infinite;
}
.hero-chip .nucleus {
  transform-origin: 60px 60px;
  animation: nucleus-pulse 2.8s ease-in-out infinite;
}
@keyframes chip-flow { to { stroke-dashoffset: -16; } }
@keyframes nucleus-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
}

/* ---------- Mantra ---------- */
.mantra {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(3rem, 2.6rem + 3.5vw, 5.5rem);
  padding-bottom: clamp(3rem, 2.6rem + 3.5vw, 5.5rem);
}
.mantra p {
  flex: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.mantra p i { color: var(--accent); font-style: normal; }
.mantra-line {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line);
}
.mantra-line::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
}
.mantra-line:first-child::before { right: 0; }
.mantra-line:last-child::before { left: 0; }

/* ---------- Seções ---------- */
.section { padding-block: var(--space-section); }
.section-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
  max-width: 780px;
  margin-bottom: clamp(2.6rem, 2rem + 2.8vw, 4.2rem);
}
.section-index {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  line-height: 1;
}
.section-head h2 {
  margin-top: 1rem;
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-head .accent { color: var(--accent); }
.section-lead {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- Problemas ---------- */
.problems { border-top: 1px solid var(--line); }

.problem {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.6rem);
  padding: clamp(1.3rem, 1.1rem + 1vw, 1.9rem) 0;
  border-bottom: 1px solid var(--line);
}
.problem-index {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
}
.problem h3 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.problem p {
  margin-top: 0.35rem;
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- Serviços (linhas editoriais) ---------- */
.services { border-top: 1px solid var(--line); }

.service {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  padding: clamp(1.5rem, 1.2rem + 1.3vw, 2.2rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s;
}
.service:hover { background: rgba(37, 99, 235, 0.05); }

.service-index {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
  transition: color 0.25s;
}
.service:hover .service-index { color: var(--accent); }

.service-body h3 {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.service:hover .service-body h3 { transform: translateX(6px); }

.service-body p {
  margin-top: 0.4rem;
  max-width: 66ch;
  color: var(--muted);
  font-size: 0.96rem;
}

.service-arrow {
  font-size: 1.3rem;
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s;
}
.service:hover .service-arrow { transform: translateX(6px); color: var(--accent); }

/* ---------- Processo (etapas com trilha) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 2.4rem);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 3.1rem;
}
.step::before {
  content: "";
  position: absolute;
  top: 1.55rem;
  left: 0;
  right: -1.2rem;
  height: 1px;
  background: var(--line);
}
.step::after {
  content: "";
  position: absolute;
  top: 1.55rem;
  right: -1.2rem;
  width: 6px;
  height: 6px;
  transform: translate(50%, -50%);
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
}
.step:last-child::after { display: none; }

.step-num {
  position: absolute;
  top: 0.35rem;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.step-note {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.step p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Projetos ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

.project {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.project:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
}

.project-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.project:hover .project-cover img { transform: scale(1.03); }

.cover-badge {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.project-cover:hover .cover-badge {
  background: var(--primary);
  border-color: var(--primary);
}

.project-info { padding: 1.3rem 1.45rem 1.5rem; }
.project-category {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.project-info h3 {
  margin-top: 0.55rem;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.project-info > p:not(.project-category) {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: stretch;
}
.project-featured .project-cover {
  aspect-ratio: auto;
  min-height: 300px;
  border-bottom: none;
  border-right: 1px solid var(--line);
}
.project-featured .project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.6rem, 3vw, 2.6rem);
}
.project-featured .project-info h3 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); }

/* ---------- Sobre ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.about-head {
  position: sticky;
  top: 110px;
  margin-bottom: 0;
}
.about-body > p {
  color: var(--muted);
  font-size: 1.05rem;
}
.about-body > p + p { margin-top: 1rem; }
.about-body > p strong { color: var(--text); }

.about-points {
  margin-top: 2.4rem;
  display: grid;
  gap: 1.7rem;
}
.about-points li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 1.1rem;
  align-items: start;
}
.point-trace {
  position: relative;
  width: 34px;
  height: 2px;
  margin-top: 0.85rem;
  background: var(--accent);
}
.point-trace::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}
.about-points h3 { font-size: 1.06rem; font-weight: 800; }
.about-points p { margin-top: 0.3rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Segmentos ---------- */
.segments {
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.segments h3 { font-size: 1.05rem; font-weight: 800; }
.segments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin-top: 1rem;
}
.segments-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.segments-list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.segments-note {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.faq-head {
  position: sticky;
  top: 110px;
  margin-bottom: 0;
}

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-weight: 700;
  font-size: 1.04rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s;
}
.faq-item summary:hover { color: var(--cyan); }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-item p {
  padding: 0 0 1.35rem;
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.96rem;
}
.faq-item p strong { color: var(--text); }

/* ---------- Contato ---------- */
.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2.4rem, 2rem + 3vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 60% 90% at 90% 10%, rgba(37, 99, 235, 0.16), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.contact-copy h2 {
  margin-top: 1.2rem;
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.contact-copy > p:not(.eyebrow) {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 46ch;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.contact-rows {
  display: grid;
  gap: 1.15rem;
}
.contact-rows li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.96rem;
}
.contact-rows .trace-node { color: var(--accent); width: 20px; }
.contact-rows a { transition: color 0.2s; }
.contact-rows a:hover { color: var(--cyan); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 0.35fr);
  gap: 3rem;
  align-items: start;
  padding-block: 3.5rem;
}
.footer-brand img { height: 180px !important; width: auto !important; max-width: none; }
.footer-brand p {
  margin-top: 0.6rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: right;
}
.footer-nav a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-mantra i { color: var(--accent); font-style: normal; }

/* ---------- WhatsApp flutuante ---------- */
.floating-whatsapp {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.5);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background-color 0.25s;
}
.floating-whatsapp.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.floating-whatsapp:hover { background: var(--primary-strong); }

/* ---------- Lightbox (galeria de telas) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(4, 9, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  animation: lightbox-fade 0.25s ease-out;
}

.lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1080px, 100%);
  max-height: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(2, 6, 23, 0.6);
  animation: lightbox-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes lightbox-fade { from { opacity: 0; } }
@keyframes lightbox-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.lightbox-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.lightbox-title {
  margin-top: 0.25rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.lightbox-close {
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

.lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  background: var(--bg);
}
.lightbox-image {
  max-width: 100%;
  max-height: 62vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 18, 32, 0.85);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.lightbox-nav:hover { background: var(--primary); border-color: var(--primary); }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.lightbox-counter { font-weight: 800; color: var(--text); }
.lightbox-hint { font-size: 0.78rem; }

body.lightbox-open { overflow: hidden; }

/* Moldura de celular para telas mobile no lightbox */
.phone-frame {
  display: inline-grid;
  place-items: center;
  padding: 14px 5px;
  border: 3px solid #182437;
  border-radius: 32px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08), 0 20px 50px rgba(2, 6, 23, 0.4);
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 5px;
  border-radius: 3px;
  background: #1A2333;
  z-index: 2;
}
.phone-frame::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.28);
  z-index: 2;
}
.phone-frame img {
  display: block;
  max-width: 100%;
  max-height: 48vh;
  width: auto;
  height: auto;
  border-radius: 8px;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.hero-copy .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero-copy .reveal:nth-child(2) { transition-delay: 0.15s; }
.hero-copy .reveal:nth-child(3) { transition-delay: 0.25s; }
.hero-copy .reveal:nth-child(4) { transition-delay: 0.35s; }
.hero-copy .reveal:nth-child(5) { transition-delay: 0.45s; }
.hero-visual.reveal { transition-delay: 0.3s; }
.services .service:nth-child(2),
.problems .problem:nth-child(2),
.steps .step:nth-child(2) { transition-delay: 0.08s; }
.services .service:nth-child(3),
.problems .problem:nth-child(3),
.steps .step:nth-child(3) { transition-delay: 0.16s; }
.services .service:nth-child(4),
.problems .problem:nth-child(4),
.steps .step:nth-child(4) { transition-delay: 0.24s; }
.services .service:nth-child(5),
.problems .problem:nth-child(5) { transition-delay: 0.32s; }
.services .service:nth-child(6) { transition-delay: 0.4s; }

/* ---------- Tablet (1024px–760px) ---------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
  }
  .hero-visual { order: -1; }
  .hero-chip { width: clamp(220px, 36vw, 340px); margin-inline: auto; }
  .hero-copy { text-align: center; }
  .hero-copy > * { margin-inline: auto; }
  .hero-sub { max-width: 52ch; }
  .hero-actions { justify-content: center; }
  .hero-offers { max-width: 520px; margin-inline: auto; }

  .about-grid,
  .faq-grid,
  .contact-panel {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
  }
  .about-head, .faq-head { position: static; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::before, .step::after { display: none; }

  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-featured {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }
  .project-featured .project-cover {
    border-right: none;
    border-bottom: 1px solid var(--line);
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .footer-inner { gap: 2rem; }
  .footer-brand img { height: 150px !important; }
}

/* ---------- Mobile (< 760px) ---------- */
@media (max-width: 760px) {
  /* Safe area para iPhones com notch */
  .site-header { padding-top: env(safe-area-inset-top); }
  .floating-whatsapp { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }

  /* Nav mobile */
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem clamp(1.25rem, 4vw, 2.5rem) 1.2rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(2, 6, 23, 0.5);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .site-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .site-nav > a:not(.btn) {
    padding: 0.9rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }
  .nav-cta { margin-top: 0.9rem; }

  /* Hero mobile */
  .hero { padding-top: clamp(2rem, 1.5rem + 3vw, 4rem); }
  .hero-grid { gap: clamp(1rem, 3vw, 2rem); }
  .hero-chip { width: clamp(160px, 50vw, 260px); }
  .hero-title { font-size: clamp(1.8rem, 1.5rem + 3vw, 2.8rem); }
  .hero-sub { font-size: 0.95rem; max-width: 100%; }
  .hero-actions { gap: 0.7rem; margin-top: 1.6rem; }
  .hero-actions .btn { width: 100%; padding: 0.9rem 1.2rem; }
  .hero-offers { grid-template-columns: 1fr; gap: 0.8rem; margin-top: 1.8rem; }
  .hero-offers strong { font-size: 0.9rem; }
  .hero-offers span { font-size: 0.8rem; }

  /* Mantra */
  .mantra { gap: 0.8rem; margin-top: clamp(2rem, 1.5rem + 3vw, 3rem); padding-bottom: clamp(2rem, 1.5rem + 3vw, 3rem); }
  .mantra p { font-size: 0.78rem; letter-spacing: 0.18em; white-space: normal; text-align: center; }
  .mantra-line { min-width: 20px; }

  /* Seções */
  .section { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
  .section-head { gap: clamp(0.8rem, 2vw, 1.5rem); margin-bottom: clamp(2rem, 1.5rem + 2.5vw, 3rem); }
  .section-head h2 { font-size: clamp(1.4rem, 1.2rem + 1.5vw, 1.8rem); }
  .section-lead { font-size: 0.92rem; }

  /* Serviços e Problemas */
  .service { grid-template-columns: 36px minmax(0, 1fr) auto; gap: clamp(0.8rem, 2vw, 1.5rem); padding-block: clamp(1rem, 0.8rem + 1vw, 1.5rem); }
  .service-index { font-size: 0.8rem; }
  .service-body h3 { font-size: 1.05rem; }
  .service-body p { font-size: 0.88rem; }
  .service-arrow { font-size: 1.1rem; }
  .problem { grid-template-columns: 36px minmax(0, 1fr); gap: clamp(0.8rem, 2vw, 1.5rem); padding-block: clamp(1rem, 0.8rem + 1vw, 1.4rem); }
  .problem-index { font-size: 0.8rem; }
  .problem h3 { font-size: 1rem; }
  .problem p { font-size: 0.88rem; }

  /* Passos */
  .steps { grid-template-columns: 1fr; gap: 1.2rem; }
  .step { padding-top: 0; padding-left: 3rem; }
  .step-num { position: relative; top: 0; left: 0; width: 2rem; height: 2rem; font-size: 1rem; }
  .step h3 { font-size: 1rem; }
  .step p { font-size: 0.88rem; }

  /* Projetos */
  .projects { grid-template-columns: 1fr; gap: 1rem; }
  .project-info { padding: 1rem 1.1rem 1.2rem; }
  .project-info h3 { font-size: 1.1rem; }
  .project-info > p:not(.project-category) { font-size: 0.88rem; }

  /* Sobre */
  .about-body > p { font-size: 0.95rem; }
  .about-points { gap: 1.2rem; }
  .about-points li { grid-template-columns: 28px 1fr; gap: 0.8rem; }
  .point-trace { width: 28px; }
  .about-points h3 { font-size: 0.98rem; }
  .about-points p { font-size: 0.88rem; }
  .segments-list { gap: 0.4rem 0.8rem; }
  .segments-list li { font-size: 0.85rem; }

  /* FAQ */
  .faq-item summary { font-size: 0.95rem; padding: 1rem 0; }
  .faq-item p { font-size: 0.88rem; }

  /* Contato */
  .contact-panel { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: 14px; }
  .contact-copy h2 { font-size: clamp(1.3rem, 1.1rem + 1.5vw, 1.6rem); }
  .contact-copy > p:not(.eyebrow) { font-size: 0.92rem; }
  .contact-actions { flex-direction: column; gap: 0.7rem; }
  .contact-actions .btn { width: 100%; padding: 0.85rem 1.2rem; }
  .contact-rows { gap: 0.8rem; margin-top: 0.3rem; }
  .contact-rows li { font-size: 0.88rem; gap: 0.3rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; text-align: left; padding-block: 2.5rem; gap: 1.5rem; }
  .footer-brand img { height: 120px !important; }
  .footer-brand p { font-size: 0.85rem; }
  .footer-nav { flex-direction: row; flex-wrap: wrap; gap: 0.6rem 1.2rem; }
  .footer-nav a { font-size: 0.85rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; padding-block: 1rem; }
  .footer-bottom p { font-size: 0.78rem; }

  /* WhatsApp */
  .floating-whatsapp { right: 1rem; width: 48px; height: 48px; }

  /* Lightbox */
  .lightbox { padding: 0.5rem; }
  .lightbox-panel { border-radius: 14px; }
  .lightbox-header { padding: 0.8rem 1rem; }
  .lightbox-title { font-size: 1.05rem; }
  .lightbox-close { width: 34px; height: 34px; font-size: 1.1rem; }
  .lightbox-stage { min-height: 240px; }
  .lightbox-image { max-height: 58vh; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 1.2rem; }
  .lightbox-nav.prev { left: 0.5rem; }
  .lightbox-nav.next { right: 0.5rem; }
  .lightbox-footer { padding: 0.7rem 1rem; }
  .lightbox-hint { display: none; }

  /* Phone-frame */
  .phone-frame { padding: 10px 4px; border-radius: 26px; border-width: 2px; }
  .phone-frame::before { width: 42px; height: 4px; top: 7px; }
  .phone-frame::after { width: 56px; height: 3px; bottom: 6px; }
  .phone-frame img { max-height: 52vh; border-radius: 6px; }
}

/* ---------- Telas muito pequenas (< 400px) ---------- */
@media (max-width: 400px) {
  .hero-title { font-size: 1.65rem; }
  .hero-chip { width: 140px; }
  .mantra p { font-size: 0.7rem; letter-spacing: 0.12em; }
  .section-head h2 { font-size: 1.3rem; }
  .contact-panel { padding: 1.2rem; }
}

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