/* ============================================================
   TEMA EDITORIAL — papel claro, tipografía serif y datos a la
   vista. El visor se queda oscuro: encima de imagen en
   movimiento no hay nada legible que no sea un panel oscuro.

   OJO: hay motores de render que parsean oklch() dentro de
   gradient() pero no lo pintan. Los degradados van en rgb.
   ============================================================ */
/* ============================================================
   EL PLANTÍO · TEMA CLARO — prototipo

   Traslada el registro de lafinca.golf a nuestro contenido:
   papel blanco, tinta gris verdosa, tarjetas sin sombra ni
   esquinas redondeadas, y un display serif como única voz alta.

   Su acento es un magenta de marca; el nuestro es el verde del
   club, que pasa de ser el fondo a ser el acento.

   Su display (Allrounder Antiqua) es de licencia comercial: aquí
   se comparan tres antiquas libres con el mismo carácter. El texto
   sí es Lato, que es exactamente la suya y es libre.

   OJO: este motor de render no pinta oklch() dentro de gradient().
   Los degradados van en rgb.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

:root {
  --papel:   #ffffff;
  --panel:   oklch(0.972 0.004 155);   /* el gris casi blanco de las tarjetas */
  --linea:   oklch(0.922 0.006 155);
  --tinta:   oklch(0.380 0.020 168);   /* gris verdoso, no negro */
  --tinta-tenue: oklch(0.640 0.012 168);
  --verde:   oklch(0.400 0.085 158);   /* el acento: el verde del club */
  --oro:     oklch(0.680 0.090 85);    /* el oro champán, de apoyo */

  --display: 'Newsreader', Georgia, serif;
}

body {
  background: var(--papel); color: var(--tinta);
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 16px; line-height: 1.6;
}
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.05; }
p { margin: 0; text-wrap: pretty; }
.envoltorio { width: min(1240px, 100% - 10vw); margin-inline: auto; }

/* el display es la única voz alta de la página */
.display {
  font-family: var(--display); font-weight: 300; font-style: italic;
  color: var(--verde); letter-spacing: -0.005em;
}

/* ---------- cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 40;
  background: rgb(255 255 255 / .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}
.cabecera .envoltorio { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--tinta); }
.marca img { height: 34px; width: auto; display: block; }
.marca b { font-weight: 400; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase; }
.cabecera nav { display: flex; gap: 2.2rem; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.cabecera nav a { color: var(--tinta-tenue); text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.cabecera nav a.activo, .cabecera nav a:hover { color: var(--verde); border-color: var(--verde); }


/* ---------- el menú de móvil ---------- */
.menu-btn { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--tinta); }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 4px 0; transition: transform .25s, opacity .2s; }
.abierto-menu .menu-btn span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.abierto-menu .menu-btn span:nth-child(2) { opacity: 0; }
.abierto-menu .menu-btn span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero video, .hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero::after {          /* solo lo justo para que la tipografía agarre */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgb(20 30 26 / .62), rgb(20 30 26 / .12) 46%, transparent 70%);
}
.hero .envoltorio { position: relative; z-index: 2; padding: 0 0 3.4rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem; flex-wrap: wrap; }
.hero h1 { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(2.8rem, 7vw, 5.4rem); color: #fff; }
.hero .sub { color: rgb(255 255 255 / .82); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; margin-top: .9rem; }
.cifras { display: flex; gap: 2.6rem; }
.cifras div { padding-left: 1.6rem; border-left: 1px solid rgb(255 255 255 / .35); }
.cifras dt { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgb(255 255 255 / .72); margin: 0; }
.cifras dd { margin: .5rem 0 0; font-size: 2.1rem; color: #fff; font-weight: 300; line-height: 1; }

/* ---------- secciones ---------- */
section { padding: 6.5rem 0; }
.titulo-seccion { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: .8rem; }
.entradilla { max-width: 56ch; color: var(--tinta-tenue); margin-bottom: 3.2rem; }

/* ---------- la rejilla de hoyos ---------- */
.hoyos { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); list-style: none; padding: 0; margin: 0; }
.hoyo { background: var(--panel); border: 1px solid var(--linea); display: flex; flex-direction: column; }
.hoyo-media { position: relative; height: 240px; overflow: hidden; background: var(--linea); }
.hoyo-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* el carrusel: el fotograma del vuelo y el plano dibujado del hoyo */
.laminas { display: flex; height: 100%; transition: transform .38s cubic-bezier(.4,0,.2,1); }
.lamina { flex: 0 0 100%; height: 100%; position: relative; }
/* La acuarela es un PLANO del hoyo: recortarla cortaría el tee o el
   green. Va entera sobre blanco, como una lámina impresa. */
.acuarela { height: 100%; background: #fff; display: grid; place-items: center; padding: .6rem; }
.acuarela img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* flechas: discretas, y solo al pasar por encima en escritorio */
.flecha {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 30px; height: 44px; padding: 0; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgb(255 255 255 / .82); color: oklch(0.380 0.020 168);
  box-shadow: 0 0 0 1px rgb(20 30 26 / .10);
  transition: opacity .2s, background-color .2s;
}
.flecha:hover { background: #fff; }
.flecha.izq { left: 0; }
.flecha.der { right: 0; }
.flecha svg { width: 13px; height: 13px; display: block; }
@media (hover: hover) {
  .flecha { opacity: 0; }
  .hoyo-media:hover .flecha, .flecha:focus-visible { opacity: 1; }
}

/* la imagen entera lleva al hoyo, por debajo de flechas y puntos */
.media-enlace { position: absolute; z-index: 1; inset: 0; }
.puntos { position: absolute; z-index: 2; left: 0; right: 0; bottom: .7rem; display: flex; justify-content: center; gap: .4rem; }
.puntos button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(255 255 255 / .55); box-shadow: 0 0 0 1px rgb(20 30 26 / .25);
}
.puntos button[aria-pressed="true"] { background: #fff; }

.hoyo-cuerpo { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.hoyo-titulo { padding: 1rem 1.1rem; border-bottom: 1px solid var(--linea); text-transform: uppercase; }
.hoyo-titulo .num { font-size: 1.32rem; line-height: 1; display: block; }
.hoyo-titulo .nombre { font-size: .95rem; font-weight: 300; line-height: 1; display: block; margin-top: .45rem; color: var(--tinta-tenue); }
.hoyo-datos { display: flex; margin: auto 0 0; padding: 0; list-style: none; }
.hoyo-datos li { flex: 1; padding: 1rem 1.1rem; display: grid; gap: .7rem; }
.hoyo-datos .v { font-size: 1.28rem; line-height: 1; }
.hoyo-datos .k { font-size: .76rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-tenue); }
.hoyo:hover { border-color: oklch(0.400 0.085 158 / .45); }
.hoyo:hover .hoyo-titulo .num { color: var(--verde); }


/* ---------- la tarjeta de campo ---------- */
.tarjeta-envoltorio { overflow-x: auto; }
table.tarjeta { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.tarjeta th, table.tarjeta td { padding: .72rem .9rem; text-align: right; white-space: nowrap; }
table.tarjeta th:first-child, table.tarjeta td:first-child,
table.tarjeta th:nth-child(2), table.tarjeta td:nth-child(2) { text-align: left; }
table.tarjeta thead th {
  font-weight: 400; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tinta-tenue); border-bottom: 1px solid var(--linea); padding-bottom: .9rem;
}
table.tarjeta tbody td { border-bottom: 1px solid var(--linea); }
table.tarjeta tbody tr:hover td { background: oklch(0.400 0.085 158 / .04); }
table.tarjeta .hoyo-n { color: var(--tinta-tenue); font-variant-numeric: tabular-nums; }
table.tarjeta .hoyo-nombre { font-weight: 400; }

/* La tarjeta es la tercera puerta al hoyo. El enlace no se subraya de
   serie —en una tabla de números sería ruido—: se anuncia con el hover
   de la fila, que ya existía, y se subraya al pasar por encima. */
table.tarjeta .hoyo-n a,
table.tarjeta .hoyo-nombre a { color: inherit; text-decoration: none; }
table.tarjeta tbody tr:hover .hoyo-n a,
table.tarjeta tbody tr:hover .hoyo-nombre a { color: var(--verde); text-decoration: underline; text-underline-offset: .18em; }
table.tarjeta .hoyo-n a:focus-visible,
table.tarjeta .hoyo-nombre a:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; border-radius: 2px; }
/* cada columna de barras lleva el tinte de su tee, como en la tarjeta de papel */
/* blanco roto: la columna de blancas tiene que leerse como columna
   de barras, no confundirse con el papel del resto de la tabla */
table.tarjeta .t-blancas   { background: oklch(0.972 0.006 92); }
table.tarjeta .t-amarillas { background: oklch(0.960 0.055 95); }
table.tarjeta .t-azules    { background: oklch(0.945 0.030 245); }
table.tarjeta .t-rojas     { background: oklch(0.950 0.035 25); }
table.tarjeta thead .t-blancas, table.tarjeta thead .t-amarillas,
table.tarjeta thead .t-azules,  table.tarjeta thead .t-rojas { color: var(--tinta); }
table.tarjeta tfoot td {
  font-weight: 700; border-top: 2px solid var(--tinta); border-bottom: 0;
  padding-top: .9rem; text-transform: uppercase; font-size: .82rem; letter-spacing: .06em;
}
table.tarjeta .corte td { background: oklch(0.968 0.004 155); font-weight: 700; }
.tarjeta-nota { margin-top: 1.2rem; font-size: .82rem; color: var(--tinta-tenue); }


/* ---------- la calculadora de hándicap ---------- */
.calc {
  margin-top: 3.5rem; padding-top: 2.6rem; border-top: 1px solid var(--linea);
  display: grid; gap: 2.4rem; align-items: end;
}
@media (min-width: 900px) { .calc { grid-template-columns: 1fr auto; } }
.calc-campos { display: grid; gap: 1.6rem 2.2rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.calc-campo { display: grid; gap: .55rem; }
.calc-campo label {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-tenue);
}
.calc-campo select, .calc-campo input {
  appearance: none; background: transparent; color: var(--tinta);
  border: 0; border-bottom: 1px solid var(--linea); border-radius: 0;
  padding: .45rem 0; font: 400 1.15rem/1.2 'Lato', sans-serif;
}
.calc-campo select { padding-right: 1.4rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23789' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right .2rem center; }
.calc-campo select:focus, .calc-campo input:focus { outline: 0; border-bottom-color: var(--verde); }
.calc-campo input::-webkit-outer-spin-button, .calc-campo input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.calc-salida { text-align: right; padding-left: 2.4rem; border-left: 1px solid var(--linea); }
.calc-salida .n {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: clamp(3.4rem, 8vw, 5rem); line-height: .9; color: var(--verde); display: block;
}
.calc-salida .k { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-tenue); display: block; margin-top: .7rem; }
.calc-detalle { margin-top: 1.4rem; font-size: .8rem; color: var(--tinta-tenue); }
@media (max-width: 899px) {
  .calc-salida { text-align: left; padding: 1.6rem 0 0; border-left: 0; border-top: 1px solid var(--linea); }
}



/* la entrada del mapa, al modo de La Finca: la frase en el display
   pero en tinta, que el verde se reserva para los títulos de sección */
.intro-mapa {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1.18;
  color: var(--tinta); max-width: 26ch; margin-bottom: 1.2rem;
}

/* ---------- el mapa del campo ---------- */
.mapa { position: relative; }
.mapa img { width: 100%; height: auto; display: block; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; text-decoration: none;
  background: var(--verde); color: #fff;
  font: 400 .86rem/1 'Lato', sans-serif;
  box-shadow: 0 2px 8px rgb(20 40 30 / .28);
  transition: transform .18s cubic-bezier(.3,1.4,.5,1), background-color .18s;
}
.pin:hover, .pin:focus-visible {
  background: oklch(0.320 0.075 158); transform: translate(-50%, -50%) scale(1.22); z-index: 3;
}
/* El cartelito del mapa. Se apoya en el hover, así que solo existe con
   ratón: en táctil el pin ya lleva al hoyo de un toque. */
.pin-tip {
  position: absolute; z-index: 5; pointer-events: none;
  transform: translate(-50%, calc(-100% - 24px));
  display: flex; align-items: baseline; gap: 1.5rem; white-space: nowrap;
  background: #fff; color: var(--tinta);
  border: 1px solid var(--linea);
  box-shadow: 0 10px 28px rgb(20 40 30 / .16);
  padding: .55rem .85rem;
  opacity: 0; transition: opacity .16s ease;
}
.pin-tip.visible { opacity: 1; }
.pin-tip[hidden] { display: none; }   /* hidden pierde contra display: flex */
.pt-hoyo { font-size: .86rem; }
.pt-datos { font-size: .74rem; letter-spacing: .06em; color: var(--tinta-tenue); }

/* sin ratón no hay hover que valga */
@media (hover: none), (max-width: 760px) { .pin-tip { display: none !important; } }

.mapa-nota { margin-top: 1.4rem; font-size: .82rem; color: var(--tinta-tenue); text-align: center; }
@media (max-width: 760px) {
  .pin { width: 24px; height: 24px; font-size: .72rem; }
}


/* modo edición de los pines: ?editar en la URL */
.editando .pin { cursor: grab; }
.editando .pin:active { cursor: grabbing; }
.editor {
  position: fixed; z-index: 70; left: 1rem; bottom: 1rem; max-width: min(560px, 92vw);
  background: oklch(0.24 0.02 165 / .95); color: #fff; backdrop-filter: blur(6px);
  padding: .9rem 1.1rem; font: 400 .74rem/1.5 ui-monospace, Menlo, monospace;
}
.editor b { display: block; font-weight: 400; opacity: .65; margin-bottom: .5rem;
  font-family: 'Lato', sans-serif; letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; }
.editor textarea { width: 100%; height: 84px; background: rgb(255 255 255 / .08); color: #fff;
  border: 0; padding: .5rem; font: inherit; resize: vertical; }

/* ---------- resto ---------- */

@media (max-width: 760px) {
  /* En vertical el menú no cabe junto al logotipo y se le monta encima.
     Se retira: la página de hoyo ya tiene su propia navegación debajo y
     el índice es una sola página. Queda pendiente un menú de verdad. */

  /* El menú no cabe junto al logotipo, así que se pliega. */
  .menu-btn { display: block; }
  .cabecera nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--linea); padding: .4rem 5vw 1.2rem;
  }
  .abierto-menu .cabecera nav { display: flex; }
  .cabecera nav a { padding: .95rem 0; border-bottom: 1px solid var(--linea); border-top: 0; font-size: .82rem; }
  .cabecera nav a:last-child { border-bottom: 0; }
  .cabecera nav a.activo { border-color: var(--linea); }
  .cabecera { position: sticky; }
  .cabecera .envoltorio { height: 62px; }
  .marca img { height: 28px; }
  .hero .envoltorio { padding-bottom: 2.2rem; }
  .cifras { gap: 1.4rem; }
  .cifras div { padding-left: 1rem; }
  .cifras dd { font-size: 1.5rem; }
  section { padding: 4rem 0; }
  .hoyo-media { height: 210px; }
}

/* ============================================================
   PÁGINA DE HOYO
   ============================================================ */
/* ============================================================
   EL PLANTÍO · PÁGINA DE HOYO — prototipo

   Misma estética que el resto del tema claro. El bloque grande
   "Recorre el hoyo" abre NUESTRO visor: vídeo y tour de 360º a
   pantalla completa, y ahí sí manda el panel oscuro, que es lo
   único legible encima de imagen en movimiento.

   OJO: este motor de render no pinta oklch() dentro de gradient().
   Los degradados van en rgb.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

:root {
  --papel: #ffffff;
  --panel: oklch(0.972 0.004 155);
  --linea: oklch(0.922 0.006 155);
  --tinta: oklch(0.380 0.020 168);
  --tinta-tenue: oklch(0.640 0.012 168);
  --verde: oklch(0.400 0.085 158);
  --display: 'Newsreader', Georgia, serif;
  color-scheme: light;
}
body { background: var(--papel); color: var(--tinta); font-family: 'Lato', system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.05; }
p { margin: 0; text-wrap: pretty; }
.envoltorio { width: min(1240px, 100% - 10vw); margin-inline: auto; }
.display { font-family: var(--display); font-weight: 300; font-style: italic; color: var(--verde); letter-spacing: -0.005em; }

/* ---------- cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.cabecera .envoltorio { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.marca img { height: 34px; width: auto; display: block; }
.cabecera nav { display: flex; gap: 2.2rem; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.cabecera nav a { color: var(--tinta-tenue); text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.cabecera nav a.activo, .cabecera nav a:hover { color: var(--verde); border-color: var(--verde); }


/* ---------- miga de pan ---------- */
.miga { padding: 1.6rem 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-tenue); }
.miga a { color: inherit; text-decoration: none; }
.miga a:hover { color: var(--verde); }
.miga .actual { color: var(--verde); }

/* ---------- hero del hoyo ---------- */
.hero { position: relative; min-height: 72vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgb(20 30 26 / .66), rgb(20 30 26 / .12) 46%, transparent 70%); }
.hero .envoltorio { position: relative; z-index: 2; padding: 0 0 3.2rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
.hero .num { color: rgb(255 255 255 / .82); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(2.6rem, 6.6vw, 5rem); color: #fff; margin-top: .5rem; }
.cifras { display: flex; gap: 2.4rem; }
.cifras div { padding-left: 1.5rem; border-left: 1px solid rgb(255 255 255 / .35); }
.cifras dt { margin: 0; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: rgb(255 255 255 / .72); }
.cifras dd { margin: .45rem 0 0; font-size: 2rem; color: #fff; font-weight: 300; line-height: 1; }

/* ---------- navegación entre hoyos ---------- */
.nav-hoyos { background: var(--panel); }
.nav-hoyos .envoltorio { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.9rem 0; }
.nav-hoyos a { display: grid; gap: .3rem; text-decoration: none; color: var(--tinta); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.nav-hoyos a:hover { color: var(--verde); }
.nav-hoyos .nombre { font-family: var(--display); font-style: italic; font-size: 1.15rem; letter-spacing: 0; text-transform: none; color: var(--verde); }
.nav-hoyos .der { text-align: right; }

section { padding: 6rem 0; }
.titulo-seccion { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: .8rem; }
.entradilla { max-width: 52ch; color: var(--tinta-tenue); }

/* ---------- el hoyo contado + su plano ---------- */
.historia { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .historia { grid-template-columns: 1fr 1fr; gap: 4.5rem; } }
.historia .texto p { font-size: 1.06rem; margin-top: 1.4rem; }
.historia .plano { margin: 0; }
.historia .plano img { width: 100%; height: auto; display: block; }

/* ---------- distancias ---------- */
.distancias { display: flex; flex-wrap: wrap; margin-top: 2.6rem; border-top: 1px solid var(--linea); }
.distancias div { flex: 1 1 130px; padding: 1.3rem 0; border-bottom: 1px solid var(--linea); }
.distancias dt { margin: 0; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-tenue); display: flex; align-items: center; gap: .5rem; }
.distancias .punto { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18); }
.distancias dd { margin: .6rem 0 0; font-size: 1.6rem; font-weight: 300; line-height: 1; }

/* ---------- recorre el hoyo: la puerta al visor ---------- */
.recorre { background: var(--panel); }
.recorre-cabecera { display: grid; gap: 1.2rem; margin-bottom: 2.6rem; }
@media (min-width: 900px) { .recorre-cabecera { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; } }
/* de lado a lado, como en La Finca: se sale del envoltorio */
.puerta {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 16 / 9; max-height: 82vh; overflow: hidden; background: #0d1512;
}
.puerta img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.puerta:hover img { transform: scale(1.03); }
.puerta::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(13 21 18 / .72), rgb(13 21 18 / .05) 42%, rgb(13 21 18 / .18));
}
.puerta-barra {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.6rem 2rem; color: #fff;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}
.puerta-play {
  position: absolute; z-index: 2; inset: 0; display: grid; place-items: center;
  color: #fff;
}
.puerta-play span {
  width: 74px; height: 74px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .7);
  display: grid; place-items: center; backdrop-filter: blur(2px);
  transition: background-color .25s, transform .25s;
}
.puerta:hover .puerta-play span { background: rgb(255 255 255 / .16); transform: scale(1.06); }
.puerta-play svg { width: 20px; height: 20px; margin-left: 3px; }

/* ---------- galería ---------- */
.galeria { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 3rem; }
.galeria figure { margin: 0; }
.galeria img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.galeria figcaption { margin-top: .7rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-tenue); }


/* ---------- la lupa de la galería ---------- */
.galeria button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.lupa { position: fixed; inset: 0; z-index: 95; background: rgb(8 14 12 / .96); display: none; }
.lupa.abierta { display: grid; grid-template-rows: 1fr auto; }
.lupa-marco { display: grid; place-items: center; padding: 4.5rem 4.5rem 1rem; min-height: 0; }
.lupa-marco img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lupa-pie { padding: 0 1.8rem 1.8rem; display: flex; align-items: center; justify-content: center; gap: 1.6rem;
  color: rgb(255 255 255 / .8); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.lupa-flecha, .lupa-cerrar {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .3);
  background: none; color: #fff; cursor: pointer; display: grid; place-items: center; flex: none;
}
.lupa-cerrar { position: absolute; top: 1.4rem; right: 1.8rem; }
@media (max-width: 760px) { .lupa-marco { padding: 3.5rem 1rem 1rem; } }

/* ============================================================
   EL VISOR — el mismo que ya tiene el motor: ficha, reproductor y
   puntos. Oscuro a propósito: encima de imagen en movimiento no hay
   nada legible que no sea un panel oscuro. La información se repite
   con la página del hoyo, y está bien: se puede llegar aquí desde
   cualquier sitio y la ficha se cierra.
   ============================================================ */
.visor { position: fixed; inset: 0; z-index: 90; background: #0b1310; display: none; }
.visor.abierto { display: block; }
.visor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* el tour dentro del visor */
.visor-360 { position: absolute; inset: 0; }
.visor-360[hidden] { display: none; }
.pano-lienzo, .visor-360 > .pano-lienzo { position: absolute; inset: 0; }
.pano-vacio { position: absolute; inset: 0; display: grid; place-content: center; margin: 0;
  color: rgb(255 255 255 / .55); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; }
.pano-hotspot { background: none; border: 0; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: .4rem; }
.hotspot-bola img { display: block; filter: drop-shadow(0 3px 8px rgb(0 0 0 / .5)); transition: transform .2s; }
.pano-hotspot:hover .hotspot-bola img { transform: scale(1.18); }
.hotspot-etiqueta { color: #fff; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgb(12 22 18 / .78); padding: .28rem .6rem; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.pano-hotspot:hover .hotspot-etiqueta, .pano-hotspot:focus-visible .hotspot-etiqueta { opacity: 1; }
/* selector de punto de vista, junto al conmutador */
.vistas-360 { display: flex; gap: .3rem; background: rgb(255 255 255 / .1); padding: .25rem; border-radius: 999px; }
.vistas-360[hidden] { display: none; }
.vistas-360 button { background: none; border: 0; color: rgb(255 255 255 / .72); cursor: pointer;
  font: 400 .72rem/1 'Lato', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  padding: .5rem 1rem; border-radius: 999px; }
.vistas-360 button[aria-pressed="true"] { background: #fff; color: #14231d; }

.visor-barra {
  position: absolute; z-index: 4; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.8rem;
}
.conmutador { display: flex; gap: .3rem; background: rgb(255 255 255 / .1); padding: .25rem; border-radius: 999px; }
.conmutador button {
  background: none; border: 0; color: rgb(255 255 255 / .72); cursor: pointer;
  font: 400 .74rem/1 'Lato', sans-serif; letter-spacing: .14em; text-transform: uppercase;
  padding: .55rem 1.1rem; border-radius: 999px;
}
.conmutador button[aria-pressed="true"] { background: #fff; color: #14231d; }
.visor-cerrar {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .32);
  background: none; color: #fff; cursor: pointer; display: grid; place-items: center;
}

/* la ficha: se abre entera con el hoyo y se retira con la X */
.ficha {
  position: absolute; z-index: 3; inset: 0; margin: auto;
  width: min(560px, calc(100% - 3rem)); height: max-content;
  max-height: calc(100% - 12rem);
  overflow-y: auto;
  background: rgb(16 28 23 / .88); backdrop-filter: blur(3px);
  border: 1px solid rgb(255 255 255 / .12);
  box-shadow: 0 30px 80px rgb(4 10 8 / .55);
  padding: 2rem 2.3rem; color: #fff;
}
.ficha[hidden] { display: none; }
.ficha-cabeza { display: flex; align-items: baseline; gap: 1rem; }
.ficha-num { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 2.9rem; line-height: 1; color: rgb(255 255 255 / .5); }
.ficha-nombre { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 2.5rem; line-height: 1; }
.ficha-meta { margin-top: .5rem; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgb(255 255 255 / .55); }
.ficha-cerrar {
  margin-left: auto; width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .28); background: none; color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.ficha p { margin-top: 1.3rem; font-size: 1rem; line-height: 1.6; color: rgb(255 255 255 / .88); }
.ficha-barras { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.ficha-barras li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; font-size: .92rem; color: rgb(255 255 255 / .8); }
.ficha-barras .punto { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .3); }
.ficha-barras .m { margin-left: auto; }

/* el pie: reproductor y navegación entre hoyos */
.visor-pie {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: grid; justify-items: center; gap: 1rem; padding: 1.4rem 1.8rem 1.8rem;
  background: linear-gradient(to top, rgb(11 19 16 / .72), transparent);
}
.reproductor[hidden] { display: none; }   /* otra vez: hidden pierde contra display */
.reproductor { display: flex; align-items: center; gap: .3rem; background: rgb(16 28 23 / .86);
  border: 1px solid rgb(255 255 255 / .18); border-radius: 999px; padding: .3rem .45rem; }
.reproductor button { background: none; border: 0; padding: .5rem .7rem; color: #fff; cursor: pointer;
  display: grid; place-items: center; position: relative; }
/* El atributo hidden NO surte efecto sobre <svg>: la regla del navegador
   [hidden]{display:none} es del espacio de nombres HTML, y un <svg> no lo
   es (comprobado: span y p dan display:none, svg da display:inline). Sin
   esta línea los dos iconos se pintan APILADOS —el botón es display:grid—
   y el reproductor crece 15 px, que en móvil vertical se nota. */
.reproductor svg[hidden] { display: none; }
.reproductor .salto { position: absolute; font-size: .55rem; font-weight: 700; }
.visor-nav { display: flex; align-items: center; gap: 1rem; }
.visor-flecha { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .28);
  background: none; color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.visor-flecha:hover { background: rgb(255 255 255 / .12); }
.puntos-hoyos { display: flex; align-items: center; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.puntos-hoyos button {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: none; cursor: pointer;
  color: rgb(255 255 255 / .5); font: 400 .68rem/1 'Lato', sans-serif;
}
.puntos-hoyos button:hover { color: #fff; }
.puntos-hoyos button[aria-current="true"] { color: #14231d; background: #fff; }
.visor-cuenta { color: rgb(255 255 255 / .8); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; display: none; }
/* El rótulo del pie: oculto por defecto, solo aparece en apaisado. */
.visor-rotulo {
  display: none; margin: 0; color: #fff;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  text-shadow: 0 1px 12px rgb(0 0 0 / .7); white-space: nowrap;
}

/* ---------- MÓVIL EN HORIZONTAL ----------
   La pantalla es muy baja y lo que importa es ver el hoyo. La ficha
   entera desaparece —ya se ha leído en vertical, que es como se empieza—
   y toda la navegación se reparte en UNA sola línea abajo: el hoyo a la
   izquierda, el reproductor en el centro y el salto de hoyo a la derecha. */
@media (orientation: landscape) and (max-height: 560px) {
  .ficha { display: none !important; }   /* ni con la clase, ni sin ella */

  .visor-pie {
    grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: .8rem;
    padding: .6rem 1rem .7rem;
  }
  .visor-rotulo { display: block; grid-column: 1; justify-self: start; }
  .reproductor  { grid-column: 2; justify-self: center; }
  .visor-nav    { grid-column: 3; justify-self: end; gap: .7rem; }

  /* la barra de arriba también se aprieta */
  .visor-barra { padding: .7rem 1rem; }
  .visor-cerrar { width: 36px; height: 36px; }
  .conmutador button { padding: .45rem .9rem; font-size: .7rem; }
}

@media (max-width: 900px) {
  .puntos-hoyos { display: none; }
  .visor-cuenta { display: block; }
  .ficha { padding: 1.5rem 1.4rem; max-height: calc(100% - 10rem); }
  .ficha p { font-size: .95rem; }
}

@media (max-width: 760px) {
  /* En vertical el menú no cabe junto al logotipo y se le monta encima.
     Se retira: la página de hoyo ya tiene su propia navegación debajo y
     el índice es una sola página. Queda pendiente un menú de verdad. */

  /* El menú no cabe junto al logotipo, así que se pliega. */
  .menu-btn { display: block; }
  .cabecera nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--linea); padding: .4rem 5vw 1.2rem;
  }
  .abierto-menu .cabecera nav { display: flex; }
  .cabecera nav a { padding: .95rem 0; border-bottom: 1px solid var(--linea); border-top: 0; font-size: .82rem; }
  .cabecera nav a:last-child { border-bottom: 0; }
  .cabecera nav a.activo { border-color: var(--linea); }
  .cabecera { position: sticky; }
  .cabecera .envoltorio { height: 62px; }
  .marca img { height: 28px; }
  section { padding: 3.6rem 0; }
  .hero { min-height: 62vh; }
  .cifras { gap: 1.3rem; }
  .cifras div { padding-left: .9rem; }
  .cifras dd { font-size: 1.4rem; }
  .puerta-barra { padding: 1rem 1.1rem; font-size: .68rem; letter-spacing: .1em; }
  .puerta-play span { width: 56px; height: 56px; }
  .nav-hoyos .envoltorio { padding: 1.3rem 0; gap: .6rem; }
  .nav-hoyos a { font-size: .66rem; letter-spacing: .08em; }
  .nav-hoyos .nombre { font-size: .95rem; }
  .miga { font-size: .64rem; letter-spacing: .1em; }
}
