/* ================================================== */
/* ================= RESET GENERAL ================== */
/* ================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================================================== */
/* ==================== VARIABLES =================== */
/* ================================================== */
:root {
  --gray-purple: #968cb1;
  --gray-green: #93a996;
  --light-yellow-green: #f1f3e9;
  --grey-neon-pink: #8e4585;
  --light-blue: #d3d3ff;

  --bg: #f1f3e9;
  --surface: #ffffff;
  --surface-soft: #f8f9f3;

  --text: #372f3d;
  --muted: #6d6673;

  --primary: #968cb1;
  --primary-deep: #7f75a0;
  --primary-soft: #d3d3ff;

  --accent: #8e4585;
  --accent-deep: #74356b;
  --accent-soft: rgba(142, 69, 133, 0.12);

  --nature: #93a996;
  --nature-deep: #768b79;

  --border: #dde3d6;
  --white: #ffffff;

  --shadow-soft: 0 10px 24px rgba(74, 57, 96, 0.08);
  --shadow: 0 18px 40px rgba(74, 57, 96, 0.12);

  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 30px;
  --max-width: 1180px;
}

/* ================================================== */
/* =================== BASE GLOBAL ================== */
/* ================================================== */
html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(
      circle at top left,
      rgba(211, 211, 255, 0.45),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(147, 169, 150, 0.18),
      transparent 24%
    ),
    linear-gradient(to bottom, #f7f8f1 0%, #f1f3e9 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

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

main {
  width: min(100% - 34px, var(--max-width));
  margin: 0 auto;
}

section {
  margin: 92px 0;
}

/* ================================================== */
/* ===================== HEADER ===================== */
/* ================================================== */
.site-header {
  width: min(100% - 34px, var(--max-width));
  margin: 0 auto;
  padding: 30px 0 10px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.logo {
  width: 260px;
  height: auto;
  object-fit: contain;
}

/* ================================================== */
/* ================== NAVEGACIÓN ==================== */
/* ================================================== */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding-bottom: 6px;
}

.main-nav a {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  border-radius: 999px;
  transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus {
  background: rgba(211, 211, 255, 0.55);
  color: var(--accent-deep);
}

.nav-cta {
  border: 1px solid rgba(142, 69, 133, 0.28);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}

/* ================================================== */
/* ================= HERO / PORTADA ================= */
/* ================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  margin-top: 44px;
}

.hero-copy {
  position: relative;
}

.hero-copy::before {
  content: "";
  width: 88px;
  height: 88px;
  position: absolute;
  top: -18px;
  left: -18px;
  background: radial-gradient(
    circle,
    rgba(211, 211, 255, 0.65),
    transparent 70%
  );
  z-index: -1;
}

.eyebrow {
  color: var(--nature-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.77rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 1.05;
  font-weight: 400;
  margin-bottom: 18px;
  color: var(--accent);
  max-width: 680px;
}

.hero-description {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 28px;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-media img {
  width: 100%;
  min-height: 560px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(150, 140, 177, 0.18);
}

/* ================================================== */
/* ================= TEXTO DE APOYO ================= */
/* ================================================== */
.section-heading {
  text-align: center;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 400;
  color: var(--text);
}

.intro {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
}

/* ================================================== */
/* ===================== BOTONES ==================== */
/* ================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 24px;
  transition: 0.25s ease;
  cursor: pointer;
  font: inherit;
  font-size: 0.98rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: var(--white);
  border: none;
  box-shadow: 0 12px 26px rgba(142, 69, 133, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(142, 69, 133, 0.22);
  background: linear-gradient(135deg, var(--accent-deep), var(--primary-deep));
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  color: var(--accent);
  border: 1px solid rgba(150, 140, 177, 0.35);
  background: rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  background: rgba(211, 211, 255, 0.48);
  border-color: rgba(150, 140, 177, 0.6);
  transform: translateY(-1px);
}

/* ================================================== */
/* ===================== PIEZAS ===================== */
/* ================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(150, 140, 177, 0.14);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
  transition: 0.28s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card img {
  height: 270px;
  width: 100%;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.card h3 {
  color: var(--accent);
  font-size: 1.34rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
}

/* ================================================== */
/* ==================== HISTORIA ==================== */
/* ================================================== */
.story {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 36px;
  align-items: center;
}

.story-image img {
  border-radius: 28px;
  box-shadow: var(--shadow);
  height: 100%;
  object-fit: cover;
}

.story-text h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text);
}

.story-text p {
  color: var(--muted);
  margin-bottom: 14px;
}

/* ================================================== */
/* ==================== GALERÍA ===================== */
/* ================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(150, 140, 177, 0.12);
}

.gallery-item img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

/* ================================================== */
/* ====================== VIDEO ===================== */
/* ================================================== */
.video-section {
  text-align: center;
}

.video-container {
  background: linear-gradient(
    135deg,
    rgba(150, 140, 177, 0.22),
    rgba(142, 69, 133, 0.16)
  );
  border: 1px solid rgba(150, 140, 177, 0.16);
  padding: 18px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.video-container video {
  width: 100%;
  border-radius: 18px;
  display: block;
}

/* ================================================== */
/* ====================== FRASE ===================== */
/* ================================================== */
.quote-section {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.quote-section blockquote {
  font-size: clamp(1.25rem, 2.4vw, 2.05rem);
  line-height: 1.55;
  color: var(--accent);
  font-style: italic;
}

/* ================================================== */
/* ==================== CONTACTO ==================== */
/* ================================================== */
.contact-section {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.contact-intro {
  text-align: center;
  color: var(--muted);
  margin-bottom: 30px;
}

.contact-form {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(150, 140, 177, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 30px;
  backdrop-filter: blur(6px);
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-row label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.96rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid rgba(150, 140, 177, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(211, 211, 255, 0.55);
  background: var(--white);
}

.form-status {
  margin-top: 16px;
  min-height: 24px;
  font-size: 0.98rem;
}

.form-status.success {
  color: #51765b;
}

.form-status.error {
  color: #a14f7a;
}

/* ================================================== */
/* ===================== FOOTER ===================== */
/* ================================================== */
.site-footer {
  padding: 34px 16px 42px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ================================================== */
/* ============== BOTÓN VOLVER ARRIBA ============== */
/* ================================================== */
.icono-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
}

.icono-flotante img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  padding: 7px;
  box-shadow: 0 10px 22px rgba(74, 57, 96, 0.18);
  border: 1px solid rgba(150, 140, 177, 0.16);
  transition: transform 0.25s ease;
}

.icono-flotante img:hover {
  transform: scale(1.08);
}

/* ================================================== */
/* ===================== CHATBOX ==================== */
/* ================================================== */
#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(74, 57, 96, 0.24);
  z-index: 9999;
  transition: 0.22s ease;
}

#chat-toggle:hover {
  transform: translateY(-2px) scale(1.02);
}

#chatbox {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  max-width: 92%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(150, 140, 177, 0.18);
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(74, 57, 96, 0.18);
  overflow: hidden;
  z-index: 9999;
  backdrop-filter: blur(8px);
  font-family: Arial, sans-serif;
}

.hidden {
  display: none;
}

.chat-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header span {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.chat-header button {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fbfbff;
}

.bot-message,
.user-message {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 0.96rem;
}

.bot-message {
  background: rgba(211, 211, 255, 0.58);
  color: var(--text);
  align-self: flex-start;
}

.user-message {
  background: var(--accent);
  color: white;
  align-self: flex-end;
}

.chat-input-area {
  display: flex;
  border-top: 1px solid rgba(150, 140, 177, 0.16);
  background: white;
}

#chat-input {
  flex: 1;
  border: none;
  padding: 13px 14px;
  outline: none;
  font: inherit;
  color: var(--text);
  background: transparent;
}

#chat-input::placeholder {
  color: #8b8593;
}

#send-chat {
  border: none;
  background: var(--primary);
  color: white;
  padding: 0 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#send-chat:hover {
  background: var(--accent);
}

/* ================================================== */
/* ===================== RESPONSIVE ================= */
/* ================================================== */
@media (max-width: 960px) {
  .hero,
  .story,
  .cards,
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero-media img {
    min-height: auto;
  }

  section {
    margin: 74px 0;
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    width: min(100% - 24px, var(--max-width));
  }

  .logo {
    width: 210px;
  }

  .hero {
    gap: 26px;
    margin-top: 28px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .contact-form {
    padding: 22px;
  }

  .gallery-item img,
  .card img {
    height: auto;
  }

  #chatbox {
    right: 12px;
    bottom: 84px;
    width: calc(100% - 24px);
  }

  #chat-toggle {
    right: 14px;
    bottom: 14px;
  }
}

/* ================================================== */
/* ==================== LIGHTBOX ==================== */
/* ================================================== */
.gallery-item {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 48, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 1000px);
  max-height: 88vh;
  animation: lightboxPop 0.28s ease;
}

.lightbox-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(28, 18, 36, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #6a4367;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(28, 18, 36, 0.18);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.05);
  background: #ffffff;
}

@keyframes lightboxPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

body.lightbox-open {
  overflow: hidden;
}
