/* ==========================================================================
   Vivienda Turística by Theia Island
   Hoja de estilos principal
   Paleta negra y dorada derivada del emblema (sol, luna, palmeras, villa).
   ========================================================================== */

:root {
  /* Color */
  --bg: #0b0b0c;
  --bg-2: #111113;
  --bg-3: #16161a;
  --gold: #c9a24b;
  --gold-2: #e0c886;
  --gold-soft: rgba(201, 162, 75, 0.16);
  --ink: #ece9e3;
  --muted: #a39c90;
  --line: rgba(201, 162, 75, 0.22);
  --line-soft: rgba(236, 233, 227, 0.08);

  /* Tipografía */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Medidas */
  --maxw: 1100px;
  --maxw-narrow: 740px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* --- Reset suave ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Brillo sutil de fondo, evoca el sol del emblema */
  background-image:
    radial-gradient(900px 480px at 78% -8%, rgba(201, 162, 75, 0.10), transparent 60%),
    radial-gradient(700px 420px at 10% 0%, rgba(201, 162, 75, 0.05), transparent 55%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-2); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: 0.2px;
}

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}
.container-narrow { max-width: var(--maxw-narrow); }

/* Accesibilidad: enlace para saltar al contenido */
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 1000;
  background: var(--gold);
  color: #111;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { left: 16px; }

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- "Nodo" decorativo (cuadrado dorado girado, como los del anillo) ------ */
.node {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: 0 0 auto;
  box-shadow: 0 0 10px rgba(201, 162, 75, 0.55);
}

/* --- Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.18s ease,
              border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #14120c;
  box-shadow: 0 10px 26px rgba(201, 162, 75, 0.28);
}
.btn-gold:hover { color: #14120c; }

.btn-ghost {
  background: transparent;
  color: var(--gold-2);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--gold-soft); border-color: var(--gold); }

.btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  transform: none;
}

/* --- Eyebrow (texto pequeño superior) ------------------------------------ */
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
  font-weight: 600;
}

/* --- Cabecera ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 12, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 14px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 42px; height: 42px; filter: drop-shadow(0 0 8px rgba(201,162,75,0.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Navegación */
.nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
}
.nav-menu a:hover { color: var(--gold-2); }
.nav-menu a.is-active { color: var(--gold-2); }
.nav-menu a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.nav-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px !important;
  color: var(--gold-2) !important;
}
.nav-cta:hover { background: var(--gold-soft); border-color: var(--gold); }

/* Botón hamburguesa (sólo móvil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--gold-2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Estrellas tenues, evocan el cielo del emblema */
  background-image:
    radial-gradient(1.5px 1.5px at 16% 24%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.5px 1.5px at 72% 16%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at 42% 38%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 88% 42%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1.5px 1.5px at 28% 64%, rgba(201,162,75,0.45), transparent),
    radial-gradient(1px 1px at 60% 72%, rgba(255,255,255,0.25), transparent);
  opacity: 0.7;
}
.hero-inner { position: relative; z-index: 1; }

.hero-emblem {
  width: 132px;
  height: 132px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 14px;
  background: radial-gradient(circle at 50% 40%, rgba(201,162,75,0.16), transparent 70%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 24px rgba(201,162,75,0.18), 0 0 30px rgba(0,0,0,0.5);
}
.hero-emblem img { width: 100%; height: 100%; object-fit: contain; }

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin: 0;
  background: linear-gradient(180deg, #fff6e2, var(--gold-2) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--muted);
  margin: 4px 0 18px;
}
.hero-lead {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 1.06rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Secciones ------------------------------------------------------------ */
.section { padding: 64px 0; }
.section-alt {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-block: 1px solid var(--line-soft);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 38px;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  text-align: center;
  margin: 0;
  color: var(--ink);
}

/* --- Rejilla de tarjetas -------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-meta time { color: var(--muted); font-size: 0.82rem; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-2);
  background: var(--gold-soft);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}
.card-title {
  font-size: 1.4rem;
  margin: 0 0 10px;
  line-height: 1.2;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold-2); }
.card-text {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0 0 16px;
  flex: 1 1 auto;
}
.card-link {
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.card-link span { transition: transform 0.18s ease; }
.card-link:hover span { transform: translateX(4px); }

.card-mini { padding: 20px; }
.card-mini .card-title { font-size: 1.18rem; margin: 0; }

/* --- Pasos "cómo funciona" ------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.step {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  line-height: 62px;
  margin-bottom: 14px;
  background: var(--gold-soft);
}
.step h3 { font-size: 1.3rem; color: var(--ink); }
.step p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* --- Centrado de bloque de acción ---------------------------------------- */
.center { text-align: center; margin-top: 36px; }

/* --- Estado vacío --------------------------------------------------------- */
.empty {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 20px auto;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

/* --- Cabecera de página (blog) ------------------------------------------- */
.page-head {
  text-align: center;
  padding: 64px 0 8px;
  border-bottom: 1px solid var(--line-soft);
}
.page-title { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.3em; }
.page-lead { color: var(--muted); margin: 0; }

/* --- Paginación ----------------------------------------------------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.pager-info { color: var(--muted); font-size: 0.92rem; }

/* --- Artículo (noticia) --------------------------------------------------- */
.article { padding: 52px 0 8px; }
.breadcrumb { margin-bottom: 18px; font-size: 0.92rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold-2); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.article-meta time { color: var(--muted); font-size: 0.88rem; }

.article-title { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 0.4em; }
.article-lead {
  font-size: 1.2rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.45;
  margin: 0 0 6px;
}

.article-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0;
}
.article-divider .line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.article-body { font-size: 1.06rem; color: #d8d4cc; }
.article-body p { margin: 0 0 1.15rem; }
.article-body h2 { font-size: 1.7rem; margin: 1.8rem 0 0.6rem; color: var(--ink); }
.article-body h3 { font-size: 1.35rem; margin: 1.5rem 0 0.5rem; color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body li::marker { color: var(--gold); }
.article-body strong { color: var(--gold-2); font-weight: 600; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote {
  margin: 1.4rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-style: italic;
}

/* Caja de fuente oficial */
.source-box {
  margin: 34px 0 8px;
  padding: 20px 22px;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.source-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.source-link { font-weight: 600; word-break: break-word; }

.article-share {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 30px 0 10px;
}

/* --- Pie de página -------------------------------------------------------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg), #08080a);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 46px 22px 30px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-mark { width: 46px; height: 46px; opacity: 0.92; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 4px;
  color: var(--ink);
}
.footer-name span { color: var(--gold); font-size: 0.85rem; }
.footer-tag { color: var(--muted); font-size: 0.9rem; margin: 0; max-width: 320px; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--ink); font-size: 0.95rem; }
.footer-links a:hover { color: var(--gold-2); }

.footer-contact p {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.footer-mail { font-weight: 600; }

.footer-bottom {
  padding: 18px 22px 30px;
  border-top: 1px solid var(--line-soft);
}
.footer-bottom p { margin: 0; color: var(--muted); font-size: 0.84rem; }

/* --- Página 404 ----------------------------------------------------------- */
.error-page {
  text-align: center;
  padding: 100px 0 90px;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 9rem);
  line-height: 1;
  margin: 0;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-page h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 8px 0 12px; }
.error-page p { color: var(--muted); max-width: 480px; margin: 0 auto 26px; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 22px 18px;
    background: rgba(11, 11, 12, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    /* Oculto por defecto en móvil */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.22s ease;
  }
  .nav-menu li { border-bottom: 1px solid var(--line-soft); }
  .nav-menu li:last-child { border-bottom: 0; padding-top: 10px; }
  .nav-menu a { display: block; padding: 14px 2px; }
  .nav-menu a.is-active::after { display: none; }
  .nav-cta { display: inline-block; text-align: center; }

  /* Estado abierto, activado por JS */
  .nav.is-open .nav-menu {
    max-height: 360px;
    opacity: 1;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .hero { padding: 64px 0 52px; }
  .section { padding: 48px 0; }
}

/* --- Respeto a "menos movimiento" ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Formulario de registro ---------------------------------------------- */
.form-card {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder { color: #6b6459; }
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.field input.has-error { border-color: #e0726a; }
.field-hint { font-size: 0.78rem; color: var(--muted); }
.field-error { font-size: 0.8rem; color: #f0a39c; }

.field-check { margin-top: 4px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.45;
}
.check input { margin-top: 3px; accent-color: var(--gold); width: 17px; height: 17px; flex: 0 0 auto; }

.form-submit { width: 100%; justify-content: center; margin-top: 22px; }
.form-foot { text-align: center; color: var(--muted); font-size: 0.82rem; margin: 14px 0 0; }
.form-alert {
  background: rgba(224, 114, 106, 0.12);
  border: 1px solid rgba(224, 114, 106, 0.4);
  color: #f0a39c;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
}

/* Estado de éxito */
.form-ok {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 46px 30px;
  box-shadow: var(--shadow);
}
.form-ok-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 1.8rem;
  color: #14120c;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 26px rgba(201, 162, 75, 0.3);
}
.form-ok h2 { font-size: 1.9rem; margin: 0 0 10px; color: var(--ink); }
.form-ok p { color: var(--muted); max-width: 460px; margin: 0 auto 24px; }

/* --- CTA de registro en la portada --------------------------------------- */
.cta-band { text-align: center; }
.cta-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(201,162,75,0.14), transparent 70%),
    linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 46px 30px;
  box-shadow: var(--shadow);
}
.cta-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 10px; }
.cta-card p { color: var(--muted); max-width: 540px; margin: 0 auto 26px; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
}
