/* RGS Signature Experience 2026 — final visual layer */
:root {
  --rgs-ink: #06182b;
  --rgs-navy: #092744;
  --rgs-blue: #0d4f7d;
  --rgs-electric: #168fca;
  --rgs-lime: #8fd148;
  --rgs-lime-bright: #b5ed62;
  --rgs-ice: #eef8fb;
  --rgs-white: #fff;
  --rgs-line: rgba(8, 49, 80, .11);
  --rgs-shadow: 0 28px 80px rgba(4, 28, 49, .14);
  --rgs-shadow-hover: 0 34px 90px rgba(4, 28, 49, .23);
  --rgs-radius: clamp(22px, 2.3vw, 36px);
  --rgs-ease: cubic-bezier(.2,.8,.2,1);
}

html { scroll-behavior: smooth; background: var(--rgs-ink); }
body {
  overflow-x: clip;
  color: var(--rgs-ink);
  background:
    radial-gradient(circle at 3% 10%, rgba(143,209,72,.10), transparent 24rem),
    radial-gradient(circle at 97% 28%, rgba(22,143,202,.10), transparent 30rem),
    linear-gradient(180deg, #f8fcfd 0%, #edf6f8 54%, #f8fcfd 100%);
  font-feature-settings: "kern" 1, "liga" 1;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9998; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
::selection { background: var(--rgs-lime); color: var(--rgs-ink); }

/* Reading progress and ambient pointer */
.rgs-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 10001; background: rgba(255,255,255,.08); }
.rgs-progress > i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--rgs-lime),#d2ff85,var(--rgs-electric)); box-shadow: 0 0 18px var(--rgs-lime); }
.rgs-ambient { position: fixed; width: 34rem; aspect-ratio: 1; border-radius: 50%; pointer-events: none; z-index: -1; transform: translate(-50%,-50%); background: radial-gradient(circle,rgba(143,209,72,.085),transparent 67%); transition: opacity .3s; }

/* Navigation: floating architectural bar */
.menu { background: rgba(5,29,50,.90) !important; border-bottom: 1px solid rgba(255,255,255,.10) !important; box-shadow: 0 16px 50px rgba(1,17,31,.22) !important; backdrop-filter: blur(24px) saturate(145%) !important; -webkit-backdrop-filter: blur(24px) saturate(145%) !important; }
.nav-shell { max-width: 1480px !important; }
.logo img { filter: drop-shadow(0 10px 15px rgba(0,0,0,.22)); transition: transform .5s var(--rgs-ease), filter .5s !important; }
.logo:hover img { transform: translateY(-2px) scale(1.035); filter: drop-shadow(0 12px 22px rgba(143,209,72,.22)); }
.nav-links > li > a,.dropdown-toggle { position: relative; letter-spacing: .015em; }
.nav-links > li > a::after,.dropdown-toggle::after { content:""; position:absolute; left:50%; right:50%; bottom:-8px; height:2px; border-radius:2px; background:var(--rgs-lime); transition: left .3s var(--rgs-ease),right .3s var(--rgs-ease); }
.nav-links > li > a:hover::after,.nav-links > li > a[aria-current="page"]::after,.dropdown-toggle:hover::after { left:12%; right:12%; }
.btn-orcamento-logo { overflow:hidden; isolation:isolate; box-shadow:0 10px 30px rgba(143,209,72,.25) !important; transition: transform .3s var(--rgs-ease),box-shadow .3s !important; }
.btn-orcamento-logo::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.42) 48%,transparent 75%); transform:translateX(-130%); transition:transform .65s; }
.btn-orcamento-logo:hover::before { transform:translateX(130%); }
.btn-orcamento-logo:hover { transform:translateY(-3px) !important; box-shadow:0 16px 38px rgba(143,209,72,.38) !important; }
.dropdown-menu { border:1px solid rgba(255,255,255,.12) !important; background:rgba(6,30,52,.96) !important; backdrop-filter:blur(22px); box-shadow:0 28px 60px rgba(0,0,0,.3) !important; }

/* Global editorial rhythm */
main > section { position:relative; isolation:isolate; }
main > section:not(.carousel-section):not(.slideshow):not(.contact-hero):not(.portfolio-hero) { padding-block:clamp(76px,9vw,144px); }
.section-kicker, .eyebrow, .hero-eyebrow { display:inline-flex; align-items:center; gap:10px; width:max-content; max-width:100%; padding:8px 14px; border-radius:999px; color:#367007 !important; background:rgba(143,209,72,.14); border:1px solid rgba(101,164,41,.24); font-size:.74rem !important; font-weight:900 !important; letter-spacing:.14em !important; text-transform:uppercase; }
.section-kicker::before,.eyebrow::before,.hero-eyebrow::before { content:""; width:7px; aspect-ratio:1; border-radius:50%; background:var(--rgs-lime); box-shadow:0 0 0 5px rgba(143,209,72,.15); }
h1,h2,h3 { text-wrap:balance; letter-spacing:-.035em; }
main h1 { font-size:clamp(2.65rem,6.6vw,6.4rem); line-height:.92; }
main h2 { font-size:clamp(2.05rem,4.4vw,4.5rem); line-height:.98; }
main p { text-wrap:pretty; }

/* Heroes with cinematic grading */
.carousel-section:first-child,.slideshow,.contact-hero,.portfolio-hero { min-height:clamp(560px,78svh,850px); overflow:hidden; background-color:var(--rgs-ink) !important; }
.carousel-section:first-child::after,.slideshow::after,.contact-hero::after,.portfolio-hero::after { content:""; position:absolute; inset:0; z-index:1; pointer-events:none; background:linear-gradient(90deg,rgba(2,17,31,.88) 0%,rgba(4,25,44,.52) 48%,rgba(4,25,44,.2) 72%),linear-gradient(0deg,rgba(3,20,35,.52),transparent 45%); }
.carousel-section:first-child img,.slideshow img { filter:saturate(.82) contrast(1.08); transform:scale(1.015); }
.carousel-section:first-child .carousel-caption,.slideshow .slide-content,.contact-hero > *,.portfolio-hero > * { position:relative; z-index:2; }
.carousel-section:first-child h1,.slideshow h1,.contact-hero h1,.portfolio-hero h1 { color:#fff !important; text-shadow:0 18px 60px rgba(0,0,0,.35); }
.carousel-section:first-child p,.slideshow p,.contact-hero p,.portfolio-hero p { color:rgba(255,255,255,.82) !important; font-size:clamp(1rem,1.6vw,1.25rem); }

/* Premium panels */
.quick-quote-section,.service-planner,.sobre-empresa,.client-feedback,.faq-section,.contact-section,.form-section,.gallery-section,.how-it-works,.portfolio { overflow:hidden; }
.form-wrapper,.quote-form,.planner-shell,.sobre-container,.feedback-shell,.faq-container,.contact-container,.portfolio-grid,.gallery-container {
  border:1px solid rgba(255,255,255,.75) !important;
  border-radius:var(--rgs-radius) !important;
  box-shadow:var(--rgs-shadow) !important;
}
.form-wrapper,.quote-form,.planner-shell,.feedback-shell,.faq-container,.contact-container { background:linear-gradient(145deg,rgba(255,255,255,.93),rgba(241,249,250,.79)) !important; backdrop-filter:blur(18px); }
.form-wrapper::before,.planner-shell::before,.feedback-shell::before { content:""; position:absolute; width:18rem; aspect-ratio:1; right:-8rem; top:-9rem; border-radius:50%; background:radial-gradient(circle,rgba(143,209,72,.22),transparent 67%); pointer-events:none; }

/* Forms look like a polished product */
form input:not([type="checkbox"]):not([type="radio"]),form select,form textarea { min-height:58px; border:1px solid rgba(9,55,86,.16) !important; border-radius:15px !important; background:rgba(255,255,255,.85) !important; box-shadow:inset 0 1px 0 #fff,0 7px 20px rgba(3,31,53,.04); transition:border-color .25s,box-shadow .25s,transform .25s !important; }
form textarea { min-height:132px; }
form input:focus,form select:focus,form textarea:focus { border-color:var(--rgs-lime) !important; box-shadow:0 0 0 4px rgba(143,209,72,.16),0 12px 28px rgba(5,37,61,.09) !important; transform:translateY(-1px); outline:0; }
form button[type="submit"],.btn-primary,.cta-button,.btn-estimate { position:relative; overflow:hidden; border:0 !important; border-radius:16px !important; background:linear-gradient(135deg,var(--rgs-lime-bright),var(--rgs-lime)) !important; color:#102a12 !important; box-shadow:0 16px 34px rgba(112,177,47,.25) !important; font-weight:900 !important; letter-spacing:.025em; transition:transform .28s var(--rgs-ease),box-shadow .28s !important; }
form button[type="submit"]:hover,.btn-primary:hover,.cta-button:hover,.btn-estimate:hover { transform:translateY(-4px) !important; box-shadow:0 24px 42px rgba(112,177,47,.35) !important; }

/* Services and project cards */
.servicos-grid,.services-grid,.gallery,.portfolio-grid,.feedback-grid { gap:clamp(18px,2vw,30px) !important; }
.servico-card,.service-card,.gallery-item,.portfolio-item,.feedback-card,.proof-card,.step-card,.contact-card {
  position:relative; overflow:hidden; border:1px solid rgba(8,55,87,.10) !important; border-radius:clamp(20px,2vw,30px) !important; background:rgba(255,255,255,.88) !important; box-shadow:0 14px 40px rgba(4,34,56,.08) !important; transition:transform .45s var(--rgs-ease),box-shadow .45s,border-color .45s !important;
}
.servico-card::after,.service-card::after,.feedback-card::after,.proof-card::after,.step-card::after { content:""; position:absolute; inset:auto -20% -55% 25%; height:75%; border-radius:50%; background:radial-gradient(circle,rgba(143,209,72,.16),transparent 65%); transition:transform .55s var(--rgs-ease); pointer-events:none; }
.servico-card:hover,.service-card:hover,.gallery-item:hover,.portfolio-item:hover,.feedback-card:hover,.proof-card:hover,.step-card:hover,.contact-card:hover { transform:translateY(-10px) !important; border-color:rgba(143,209,72,.42) !important; box-shadow:var(--rgs-shadow-hover) !important; }
.servico-card:hover::after,.service-card:hover::after,.feedback-card:hover::after { transform:translate(-12%,-18%) scale(1.2); }
.gallery-item img,.portfolio-item img,.servico-card img,.service-card img { transition:transform .8s var(--rgs-ease),filter .5s !important; }
.gallery-item:hover img,.portfolio-item:hover img,.servico-card:hover img,.service-card:hover img { transform:scale(1.065) !important; filter:saturate(1.08) contrast(1.04); }
.servico-card i,.service-card i,.step-card i,.contact-card i { filter:drop-shadow(0 10px 14px rgba(95,157,38,.18)); }

/* Alternating section atmosphere */
.trust-strip,.premium-proof,.portfolio-cta,.contact-section { background:linear-gradient(135deg,#061b30,#0a3557 62%,#0d4667) !important; color:#fff; }
.trust-strip::before,.premium-proof::before,.portfolio-cta::before,.contact-section::before,.site-footer::before { content:""; position:absolute; inset:0; z-index:-1; opacity:.22; background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px); background-size:48px 48px; mask-image:linear-gradient(to bottom,black,transparent); }
.trust-strip h2,.premium-proof h2,.portfolio-cta h2,.contact-section h2 { color:#fff !important; }

/* Footer as a brand destination */
.site-footer { position:relative; overflow:hidden; background:linear-gradient(145deg,#041522 0%,#072842 56%,#0a3a57 100%) !important; border-top:1px solid rgba(143,209,72,.25); }
.site-footer::after { content:"RGS"; position:absolute; right:-.03em; bottom:-.28em; color:rgba(255,255,255,.025); font-size:clamp(12rem,30vw,34rem); line-height:1; font-weight:950; letter-spacing:-.12em; pointer-events:none; }
.site-footer a { transition:color .25s,transform .25s; }
.site-footer a:hover { color:var(--rgs-lime-bright) !important; transform:translateX(3px); }

/* Scroll reveals */
.rgs-reveal { opacity:0; transform:translateY(34px); transition:opacity .8s var(--rgs-ease),transform .8s var(--rgs-ease); transition-delay:var(--reveal-delay,0ms); }
.rgs-reveal.rgs-in { opacity:1; transform:none; }

@media (max-width: 768px) {
  .rgs-ambient { display:none; }
  body::before { opacity:.018; }
  .nav-whatsapp { display:none !important; }
  .menu .nav-shell { min-height:76px !important; grid-template-columns:minmax(44px,1fr) auto minmax(44px,1fr) !important; gap:6px !important; padding-inline:max(10px,env(safe-area-inset-left)) !important; }
  .mobile-menu-toggle { justify-self:start !important; width:44px !important; height:44px !important; border-radius:14px !important; background:rgba(255,255,255,.07) !important; border:1px solid rgba(255,255,255,.12) !important; }
  .logo { position:static !important; transform:none !important; justify-self:center !important; }
  .logo img { max-width:78px !important; max-height:64px !important; }
  .btn-orcamento-logo { position:relative !important; inset:auto !important; justify-self:end !important; width:auto !important; min-width:0 !important; margin:0 !important; padding:10px 9px !important; font-size:clamp(.59rem,2.7vw,.72rem) !important; line-height:1.05; text-align:center; border-radius:12px !important; transform:none !important; }
  .btn-orcamento-logo i { display:none !important; }
  .nav-links { border-radius:0 0 24px 24px !important; background:rgba(5,27,47,.985) !important; box-shadow:0 25px 55px rgba(0,0,0,.36) !important; }
  main > section:not(.carousel-section):not(.slideshow):not(.contact-hero):not(.portfolio-hero) { padding-block:64px; }
  main h1 { font-size:clamp(2.35rem,13vw,4rem); }
  main h2 { font-size:clamp(2rem,10vw,3rem); }
  .carousel-section:first-child,.slideshow,.contact-hero,.portfolio-hero { min-height:620px; }
  .form-wrapper,.quote-form,.planner-shell,.sobre-container,.feedback-shell,.faq-container,.contact-container { border-radius:22px !important; padding:24px 16px !important; }
  .servico-card:hover,.service-card:hover,.gallery-item:hover,.portfolio-item:hover,.feedback-card:hover,.proof-card:hover,.step-card:hover,.contact-card:hover { transform:translateY(-4px) !important; }
}

@media (max-width: 370px) {
  .menu .nav-shell { padding-inline:6px !important; }
  .menu .logo { width:66px !important; height:60px !important; }
  .logo img { max-width:66px !important; }
  .btn-orcamento-logo { max-width:78px; padding:9px 6px !important; font-size:.57rem !important; }
  main h1 { font-size:clamp(2.15rem,12.4vw,3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  .rgs-reveal { opacity:1; transform:none; }
}

/* Signature refinement — richer details without visual noise */
@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar { width: 11px; }
  ::-webkit-scrollbar-track { background: #06182b; }
  ::-webkit-scrollbar-thumb { background: linear-gradient(var(--rgs-lime),#4f8f27); border: 3px solid #06182b; border-radius: 999px; }
}

main > section:not(:first-child)::after {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: min(1180px, calc(100% - 40px)); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(11,68,103,.16) 22%, rgba(143,209,72,.3) 50%, rgba(11,68,103,.16) 78%, transparent);
  pointer-events: none;
}

.servicos-oferecidos::before,.gallery-section::before,.portfolio::before {
  content: ""; position: absolute; inset: 6% auto auto -10rem; z-index: -1;
  width: 28rem; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(22,143,202,.12);
  box-shadow: 0 0 0 70px rgba(22,143,202,.025),0 0 0 140px rgba(143,209,72,.018);
}

.servico-card,.service-card,.portfolio-item,.gallery-item { isolation: isolate; }
.servico-card::before,.service-card::before,.portfolio-item::before,.gallery-item::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg,rgba(255,255,255,.24),transparent 28%,transparent 72%,rgba(143,209,72,.09));
  opacity: .75;
}
.portfolio-item::after,.gallery-item::after {
  content: "View project  ↗"; position: absolute; z-index: 4; right: 16px; bottom: 16px;
  padding: 9px 13px; border: 1px solid rgba(255,255,255,.34); border-radius: 999px;
  color: #fff; background: rgba(5,29,50,.72); backdrop-filter: blur(12px);
  font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; transform: translateY(10px); transition: opacity .35s,transform .35s var(--rgs-ease);
}
.portfolio-item:hover::after,.gallery-item:hover::after { opacity: 1; transform: none; }

.trust-strip [class*="item"],.premium-proof [class*="card"] {
  border-color: rgba(255,255,255,.13) !important;
  background: linear-gradient(145deg,rgba(255,255,255,.095),rgba(255,255,255,.035)) !important;
  backdrop-filter: blur(14px);
}
.trust-strip i,.premium-proof i { color: var(--rgs-lime-bright) !important; }

.rgs-trust-rail {
  position: fixed; z-index: 90; left: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid rgba(255,255,255,.13); border-left: 0; border-radius: 0 18px 18px 0;
  background: rgba(5,29,50,.9); box-shadow: 0 18px 45px rgba(0,0,0,.2);
  backdrop-filter: blur(18px); overflow: hidden;
}
.rgs-trust-rail span {
  display: grid; place-items: center; gap: 6px; width: 55px; min-height: 72px; padding: 9px 4px;
  color: rgba(255,255,255,.72); font-size: .52rem; font-weight: 850; letter-spacing: .07em;
  text-align: center; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.09);
}
.rgs-trust-rail span:last-child { border-bottom: 0; }
.rgs-trust-rail i { color: var(--rgs-lime-bright); font-size: 1rem; }

.rgs-page-mark {
  position: absolute; right: clamp(18px,4vw,70px); top: clamp(22px,4vw,54px); z-index: 0;
  color: rgba(7,38,63,.055); font-size: clamp(4.5rem,10vw,9rem); line-height: .8;
  font-weight: 950; letter-spacing: -.08em; pointer-events: none; user-select: none;
}

.site-footer .footer-logo img,.site-footer img[alt*="RGS"] {
  filter: drop-shadow(0 16px 24px rgba(0,0,0,.28));
}

.rgs-pressed { transform: translateY(1px) scale(.985) !important; }

@media (max-width: 1120px) { .rgs-trust-rail { display: none; } }
@media (max-width: 768px) {
  main > section:not(:first-child)::after { width: calc(100% - 28px); }
  .portfolio-item::after,.gallery-item::after { opacity: 1; transform: none; right: 10px; bottom: 10px; font-size: .57rem; padding: 7px 10px; }
  .rgs-page-mark { top: 22px; right: 14px; font-size: 4.4rem; }
}

/* Stability and responsive hardening (2026-08)
   Loaded last on every page so it resolves conflicts left by legacy styles. */
html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

main,
section,
article,
.container,
.nav-container,
.footer-container,
.footer-experience,
.footer-experience__main,
.contact-container,
.form-wrapper,
.quote-form {
  min-width: 0;
}

input,
select,
textarea,
button {
  max-width: 100%;
  min-width: 0;
}

.carousel-section,
.carousel-container,
.carousel-slide,
.slideshow,
.slide {
  isolation: isolate;
  overflow: hidden;
}

.carousel-slide > img,
.carousel-track > img,
.slideshow .slide > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.footer-ticker {
  max-width: 100%;
  contain: inline-size paint;
}

@media (max-width: 900px) {
  .menu,
  .menu .nav-container {
    width: 100%;
    max-width: 100%;
  }

  .menu .nav-links {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
  }

  .carousel-copy,
  .slideshow .overlay,
  .slide .overlay,
  .contact-hero__content,
  .portfolio-hero__content {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: calc(100% - 24px) !important;
    margin-inline: auto !important;
    box-sizing: border-box;
  }

  .slideshow .overlay,
  .slide .overlay {
    top: 50% !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
  }

  .carousel-copy h1,
  .slideshow h1,
  .contact-hero__content h1,
  .portfolio-hero__content h1 {
    overflow-wrap: anywhere !important;
    hyphens: auto;
  }
}

@media (max-width: 480px) {
  .carousel-section:first-child,
  .slideshow,
  .contact-hero,
  .portfolio-hero {
    min-height: max(560px, 78svh);
  }

  .carousel-copy,
  .slideshow .overlay,
  .slide .overlay {
    padding: 20px !important;
  }

  .carousel-copy h1,
  .slideshow h1,
  .contact-hero__content h1,
  .portfolio-hero__content h1 {
    font-size: clamp(1.85rem, 9.5vw, 2.65rem) !important;
    line-height: 1.04 !important;
  }

  .footer-ticker {
    width: 100% !important;
    margin-inline: 0 !important;
  }
}

.slideshow .slide-heading {
  max-width: 850px;
  margin: 0 0 15px;
  color: #fff !important;
  font-size: clamp(2.25rem, 5.4vw, 4.65rem) !important;
  font-weight: 700;
  line-height: 1.04 !important;
  letter-spacing: -.045em;
  text-wrap: balance;
  text-shadow: 0 3px 22px rgba(0,0,0,.25);
}

.dots-container .dot {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
}

.dots-container .dot:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .slideshow .slide-heading {
    font-size: clamp(2rem, 10vw, 3.3rem) !important;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .slideshow .slide-heading {
    font-size: clamp(1.85rem, 9.5vw, 2.65rem) !important;
    line-height: 1.04 !important;
  }
}
