:root{
  --bg:#05060a; 
  --card:#0a0f1e; 
  --accent:#18b6d6; 
  --accent2:#ff48a1; 
  --muted:#9aa6b2; 
  --glass:rgba(255,255,255,0.05);
  --maxw:1200px; 
  --radius:16px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: dark;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html,body{
  height:100%;
  margin:0;
  background:#03040a;
  background-image:
    radial-gradient(at 0% 0%, rgba(24,182,214,0.1) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(255,72,161,0.1) 0%, transparent 50%),
    linear-gradient(180deg,#03040a 0%, #051027 70%);
  background-attachment:fixed;
  background-repeat:no-repeat;
  background-size:100% 100%;
  color:#e8f6fb;
  -webkit-font-smoothing:antialiased;
  scroll-behavior:smooth;
  transition:background-image 0.5s ease;
}

/* Portuguese language gradient variation */
html.lang-pt,
body.lang-pt{
  background-image:
    radial-gradient(at 0% 0%, rgba(24,182,214,0.11) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(255,72,161,0.11) 0%, transparent 50%),
    linear-gradient(180deg,#03040a 0%, #061025 70%);
}

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

/* Responsive container padding */
@media (max-width:768px){
  .container{
    padding:20px;
  }
}

@media (max-width:480px){
  .container{
    padding:16px;
  }
}

/* Header & Navigation */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 0;
  position:relative;
  border-bottom:1px solid rgba(255,255,255,0.05);
  margin-bottom:8px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
  transition:opacity 0.2s;
}

.brand:hover{
  opacity:0.9;
}

.brand img{
  height:56px;
  border-radius:8px;
  display:block;
}

@media (max-width:480px){
  .brand img{
    height:48px;
  }
}

.brand-text{
  line-height:1;
}

.brand-name{
  font-size:18px;
  font-weight:700;
}

.brand-subtitle{
  font-size:12px;
  color:var(--muted);
}

.nav{
  display:flex;
  gap:12px;
  align-items:center;
}

.nav a{
  color:var(--muted);
  text-decoration:none;
  padding:8px 12px;
  border-radius:10px;
  font-weight:600;
  transition:all 0.2s ease;
  position:relative;
}

.nav a:hover,
.nav a:focus{
  color:#fff;
  background:var(--glass);
  transform:translateY(-2px);
  outline:none;
}

.nav a.active{
  color:#fff;
  background:var(--glass);
}

/* Mobile Menu Toggle */
.menu-toggle{
  display:none;
  background:transparent;
  border:none;
  color:var(--muted);
  font-size:24px;
  cursor:pointer;
  padding:8px;
  border-radius:8px;
  transition:all 0.2s;
  z-index:1001;
}

.menu-toggle:hover,
.menu-toggle:focus{
  color:#fff;
  background:var(--glass);
  outline:none;
}

.menu-toggle:active{
  transform:scale(0.95);
}

/* Language Toggle */
.lang-toggle{
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  color:#fff;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  padding:8px 14px;
  border-radius:10px;
  transition:all 0.3s ease;
  text-transform:uppercase;
  letter-spacing:0.5px;
  min-width:50px;
  text-align:center;
  display:flex;
  align-items:center;
  gap:6px;
  position:relative;
  overflow:hidden;
}

.lang-toggle::before{
  content:'🌐';
  font-size:16px;
  display:inline-block;
  transition:transform 0.3s ease;
  line-height:1;
  margin-right:2px;
}

.lang-text{
  display:inline-block;
}

.lang-toggle:hover::before{
  transform:rotate(360deg);
}

.lang-toggle:hover,
.lang-toggle:focus{
  color:#fff;
  background:rgba(255,255,255,0.1);
  border-color:rgba(24,182,214,0.5);
  outline:none;
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(24,182,214,0.2);
}

.lang-toggle:active{
  transform:translateY(0);
}

.lang-toggle:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* Hero Section */
.hero{
  display:grid;
  grid-template-columns:1fr 420px;
  gap:26px;
  align-items:start;
  padding:28px 0;
}

@media (max-width:1024px){
  .hero{
    grid-template-columns:1fr 380px;
    gap:20px;
    padding:24px 0;
  }
}

@media (max-width:920px){
  .hero{
    padding:20px 0;
  }
}

@media (max-width:480px){
  .hero{
    padding:16px 0;
  }
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  padding:28px;
  border-radius:var(--radius);
  box-shadow:0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
  transition:transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter:blur(10px);
}

@media (max-width:768px){
  .card{
    padding:18px;
  }
}

@media (max-width:480px){
  .card{
    padding:16px;
    border-radius:12px;
  }
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
}

.title{
  font-size:38px;
  margin:0 0 16px;
  line-height:1.15;
  font-weight:800;
  letter-spacing:-0.02em;
}

@media (max-width:768px){
  .title{
    font-size:32px;
    letter-spacing:-0.01em;
  }
}

@media (max-width:480px){
  .title{
    font-size:26px;
    line-height:1.25;
    letter-spacing:-0.01em;
  }
}

.subtitle{
  color:var(--muted);
  margin-bottom:20px;
  line-height:1.7;
  font-size:16px;
}

@media (max-width:768px){
  .subtitle{
    font-size:15px;
    margin-bottom:16px;
  }
}

@media (max-width:480px){
  .subtitle{
    font-size:14px;
    margin-bottom:14px;
  }
}

.type{
  color:var(--accent);
  font-weight:700;
  display:inline-block;
  min-width:200px;
  height:1.2em;
  vertical-align:bottom;
}

@media (max-width:768px){
  .type{
    min-width:180px;
  }
}

@media (max-width:480px){
  .type{
    min-width:160px;
    font-size:0.9em;
  }
}

/* Services */
.services{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:18px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.service{
  padding:24px;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  min-height:160px;
  transition:all 0.3s ease;
  cursor:pointer;
  border:1px solid rgba(255,255,255,0.05);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
  overflow:hidden;
}

.service::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  transform:scaleX(0);
  transition:transform 0.3s ease;
}

.service:hover::before{
  transform:scaleX(1);
}

.service:hover,
.service:focus{
  transform:translateY(-8px);
  box-shadow:0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  border-color:rgba(255,255,255,0.1);
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  outline:none;
}

.service h4{
  margin:0 0 10px;
  font-size:19px;
  font-weight:700;
  letter-spacing:-0.01em;
}

.service .small{
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

/* Contact Form */
.form-row{
  display:flex;
  gap:10px;
}

.input,
textarea{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.04);
  background:transparent;
  color:inherit;
  font-family:inherit;
  font-size:14px;
  transition:all 0.2s ease;
}

.input:focus,
textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(24,182,214,0.1);
}

.input.error,
textarea.error{
  border-color:var(--accent2);
  box-shadow:0 0 0 3px rgba(255,72,161,0.1);
}

.error-message{
  color:var(--accent2);
  font-size:12px;
  margin-top:4px;
  display:block;
}

.input::placeholder,
textarea::placeholder{
  color:var(--muted);
  opacity:0.6;
}

textarea{
  resize:vertical;
  min-height:120px;
}

label{
  display:block;
  margin-bottom:4px;
  margin-top:16px;
  font-weight:600;
  font-size:14px;
}

label:first-child{
  margin-top:0;
}

.button{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#001;
  padding:14px 24px;
  border-radius:12px;
  border:none;
  font-weight:700;
  cursor:pointer;
  font-size:15px;
  transition:all 0.3s ease;
  text-decoration:none;
  display:inline-block;
  text-align:center;
  box-shadow:0 4px 15px rgba(24,182,214,0.3);
  position:relative;
  overflow:hidden;
}

.button:hover,
.button:focus{
  transform:translateY(-3px);
  box-shadow:0 8px 25px rgba(24,182,214,0.4), 0 0 0 0 rgba(24,182,214,0.2);
  outline:none;
}

.button::before{
  content:'';
  position:absolute;
  top:0;
  left:-100%;
  width:100%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition:left 0.5s ease;
}

.button:hover::before{
  left:100%;
}

.button:active{
  transform:translateY(0);
}

.button-secondary{
  background:transparent;
  border:1px solid rgba(255,255,255,0.04);
  color:var(--accent);
}

.button-secondary:hover,
.button-secondary:focus{
  background:var(--glass);
  border-color:rgba(255,255,255,0.1);
}

.button-group{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* Info Block */
.info-block{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

/* Payment Note */
.payment-note{
  margin-top:20px;
  padding:12px 16px;
  background:rgba(24,182,214,0.1);
  border-radius:10px;
  border:1px solid rgba(24,182,214,0.2);
  font-size:13px;
  line-height:1.6;
  color:var(--accent);
  font-style:italic;
}

.payment-note strong{
  color:#fff;
  font-style:normal;
  font-weight:600;
}

.info-block a{
  color:var(--accent);
  text-decoration:none;
  transition:opacity 0.2s;
}

.info-block a:hover{
  opacity:0.8;
  text-decoration:underline;
}

/* KPI Items */
.kpi{
  display:flex;
  gap:12px;
  margin-top:22px;
}

.kpi .item{
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  padding:16px;
  border-radius:12px;
  font-weight:700;
  color:#fff;
  flex:1;
  text-align:center;
  transition:all 0.3s ease;
  border:1px solid rgba(255,255,255,0.05);
  position:relative;
  overflow:hidden;
}

.kpi .item:hover{
  background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(0,0,0,0.3);
  border-color:rgba(255,255,255,0.1);
}

/* Footer */
.footer{
  border-top:1px solid rgba(255,255,255,0.03);
  padding:26px 0;
  margin-top:40px;
  color:var(--muted);
  font-size:14px;
}

.footer-content{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
}

.footer a{
  color:var(--accent);
  text-decoration:none;
  transition:opacity 0.2s;
}

.footer a:hover{
  opacity:0.8;
  text-decoration:underline;
}

/* Modal */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.7);
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:1000;
  backdrop-filter:blur(4px);
}

.modal.active{
  display:flex;
}

.modal-content{
  max-width:680px;
  width:100%;
  background:var(--card);
  padding:24px;
  border-radius:var(--radius);
  position:relative;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  animation:modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn{
  from{
    opacity:0;
    transform:scale(0.9) translateY(-20px);
  }
  to{
    opacity:1;
    transform:scale(1) translateY(0);
  }
}

.modal-close{
  position:absolute;
  right:12px;
  top:12px;
  background:transparent;
  border:none;
  color:var(--muted);
  font-weight:700;
  cursor:pointer;
  font-size:28px;
  line-height:1;
  padding:4px 8px;
  border-radius:6px;
  transition:all 0.2s ease;
}

.modal-close:hover,
.modal-close:focus{
  color:#fff;
  background:var(--glass);
  outline:none;
}

.modal-title{
  margin:0 0 12px;
  font-size:24px;
}

.modal-body{
  color:var(--muted);
  line-height:1.6;
}

/* Utility Classes */
.small{
  font-size:14px;
}

.mt-0{
  margin-top:0;
}

.mt-10{
  margin-top:10px;
}

.mt-16{
  margin-top:16px;
}

.mt-18{
  margin-top:18px;
}

.text-center{
  text-align:center;
}

.contact-grid{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:18px;
}

@media (max-width:1024px){
  .contact-grid{
    grid-template-columns:1fr 320px;
    gap:16px;
  }
}

hr{
  margin:16px 0;
  border:none;
  border-top:1px solid rgba(255,255,255,0.03);
}

/* Responsive */
/* Tablet and smaller desktop */
@media (max-width:1024px){
  .hero{
    grid-template-columns:1fr 380px;
    gap:20px;
  }
  
  .contact-grid{
    grid-template-columns:1fr 320px;
    gap:16px;
  }
}

/* Tablet portrait */
@media (max-width:920px){
  .hero{
    grid-template-columns:1fr;
    padding-bottom:20px;
    gap:20px;
  }
  
  .grid{
    grid-template-columns:1fr 1fr;
    gap:16px;
  }
  
  .contact-grid{
    grid-template-columns:1fr;
    gap:20px;
  }
  
  .kpi{
    flex-wrap:wrap;
  }
  
  .kpi .item{
    min-width:calc(50% - 6px);
  }
}

/* Mobile landscape and small tablets */
@media (max-width:768px){
  .menu-toggle{
    display:block;
  }
  
  .nav{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:var(--card);
    flex-direction:column;
    padding:16px;
    border-radius:var(--radius);
    box-shadow:0 8px 30px rgba(2,6,23,0.6);
    margin-top:12px;
    gap:8px;
    z-index:1000;
  }
  
  .nav.active{
    display:flex;
  }
  
  .nav a{
    width:100%;
    text-align:left;
    padding:12px;
    font-size:16px;
  }
  
  .grid{
    grid-template-columns:1fr 1fr;
    gap:14px;
  }
  
  .service{
    min-height:140px;
    padding:16px;
  }
  
  .service h4{
    font-size:16px;
  }
  
  .button{
    padding:12px 18px;
    font-size:14px;
  }
  
  .button-group{
    gap:12px;
  }
  
  .subtitle{
    font-size:15px;
  }
  
  .info-block{
    font-size:13px;
  }
  
  .lang-toggle{
    padding:7px 12px;
    font-size:12px;
    min-width:45px;
  }
  
  .lang-toggle::before{
    font-size:14px;
  }
}

/* Mobile portrait */
@media (max-width:580px){
  .grid{
    grid-template-columns:1fr;
    gap:12px;
  }
  
  .service{
    min-height:130px;
    padding:14px;
  }
  
  .service h4{
    font-size:15px;
  }
  
  .service .small{
    font-size:13px;
  }
  
  .brand img{
    height:44px;
  }
  
  .brand-name{
    font-size:16px;
  }
  
  .brand-subtitle{
    font-size:11px;
  }
  
  .button-group{
    flex-direction:column;
    gap:10px;
  }
  
  .button-group .button{
    width:100%;
    padding:14px 20px;
  }
  
  .kpi{
    flex-direction:column;
    gap:10px;
  }
  
  .kpi .item{
    width:100%;
    padding:14px;
    font-size:14px;
  }
  
  .footer-content{
    flex-direction:column;
    text-align:center;
    gap:8px;
  }
  
  .footer{
    padding:20px 0;
    font-size:13px;
  }
  
  .modal-content{
    padding:20px;
    margin:16px;
  }
  
  .modal-title{
    font-size:20px;
  }
  
  .modal-body{
    font-size:14px;
  }
}

/* Small mobile */
@media (max-width:400px){
  .container{
    padding:12px;
  }
  
  .header{
    padding:8px 0;
  }
  
  .brand{
    gap:8px;
  }
  
  .brand img{
    height:40px;
  }
  
  .brand-name{
    font-size:15px;
  }
  
  .title{
    font-size:22px;
  }
  
  .subtitle{
    font-size:14px;
  }
  
  .card{
    padding:14px;
  }
  
  .button{
    padding:12px 16px;
    font-size:13px;
  }
  
  .input,
  textarea{
    padding:10px;
    font-size:14px;
  }
  
  label{
    font-size:13px;
  }
  
  .service{
    min-height:120px;
    padding:12px;
  }
  
  .service h4{
    font-size:14px;
  }
  
  .service .small{
    font-size:12px;
  }
}

/* Large screens */
@media (min-width:1400px){
  .container{
    max-width:1200px;
  }
  
  .hero{
    gap:32px;
  }
  
  .card{
    padding:28px;
  }
}

/* Touch device optimizations */
@media (hover:none) and (pointer:coarse){
  .button,
  .nav a,
  .service{
    min-height:44px;
  }
  
  .button{
    padding:14px 20px;
  }
  
  .nav a{
    padding:12px 16px;
  }
  
  .input,
  textarea{
    padding:14px;
    font-size:16px; /* Prevents zoom on iOS */
  }
}

/* Language Selection Popup */
#language-popup{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:rgba(0,0,0,0.85);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10000;
  backdrop-filter:blur(8px);
  animation:popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn{
  from{
    opacity:0;
  }
  to{
    opacity:1;
  }
}

#language-popup > div{
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  padding:32px;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.6);
  max-width:420px;
  width:90%;
  text-align:center;
  border:1px solid rgba(255,255,255,0.1);
  animation:popupSlideIn 0.4s ease;
}

@keyframes popupSlideIn{
  from{
    opacity:0;
    transform:scale(0.9) translateY(-20px);
  }
  to{
    opacity:1;
    transform:scale(1) translateY(0);
  }
}

#language-popup h3{
  margin:0 0 16px;
  font-size:24px;
  font-weight:700;
  color:#fff;
}

#language-popup p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.6;
  font-size:15px;
}

#language-popup p.popup-note{
  margin:0 0 24px;
  font-size:13px;
  color:var(--accent);
  font-style:italic;
  padding:12px;
  background:rgba(24,182,214,0.1);
  border-radius:8px;
  border:1px solid rgba(24,182,214,0.2);
}

#language-popup .popup-buttons{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}

#language-popup button{
  padding:12px 24px;
  border-radius:12px;
  border:none;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  transition:all 0.3s ease;
  min-width:140px;
}

#language-popup button.primary{
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  color:#001;
  box-shadow:0 4px 15px rgba(24,182,214,0.3);
}

#language-popup button.primary:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 25px rgba(24,182,214,0.4);
}

#language-popup button.secondary{
  background:transparent;
  border:1px solid rgba(255,255,255,0.1);
  color:var(--accent);
}

#language-popup button.secondary:hover{
  background:rgba(255,255,255,0.05);
  border-color:rgba(255,255,255,0.2);
}

@media (max-width:480px){
  #language-popup > div{
    padding:24px;
    max-width:90%;
  }
  
  #language-popup h3{
    font-size:20px;
  }
  
  #language-popup p{
    font-size:14px;
  }
  
  #language-popup .popup-buttons{
    flex-direction:column;
  }
  
  #language-popup button{
    width:100%;
  }
}
