/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: #0A0A0A; }
body {
  font-family: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #0A0A0A;
  color: #ffffff;
  overflow-x: hidden;
}
a { color: #FEFFD4; text-decoration: none; }
::selection { background: #FEFFD4; color: #0A0A0A; }
img { max-width: 100%; }
button { font-family: inherit; }

@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

/* reveal-on-scroll units */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Slightly more expressive entrance for standout titles */
.title-pop.reveal {
  opacity: 0;
  transform: translateY(46px) scale(0.94);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.title-pop.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* backdrop-filter re-samples everything behind it every scroll frame;
     a smaller radius plus an isolated compositor layer keeps it from
     competing with the pinned scroll sections below for frame budget. */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10,10,10,0.62);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transform: translateZ(0);
  will-change: background-color;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
header.is-scrolled {
  background: rgba(10,10,10,0.86);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  transition: padding 0.35s cubic-bezier(0.16,1,0.3,1);
}
header.is-scrolled .header-inner { padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; }
.logo-img { display: block; height: 26px; width: auto; }
.main-nav { display: flex; gap: clamp(16px, 2.2vw, 34px); margin-left: auto; }
.main-nav a { font-size: 16px; font-weight: 300; color: rgba(255,255,255,0.72); transition: color 0.25s ease; }
.main-nav a:hover { color: #ffffff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  border-radius: 999px;
  font-weight: 400;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}
.btn-light { padding: 12px 22px; background: #ffffff; color: #0A0A0A; font-size: 15px; gap: 10px; }
.btn-light:hover { background: #FEFFD4; }
.btn-accent { background: #FEFFD4; color: #0A0A0A; box-shadow: 0 0 48px rgba(254,255,212,0.22); }
.btn-accent:hover { background: #ffffff; }
.btn-lg { padding: 21px 34px; font-size: 19px; }
.btn-xl { padding: 22px 38px; font-size: 19px; box-shadow: 0 0 56px rgba(254,255,212,0.26); }
.btn .arrow { font-size: 20px; }
.btn-nav { display: none; }
@media (min-width: 720px) { .btn-nav { display: inline-flex; } }

/* ---------- Sections generic ---------- */
.section { padding: clamp(88px, 10vw, 150px) 0; }
.section-border { border-top: 1px solid rgba(255,255,255,0.08); }
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.eyebrow-center { justify-content: center; }
.eyebrow-line { width: 28px; height: 1px; background: #FEFFD4; }
.eyebrow-line-dark { background: #0A0A0A; }
.eyebrow-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: #FEFFD4;
}
.eyebrow-label-dark { color: #0A0A0A; }

.h2 {
  margin: 0; font-size: clamp(30px, 3.6vw, 52px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.028em; text-wrap: pretty;
}
.h3 { margin: 0; font-size: clamp(24px, 2.2vw, 34px); font-weight: 700; letter-spacing: -0.025em; }
.p { margin: 0; font-size: clamp(16px, 1.15vw, 19px); font-weight: 300; line-height: 1.58; color: rgba(255,255,255,0.64); text-wrap: pretty; }
.lead { margin: 0; font-size: clamp(16px, 1.15vw, 19px); font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.66); text-wrap: pretty; }
.mb-lg { margin-bottom: clamp(32px, 3.6vw, 52px); }
.mb-xl { margin-bottom: clamp(44px, 5vw, 72px); }
.mt-lg { margin-top: clamp(28px, 3vw, 44px); }
.mt-xl { margin-top: clamp(44px, 5vw, 72px); }

.section-head-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(24px, 3vw, 64px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.center-cta { margin-top: clamp(48px, 5vw, 80px); display: flex; justify-content: center; }

.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
}
.avatar-photo { object-fit: cover; object-position: top center; display: block; flex: 0 0 auto; background: #1b1b1b; }
.avatar-light {
  width: 58px; height: 58px;
  background: repeating-linear-gradient(135deg,#e8e6e0 0 5px,#dedbd4 5px 10px);
  border: 1px solid rgba(10,10,10,0.1);
}
.member-name { font-size: 19px; font-weight: 700; line-height: 1.25; }
.member-role { font-size: 17px; font-weight: 300; color: rgba(255,255,255,0.6); line-height: 1.25; }
.member-name-dark { color: #0A0A0A; font-size: 21px; }
.member-role-dark { color: rgba(10,10,10,0.6); }

.nav-circle {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: rgba(255,255,255,0.7); background: transparent; cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.nav-circle:hover { border-color: #FEFFD4; color: #FEFFD4; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: flex-end;
  padding: clamp(80px, 12vh, 180px) 0 clamp(48px, 6vw, 88px);
  overflow: hidden;
}
.hero-prism { position: absolute; inset: 0; z-index: 0; }
.hero-dim {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(10,10,10,0.45);
  pointer-events: none;
}
.hero-fade-top {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 80% at 50% 8%, rgba(10,10,10,0) 40%, rgba(10,10,10,0.55) 78%, #0A0A0A 100%);
  pointer-events: none;
}
.hero-fade-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.86) 58%, #0A0A0A 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-title {
  margin: 0; max-width: 17ch; font-size: clamp(38px, 5.2vw, 80px);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; text-wrap: pretty;
}
.hero-desc {
  margin: 32px 0 0; max-width: 62ch; font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.68); text-wrap: pretty;
}
.hero-bottom {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(24px, 4vw, 64px); margin-top: clamp(36px, 4vw, 56px);
}
.hero-team { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-team-member { display: flex; align-items: center; gap: 14px; }

/* ---------- Services rail + pinned cards ---------- */
.sol-pin { display: grid; grid-template-columns: minmax(0,270px) minmax(0,1fr); gap: clamp(28px,5vw,90px); align-items: start; }
.sol-rail-wrap { position: sticky; top: 132px; }
.sol-rail { position: relative; padding: 6px 0; }
.rail-track { position: absolute; left: 12px; top: 28px; bottom: 28px; width: 1px; background: rgba(255,255,255,0.14); }
.rail-fill { position: absolute; left: 12px; top: 28px; width: 1px; height: 0; background: #FEFFD4; box-shadow: 0 0 12px rgba(254,255,212,0.6); transition: height 0.6s cubic-bezier(0.16,1,0.3,1); }
.rail-item { position: relative; display: flex; align-items: center; gap: 18px; padding: 12px 0 34px; }
.rail-item-last { padding-bottom: 0; }
.rail-dot {
  flex: 0 0 auto; width: 25px; height: 25px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22); background: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.5);
  transition: border-color 0.4s ease, color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}
.rail-label { font-size: 17px; font-weight: 300; color: rgba(255,255,255,0.42); transition: color 0.4s ease; }

.sol-stage { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 34px); }
.sol-card {
  padding: clamp(32px, 3vw, 56px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0));
  display: flex; flex-direction: column; gap: 20px;
  min-height: clamp(260px, 26vw, 340px);
  justify-content: flex-end;
  /* `.reveal`'s own opacity/transform transition must be repeated here:
     this rule is declared after `.reveal` in the cascade, so its
     `transition` shorthand fully replaces (not merges with) the one from
     `.reveal` on the same element — without these two, the card's
     entrance animation silently doesn't play at all, it just snaps. */
  transition: border-color 0.35s ease, background-color 0.35s ease,
    opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
  will-change: transform, opacity;
}
.sol-card:hover { border-color: rgba(254,255,212,0.45); }
.sol-index { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.12em; color: #FEFFD4; margin-bottom: auto; }

/* ---------- Flip grid ---------- */
.flip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.flip-cell { position: relative; height: clamp(200px, 23vw, 264px); perspective: 1400px; }
.flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(180deg); will-change: transform; }
.flip-back, .flip-front {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px;
}
.flip-back {
  transform: rotateX(180deg);
  border: 1px solid rgba(255,255,255,0.1);
  background: #0E0E0E;
  display: flex; align-items: center; justify-content: center;
}
.flip-logo { height: clamp(20px, 1.8vw, 24px); opacity: 0.45; }
.flip-front {
  border: 1px solid rgba(255,255,255,0.12);
  background: #0A0A0A;
  padding: clamp(22px, 2vw, 30px);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 11px; overflow: hidden;
  transition: border-color 0.3s ease;
}
.flip-front:hover { border-color: rgba(254,255,212,0.4); }
.flip-title { margin: 0; flex: 0 0 auto; font-size: clamp(19px, 1.5vw, 21px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.flip-text {
  margin: 0; min-height: 0; font-size: clamp(14px, 1.05vw, 15.5px); font-weight: 300; line-height: 1.5;
  color: rgba(255,255,255,0.6); text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
}

/* ---------- Steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px; border-top: 1px solid rgba(255,255,255,0.14); }
.step { padding-top: 30px; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #FEFFD4;
  margin-bottom: 22px;
}
.step-num-active { border-color: rgba(254,255,212,0.5); background: rgba(254,255,212,0.08); }
.h3-sm { margin: 0 0 12px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.p-sm { margin: 0; font-size: 16px; font-weight: 300; line-height: 1.55; color: rgba(255,255,255,0.6); text-wrap: pretty; }

/* ---------- Metrics ---------- */
.metrics-section { padding: clamp(56px,6vw,88px) 0; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: clamp(28px, 4vw, 64px); }
.metric-num { font-size: clamp(44px, 4.6vw, 68px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: #FEFFD4; }
.metric-label { margin-top: 12px; font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.6); }

/* ---------- Testimonials ---------- */
.testimonials { background: #F6F5F1; color: #0A0A0A; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.testimonial-card {
  margin: 0; background: #ffffff; border: 1px solid rgba(10,10,10,0.1); border-radius: 18px;
  padding: clamp(28px, 2.6vw, 44px); display: flex; flex-direction: column; gap: 28px;
}
.stars { display: flex; gap: 4px; color: #DFBA00; font-size: 19px; letter-spacing: 2px; }
.quote { margin: 0; font-size: clamp(17px, 1.3vw, 21px); font-weight: 300; line-height: 1.55; color: #0A0A0A; text-wrap: pretty; }
.testimonial-author { display: flex; align-items: center; gap: 16px; margin-top: auto; }
.testimonial-brand {
  background: #0A0A0A; border-radius: 18px; padding: clamp(28px, 2.6vw, 44px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 24px; min-height: 260px;
}
.testimonial-brand-logo { height: 32px; }
.testimonial-brand-text { margin: 0; max-width: 22ch; font-size: 20px; font-weight: 200; line-height: 1.45; color: #ffffff; text-wrap: pretty; }

/* ---------- Portfolio / drift wall ---------- */
.drift-wall-wrap {
  position: relative;
  height: clamp(440px, 62vh, 640px);
  margin: 0 calc(-1 * clamp(20px, 5vw, 80px));
}
drift-wall { position: absolute; inset: 0; }

/* ---------- Team / About ---------- */
.team-head {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between;
  margin-bottom: clamp(40px, 4.5vw, 68px);
}
.team-nav { display: flex; align-items: center; gap: 14px; }
.team-nav .nav-circle { width: 48px; height: 48px; font-size: 19px; font-family: Archivo, sans-serif; color: #ffffff; }

.team-stage { display: grid; align-items: start; }
.team-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 4.5vw, 72px);
  align-items: start;
  opacity: 0;
  transform: translateY(26px) scale(0.99);
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.team-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }

.team-photo {
  position: relative; aspect-ratio: 4/5; max-width: 430px; border-radius: 18px;
  overflow: hidden; border: 1px solid rgba(255,255,255,0.12); background: #111111;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.team-photo-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,10,0) 55%, rgba(10,10,10,0.5) 100%);
}
.team-info { display: flex; flex-direction: column; gap: 22px; padding-top: clamp(0px, 2vw, 28px); }
.team-name { font-size: clamp(26px, 2.4vw, 38px); font-weight: 300; color: #FEFFD4; line-height: 1.2; }
.team-role {
  margin-top: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.5);
}
.p-team { margin: 0; font-size: clamp(16px, 1.15vw, 19px); font-weight: 300; line-height: 1.62; color: rgba(255,255,255,0.72); text-wrap: pretty; }
.team-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 22px;
  margin-top: 6px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.12);
}
.team-stat-num { font-size: clamp(28px, 2.4vw, 38px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; color: #ffffff; }
.team-stat-label { margin-top: 9px; font-size: 15px; font-weight: 300; color: rgba(255,255,255,0.55); }

.team-progress-bar { display: flex; align-items: center; gap: 18px; margin-top: clamp(36px, 4vw, 56px); }
.team-progress-btn {
  flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  text-align: left; display: flex; flex-direction: column; gap: 12px;
}
.team-progress-caption {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); transition: color 0.4s ease;
}
.team-progress-btn.is-active .team-progress-caption { color: #FEFFD4; }
.team-progress-track { position: relative; display: block; height: 2px; background: rgba(255,255,255,0.14); overflow: hidden; }
.team-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: #FEFFD4; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 920px; border-top: 1px solid rgba(255,255,255,0.14); }
.faq-item { padding: 28px 0; border-bottom: 1px solid rgba(255,255,255,0.14); cursor: pointer; display: flex; gap: 24px; align-items: flex-start; }
.faq-question { flex: 1; }
.faq-h { margin: 0; font-size: clamp(18px, 1.5vw, 23px); font-weight: 400; line-height: 1.35; text-wrap: pretty; }
.faq-answer {
  margin: 18px 0 0; max-width: 74ch; font-size: clamp(15px, 1.05vw, 17px); font-weight: 300;
  line-height: 1.62; color: rgba(255,255,255,0.62); text-wrap: pretty;
  display: none;
  animation: faqIn 0.34s cubic-bezier(0.16,1,0.3,1) both;
}
.faq-item.is-open .faq-answer { display: block; }
.faq-icon { font-size: 26px; font-weight: 200; color: #FEFFD4; line-height: 1.2; transition: transform 0.3s ease; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }

/* ---------- CTA ---------- */
.cta-section { position: relative; padding: clamp(96px, 11vw, 170px) 0; border-top: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.cta-glow {
  position: absolute; left: 50%; top: 0; width: min(1100px, 120%); height: 100%; transform: translateX(-50%);
  background: radial-gradient(60% 70% at 50% 100%, rgba(254,255,212,0.12), rgba(254,255,212,0) 70%);
  pointer-events: none;
  animation: ctaGlowPulse 6s ease-in-out infinite;
}
@keyframes ctaGlowPulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
.cta-content { position: relative; text-align: center; }
.h2-cta { margin: 0 auto; max-width: 24ch; font-size: clamp(32px, 4.4vw, 66px); font-weight: 700; line-height: 1.03; letter-spacing: -0.032em; text-wrap: pretty; }
.lead-cta { margin: 28px auto 0; max-width: 48ch; font-size: clamp(16px, 1.2vw, 20px); font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.68); text-wrap: pretty; }
.cta-btn-wrap { margin-top: clamp(36px, 4vw, 56px); display: flex; justify-content: center; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 48px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-copy { font-size: 16px; font-weight: 300; color: rgba(255,255,255,0.5); }
.footer-social { display: flex; gap: 12px; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 860px) {
  .sol-pin { grid-template-columns: 1fr; }
  .sol-rail-wrap { position: static; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 96px; }
  .hero-title { max-width: 22ch; }
  .hero-desc { margin-top: 20px; }
  .hero-bottom { margin-top: 24px; }
  /* The two team members repeat in full (photo, name, role, bio) in the
     "Quem assina o seu projeto" section below — on a narrow screen they
     just wrap onto three extra rows and roughly double the hero's height
     for information already shown better further down. */
  .hero-team { display: none; }
}
