:root {
  --bg: #f6f5f1;      /* blanco suave, cálido, menos brillante que #fff */
  --surface: #fdfcf9;
  --text: #2a2a2c;
  --muted: #6b6b70;
  --accent: #4f46e5;
  --border: #e4e2dc;
  --max: 1080px;
  --nav-width: 190px; /* espacio reservado a la izquierda para el dial */
  --item-size: 54px;  /* alto de cada opción del slider */

  /* ---- Receta "liquid glass" compartida por todas las piezas ---- */
  /* Tinte: casi transparente, deja ver el fondo desenfocado */
  --glass-tint: rgba(255, 255, 255, .3);
  --glass-tint-strong: rgba(255, 255, 255, .44);
  /* Reflejo: más luz arriba, se apaga al centro y vuelve un poco abajo (como vidrio curvo) */
  --glass-sheen: linear-gradient(180deg,
    rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .14) 32%,
    rgba(255, 255, 255, .04) 62%, rgba(255, 255, 255, .2) 100%);
  /* Desenfoque + saturación: lo de atrás se ve difuso pero más vivo */
  --glass-filter: blur(28px) saturate(1.9) brightness(1.05);
  /* Bordes de luz: canto brillante arriba y a los lados, reflejo suave abajo */
  --glass-edge:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .35),
    inset 1px 0 0 rgba(255, 255, 255, .45),
    inset -1px 0 0 rgba(255, 255, 255, .45);
  /* Contorno muy fino para separarlo del fondo claro */
  --glass-ring: 0 0 0 .5px rgba(0, 0, 0, .09);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Work Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Navegación: dial selector infinito sobre un panel de vidrio ---------- */
.slider-nav {
  position: fixed; left: 12px; top: 50%; transform: translateY(-50%);
  z-index: 20;
  width: calc(var(--nav-width) - 24px); height: min(88vh, 720px);
  border-radius: 34px;
  overflow: hidden;
  user-select: none; touch-action: none;
  outline: none;
  background: var(--glass-sheen), var(--glass-tint);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-edge), var(--glass-ring), 0 24px 60px rgba(40, 30, 80, .12);
}
.slider-nav.dragging, .slider-nav.dragging * { cursor: grabbing !important; }

/* Zona donde se mueven las opciones: se desvanece arriba y abajo para que parezca no tener fin */
.slider-viewport {
  position: absolute; inset: 0; z-index: 1;
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
}

/* El selector: una "lente" de vidrio más clara, fija en el medio; las opciones pasan por debajo */
.slider-nav::before {
  content: "";
  position: absolute; left: 10px; right: 10px; top: 50%; z-index: 0;
  height: calc(var(--item-size) - 8px);
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .6));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 1px rgba(0, 0, 0, .04),
    0 0 0 .5px rgba(0, 0, 0, .07),
    0 1px 3px rgba(0, 0, 0, .06),
    0 8px 20px rgba(40, 30, 80, .1);
}
/* Marca de color a la izquierda del selector */
.slider-nav::after {
  content: "";
  position: absolute; left: 22px; top: 50%; z-index: 2;
  width: 4px; height: 16px; border-radius: 4px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #8b85ff, var(--accent));
  box-shadow: 0 0 8px rgba(79, 70, 229, .45);
}
.slider-nav:focus-visible::before { box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(40, 30, 80, .1); }

.slider-track {
  position: absolute; top: 0; left: 0; width: 100%;
  display: flex; flex-direction: column;
  will-change: transform;
}

.slider-item {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: var(--item-size); flex-shrink: 0;
  font-weight: 500; font-size: 1.02rem; white-space: nowrap;
  color: rgba(42, 42, 44, .78);
  cursor: pointer;
  transition: color .2s;
  -webkit-user-drag: none;
  outline: none;
}
/* Al pasar el mouse por una opción aparece una píldora de vidrio tenue: se nota que se puede tocar */
.slider-item::before {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 6px; bottom: 6px;
  border-radius: 999px;
  /* Sobre el vidrio claro, un gris muy leve se nota más que el blanco */
  background: rgba(42, 42, 44, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 0 .5px rgba(0, 0, 0, .06);
  opacity: 0; transform: scale(.94);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.slider-item:not(.selected):hover::before { opacity: 1; transform: scale(1); }
.slider-item:not(.selected):active::before { transform: scale(.96); background: rgba(42, 42, 44, .09); }
.slider-item:hover { color: var(--text); }
.slider-item:focus-visible::before { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px var(--accent); }
/* El JS gira y escala el texto según su distancia al selector (efecto rueda).
   Solo se transforma el texto: la zona de clic queda fija y no se pisa con la de al lado */
.slider-item span {
  display: inline-block;
  pointer-events: none;
  will-change: transform, opacity;
}
.slider-item.selected { color: var(--text); font-weight: 600; cursor: default; }

/* Flechas arriba y abajo: dicen "esto se desliza" y avanzan de a una opción */
.dial-arrow {
  position: absolute; left: 50%; z-index: 3;
  width: 30px; height: 30px; margin-left: -15px;
  display: grid; place-items: center;
  border: none; border-radius: 50%; cursor: pointer;
  color: rgba(42, 42, 44, .55);
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 .5px rgba(0, 0, 0, .07), 0 3px 10px rgba(40, 30, 80, .08);
  transition: transform .15s, color .15s, background .15s;
}
.dial-prev { top: 12px; }
.dial-next { bottom: 12px; }
.dial-arrow svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.dial-arrow:hover { color: var(--text); background: rgba(255, 255, 255, .85); transform: scale(1.08); }
.dial-arrow:active { transform: scale(.92); }
.dial-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Pequeño empujón de las flechas al cargar la página: invita a deslizar */
.dial-prev { animation: nudge-up 1.6s .6s ease-in-out 2; }
.dial-next { animation: nudge-down 1.6s .6s ease-in-out 2; }
@keyframes nudge-up { 50% { transform: translateY(-4px); } }
@keyframes nudge-down { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  .dial-arrow { animation: none; }
}

/* ---------- Inicio: ficha central de vidrio ---------- */
.hero {
  display: grid; place-items: center;
  padding: 2rem 16px;
}

.profile-card {
  width: 100%; max-width: 380px;
  border-radius: 34px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  background: var(--glass-sheen), var(--glass-tint);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-edge), var(--glass-ring), 0 30px 70px rgba(40, 30, 80, .12);
}

/* Foto reactiva: JS ajusta --rx/--ry (inclinación), --tx/--ty (atracción) y --s (escala) */
.avatar-btn {
  --rx: 0deg; --ry: 0deg; --tx: 0px; --ty: 0px; --s: 1; --gx: 50%; --gy: 50%; --glare: 0;
  position: relative; display: block;
  width: 140px; height: 140px; margin: 0 auto 1.25rem;
  padding: 0; border: none; background: none; border-radius: 50%;
  cursor: zoom-in;
  transform: perspective(600px) translate(var(--tx), var(--ty)) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.avatar-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.avatar-btn:active .avatar { transform: scale(.96); }
.avatar { transition: transform .15s; }

/* Brillo que sigue al cursor */
.avatar-glare {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .45), transparent 55%);
  opacity: var(--glare); mix-blend-mode: soft-light;
  transition: opacity .3s;
}

.avatar {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%; /* centra la cara dentro del círculo */
  /* Aro de vidrio alrededor de la foto */
  border: 4px solid rgba(255, 255, 255, .75);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 10px 28px rgba(40, 30, 80, .18);
}

.profile-card h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  line-height: 1.2;
}
.role { color: var(--muted); margin-top: .35rem; }

.facts {
  list-style: none; text-align: left;
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); /* línea grabada en el vidrio */
  display: grid; gap: .6rem;
}
.facts li { display: flex; justify-content: space-between; gap: 1rem; }
.facts .fact-label { color: var(--muted); }

/* ---------- Switch de idioma (banderas Argentina / EE. UU.) ---------- */
.lang-switch {
  --opt-w: 40px; --opt-h: 30px; --pad: 3px;
  position: relative; display: inline-flex; padding: var(--pad);
  border-radius: 999px;
  background: var(--glass-sheen), var(--glass-tint);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-edge), var(--glass-ring), 0 8px 22px rgba(40, 30, 80, .1);
}
/* La "lente" de vidrio que se desliza hasta la bandera elegida */
.lang-thumb {
  position: absolute; top: var(--pad); left: var(--pad);
  width: var(--opt-w); height: var(--opt-h); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .65));
  box-shadow: inset 0 1px 0 #fff, 0 0 0 .5px rgba(0, 0, 0, .07), 0 2px 7px rgba(40, 30, 80, .16);
  transition: transform .4s cubic-bezier(.34, 1.4, .64, 1);
}
.lang-switch[data-active="en"] .lang-thumb { transform: translateX(var(--opt-w)); }
.lang-opt {
  position: relative; z-index: 1;
  width: var(--opt-w); height: var(--opt-h);
  display: grid; place-items: center;
  border: none; border-radius: 999px; background: none; padding: 0; cursor: pointer;
}
.lang-opt svg {
  display: block; width: 21px; height: 14px; border-radius: 3px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2);
  filter: grayscale(.75) opacity(.5);
  transition: filter .25s, transform .2s;
}
.lang-opt[aria-pressed="true"] svg, .lang-opt:hover svg { filter: none; }
.lang-opt:active svg { transform: scale(.88); }
.lang-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* El de la página: arriba a la derecha, por encima de las ventanas */
.lang-switch-global { position: fixed; top: 16px; right: 16px; z-index: 99999; }

/* El de cada ventana: más chico, a la derecha de la barra de título */
.window-bar .lang-switch {
  --opt-w: 32px; --opt-h: 24px; --pad: 2px;
  position: absolute; right: 12px;
  background: rgba(42, 42, 44, .05);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05), inset 0 -1px 0 rgba(255, 255, 255, .6);
}
.window-bar .lang-opt svg { width: 18px; height: 12px; }

/* ---------- Ventanas estilo macOS (foto y secciones) ---------- */
.mac-window {
  margin: auto; padding: 0; border: none;
  border-radius: 26px; overflow: hidden;
  background: var(--glass-sheen), var(--glass-tint-strong);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-edge), var(--glass-ring), 0 34px 90px rgba(30, 20, 60, .24);
  color: var(--text);
}

/* Mini ventana de la foto */
.photo-window { width: min(440px, calc(100vw - 32px)); }
.photo-window::backdrop {
  background: rgba(30, 30, 40, .22);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}
.photo-window[open] { animation: window-in .38s cubic-bezier(.2, .9, .25, 1.1); }
.photo-window[open]::backdrop { animation: fade-in .3s ease; }
.photo-window.closing { animation: window-out .2s ease forwards; }
.photo-window.closing::backdrop { animation: fade-in .2s ease reverse forwards; }

@keyframes window-in { from { opacity: 0; transform: scale(.88) translateY(14px); filter: blur(4px); } }
@keyframes window-out { to { opacity: 0; transform: scale(.94); filter: blur(3px); } }
@keyframes fade-in { from { opacity: 0; } }

/* Barra de título integrada al vidrio (sin línea divisoria, como macOS actual) */
.window-bar {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 16px;
}
.traffic { position: absolute; left: 18px; display: flex; gap: 8px; }
.dot {
  position: relative;
  width: 12px; height: 12px; border-radius: 50%; border: none; padding: 0;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18), inset 0 1px 1px rgba(255, 255, 255, .45);
}
.dot-close { background: radial-gradient(circle at 50% 30%, #ff8a82, #ff5f57 55%, #e5463f); cursor: pointer; }
.dot-min { background: radial-gradient(circle at 50% 30%, #ffd36b, #febc2e 55%, #e0a020); }
.dot-max { background: radial-gradient(circle at 50% 30%, #5fe06e, #28c840 55%, #1fa834); }
/* Símbolos que aparecen al pasar por los botones, como en macOS */
.dot::after {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; line-height: 1;
  opacity: 0; transition: opacity .15s;
}
.dot-close::after { content: "×"; font-size: 11px; color: rgba(90, 0, 0, .7); }
.dot-min::after { content: "−"; color: rgba(110, 60, 0, .7); }
.dot-max::after { content: "+"; color: rgba(0, 80, 0, .7); }
.traffic:hover .dot::after { opacity: 1; }
.window-title { font-size: .82rem; font-weight: 600; color: rgba(42, 42, 44, .72); }

.photo-window img {
  display: block; width: calc(100% - 20px); height: auto; margin: 0 10px 10px;
  max-height: calc(100vh - 120px); object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08);
}

/* Ventanas de sección: flotan sobre la página, se pueden mover y abrir varias.
   El JS fija su posición (left/top) y el orden (z-index) */
.section-window {
  position: fixed; z-index: 30; margin: 0;
  width: min(560px, calc(100vw - var(--nav-width) - 48px));
  min-height: min(360px, 70vh); max-height: 80vh;
  display: flex; flex-direction: column;
  transition: box-shadow .25s, background-color .25s;
}
.section-window.opening { animation: window-in .38s cubic-bezier(.2, .9, .25, 1.1); }
.section-window.closing { animation: window-out .2s ease forwards; pointer-events: none; }
/* Aviso al elegir en el dial una ventana que ya estaba abierta */
.section-window.attention { animation: attention .35s ease; }
@keyframes attention { 40% { transform: scale(1.025); } }

/* Barra de título: de ahí se arrastra la ventana */
.section-window .window-bar { cursor: grab; touch-action: none; user-select: none; }
.section-window.moving .window-bar { cursor: grabbing; }
.section-window.moving {
  box-shadow: var(--glass-edge), var(--glass-ring), 0 46px 110px rgba(30, 20, 60, .3);
}

/* Ventanas de fondo: como en macOS, más transparentes, sombra suave y botones grises */
.section-window:not(.focused) {
  background: var(--glass-sheen), var(--glass-tint);
  box-shadow: var(--glass-edge), var(--glass-ring), 0 16px 44px rgba(30, 20, 60, .14);
}
.section-window:not(.focused) .window-title { opacity: .55; }
.section-window:not(.focused) .traffic:not(:hover) .dot {
  background: rgba(0, 0, 0, .12);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08);
}

.window-body { padding: .5rem 2rem 2rem; overflow-y: auto; }

.panel h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.6rem; margin-bottom: .75rem;
}
.panel p { color: var(--muted); }

/* ---------- Sobre mí ---------- */
.panel-about p {
  display: flex; gap: .75rem; align-items: flex-start;
  color: var(--text); font-size: 1rem; line-height: 1.65;
}
.panel-about p + p { margin-top: 1rem; }
.panel-about strong { font-weight: 700; letter-spacing: .02em; }
/* Emoji en una pequeña burbuja de vidrio al inicio de cada párrafo */
.panel-about .emoji {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.15rem; line-height: 1;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 .5px rgba(0, 0, 0, .06), 0 2px 8px rgba(40, 30, 80, .06);
}
.panel-about .about-cta {
  margin-top: 1.4rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(0, 0, 0, .07);
  align-items: center;
}
/* Enlace que abre otra ventana (por ejemplo, Contacto) */
.open-section {
  color: var(--accent); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px;
  text-underline-offset: 3px; text-decoration-color: rgba(79, 70, 229, .35);
  transition: text-decoration-color .15s;
}
.open-section:hover { text-decoration-color: var(--accent); }
.open-section:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Ventana de contacto: español | inglés ---------- */
/* Más ancha que las demás para que entren las dos columnas */
.section-window[data-section="contacto"] { width: min(840px, calc(100vw - var(--nav-width) - 48px)); }
.section-window[data-section="contacto"] .window-body { container-type: inline-size; }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1px 1fr; gap: 1.75rem;
}
/* Línea vertical "grabada" en el vidrio entre los dos idiomas */
.contact-divider {
  background: linear-gradient(transparent, rgba(0, 0, 0, .09) 20%, rgba(0, 0, 0, .09) 80%, transparent);
  box-shadow: 1px 0 0 rgba(255, 255, 255, .6);
}

/* El idioma de la ventana va primero (a la izquierda o arriba); el otro queda al lado */
.contact-col[lang="es"] { order: 0; }
.contact-divider { order: 1; }
.contact-col[lang="en"] { order: 2; }
.section-window[data-lang="en"] .contact-col[lang="en"] { order: 0; }
.section-window[data-lang="en"] .contact-col[lang="es"] { order: 2; }

.contact-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.flag {
  display: block; flex-shrink: 0;
  width: 30px; height: 20px; border-radius: 5px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18), 0 2px 6px rgba(40, 30, 80, .14);
}
.flag svg { display: block; width: 100%; height: 100%; }
.lang-tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
  padding: .15rem .6rem; border-radius: 999px;
  background: rgba(42, 42, 44, .05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.contact-col h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.35rem; margin-bottom: .3rem;
}
.contact-col > p { color: var(--muted); font-size: .9rem; margin-bottom: 1.1rem; }

.mail-list { list-style: none; display: grid; gap: .55rem; }

/* Cada correo: una tarjeta de vidrio con ícono, motivo, dirección y botón de copiar */
.mail-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .55rem .6rem .65rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 0 0 .5px rgba(0, 0, 0, .06), 0 2px 8px rgba(40, 30, 80, .04);
  transition: transform .18s, background .18s, box-shadow .18s;
}
.mail-row:hover {
  background: rgba(255, 255, 255, .72);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 .5px rgba(0, 0, 0, .07), 0 8px 20px rgba(40, 30, 80, .09);
}

.mail-icon {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 8px rgba(0, 0, 0, .12);
}
.mail-icon svg {
  width: 18px; height: 18px;
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.mail-text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.mail-label { font-size: .76rem; color: var(--muted); }
.mail-addr {
  font-weight: 500; font-size: .92rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.mail-addr:hover { color: var(--accent); }
.mail-addr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Botón de copiar: muestra un ✓ y un globito "Copiado / Copied" */
.copy-btn {
  position: relative; flex-shrink: 0;
  width: 32px; height: 32px; border: none; border-radius: 10px;
  display: grid; place-items: center;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.copy-btn:hover { background: rgba(42, 42, 44, .07); color: var(--text); }
.copy-btn:active { transform: scale(.9); }
.copy-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.copy-btn svg {
  grid-area: 1 / 1; width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity .15s, transform .2s;
}
.copy-btn .icon-check { opacity: 0; transform: scale(.6); }
.copy-btn.copied { color: #1f9d48; }
.copy-btn.copied .icon-copy { opacity: 0; transform: scale(.6); }
.copy-btn.copied .icon-check { opacity: 1; transform: scale(1); }
.copy-btn::after {
  content: attr(data-done);
  position: absolute; bottom: calc(100% + 6px); right: 0;
  padding: 3px 9px; border-radius: 8px;
  font-size: .72rem; font-weight: 500; white-space: nowrap;
  background: rgba(30, 30, 34, .85); color: #fff;
  opacity: 0; transform: translateY(3px); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.copy-btn.copied::after { opacity: 1; transform: none; }

/* Ventana angosta (celular o pantalla chica): un idioma debajo del otro */
@container (max-width: 620px) {
  .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .09) 20%, rgba(0, 0, 0, .09) 80%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  }
}

/* ---------- Aviso "liquid glass" (3+ ventanas abiertas) ---------- */
.glass-toast {
  position: fixed; top: 16px; left: 50%; z-index: 100000;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 22px 9px 9px;
  border: none; border-radius: 999px;
  font: inherit; color: var(--text); text-align: left; cursor: pointer;
  background: var(--glass-sheen), var(--glass-tint);
  backdrop-filter: blur(22px) saturate(2) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(2) brightness(1.08);
  box-shadow: var(--glass-edge), var(--glass-ring), 0 14px 40px rgba(30, 20, 60, .16);
  overflow: hidden;
  /* Escondido arriba; entra con un pequeño rebote */
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -140%) scale(.9);
  transition: transform .55s cubic-bezier(.34, 1.45, .64, 1), opacity .3s ease;
}
.glass-toast.show {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.glass-toast.show:hover { transform: translate(-50%, 0) scale(1.03); }
.glass-toast.show:active { transform: translate(-50%, 0) scale(.97); transition-duration: .15s; }
.glass-toast:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Reflejo curvo en la parte de arriba, como el vidrio de Apple */
.glass-toast::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 70% at 30% -10%, rgba(255, 255, 255, .7), transparent 55%);
}
/* Destello que cruza el vidrio al aparecer */
.glass-toast::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
}
.glass-toast.show::after { animation: glass-sheen 1.1s .25s ease; }
@keyframes glass-sheen { to { left: 130%; } }

.toast-icon {
  position: relative; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #8b85ff, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 10px rgba(79, 70, 229, .3);
}
.toast-icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round;
}
.toast-count {
  position: absolute; top: -3px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center;
  background: #ff3b30; color: #fff; font-size: .7rem; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .8);
}
.toast-text { position: relative; display: grid; line-height: 1.25; }
.toast-text strong { font-size: .92rem; font-weight: 600; }
.toast-text small { font-size: .78rem; color: var(--muted); }

/* ---------- Página: una sola pantalla con la ficha ---------- */
main { flex: 1; display: grid; padding-left: var(--nav-width); } /* espacio para la navegación */

.site-footer {
  padding: 1.25rem 0 1.25rem var(--nav-width);
  text-align: center; color: var(--muted); font-size: .85rem;
}

/* ---------- Móvil: el dial pasa abajo, como una barra de vidrio flotante ---------- */
@media (max-width: 720px) {
  :root { --item-size: 118px; } /* en horizontal, ancho de cada opción */
  .slider-nav {
    top: auto; bottom: 12px; left: 12px; right: 12px; transform: none;
    width: auto; height: 60px; border-radius: 30px;
  }
  .slider-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  }
  .slider-nav::before {
    left: 50%; right: auto; top: 50%;
    width: calc(var(--item-size) - 10px); height: 44px;
    transform: translate(-50%, -50%);
  }
  .slider-nav::after {
    left: 50%; top: auto; bottom: 5px;
    width: 16px; height: 3px; transform: translateX(-50%);
  }
  .slider-track { flex-direction: row; height: 100%; width: auto; }
  .slider-item { height: 100%; width: var(--item-size); }
  .slider-item::before { left: 6px; right: 6px; top: 8px; bottom: 8px; }
  /* En horizontal las flechas van a los costados */
  .dial-arrow { top: 50%; bottom: auto; left: auto; margin: -14px 0 0; width: 28px; height: 28px; }
  .dial-prev { left: 8px; }
  .dial-next { right: 8px; }
  .dial-arrow svg { transform: rotate(-90deg); }
  @keyframes nudge-up { 50% { transform: translateX(-4px); } }
  @keyframes nudge-down { 50% { transform: translateX(4px); } }
  main, .site-footer { padding-left: 0; }
  .site-footer { padding-bottom: 6rem; }
  .section-window {
    width: calc(100vw - 32px);
    min-height: min(320px, 60vh); max-height: calc(100vh - 110px); /* deja libre el dial de abajo */
  }
}
