.lang{
  position:fixed;
  top:clamp(12px, 2vw, 16px);
  right:clamp(12px, 2vw, 16px);
  z-index:20;

  display:inline-flex;
  align-items:center;
  gap:6px;

  padding:8px 10px;
  border-radius:999px;

  background:rgba(15,17,19,.55);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.lang button{
  background:transparent;
  border:0;
  color:var(--muted);
  cursor:pointer;

  padding:6px 10px;
  border-radius:999px;

  font-size:14px;
  line-height:1;
  white-space:nowrap;

  transition:
    color .15s ease,
    background-color .15s ease,
    opacity .15s ease,
    transform .15s ease,
    box-shadow .15s ease,
    border-color .15s ease;
}

/* ✅ Estado activo del idioma (CSS-driven, accesible) */
.lang button[aria-pressed="true"]{
  border:1px solid rgba(244, 242, 238, 0.35);
  background:rgba(244, 242, 238, 0.12);
  color:var(--fg);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.lang button:hover{
  color:var(--fg);
  background:rgba(255,255,255,.06);
}

.lang button:focus-visible{
  outline:2px solid rgba(31,122,109,.95);
  outline-offset:2px;
  color:var(--fg);
  background:rgba(31,122,109,.12);
}

.lang button:active{
  opacity:.85;
}

/* -------------------------------------------------
   LANGUAGE SELECTOR — PRO (trigger + dropdown/sheet)
   ------------------------------------------------- */

.lang-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:44px;
  height:36px;
  padding:0 14px;

  border-radius:999px;
  background:transparent;
  border:0;

  color:var(--fg);
  cursor:pointer;
  font-size:14px;
  line-height:1;
  white-space:nowrap;

  transition:
    background-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.lang-trigger:hover{
  background:rgba(255,255,255,.06);
}

.lang-trigger:focus-visible{
  outline:2px solid rgba(31,122,109,.95);
  outline-offset:2px;
  background:rgba(31,122,109,.12);
}

.lang-trigger[aria-expanded="true"]{
  border:1px solid rgba(244, 242, 238, 0.35);
  background:rgba(244, 242, 238, 0.12);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.lang-current{
  font-weight:500;
  letter-spacing:.02em;
}

/* Dropdown menu (desktop) */
.lang-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;

  min-width:180px;
  padding:6px;

  background:#111315;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;

  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.lang-menu[hidden]{ display:none; }

.lang-menu li{ list-style:none; }

.lang-menu button{
  width:100%;
  text-align:left;

  background:transparent;
  border:0;
  border-radius:8px;

  padding:10px 12px;
  font-size:14px;
  color:var(--fg);
  cursor:pointer;

  transition:
    background-color .12s ease,
    color .12s ease;
}

.lang-menu button:hover{
  background:rgba(255,255,255,.06);
}

.lang-menu button:focus-visible{
  outline:2px solid rgba(31,122,109,.95);
  outline-offset:2px;
  background:rgba(31,122,109,.12);
}

.lang-menu button[aria-checked="true"]{
  background:rgba(31,122,109,.18);
  color:var(--fg);
}

/* Mobile sheet */
@media (max-width:720px){
  /* FIX iOS Safari: evita clipping del sheet al tener backdrop-filter en el trigger */
  .lang{
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }

  .lang-menu{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    top:auto;

    border-radius:16px 16px 0 0;
    padding:16px;

    background:#0f1113;
    box-shadow: 0 -20px 50px rgba(0,0,0,.6);
  }

  .lang-menu button{
    font-size:16px;
    padding:14px 12px;
  }
}

/* CTA */
.cta{
  display:inline-block;
  margin-top:24px;
  padding:14px 26px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  border:0;
  cursor:pointer;

  border:1px solid rgba(255,255,255,.10);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.22),
    0 0 0 rgba(0,0,0,0);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    filter .12s ease,
    background-color .12s ease;
}

.cta:hover{
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.28),
    0 10px 24px rgba(0,0,0,.28);
  filter: brightness(1.05);
}

.cta:focus-visible{
  outline:2px solid rgba(31,122,109,.95);
  outline-offset:3px;
  box-shadow: 0 0 0 4px rgba(31,122,109,.25);
}

.cta:active{
  transform: translateY(0);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.28),
    0 6px 16px rgba(0,0,0,.25);
}

/* --------- FASE 2.3 — CTA disabled --------- */
.cta:disabled,
.cta[aria-disabled="true"]{
  cursor:not-allowed;
  pointer-events:none;

  background:rgba(31,122,109,.35);
  border-color:rgba(31,122,109,.35);

  color:rgba(255,255,255,.9);
  box-shadow:none;
  filter:none;
  transform:none;
  opacity:1;
}

.form{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:24px;
}
.form input,
.form textarea{
  background:#14181b;
  border:1px solid #222;
  color:var(--fg);
  padding:12px 14px;
  border-radius:8px;
}

/* ---------------------------------------------
   FORM — SUCCESS STATUS (post-submit)
   --------------------------------------------- */

#contact-status{
  margin-top:12px;
  padding:12px 14px;
  border-radius:10px;

  background:rgba(31,122,109,.12);
  border:1px solid rgba(31,122,109,.35);

  color:var(--fg);
  font-size:14px;
  line-height:1.4;

  animation: fadeInStatus .25s ease-out both;
}

@keyframes fadeInStatus{
  from{
    opacity:0;
    transform: translateY(-2px);
  }
  to{
    opacity:1;
    transform:none;
  }
}
