/* ==========================================
   LPER — Custom Styles
   Palette: #000000 | #14213d | #fca311 | #e5e5e5 | #ffffff
   ========================================== */

/* ---- Hero Mesh Gradient ---- */
.hero-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(252, 163, 17, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 75% 25%, rgba(20, 33, 61, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 50% 80%, rgba(252, 163, 17, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 70% 40% at 85% 70%, rgba(20, 33, 61, 0.08) 0%, transparent 55%);
  animation: mesh-drift 12s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  0% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 80% 60%;
    filter: hue-rotate(0deg);
  }
  33% {
    background-position: 10% 20%, 90% 10%, 40% 90%, 70% 50%;
  }
  66% {
    background-position: 5% 10%, 95% 20%, 55% 85%, 75% 65%;
  }
  100% {
    background-position: 15% 5%, 85% 15%, 45% 95%, 65% 55%;
    filter: hue-rotate(5deg);
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---- Marquee ---- */
.marquee {
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

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

/* ---- Dot Grid (dark sections) ---- */
.dot-grid-bg {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.03;
}

/* ---- Featured Card Gradient Border ---- */
.card-gradient-border {
  background: white;
  border: 1px solid transparent;
  position: relative;
}

.card-gradient-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, #fca311, #fde68a);
  -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;
  pointer-events: none;
}

/* ---- Method Card Arrows ---- */
@media (min-width: 1024px) {
  .method-card:not(:last-child)::after {
    content: "\2192";
    position: absolute;
    right: -0.55rem;
    top: 1.5rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    font-size: 0.55rem;
    line-height: 1;
    color: #000000;
    background: #fca311;
    box-shadow: 0 2px 8px rgba(252, 163, 17, 0.35);
    z-index: 10;
  }
}

/* ---- Floating Animations ---- */
@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes float-c {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-float-a { animation: float-a 5s ease-in-out infinite; }
.animate-float-b { animation: float-b 4s ease-in-out infinite; }
.animate-float-c { animation: float-c 4.5s ease-in-out infinite; }

/* ---- Focus ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #fca311;
  outline-offset: 2px;
}

/* ---- Noise Overlay ---- */
.noise-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: 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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ---- Display Cards (Stacked KPI) ---- */
.display-cards-grid {
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
  min-height: 380px;
}

.display-card {
  grid-area: stack;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 9rem;
  width: 22rem;
  max-width: 90vw;
  transform: skewY(-8deg);
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  padding: 0.85rem 1.1rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  user-select: none;
}

/* Right-side fade (matches bg-brand-navy) */
.display-card::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -5%;
  height: 110%;
  width: 18rem;
  background: linear-gradient(to left, #14213d, transparent);
  pointer-events: none;
}

/* Inner content above overlays */
.display-card > * {
  position: relative;
  z-index: 2;
}

/* Cards 1-3: grayscale + dark overlay */
.display-card:nth-child(1),
.display-card:nth-child(2),
.display-card:nth-child(3) {
  filter: grayscale(100%);
}

.display-card:nth-child(1)::before,
.display-card:nth-child(2)::before,
.display-card:nth-child(3)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  outline: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(20, 33, 61, 0.55);
  transition: opacity 0.5s;
  z-index: 1;
}

/* Shared hover: remove grayscale + overlay */
.display-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.display-card:nth-child(1):hover,
.display-card:nth-child(2):hover,
.display-card:nth-child(3):hover {
  filter: grayscale(0);
}

.display-card:nth-child(1):hover::before,
.display-card:nth-child(2):hover::before,
.display-card:nth-child(3):hover::before {
  opacity: 0;
}

/* Card 1 — back-most */
.display-card:nth-child(1):hover {
  transform: skewY(-8deg) translateY(-2.5rem);
}

/* Card 2 */
.display-card:nth-child(2) {
  transform: skewY(-8deg) translateX(2rem) translateY(1.75rem);
}

.display-card:nth-child(2):hover {
  transform: skewY(-8deg) translateX(2rem) translateY(-0.75rem);
}

/* Card 3 */
.display-card:nth-child(3) {
  transform: skewY(-8deg) translateX(4rem) translateY(3.5rem);
}

.display-card:nth-child(3):hover {
  transform: skewY(-8deg) translateX(4rem) translateY(1rem);
}

/* Card 4 — front (active, no grayscale) */
.display-card:nth-child(4) {
  transform: skewY(-8deg) translateX(6rem) translateY(5.25rem);
}

.display-card:nth-child(4):hover {
  transform: skewY(-8deg) translateX(6rem) translateY(2.75rem);
}

/* Responsive: tighter on small screens */
@media (max-width: 640px) {
  .display-cards-grid {
    min-height: 320px;
  }

  .display-card {
    width: 17rem;
    height: 7.5rem;
    padding: 0.7rem 0.9rem;
  }

  .display-card:nth-child(2) {
    transform: skewY(-8deg) translateX(1rem) translateY(1.75rem);
  }

  .display-card:nth-child(2):hover {
    transform: skewY(-8deg) translateX(1rem) translateY(-0.75rem);
  }

  .display-card:nth-child(3) {
    transform: skewY(-8deg) translateX(2rem) translateY(3.5rem);
  }

  .display-card:nth-child(3):hover {
    transform: skewY(-8deg) translateX(2rem) translateY(1rem);
  }

  .display-card:nth-child(4) {
    transform: skewY(-8deg) translateX(3rem) translateY(5.25rem);
  }

  .display-card:nth-child(4):hover {
    transform: skewY(-8deg) translateX(3rem) translateY(2.75rem);
  }

  .display-card::after {
    width: 10rem;
  }
}

/* ---- Glassmorphic Navigation ---- */
.nav-glass {
  background: linear-gradient(
    135deg,
    rgba(20, 33, 61, 0.55) 0%,
    rgba(10, 18, 36, 0.50) 50%,
    rgba(20, 33, 61, 0.55) 100%
  );
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Top-edge light refraction line */
.nav-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    transparent 100%
  );
  -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;
  pointer-events: none;
  z-index: 1;
}

/* Dropdown glass panels */
.dropdown-glass {
  background: linear-gradient(
    160deg,
    rgba(12, 20, 42, 0.93) 0%,
    rgba(8, 14, 32, 0.91) 100%
  );
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(40px) brightness(0.5) saturate(1.3);
  backdrop-filter: blur(40px) brightness(0.5) saturate(1.3);
}

.dropdown-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    transparent 100%
  );
  -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;
  pointer-events: none;
}

/* Mobile menu glass */
.mobile-glass {
  background: linear-gradient(
    160deg,
    rgba(20, 33, 61, 0.78) 0%,
    rgba(10, 18, 36, 0.74) 100%
  );
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}


/* ---- Dropdown Menu ---- */
.dropdown-menu {
  pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-menu.opacity-100 {
  pointer-events: auto;
}

/* ---- Page Hero (Inner Pages) ---- */
.page-hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

.page-hero--dark {
  background: #14213d;
  color: white;
}

.page-hero--dark .dot-grid-bg {
  opacity: 0.03;
}

@media (min-width: 768px) {
  .page-hero {
    padding-top: 10rem;
    padding-bottom: 5rem;
  }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(115, 115, 115, 1);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: rgba(115, 115, 115, 1);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #000;
}

.page-hero--dark .breadcrumb,
.page-hero--dark .breadcrumb a {
  color: rgba(255, 255, 255, 0.45);
}

.page-hero--dark .breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb .separator {
  opacity: 0.4;
  font-size: 0.65rem;
}

/* ---- FAQ Accordion ---- */
.faq-accordion details {
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-accordion details:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.faq-accordion details[open] {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.faq-accordion summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: #fca311;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-accordion details[open] summary::after {
  transform: rotate(45deg);
}

.faq-accordion .faq-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.88rem;
  color: #737373;
  line-height: 1.65;
}

/* ---- Contact Form ---- */
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #000;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #fca311;
  box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #a3a3a3;
}

.contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.35rem;
}

/* ---- Service Card Large ---- */
.service-card--large {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  transition: all 0.3s;
}

.service-card--large:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.service-card--large .card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.service-card--large .card-body {
  padding: 1.5rem;
}

/* ---- Timeline (Method page) ---- */
.timeline-step {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 2rem;
  bottom: -1rem;
  width: 2px;
  background: #e5e5e5;
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-step .step-dot {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #fca311;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #000;
  box-shadow: 0 2px 8px rgba(252, 163, 17, 0.35);
}

/* ---- Hero Glassmorphic ---- */
.hero-glass {
  position: relative;
  background: #0a0e1a;
  padding-top: 8rem;
  padding-bottom: 4rem;
  overflow: hidden;
  color: white;
}

@media (min-width: 768px) {
  .hero-glass {
    padding-top: 10rem;
    padding-bottom: 5rem;
  }
}

/* Background image with radial mask */
.hero-glass__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 75%);
  pointer-events: none;
}

/* Variant: mask shifted right for service detail pages */
.hero-glass__bg--right {
  -webkit-mask-image: radial-gradient(ellipse 65% 80% at 65% 50%, black 25%, transparent 70%);
  mask-image: radial-gradient(ellipse 65% 80% at 65% 50%, black 25%, transparent 70%);
}

/* Gradient text for H1 */
.text-gradient-hero {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 40%, #fca311 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Stagger animation (CSS-only, replaces .reveal in heroes) */
.hero-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-stagger-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.hero-stagger > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes hero-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass card */
.glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    transparent 100%
  );
  -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;
  pointer-events: none;
}

/* Ghost / glass button */
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: white;
  font-weight: 500;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.btn-glass:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

/* Glow orbs */
.glow-orb {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(100px);
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.glow-orb--orange {
  background: rgba(252, 163, 17, 0.15);
}

.glow-orb--navy {
  background: rgba(20, 33, 61, 0.25);
}

@keyframes glow-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -20px) scale(1.1);
  }
  100% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

/* Light variant for persona pages and contato */
.hero-glass--light {
  background: #ffffff;
  color: #000;
}

.hero-glass--light .hero-glass__bg {
  opacity: 0.08;
}

.hero-glass--light .glow-orb--orange {
  background: rgba(252, 163, 17, 0.08);
}

.hero-glass--light .breadcrumb,
.hero-glass--light .breadcrumb a {
  color: rgba(115, 115, 115, 1);
}

.hero-glass--light .breadcrumb a:hover {
  color: #000;
}

/* Glass breadcrumbs for dark hero-glass */
.hero-glass .breadcrumb,
.hero-glass .breadcrumb a {
  color: rgba(255, 255, 255, 0.45);
}

.hero-glass .breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Glass card stat item */
.glass-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.glass-stat__value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fca311;
  line-height: 1.2;
}

.glass-stat__label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-stagger > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
