/* =====================================================================
   MAESTRO — Design System
   Conduzimos. Você cresce.
===================================================================== */

:root {
  --navy: #071525;
  --navy-2: #0B1E33;
  --navy-3: #102A43;
  --gold: #C9A961;
  --gold-light: #D8C58A;
  --gold-dark: #9F8445;
  --white: #FFFFFF;
  --off-white: #F5F3EE;
  --text: #17202A;
  --muted: #8792A2;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--off-white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.serif { font-family: var(--serif); }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--gold);
  padding: 12px 20px;
  z-index: 999;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   Botões
--------------------------------------------------------------------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 16px 32px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: var(--navy);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-block { width: 100%; }

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background-color 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(7, 21, 37, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 8px 30px rgba(7, 21, 37, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  font-size: 1.4rem;
  color: var(--white);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  transition: color 0.3s var(--ease);
  position: relative;
}
.main-nav a:not(.nav-cta):after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}
.main-nav a:not(.nav-cta):hover { color: var(--white); }
.main-nav a:not(.nav-cta):hover:after { width: 100%; }

.nav-cta {
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--gold-light) !important;
}
.nav-cta:hover { background: var(--gold); color: var(--navy) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--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); }

/* ---------------------------------------------------------------------
   Hero
--------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 50% 0%, var(--navy-3) 0%, var(--navy) 55%, var(--navy) 100%);
  overflow: hidden;
  padding: 140px 0 100px;
}

.hero__field {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 169, 97, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 72%);
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 100px;
  padding: 8px 20px;
  margin-bottom: 40px;
}

.hero-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 28px;
}
.hero-logo .word {
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.hero-baton {
  position: absolute;
  width: 62%;
  top: 8%;
  left: 20%;
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(201, 169, 97, 0.35));
  animation: baton-conduct 4.5s var(--ease) infinite;
  transform-origin: 6% 92%;
}
.hero-baton__tip { animation: baton-tip-glow 4.5s var(--ease) infinite; }

@keyframes baton-conduct {
  0%   { transform: translateY(6px) rotate(-2.5deg); }
  35%  { transform: translateY(-6px) rotate(2deg); }
  55%  { transform: translateY(-2px) rotate(0.5deg); }
  100% { transform: translateY(6px) rotate(-2.5deg); }
}
@keyframes baton-tip-glow {
  0%, 100% { opacity: 0.85; }
  45% { opacity: 1; }
}

.hero-tag {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-style: italic;
  color: var(--gold-light);
  margin: 0 0 18px;
}

.hero-lead {
  max-width: 560px;
  color: rgba(245, 243, 238, 0.78);
  font-size: 1.05rem;
  margin: 0 0 44px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  z-index: 2;
}
.hero-scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  border-radius: 100px;
  background: var(--gold);
  animation: cue-move 1.8s ease-in-out infinite;
}
@keyframes cue-move {
  0% { top: 6px; opacity: 1; }
  70% { top: 18px; opacity: 0; }
  100% { top: 18px; opacity: 0; }
}

/* ---------------------------------------------------------------------
   Faixa de imagem (full-bleed) — divisor de seção com efeito parallax
   Implementado com background-image: mais robusto que <img> com
   width:100vw + position:absolute, que pode "vazar" o layout dependendo
   do contexto em que a seção é inserida.
--------------------------------------------------------------------- */
.image-band {
  position: relative;
  display: block;
  width: 100%;
  height: 200px;
  max-height: 200px;
  overflow: hidden;
  border-top: 1px solid rgba(201, 169, 97, 0.35);
  border-bottom: 1px solid rgba(201, 169, 97, 0.35);
  background-image: url('https://maestro.brs.onl/assets/img/maestro-1.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center calc(50% + var(--parallax-y, 0px));
  will-change: background-position;
}

/* Leve escurecimento nas bordas para a imagem se integrar como um
   divisor entre seções, e não como uma foto "solta" na página. */
.image-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7, 21, 37, 0.35) 0%, rgba(7, 21, 37, 0) 30%,
      rgba(7, 21, 37, 0) 70%, rgba(7, 21, 37, 0.35) 100%);
}

@media (max-width: 768px) {
  .image-band { height: 100px; max-height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .image-band { background-position: center center !important; }
}

/* ---------------------------------------------------------------------
   Sections comuns
--------------------------------------------------------------------- */
.section { padding: 108px 0; }

.section-eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 16px;
  font-weight: 700;
}
.section-head--light .section-eyebrow { color: var(--gold-light); }

.section-head {
  max-width: 640px;
  margin: 0 0 56px;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 14px; font-weight: 500; }
.section-sub { color: var(--muted); font-size: 1.02rem; margin: 0; }

/* Posicionamento */
.positioning__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.positioning__lead h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 500; margin: 0; }
.positioning__body p { color: var(--muted); font-size: 1.05rem; }
.positioning__body p:first-child { color: var(--text); }

/* Soluções */
.solutions__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #E4E0D3;
  border: 1px solid #E4E0D3;
}
.solution-card {
  background: var(--white);
  padding: 40px 28px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  position: relative;
}
.solution-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(11, 30, 51, 0.1);
  z-index: 2;
}
.solution-card__index {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 20px;
}
.solution-card h3 { font-size: 1.35rem; margin: 0 0 12px; font-weight: 500; }
.solution-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Método (fundo navy) */
.method {
  background: var(--navy-2);
  color: var(--off-white);
}
.method .section-head h2 { color: var(--white); }
.method__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(201, 169, 97, 0.15);
}
.method__item {
  background: var(--navy-2);
  padding: 36px 26px;
  border-top: 1px solid rgba(201, 169, 97, 0.15);
}
.method__num {
  color: var(--gold);
  font-size: 1.5rem;
  display: block;
  margin-bottom: 14px;
}
.method__item h3 { font-size: 1.08rem; margin: 0 0 8px; font-weight: 600; color: var(--white); }
.method__item p { color: rgba(245, 243, 238, 0.62); font-size: 0.9rem; margin: 0; }

/* Estágios */
.stages__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.stage-card { position: relative; padding-top: 26px; }
.stage-card__line {
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-bottom: 22px;
}
.stage-card h3 { font-size: 1.2rem; margin: 0 0 8px; font-weight: 500; }
.stage-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Final CTA */
.final-cta {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.final-cta__inner { max-width: 620px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 500; margin: 0 0 18px; }
.final-cta p { color: rgba(245, 243, 238, 0.7); margin: 0 0 36px; font-size: 1.05rem; }

/* ---------------------------------------------------------------------
   Diagnóstico (formulário premium)
--------------------------------------------------------------------- */
.diagnostic {
  background: var(--navy);
  padding-top: 0;
  padding-bottom: 130px;
}
.diagnostic__panel {
  background: linear-gradient(165deg, var(--navy-3), var(--navy-2));
  border: 1px solid rgba(201, 169, 97, 0.22);
  border-radius: 18px;
  padding: 64px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
}
.diagnostic__head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.diagnostic__head h2 { color: var(--white); font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 500; margin: 0 0 14px; }
.diagnostic__head p { color: rgba(245, 243, 238, 0.65); margin: 0; }

.diagnostic-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 28px;
  max-width: 760px;
  margin: 0 auto;
}
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group--full { grid-column: 1 / -1; }

.field-group label,
.field-label-static {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--gold-light);
  font-weight: 600;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"] {
  background: rgba(245, 243, 238, 0.06);
  border: 1px solid rgba(245, 243, 238, 0.18);
  border-radius: 6px;
  padding: 15px 16px;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.98rem;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.field-group input::placeholder { color: rgba(245, 243, 238, 0.35); }
.field-group input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245, 243, 238, 0.1);
}
.field-group input.is-invalid { border-color: #C97A6E; }

.field-error {
  min-height: 16px;
  font-size: 0.78rem;
  color: #E3A99B;
}

/* Telefone internacional (intl-tel-input) */
.iti { width: 100%; }
.iti__tel-input {
  background: rgba(245, 243, 238, 0.06);
  border: 1px solid rgba(245, 243, 238, 0.18);
  border-radius: 6px;
  padding: 15px 16px 15px 90px;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.98rem;
  width: 100%;
}
.iti__selected-country { border-radius: 6px 0 0 6px; }

/* Seleção de produto (chips) */
.product-select {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.product-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(245, 243, 238, 0.18);
  border-radius: 8px;
  padding: 16px 10px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
  font-size: 0.86rem;
  color: rgba(245, 243, 238, 0.75);
}
.product-chip input { position: absolute; opacity: 0; pointer-events: none; }
.product-chip:hover { border-color: rgba(201, 169, 97, 0.5); transform: translateY(-2px); }
.product-chip:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.12);
  color: var(--gold-light);
}

.diagnostic-form__submit { text-align: center; margin-top: 8px; }
.form-status { min-height: 20px; font-size: 0.86rem; margin: 14px 0 0; color: rgba(245, 243, 238, 0.7); }
.form-status.is-error { color: #E3A99B; }
.form-status.is-success { color: var(--gold-light); }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ---------------------------------------------------------------------
   Modal de sucesso
--------------------------------------------------------------------- */
.maestro-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.maestro-modal[hidden] { display: none; }
.maestro-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 37, 0.75);
  backdrop-filter: blur(4px);
}
.maestro-modal__panel {
  position: relative;
  background: var(--off-white);
  border-radius: 14px;
  padding: 48px 40px;
  max-width: 440px;
  text-align: center;
  animation: modal-in 0.4s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.maestro-modal__icon { margin: 0 auto 20px; }
.maestro-modal__panel h3 { font-size: 1.6rem; margin: 0 0 4px; font-weight: 500; }
.maestro-modal__lead { color: var(--gold-dark); font-weight: 600; margin: 0 0 16px; }
.maestro-modal__body { color: var(--muted); margin: 0 0 28px; font-size: 0.95rem; }

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: rgba(245, 243, 238, 0.6);
  padding: 48px 0;
  border-top: 1px solid rgba(201, 169, 97, 0.15);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.site-footer__brand .serif { color: var(--white); font-size: 1.2rem; }
.site-footer__brand p { margin: 4px 0 0; font-size: 0.82rem; color: var(--gold-light); }
.site-footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer__nav a { font-size: 0.88rem; transition: color 0.3s var(--ease); }
.site-footer__nav a:hover { color: var(--gold-light); }
.site-footer__legal { font-size: 0.78rem; margin: 0; width: 100%; text-align: center; opacity: 0.6; }

/* ---------------------------------------------------------------------
   Scroll reveal
--------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-baton, .hero-baton__tip, .hero-scroll-cue span { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------------
   Responsividade
--------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .solutions__grid { grid-template-columns: repeat(2, 1fr); }
  .method__grid { grid-template-columns: repeat(2, 1fr); }
  .stages__row { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .diagnostic__panel { padding: 48px 32px; }
}

@media (max-width: 900px) {
  .positioning__grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { font-size: 1.1rem; }
  .nav-cta { width: 100%; text-align: center; }
}

@media (max-width: 720px) {
  .section { padding: 76px 0; }
  .hero { padding-top: 120px; }
  .hero-logo .word { font-size: clamp(2.6rem, 15vw, 4.4rem); }
  .solutions__grid { grid-template-columns: 1fr; }
  .method__grid { grid-template-columns: 1fr; }
  .stages__row { grid-template-columns: 1fr; }
  .diagnostic-form { grid-template-columns: 1fr; }
  .product-select { grid-template-columns: repeat(2, 1fr); }
  .diagnostic__panel { padding: 36px 22px; border-radius: 14px; }
}

@media (max-width: 380px) {
  .wrap { padding: 0 20px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; }
}
