@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Manrope:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root{
  --rsg-navy:#09247c;
  --rsg-navy-dark:#071b5e;
  --rsg-red:#e20613;
  --rsg-red-dark:#b8050f;
  --rsg-black:#0c0c0c;
  --rsg-gray:#61615f;
  --rsg-gray-light:#9a9a97;
  --rsg-white:#ffffff;
  --rsg-line:rgba(9,36,124,.10);
  --rsg-tint:#f4f6fb;
  --font-display:'Manrope', sans-serif;
  --font-body:'Inter', sans-serif;
  --header-h:84px;
}
@media (max-width:900px){ :root{ --header-h:68px; } }

.rsg-contact, .rsg-contact *{ box-sizing:border-box; }

.rsg-contact{
  position:relative;
  min-height:calc(100svh - var(--header-h));
  background:var(--rsg-tint);
  overflow:hidden;
  display:flex; align-items:stretch;
}
.rsg-contact__bg{
  position:absolute; inset:0; z-index:0;
  background:radial-gradient(circle at 1.5px 1.5px, rgba(9,36,124,.08) 1.5px, transparent 0) 0 0/28px 28px;
  mask-image:radial-gradient(ellipse 70% 60% at 85% 10%, #000 40%, transparent 88%);
  -webkit-mask-image:radial-gradient(ellipse 70% 60% at 85% 10%, #000 40%, transparent 88%);
}

.rsg-contact__inner{
  position:relative; z-index:1;
  display:grid; grid-template-columns:.86fr 1.14fr;
  width:100%; max-width:1360px; margin:0 auto;
}

/* ---- Panel lateral ---- */
.rsg-contact__panel{
  position:relative;
  background:var(--rsg-navy);
  color:var(--rsg-white);
  display:flex; align-items:center;
  padding:64px 56px;
  overflow:hidden;
}
.rsg-contact__panel::before{
  content:''; position:absolute; inset:0;
  background:radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,.06) 1.5px, transparent 0) 0 0/26px 26px;
  mask-image:radial-gradient(ellipse 75% 60% at 20% 15%, #000 40%, transparent 88%);
  -webkit-mask-image:radial-gradient(ellipse 75% 60% at 20% 15%, #000 40%, transparent 88%);
}
.rsg-contact__panel::after{
  content:''; position:absolute; width:340px; height:340px; border-radius:50%;
  background:rgba(226,6,19,.14); filter:blur(70px);
  bottom:-120px; right:-100px;
}
.rsg-contact__panel-inner{ position:relative; z-index:1; max-width:420px; }

.rsg-contact__eyebrow{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-body); font-weight:600; font-size:13px; letter-spacing:.4px;
  color:rgba(255,255,255,.6); margin-bottom:20px;
  opacity:0; transform:translateY(10px);
  transition:opacity .6s ease, transform .6s ease;
}
.rsg-contact__eyebrow-mark{ width:16px; height:2px; background:var(--rsg-red); display:inline-block; }
.rsg-contact.is-visible .rsg-contact__eyebrow{ opacity:1; transform:translateY(0); }

.rsg-contact__title{
  font-family:var(--font-display); font-weight:800; font-size:clamp(26px,2.6vw,36px); line-height:1.22;
  letter-spacing:-.3px; margin:0 0 18px;
  opacity:0; transform:translateY(14px);
  transition:opacity .65s ease .08s, transform .65s ease .08s;
}
.rsg-contact.is-visible .rsg-contact__title{ opacity:1; transform:translateY(0); }

.rsg-contact__desc{
  font-family:var(--font-body); font-size:15px; line-height:1.65; color:rgba(255,255,255,.68);
  margin:0 0 36px;
  opacity:0; transform:translateY(14px);
  transition:opacity .65s ease .16s, transform .65s ease .16s;
}
.rsg-contact.is-visible .rsg-contact__desc{ opacity:1; transform:translateY(0); }

.rsg-contact__info{
  list-style:none; margin:0 0 40px; padding:0;
  display:flex; flex-direction:column; gap:20px;
}
.rsg-contact__info li{
  display:flex; align-items:flex-start; gap:14px;
  font-family:var(--font-body); font-size:14.5px; line-height:1.55; color:rgba(255,255,255,.85);
  opacity:0; transform:translateY(12px);
  transition:opacity .55s ease, transform .55s ease;
}
.rsg-contact.is-visible .rsg-contact__info li:nth-child(1){ transition-delay:.24s; opacity:1; transform:translateY(0); }
.rsg-contact.is-visible .rsg-contact__info li:nth-child(2){ transition-delay:.32s; opacity:1; transform:translateY(0); }
.rsg-contact.is-visible .rsg-contact__info li:nth-child(3){ transition-delay:.4s; opacity:1; transform:translateY(0); }
.rsg-contact__info svg{ width:19px; height:19px; flex-shrink:0; color:var(--rsg-red); margin-top:1px; }
.rsg-contact__info a{ color:rgba(255,255,255,.85); text-decoration:none; transition:color .2s ease; }
.rsg-contact__info a:hover{ color:var(--rsg-white); text-decoration:underline; }

.rsg-contact__cta{
  display:flex; flex-wrap:wrap; gap:12px;
  opacity:0; transform:translateY(14px);
  transition:opacity .6s ease .48s, transform .6s ease .48s;
}
.rsg-contact.is-visible .rsg-contact__cta{ opacity:1; transform:translateY(0); }
.rsg-contact__cta-ghost{
  color:var(--rsg-white) !important; border-color:rgba(255,255,255,.3) !important;
}
.rsg-contact__cta-ghost:hover{
  background:rgba(255,255,255,.1) !important; border-color:var(--rsg-white) !important;
}

/* ---- Formulario ---- */
.rsg-contact__form-wrap{
  display:flex; align-items:center; justify-content:center;
  padding:64px 48px;
}
.rsg-contact__card{
  width:100%; max-width:600px;
  background:var(--rsg-white);
  border:1px solid var(--rsg-line);
  padding:44px 40px;
  opacity:0; transform:translateY(20px);
  transition:opacity .65s cubic-bezier(.22,1,.36,1) .1s, transform .65s cubic-bezier(.22,1,.36,1) .1s;
}
.rsg-contact.is-visible .rsg-contact__card{ opacity:1; transform:translateY(0); }

.rsg-contact__form-header{ margin-bottom:32px; }
.rsg-contact__form-title{
  font-family:var(--font-display); font-weight:800; font-size:24px; color:var(--rsg-navy); margin:0 0 8px;
}
.rsg-contact__form-sub{ font-family:var(--font-body); font-size:14px; color:var(--rsg-gray); margin:0; }

.rsg-contact__form{ display:flex; flex-direction:column; gap:22px; }
.rsg-contact__row--split{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }

.rsg-contact__field{ display:flex; flex-direction:column; gap:8px; }
.rsg-contact__field label{
  font-family:var(--font-body); font-weight:600; font-size:13px; color:var(--rsg-navy);
}
.rsg-contact__req{ color:var(--rsg-red); }

.rsg-contact__field input[type="text"],
.rsg-contact__field input[type="tel"],
.rsg-contact__field input[type="email"],
.rsg-contact__field textarea,
.rsg-contact__field select{
  width:100%;
  font-family:var(--font-body); font-size:14.5px; color:var(--rsg-black);
  background:transparent;
  border:none; border-bottom:1.5px solid var(--rsg-line);
  padding:9px 2px;
  transition:border-color .25s ease;
}
.rsg-contact__field textarea{ resize:none; }
.rsg-contact__field input:focus,
.rsg-contact__field textarea:focus,
.rsg-contact__field select:focus{
  outline:none; border-color:var(--rsg-navy);
}
.rsg-contact__field input::placeholder,
.rsg-contact__field textarea::placeholder{ color:var(--rsg-gray-light); }

.rsg-contact__select-wrap{ position:relative; }
.rsg-contact__select-wrap select{
  appearance:none; -webkit-appearance:none;
  padding-right:26px; cursor:pointer;
}
.rsg-contact__select-wrap::after{
  content:''; position:absolute; right:2px; top:50%; width:10px; height:10px;
  border-right:1.5px solid var(--rsg-gray); border-bottom:1.5px solid var(--rsg-gray);
  transform:translateY(-70%) rotate(45deg); pointer-events:none;
}

/* Teléfono con código de país */
.rsg-contact__phone-input{
  display:flex; align-items:center; gap:8px;
  border-bottom:1.5px solid var(--rsg-line);
  padding:9px 2px;
  transition:border-color .25s ease;
}
.rsg-contact__phone-input:focus-within{ border-color:var(--rsg-navy); }
.rsg-contact__phone-code{
  font-family:var(--font-body); font-weight:600; font-size:14px; color:var(--rsg-gray);
  flex-shrink:0;
}
.rsg-contact__phone-input input[type="tel"]{
  border:none !important; padding:0 !important;
}

/* Toggle: Cotización / Reunión */
.rsg-contact__toggle{ display:flex; gap:10px; }
.rsg-contact__toggle input{
  position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0);
}
.rsg-contact__toggle-option{
  flex:1; text-align:center; padding:12px 16px; cursor:pointer;
  border:1.5px solid var(--rsg-line);
  font-family:var(--font-body); font-weight:600; font-size:13.5px; color:var(--rsg-navy);
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.rsg-contact__toggle input:checked + .rsg-contact__toggle-option{
  background:var(--rsg-navy); border-color:var(--rsg-navy); color:var(--rsg-white);
}
.rsg-contact__toggle input:focus-visible + .rsg-contact__toggle-option{
  outline:2px solid var(--rsg-red); outline-offset:2px;
}

.rsg-contact__submit{ margin-top:10px; width:100%; }
.rsg-contact__submit:disabled{ opacity:.6; cursor:default; }

/* Alerta de error */
.rsg-contact__alert{
  margin-top:18px; padding:14px 16px;
  border-left:3px solid var(--rsg-red); background:rgba(226,6,19,.06);
  font-family:var(--font-body); font-size:13.5px; color:var(--rsg-red-dark);
  transition:opacity .3s ease;
}
.rsg-contact__alert p{ margin:0; }
.rsg-contact__alert.is-leaving{ opacity:0; }

/* Confirmación */
.rsg-contact__done{ text-align:center; padding:12px 4px; }
.rsg-contact__done-icon{
  width:64px; height:64px; margin:0 auto 20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(9,36,124,.08); color:var(--rsg-navy);
}
.rsg-contact__done-icon svg{ width:30px; height:30px; }
.rsg-contact__done-title{ font-family:var(--font-display); font-weight:800; font-size:22px; color:var(--rsg-navy); margin:0 0 12px; }
.rsg-contact__done-text{ font-family:var(--font-body); font-size:14.5px; line-height:1.6; color:var(--rsg-gray); margin:0 0 8px; }

/* ---- Responsive ---- */
@media (max-width:1080px){
  .rsg-contact__inner{ grid-template-columns:1fr; }
  .rsg-contact__panel{ padding:56px 40px 40px; }
  .rsg-contact__form-wrap{ padding:40px; }
}
@media (max-width:640px){
  .rsg-contact__panel{ padding:48px 24px 32px; }
  .rsg-contact__form-wrap{ padding:24px; }
  .rsg-contact__card{ padding:32px 24px; }
  .rsg-contact__row--split{ grid-template-columns:1fr; gap:22px; }
  .rsg-contact__cta{ flex-direction:column; }
  .rsg-contact__cta .rsg-btn{ width:100%; }
}

@media (prefers-reduced-motion:reduce){
  .rsg-contact *{ transition:none !important; animation:none !important; }
  .rsg-contact__eyebrow, .rsg-contact__title, .rsg-contact__desc,
  .rsg-contact__info li, .rsg-contact__cta, .rsg-contact__card{
    opacity:1 !important; transform:none !important;
  }
}