/* ============================================================
   Lumis Labs — Design System
   ============================================================ */

:root {
  /* Colors — brand */
  --bg:            #0A0F1C;
  --bg-elevated:   #0E1629;
  --bg-card:       rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.04);

  --primary:   #2F80ED;
  --primary-2: #1f6fd9;
  --secondary: #56CCF2;
  --text:      #E0E6F0;

  --text-muted: rgba(224, 230, 240, 0.62);
  --text-dim:   rgba(224, 230, 240, 0.38);

  --border:        rgba(224, 230, 240, 0.08);
  --border-hover:  rgba(47, 128, 237, 0.45);

  --glow:      rgba(47, 128, 237, 0.35);
  --glow-soft: rgba(86, 204, 242, 0.25);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Scale */
  --container: 1280px;
  --gutter:    clamp(1.5rem, 4vw, 3rem);
  --radius:    18px;
  --radius-sm: 10px;

  /* Motion */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ------------------------------------------------------------
   Reset
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }

::selection { background: rgba(47, 128, 237, 0.35); color: var(--text); }

/* ------------------------------------------------------------
   Ambient backdrop layers
   ------------------------------------------------------------ */

/* Global subtle grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 128, 237, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 128, 237, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Deep glow from bottom */
body::after {
  content: '';
  position: fixed;
  left: 50%;
  bottom: -40%;
  width: 100vw;
  height: 80vh;
  background: radial-gradient(ellipse at center, rgba(47, 128, 237, 0.12), transparent 60%);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

/* Grain noise */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Mouse spotlight */
.spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 128, 237, 0.14) 0%, rgba(86, 204, 242, 0.06) 40%, transparent 70%);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.spotlight.active { opacity: 1; }

main, .nav, .footer { position: relative; z-index: 10; }

/* ------------------------------------------------------------
   Typography helpers
   ------------------------------------------------------------ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  position: relative;
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section__label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  padding-left: 2.25rem;
  position: relative;
}
.section__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.75rem;
  height: 1px;
  background: var(--secondary);
  opacity: 0.5;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
}
.section__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  isolation: isolate;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow:
    0 8px 32px -10px rgba(47, 128, 237, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  opacity: 0;
  transition: opacity 0.35s;
  z-index: -1;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(86, 204, 242, 0.4),
    0 16px 48px -10px rgba(47, 128, 237, 0.7),
    0 0 60px -10px rgba(86, 204, 242, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn--primary:hover::before { opacity: 1; }

.btn--ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  border-color: var(--border-hover);
  background: rgba(47, 128, 237, 0.08);
  transform: translateY(-2px);
}

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1.25rem 0;
  border-bottom: 1px solid transparent;
  transition: padding 0.35s var(--ease), border-color 0.35s var(--ease);
  isolation: isolate;
}
/* Glass backdrop on pseudo-element so .nav does NOT become a containing block
   for fixed-positioned descendants (would trap the mobile menu). */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.55);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  z-index: -1;
  transition: background 0.35s;
}
.nav.scrolled {
  padding: 0.75rem 0;
  border-bottom-color: var(--border);
}
.nav.scrolled::before { background: rgba(10, 15, 28, 0.8); }

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Logo images — crisp on retina via explicit height; width auto preserves ratio. */
.nav__logo {
  display: block;
  height: 38px;
  width: auto;
  transition: height 0.35s var(--ease), opacity 0.35s;
}
.nav.scrolled .nav__logo { height: 30px; }

.footer__logo {
  display: block;
  height: 44px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.25s;
}
.footer__logo:hover { opacity: 1; }

@media (max-width: 600px) {
  .nav__logo { height: 32px; }
  .nav.scrolled .nav__logo { height: 26px; }
  .footer__logo { height: 36px; }
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}
.nav__brand-light {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.15em;
}

.nav__beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow:
    0 0 10px var(--secondary),
    0 0 24px rgba(86, 204, 242, 0.6),
    0 0 0 1px rgba(86, 204, 242, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.82); }
}

.nav__menu {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav__menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.25s;
  position: relative;
}
.nav__menu a:not(.nav__cta)::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__menu a:hover { color: var(--text); }
.nav__menu a:not(.nav__cta):hover::after { transform: scaleX(1); }

.nav__cta {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  transition: all 0.3s var(--ease);
}
.nav__cta:hover {
  border-color: var(--primary);
  background: rgba(47, 128, 237, 0.1);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px 6px;
  z-index: 60;
}
.nav__toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.35s;
  transform-origin: center;
}
.nav__toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem var(--gutter) 3rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__beacon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 128, 237, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 128, 237, 0.07) 1px, transparent 1px);
  background-size: 90px 90px;
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 42%, #000 15%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 50% at 50% 42%, #000 15%, transparent 75%);
  z-index: -1;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(10, 15, 28, 0.9) 0%, transparent 50%),
    linear-gradient(180deg, transparent 0%, transparent 80%, var(--bg) 100%);
  z-index: -1;
  pointer-events: none;
}

.hero__content {
  max-width: 920px;
  text-align: center;
  position: relative;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.025);
  letter-spacing: 0.02em;
}
.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 8rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-bottom: 1.75rem;
  color: var(--text);
}
.hero__title-accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 36px rgba(47, 128, 237, 0.35));
}

.hero__slogan {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  color: var(--text);
  font-weight: 400;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero__desc {
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.75rem;
  line-height: 1.7;
}

.hero__cta {
  display: inline-flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(224, 230, 240, 0.3), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--secondary));
  animation: scrollDot 2.2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(-100%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(250%); opacity: 0; }
}

/* ------------------------------------------------------------
   Sobre
   ------------------------------------------------------------ */

.sobre__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.005em;
}
.sobre__text p:not(.lead) {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.sobre__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.sobre__metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.03em;
}
.sobre__metrics strong i {
  font-style: normal;
  font-size: 0.65em;
  vertical-align: 0.1em;
}
.sobre__metrics span {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Orb visual */
.sobre__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}
.orb {
  position: relative;
  width: 65%;
  height: 65%;
}
.orb__core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(86, 204, 242, 0.45), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(47, 128, 237, 0.6), transparent 55%),
    #0E1629;
  box-shadow:
    0 0 100px rgba(47, 128, 237, 0.35),
    inset 0 0 60px rgba(86, 204, 242, 0.15),
    inset 0 -30px 60px rgba(0, 0, 0, 0.4);
  animation: orbFloat 7s ease-in-out infinite;
}
.orb__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: orbSpin 20s linear infinite;
}
.orb__ring--1 { inset: -10%; border-color: rgba(47, 128, 237, 0.25); }
.orb__ring--2 { inset: -25%; border-color: rgba(86, 204, 242, 0.12); animation-duration: 30s; animation-direction: reverse; }
.orb__ring--3 {
  inset: -40%;
  border-color: rgba(47, 128, 237, 0.08);
  border-style: dashed;
  animation-duration: 45s;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-18px) scale(1.02); }
}
@keyframes orbSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ------------------------------------------------------------
   Serviços
   ------------------------------------------------------------ */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.service--feature {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.06), rgba(86, 204, 242, 0.02));
}

.service::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 50%),
    rgba(86, 204, 242, 0.12),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(47, 128, 237, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(47, 128, 237, 0.25);
}
.service:hover::before { opacity: 1; }
.service:hover::after { opacity: 1; }

.service__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.18) 0%, rgba(86, 204, 242, 0.06) 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  color: var(--secondary);
  position: relative;
  transition: all 0.4s var(--ease);
}
.service__icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.4s;
}
.service__icon svg {
  width: 24px;
  height: 24px;
}
.service:hover .service__icon { border-color: var(--border-hover); }
.service:hover .service__icon::after { opacity: 0.5; }

.service h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
  color: var(--text);
}
.service--feature h3 { font-size: 1.5rem; }

.service p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.service__meta {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.service__meta li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   Portfolio
   ------------------------------------------------------------ */

.project {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.project__preview {
  position: relative;
  perspective: 1400px;
}
.project__glow {
  position: absolute;
  inset: 5%;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 65%);
  filter: blur(40px);
  opacity: 0.8;
  pointer-events: none;
  z-index: -1;
}

.project__window {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 60px -20px var(--glow);
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg) translateZ(0);
  transform-origin: center center;
  transition: transform 0.8s var(--ease);
}
.project:hover .project__window {
  transform: perspective(1400px) rotateY(0) rotateX(0) translateZ(0);
}

.project__chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.project__chrome > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(224, 230, 240, 0.12);
}
.project__chrome > span:nth-child(1) { background: rgba(255, 95, 86, 0.5); }
.project__chrome > span:nth-child(2) { background: rgba(255, 189, 46, 0.5); }
.project__chrome > span:nth-child(3) { background: rgba(39, 201, 63, 0.5); }

.project__url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-body);
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  max-width: 260px;
  margin: 0 auto;
}

.project__screen {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 20%, rgba(47, 128, 237, 0.18), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(86, 204, 242, 0.1), transparent 55%),
    linear-gradient(180deg, #0E1629 0%, #0A0F1C 100%);
  position: relative;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project__screen-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(224, 230, 240, 0.06);
}
.project__logo {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--secondary);
}
.project__screen-menu {
  display: flex;
  gap: 0.8rem;
}
.project__screen-menu span {
  width: 20px;
  height: 4px;
  background: rgba(224, 230, 240, 0.15);
  border-radius: 2px;
}
.project__screen-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  padding: 0 1rem;
}
.project__screen-title {
  height: 14px;
  width: 70%;
  background: linear-gradient(90deg, rgba(224, 230, 240, 0.25), rgba(224, 230, 240, 0.1));
  border-radius: 3px;
}
.project__screen-sub {
  height: 6px;
  width: 50%;
  background: rgba(224, 230, 240, 0.12);
  border-radius: 3px;
}
.project__screen-btn {
  height: 24px;
  width: 100px;
  margin-top: 0.4rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 999px;
  box-shadow: 0 4px 16px -4px var(--glow);
}
.project__screen-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.project__screen-cards > div {
  height: 34px;
  background: rgba(224, 230, 240, 0.05);
  border: 1px solid rgba(224, 230, 240, 0.06);
  border-radius: 6px;
}

/* Real screenshot inside the browser mockup — replaces stylized content */
.project__screen--image {
  padding: 0;
  background: #000;
  overflow: hidden;
}
.project__screen--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.project__info .project__tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.25rem;
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(86, 204, 242, 0.25);
  border-radius: 999px;
  background: rgba(86, 204, 242, 0.04);
}
.project__info h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  line-height: 1;
}
.project__info p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1.02rem;
  line-height: 1.7;
}
.project__tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.project__tech span {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   Portfolio carousel
   ------------------------------------------------------------ */

.carousel {
  position: relative;
  isolation: isolate;
}

.carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                  /* Firefox */
}
.carousel__viewport::-webkit-scrollbar { display: none; }

.carousel__track {
  display: flex;
}

.carousel__slide {
  flex: 0 0 auto;
  width: var(--slide-width, 100%);
  min-width: 0;
}

/* Gentle fade-out of non-active slides to focus attention */
.carousel__slide:not([data-active]) {
  opacity: 0.25;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.carousel__slide[data-active] {
  opacity: 1;
  pointer-events: auto;
}

/* Navigation arrows */
.carousel__nav {
  position: absolute;
  top: 35%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(14, 22, 41, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3;
  transition: all 0.35s var(--ease);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.carousel__nav:hover:not(:disabled) {
  border-color: var(--border-hover);
  background: rgba(47, 128, 237, 0.18);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 40px -10px rgba(47, 128, 237, 0.4), 0 0 40px -10px var(--glow);
}
.carousel__nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.carousel__nav--prev { left: -22px; }
.carousel__nav--next { right: -22px; }

/* Controls row (counter + dots) */
.carousel__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 0 clamp(0.5rem, 2vw, 2rem);
}

.carousel__counter {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  min-width: 60px;
  font-variant-numeric: tabular-nums;
}
.carousel__counter [data-carousel-current] {
  color: var(--secondary);
  font-weight: 500;
}

.carousel__dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(224, 230, 240, 0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.carousel__dot:hover { background: rgba(224, 230, 240, 0.35); }
.carousel__dot.is-active {
  background: var(--secondary);
  width: 32px;
  border-radius: 999px;
  box-shadow: 0 0 10px var(--secondary), 0 0 18px rgba(86, 204, 242, 0.4);
}

/* Featured badge (replaces the old "featured card" distinction) */
.project__info-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.project__info-top .project__tag { margin-bottom: 0; }

.project__featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0A0F1C;
  background: linear-gradient(135deg, var(--secondary) 0%, #89dbff 100%);
  box-shadow: 0 0 20px rgba(86, 204, 242, 0.4);
}
.project__featured-badge svg { color: currentColor; }

@media (max-width: 968px) {
  .carousel__nav--prev { left: 0.5rem; }
  .carousel__nav--next { right: 0.5rem; }
  .carousel__nav { width: 44px; height: 44px; top: 22%; }
}
@media (max-width: 600px) {
  .carousel__controls { flex-direction: column-reverse; gap: 1rem; }
  .carousel__counter { text-align: center; }
}

/* ------------------------------------------------------------
   Diferenciais
   ------------------------------------------------------------ */

.differentiators {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}
.diff {
  padding: 2.25rem 0 0;
  border-top: 1px solid var(--border);
  position: relative;
  transition: border-color 0.4s;
}
.diff::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 1px;
  background: var(--secondary);
  transition: width 0.5s var(--ease);
}
.diff:hover { border-top-color: rgba(47, 128, 237, 0.25); }
.diff:hover::before { width: 100%; }

.diff__num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--secondary);
  letter-spacing: 0.25em;
  margin-bottom: 1.25rem;
  display: block;
  font-weight: 500;
}
.diff h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
  letter-spacing: -0.015em;
  color: var(--text);
}
.diff p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ------------------------------------------------------------
   Contato
   ------------------------------------------------------------ */

.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-weight: 500;
}
.field input,
.field textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  resize: vertical;
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(47, 128, 237, 0.04);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

/* ----------------------------------------------------------------
   Field-level errors (inline abaixo do campo)
   ---------------------------------------------------------------- */
.field__error {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #fca5a5;
  line-height: 1.4;
}
/* Sobrepõe o display:flex quando o atributo `hidden` está setado —
   caso contrário o ícone ::before fica visível mesmo sem mensagem. */
.field__error[hidden],
[data-error-global][hidden] {
  display: none !important;
}
.field__error::before {
  content: '!';
  display: inline-flex;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  align-items: center;
  justify-content: center;
}

.field--has-error input,
.field--has-error textarea {
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: rgba(239, 68, 68, 0.03) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08) !important;
}

/* Global (erros de rede, rate limit, servidor) */
.form__error-global {
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ----------------------------------------------------------------
   hCaptcha — ajustes para combinar com o design premium
   ---------------------------------------------------------------- */
.field--captcha { margin-top: 0.25rem; }
.field--captcha .h-captcha {
  min-height: 78px;
  display: flex;
  align-items: center;
}
.field--captcha .h-captcha iframe {
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------------
   Modal — sucesso pós-envio (<dialog> nativo)
   ---------------------------------------------------------------- */
.modal {
  /* Centralização explícita: `margin:auto + inset:0` centra vertical e horizontalmente
     no viewport independente do tamanho do conteúdo; sobrepõe defaults do browser
     que às vezes alinham no topo em algumas versões. */
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: 480px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 120px -20px var(--glow);
  overflow: visible;
}
.modal:not([open]) { display: none; }

.modal::backdrop {
  background: rgba(4, 8, 16, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modalBackdropIn 0.3s var(--ease);
}

.modal[open] {
  animation: modalIn 0.45s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal__card {
  padding: 2.5rem 2.25rem 2rem;
  text-align: center;
  position: relative;
  isolation: isolate;
}
.modal__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center top, rgba(47, 128, 237, 0.14), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.modal__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.18), rgba(86, 204, 242, 0.08));
  border: 1px solid rgba(86, 204, 242, 0.3);
  color: var(--secondary);
  box-shadow: 0 0 0 8px rgba(86, 204, 242, 0.06), 0 0 30px rgba(47, 128, 237, 0.25);
  animation: iconPop 0.6s var(--ease) 0.15s both;
}
.modal__icon svg { width: 30px; height: 30px; }

@keyframes iconPop {
  from { opacity: 0; transform: scale(0.5); }
  60%  { transform: scale(1.1); }
  to   { opacity: 1; transform: scale(1); }
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.modal__body {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.modal__body strong {
  color: var(--text);
  font-weight: 500;
}

.modal__actions {
  display: flex;
  justify-content: center;
  margin: 0;
}
.modal__actions .btn { min-width: 140px; }

/* Fallback para browsers sem <dialog> nativo */
.modal--fallback {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
}

.contact__form button { align-self: flex-start; margin-top: 0.5rem; }

.contact__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.contact__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 50%, rgba(47, 128, 237, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.contact__link:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px -20px rgba(47, 128, 237, 0.4);
}
.contact__link:hover::before { opacity: 1; }
.contact__link:hover .contact__link-arrow { transform: translate(3px, -3px); }

.contact__link-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.18), rgba(86, 204, 242, 0.06));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.contact__link-icon svg { width: 20px; height: 20px; }

.contact__link > div:not(.contact__link-icon) {
  flex: 1;
  position: relative;
  z-index: 1;
}
.contact__link span {
  display: block;
  font-size: 0.7rem;
  color: var(--secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-weight: 500;
}
.contact__link strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--font-display);
  letter-spacing: -0.005em;
}
.contact__link-arrow {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
  z-index: 1;
}

.contact__note {
  margin-top: 0.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(86, 204, 242, 0.02);
}
.contact__note p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.contact__note strong {
  color: var(--secondary);
  font-weight: 500;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  background: rgba(0, 0, 0, 0.2);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.6rem;
  margin-left: 1.3rem;
}
.footer__meta small {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* ------------------------------------------------------------
   Reveal animations
   ------------------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1s var(--ease) var(--d, 0s),
    transform 1s var(--ease) var(--d, 0s);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 968px) {
  .nav__menu {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 15, 28, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.25rem;
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease);
    z-index: 55;
  }
  .nav__menu.open { transform: translateY(0); }
  .nav__menu a {
    font-size: 1.6rem;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--text);
  }
  .nav__toggle { display: flex; }

  .sobre__grid,
  .project,
  .contact {
    grid-template-columns: 1fr;
  }
  .sobre__visual { max-width: 320px; order: -1; }

  .services { grid-template-columns: repeat(2, 1fr); }
  .service--feature { grid-column: span 2; }

  .differentiators { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

  .project__window {
    transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
  }
  .project__info h3 { font-size: 2rem; }
}

@media (max-width: 600px) {
  .services { grid-template-columns: 1fr; }
  .service--feature { grid-column: span 1; }
  .differentiators { grid-template-columns: 1fr; }
  .sobre__metrics { grid-template-columns: 1fr 1fr; gap: 1.25rem; }

  .hero__cta { width: 100%; flex-direction: column; }
  .hero__cta .btn { width: 100%; }

  .contact__form { padding: 1.75rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 400px) {
  .sobre__metrics { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

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