/* ══════════════════════════════════════════════
   Lisboa.tech — Design Tokens (from design-system.html)
═══════════════════════════════════════════════ */
:root {
  --midnight:       #1B2A4A;
  --midnight-80:    #3A4F72;
  --midnight-60:    #5D729B;
  --midnight-20:    #E8EBF1;
  --midnight-10:    #F3F5F9;
  --action:         #E85D26;
  --action-dark:    #C44D1B;
  --action-light:   #FBF0EB;
  --action-glow:    rgba(232,93,38,0.35);
  --bg:             #F4F5F7;
  --text-dark:      #2D3748;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.grain::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   INTRO / SPLASH — Logo reveal
═══════════════════════════════════════════════ */
#intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--midnight);
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 38px 38px;
}

#introContent {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#introMark {
  width: clamp(90px, 13vw, 140px);
}
#introMark path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
}

/* ══════════════════════════════════════════════
   NAV — flat, minimal
═══════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--midnight-20);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo svg { width: 20px; height: auto; }
.nav-logo svg path { fill: var(--midnight); }
.nav-logo span {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 16px;
  color: var(--midnight);
}
.nav-logo .dot { color: var(--action); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(27,42,74,0.6);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--midnight); }
.nav-cta { margin-left: auto; }
.nav-links a.nav-links-cta { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--midnight);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-inner { gap: 16px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--midnight-20);
    padding: 8px 24px 20px;
    box-shadow: 0 12px 24px rgba(27,42,74,0.08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--midnight-20); }
  .nav-links a.nav-links-cta {
    display: inline-flex;
    margin-top: 12px;
    border-bottom: none;
    padding: 13px 22px;
    color: #ffffff;
  }
}

/* Buttons — flat, no gradients, no glow */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-primary {
  color: #ffffff;
  background: var(--midnight);
}
.btn-primary:hover { background: #14213b; }
.btn-ghost {
  color: var(--midnight);
  background: transparent;
  border-color: var(--midnight-20);
}
.btn-ghost:hover { border-color: var(--midnight-60); }

/* ══════════════════════════════════════════════
   HERO — flat, editorial, generous whitespace
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px 120px;
}

/* Faint technical grid — the only ambient texture, very low opacity */
.hero-grid-bg {
  position: absolute;
  top: 0; right: 0;
  width: min(56vw, 720px);
  height: 100%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(27,42,74,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,42,74,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to left, black, transparent 85%);
  mask-image: linear-gradient(to left, black, transparent 85%);
}

.hero-inner {
  position: relative;
  max-width: 640px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(27,42,74,0.55);
  margin: 0 0 28px;
  opacity: 0;
  transform: translateY(10px);
}
.hero-eyebrow .eyebrow-mark {
  width: 7px; height: 7px;
  background: var(--action);
  flex-shrink: 0;
}

.hero-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-size: clamp(34px, 4.6vw, 52px);
  color: var(--midnight);
  margin: 0 0 24px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: inline-block; opacity: 0; transform: translateY(100%); }

.hero-sub {
  font-size: 17px;
  font-weight: 400;
  color: rgba(27,42,74,0.6);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 36px;
  opacity: 0;
  transform: translateY(10px);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
}

/* Reveal-on-scroll utility for later sections */
.reveal { opacity: 0; transform: translateY(24px); }

/* ══════════════════════════════════════════════
   SERVICES — editorial list, numbered rows with hairlines
═══════════════════════════════════════════════ */
.services {
  border-top: 1px solid var(--midnight-20);
}
.services-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px;
}
.services-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(28px, 3.4vw, 38px);
  color: var(--midnight);
  margin: 0 0 8px;
}
.services-list {
  border-top: 1px solid var(--midnight-20);
  margin-top: 32px;
}
.service-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--midnight-20);
  transition: background-color .2s ease;
}
.service-row:hover { background: rgba(27,42,74,0.02); }
.service-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--action);
  padding-top: 4px;
}
.service-content h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--midnight);
  margin: 0 0 8px;
}
.service-content p {
  font-size: 15px;
  font-weight: 400;
  color: rgba(27,42,74,0.6);
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
}

@media (max-width: 560px) {
  .service-row { grid-template-columns: 1fr; gap: 8px; padding: 26px 0; }
}

/* ══════════════════════════════════════════════
   ABOUT — editorial statement, no grid or cards
═══════════════════════════════════════════════ */
.about {
  border-top: 1px solid var(--midnight-20);
}
.about-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
}
.about-year {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--action);
  margin: 0 0 24px;
}
.about-statement {
  font-size: clamp(24px, 3.1vw, 34px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(27,42,74,0.48);
  max-width: 780px;
  margin: 0;
}
.about-statement strong {
  font-weight: 800;
  color: var(--midnight);
}

/* ══════════════════════════════════════════════
   CLIENTS — quiet logo strip below the hero
═══════════════════════════════════════════════ */
.clients {
  border-top: 1px solid var(--midnight-20);
}
.clients-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 0;
}
.clients-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(27,42,74,0.5);
  margin: 0;
}

/* Marquee track — each set is forced to exactly one viewport width (100vw) with its
   logos evenly distributed across it, so the strip is always full-bleed and gapless
   at every point of the loop — not just at rest. */
.clients-marquee {
  position: relative;
  overflow: hidden;
  padding: 32px 0 56px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.clients-track {
  display: flex;
  width: max-content;
  animation: clients-marquee 36s linear infinite;
}
.clients-marquee:hover .clients-track { animation-play-state: paused; }
.clients-set {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  flex-shrink: 0;
  width: 100vw;
  gap: 48px;
}
.client-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: var(--midnight-60);
  transition: color .15s ease;
}
.client-logo:hover { color: var(--midnight); }
.client-logo svg { width: 100%; height: 100%; }

@keyframes clients-marquee {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0%); }
}

@media (prefers-reduced-motion: reduce) {
  .clients-track { animation: none; }
}

@media (max-width: 640px) {
  .clients-set { gap: 28px; }
  .client-logo { width: 26px; height: 26px; }
}

/* ══════════════════════════════════════════════
   CASES — bento grid, one featured + two smaller
═══════════════════════════════════════════════ */
.cases {
  border-top: 1px solid var(--midnight-20);
}
.cases-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px;
}
.cases-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(28px, 3.4vw, 38px);
  color: var(--midnight);
  margin: 0 0 40px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  min-height: 440px;
  background: var(--midnight-10);
}

.case-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-card:hover img { transform: scale(1.04); }

.case-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,20,35,0.82) 0%, rgba(15,20,35,0.25) 55%, transparent 80%);
}

.case-card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px;
  color: #ffffff;
}
.case-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 12px;
}
.case-card-body h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.case-card-body p {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  max-width: 380px;
  margin: 0 0 14px;
}
.case-stat {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

@media (max-width: 860px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
  .case-card { min-height: 300px; }
}

/* ══════════════════════════════════════════════
   CASE MODAL
═══════════════════════════════════════════════ */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.case-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,20,35,0.55);
}
.case-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  max-height: 86vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
}
.case-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--midnight);
  cursor: pointer;
  transition: background-color .15s ease;
}
.case-modal-close:hover { background: #ffffff; }
.case-modal-close svg { width: 16px; height: 16px; }

.case-modal-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.case-modal-gallery img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.case-modal-gallery img:first-child {
  grid-column: 1 / -1;
  height: 240px;
}
.case-modal-gallery img:not(:first-child) { height: 160px; }

.case-modal-body { padding: 28px 32px 32px; }
.case-modal-body .case-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--action-dark);
  background: var(--action-light);
  border: 1px solid rgba(232,93,38,0.2);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.case-modal-body h3 {
  font-size: clamp(22px, 3vw, 27px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--midnight);
  margin: 0 0 12px;
}
.case-modal-body p {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(27,42,74,0.62);
  max-width: 60ch;
  margin: 0 0 26px;
}

@media (max-width: 640px) {
  .case-modal { padding: 0; }
  .case-modal-panel { max-width: none; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .case-modal-gallery { grid-template-columns: 1fr; }
  .case-modal-gallery img:first-child { height: 200px; }
  .case-modal-gallery img:not(:first-child) { height: 200px; }
}

/* ══════════════════════════════════════════════
   FOOTER — dark bookend, brand + contact form
═══════════════════════════════════════════════ */
.footer {
  background: var(--midnight);
  color: #ffffff;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.footer-logo svg { width: 20px; height: auto; }
.footer-logo svg path { fill: #ffffff; }
.footer-logo span {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 16px;
  color: #ffffff;
}
.footer-logo .dot { color: var(--action); }

.footer-intro p {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  max-width: 420px;
  margin: 0 0 28px;
}

.footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 11px 18px;
  transition: background-color .15s ease, border-color .15s ease;
}
.footer-whatsapp svg { width: 17px; height: 17px; color: #25D366; flex-shrink: 0; }
.footer-whatsapp:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.24); }

.footer-form h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 8px;
}
.footer-form-note {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin: 0 0 24px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-row label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.form-row input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font-sans);
  color: #ffffff;
  outline: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.form-row input::placeholder { color: rgba(255,255,255,0.32); }
.form-row input:focus {
  border-color: var(--action);
  background: rgba(255,255,255,0.1);
}
.footer-form .btn-primary {
  margin-top: 6px;
  width: 100%;
  background: var(--action);
  color: #ffffff;
}
.footer-form .btn-primary:hover { background: var(--action-dark); }
.footer-form .btn-primary:disabled { opacity: 0.6; cursor: default; }

/* Honeypot anti-spam — fora da tela, mas presente no DOM/tab order pra bots simples. */
.form-row--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-form-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
}
.footer-form-status[data-state="ok"] { color: #6ee7a7; }
.footer-form-status[data-state="erro"] { color: #f2a0a0; }

.footer-bottom {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.5); transition: color .15s ease; }
.footer-links a:hover { color: #ffffff; }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Floating WhatsApp button */
.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  transition: transform .15s ease;
}
.whatsapp-fab:hover { transform: scale(1.06); }
.whatsapp-fab svg { width: 24px; height: 24px; }
