/* ============================================================
   Kodamas — bosque nocturno
   ============================================================ */
:root {
  --bg:        #0a120d;
  --bg-soft:   #101b14;
  --panel:     #16241b;
  --text:      #dceadf;
  --text-dim:  #9db8a7;
  --glow:      #a8ffcf;
  --glow-soft: #6fdfa4;
  --accent:    #3f7a58;
  --radius:    18px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Quicksand', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  color: #eef8f1;
}

/* ---------- Luciérnagas ---------- */
.fireflies { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.fireflies span {
  position: absolute;
  bottom: -10px;
  left: var(--x);
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 12px 3px rgba(168, 255, 207, .55);
  opacity: 0;
  animation: rise var(--t) linear var(--d) infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  10%  { opacity: .85; }
  50%  { transform: translate(4vw, -55vh) scale(1); opacity: .5; }
  90%  { opacity: .15; }
  100% { transform: translate(-3vw, -105vh) scale(.5); opacity: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: heroZoom 24s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}
.hero-video.ready { opacity: 1; }
.hero-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center 40%, transparent 30%, rgba(6, 12, 8, .55) 100%);
}
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30vh;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 24px 16vh;
  animation: fadeUp 1.6s ease both .3s;
}
.hero-kicker {
  letter-spacing: .35em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--glow);
  text-shadow: 0 0 18px rgba(168, 255, 207, .8);
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(3.4rem, 10vw, 6.5rem);
  font-weight: 600;
  letter-spacing: .04em;
  color: #f4fdf7;
  text-shadow: 0 0 40px rgba(168, 255, 207, .45), 0 2px 24px rgba(0, 0, 0, .8);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { text-shadow: 0 0 30px rgba(168,255,207,.3), 0 2px 24px rgba(0,0,0,.8); }
  50%      { text-shadow: 0 0 55px rgba(168,255,207,.65), 0 2px 24px rgba(0,0,0,.8); }
}
.hero-sub {
  max-width: 560px;
  margin: 18px auto 34px;
  font-size: 1.15rem;
  color: #e6f2ea;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .9);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* En pantallas chicas el video apaisado no se recorta:
   se ve entero arriba y el texto pasa debajo */
@media (max-width: 700px) {
  .hero { display: grid; min-height: 0; }
  .hero-img, .hero-video, .hero-veil {
    grid-area: 1 / 1;
    position: relative;
    inset: auto;
  }
  .hero-img, .hero-video {
    width: 100%;
    height: auto;
    aspect-ratio: 1280 / 704;
  }
  .hero-img { animation: none; }
  .hero-veil {
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 60%, var(--bg));
  }
  .hero-fade { display: none; }
  .hero-content {
    grid-area: 2 / 1;
    padding: 4px 24px 34px;
  }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 14px 38px;
  border-radius: 999px;
  border: 1px solid rgba(168, 255, 207, .5);
  background: rgba(16, 32, 22, .55);
  color: var(--glow);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all .3s ease;
}
.btn:hover {
  background: rgba(168, 255, 207, .15);
  box-shadow: 0 0 28px rgba(168, 255, 207, .35);
  transform: translateY(-2px);
}

/* ---------- Secciones ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 90px 24px;
  text-align: center;
}
body.js .section {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s ease;
}
body.js .section.visible { opacity: 1; transform: none; }
.section h2 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin-bottom: 14px;
}
.section .lead {
  max-width: 640px;
  margin: 0 auto 48px;
  color: var(--text-dim);
  font-size: 1.08rem;
}
.section-dark {
  max-width: none;
  background: linear-gradient(to bottom, var(--bg), var(--bg-soft) 20%, var(--bg-soft) 80%, var(--bg));
}
.section-dark > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.section-dark > .lead { margin-bottom: 48px; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  text-align: left;
}
.feature {
  background: var(--panel);
  border: 1px solid rgba(168, 255, 207, .12);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 255, 207, .35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 0 30px rgba(168, 255, 207, .07);
}
.feature-icon {
  width: 52px; height: 52px;
  margin-bottom: 18px;
  color: var(--glow-soft);
}
.feature-icon svg { width: 100%; height: 100%; }
.feature h3 { font-size: 1.45rem; margin-bottom: 10px; }
.feature p { color: var(--text-dim); font-size: .98rem; }

/* ---------- Leyenda ---------- */
.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 26px;
  text-align: left;
}
.legend-card {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(168, 255, 207, .12);
  border-radius: var(--radius);
  padding: 34px 30px;
  overflow: hidden;
}
.legend-kanji {
  position: absolute;
  top: -14px; right: 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7.5rem;
  line-height: 1;
  color: rgba(168, 255, 207, .08);
  pointer-events: none;
  user-select: none;
}
.legend-card h3 { position: relative; font-size: 1.45rem; margin-bottom: 10px; }
.legend-card p  { position: relative; color: var(--text-dim); font-size: .98rem; }

/* ---------- Día / Noche ---------- */
.daynight { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.dn-carousel {
  position: relative;
  width: min(680px, 92vw);
}
.dn-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(168, 255, 207, .15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  transition: box-shadow .8s ease;
}
.night .dn-viewport {
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 70px rgba(168, 255, 207, .25);
}
.dn-track {
  display: flex;
  transition: transform .5s ease;
}
.dn-frame {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
}
.dn-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .8s ease;
}
.dn-night { opacity: 0; }
.night .dn-night { opacity: 1; }
.night .dn-day   { opacity: 0; }
.dn-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(168, 255, 207, .4);
  background: rgba(10, 18, 13, .55);
  color: var(--glow);
  font-size: 1.7rem;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background .3s ease, box-shadow .3s ease;
}
.dn-nav:hover {
  background: rgba(168, 255, 207, .18);
  box-shadow: 0 0 20px rgba(168, 255, 207, .3);
}
.dn-prev { left: 14px; }
.dn-next { right: 14px; }
.dn-dots { display: flex; gap: 11px; justify-content: center; }
.dn-dot {
  width: 11px; height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--glow-soft);
  background: transparent;
  cursor: pointer;
  transition: background .3s ease, box-shadow .3s ease;
}
.dn-dot.active {
  background: var(--glow);
  box-shadow: 0 0 10px rgba(168, 255, 207, .6);
}
body:not(.js) .dn-nav,
body:not(.js) .dn-dots,
body:not(.js) #dn-btn { display: none; }
.dn-label-on { display: none; }
.night .dn-label-on  { display: inline; }
.night .dn-label-off { display: none; }
.is-hidden-img { opacity: 0; }

/* ---------- Galería ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
@media (min-width: 800px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery-item:first-child,
  .gallery-item:nth-last-child(2),
  .gallery-item:last-child { grid-column: span 2; }
}
.gallery-item {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(168, 255, 207, .1);
  aspect-ratio: 4 / 3;
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-item:hover {
  transform: scale(1.025);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5), 0 0 24px rgba(168, 255, 207, .12);
}
.gallery-item img,
.gallery-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  display: block;
  pointer-events: none;
}
.gallery-item:hover img,
.gallery-item:hover video { transform: scale(1.06); }

/* ---------- Proceso ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 26px;
  text-align: left;
  counter-reset: paso;
}
.steps li {
  background: var(--panel);
  border: 1px solid rgba(168, 255, 207, .12);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.step-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glow-soft);
  color: var(--glow);
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 0 16px rgba(168, 255, 207, .2) inset, 0 0 12px rgba(168, 255, 207, .15);
}
.steps h3 { font-size: 1.35rem; margin-bottom: 8px; }
.steps p  { color: var(--text-dim); font-size: .95rem; }

/* ---------- Contacto ---------- */
.contact-form {
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9rem;
  color: var(--text-dim);
  letter-spacing: .04em;
}
.contact-form input,
.contact-form textarea {
  background: var(--panel);
  border: 1px solid rgba(168, 255, 207, .18);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--glow-soft);
  box-shadow: 0 0 18px rgba(168, 255, 207, .15);
}
.contact-form .btn { align-self: center; margin-top: 8px; }
.form-ok {
  color: var(--glow);
  font-size: 1.15rem;
  text-shadow: 0 0 20px rgba(168, 255, 207, .4);
}
.form-error {
  color: #ffb3a7;
  margin-bottom: 20px;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 60px 24px 40px;
  color: var(--text-dim);
  font-size: .9rem;
  border-top: 1px solid rgba(168, 255, 207, .08);
}
footer .disclaimer {
  margin-top: 10px;
  font-size: .78rem;
  opacity: .65;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0;
  z-index: 50;
  background: rgba(4, 8, 6, .93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
}
.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 0 80px rgba(0, 0, 0, .8);
}
.lightbox img[hidden],
.lightbox video[hidden] { display: none; }
.lb-close {
  position: absolute;
  top: 18px; right: 26px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.6rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Responsive ---------- */
.wide-only { display: none; }
@media (min-width: 700px) { .wide-only { display: inline; } }
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img, .fireflies span, .hero h1 { animation: none; }
  .hero-video { display: none; }
  body.js .section { opacity: 1; transform: none; transition: none; }
}
