/* =========================
   UMBRAL — index.css (limpio)
   ========================= */

/* Reset + base */
*{ box-sizing: border-box; }
html, body{
  height: 100%;
  margin: 0;
}
body{
  background: #dadada;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Grano (ruta relativa al CSS: ElVueloDeLosEstorninos/css/index.css) */
  background-image: url("../../LaVisionDePtolomeo/graficos/Ruido_1.jpg");
  background-repeat: repeat;
  background-size: 200px 200px;
  background-position: center;

  /* amortiguación */
  background-color: #dddedc;
  background-blend-mode: normal;
}

/* =========================
   AJUSTES MANUALES (TOCA AQUÍ)
   ========================= */
:root{
  /* Alturas de franjas */
  --f1: 140px;
  --f2: clamp(520px, 72vh, 1108px);

  /* Centrado de imagen (object-position) */
  --img-offset-x: 0px;
  --img-offset-y: -120px;

  /* Ajuste fino del bloque de botones */
  --btn-offset-y: -120px;

  /* Espaciados */
  --brand-pad: 26px;
  --btn-gap: 10px;

  /* Tipos */
  --brand-size: 1.0rem;
  --btn-size: 2rem;
  --subbtn-size: 1.05rem;
}

/* =========================
   LAYOUT GENERAL
   ========================= */
.layout{
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--f1) var(--f2) 1fr;
}
/* ===============================
   LANGUAGE SWITCH (UMBRAL)
================================= */

.lang-switch {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 12px;
  font-family: system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.lang-switch .lang {
  text-decoration: none;
  font-size: 0.9rem;
  color: #444;
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(3px);
  transition: all 0.3s ease;
}

.lang-switch .lang:hover {
  color: #fd6400;
  border-color: #fd6400;
  background: rgba(255,255,255,0.9);
}

/* Responsive */

@media (max-width: 768px) {
  .lang-switch {
    top: 15px;
    left: 15px;
  }

  .lang-switch .lang {
    font-size: 0.8rem;
    padding: 5px 8px;
  }
}

/* =========================
   FRANJA 1 — marca (arriba derecha)
   ========================= */
.franja-1{
  display: grid;
  align-items: start;
  justify-items: end;
  padding: var(--brand-pad);
}

.btn-tienda{
  margin: 0;
  padding: 12px 18px;
  background: transparent;
  border: 0;
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: var(--brand-size);
  font-weight: 305;
  color: rgba(248, 10, 14, 0.50);
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.btn-tienda:hover{ color: rgba(248, 10, 14, 0.75); }
.btn-tienda:focus-visible{
  outline: 2px solid rgba(248, 10, 14, 0.45);
  outline-offset: 4px;
  border-radius: 8px;
}

/* =========================
   FRANJA 2 — imagen (centrada)
   ========================= */
.franja-2{
  display: grid;
  place-items: center;
  overflow: hidden;
}

.umbral-link{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

/* Imagen estable al cambiar tamaño */
.umbral-img{
  width: 100%;
  height: 100%;
  display: block;

  /* Si quieres que NO recorte nunca, cambia a: contain */
  object-fit: cover;

  /* centrado + offsets afinables */
  object-position: calc(50% + var(--img-offset-x)) calc(50% + var(--img-offset-y));
}

/* =========================
   FRANJA 3 — acciones (EMPEZAR + tienda)
   ========================= */
.franja-3{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--btn-gap);
  transform: translateY(var(--btn-offset-y));
  padding: 0 16px 24px;
}

/* Centrado perfecto de texto */
.btn-abrir,
.btn-irATienda{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;

  width: max-content;
  max-width: min(92vw, 720px);
  white-space: normal;

  background: transparent;
  border: 0;
  font-family: 'Ubuntu', system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.btn-abrir{
  margin: 0;
  padding: 14px 22px;
  font-size: var(--btn-size);
  color: rgba(12, 101, 0, 0.50);
}
.btn-abrir:hover{ color: rgba(12, 101, 0, 0.72); }

.btn-irATienda{
  margin: 0;
  padding: 10px 18px;
  font-size: var(--subbtn-size);
  color: rgba(12, 101, 0, 0.30);
}
.btn-irATienda:hover{ color: rgba(12, 101, 0, 0.55); }

.btn-abrir:focus-visible,
.btn-irATienda:focus-visible{
  outline: 2px solid rgba(12, 101, 0, 0.35);
  outline-offset: 6px;
  border-radius: 10px;
}

/* =========================
   MEDIA QUERIES
   ========================= */

/* Pantallas bajas */
@media (max-height: 760px){
  :root{
    --f1: 96px;
    --f2: clamp(420px, 74vh, 900px);
    --btn-offset-y: -110px;
    --brand-pad: 18px;
    --btn-gap: 8px;
  }
}

/* Móvil */
@media (max-width: 480px){
  :root{
    --f1: 84px;
    --f2: clamp(420px, 70vh, 860px);

    --btn-offset-y: -84px;
    --brand-pad: 14px;
    --btn-gap: 10px;

    --brand-size: 1.0rem;
    --btn-size: 1.55rem;
    --subbtn-size: 0.95rem;
  }

  .btn-tienda{ padding: 10px 12px; }
  .btn-abrir{ padding: 12px 18px; }
  .btn-irATienda{ padding: 10px 14px; }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px){
  :root{
    --f1: 120px;
    --f2: clamp(520px, 70vh, 980px);
    --btn-offset-y: -130px;

    --btn-size: 1.85rem;
    --subbtn-size: 1.05rem;
  }
}