:root {
  /* Paleta de colores */
  --color-bg: #08080c;
  --color-text: #ffffff;
  --color-purple: #c3aafd;
  --color-gold: #e4cd7a;
  --color-red: #f40014;

  /* Tipografía */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-size-base: 18px;
  --font-regular: 500;
  --font-bold: 800;

  /* Layout */
  --container-max-width: 1400px;
  --container-width: 92%;
  --section-padding-y: 100px;
  --section-padding-y-mobile: 60px;
  --grid-gap: 32px;

  /* Animaciones */
  --transition-fast: 0.3s ease;
  --transition-menu: right 0.4s ease;

  /*Formulario */
  --mf-font-size: 18px;
  --mf-label-size: 13px;
  --mf-padding-y: 12px;
  --mf-padding-x: 4px;
  --mf-border: 1.5px;
  --mf-transition: .3s ease;
}

/* =============================================
   GENERIC - Reset & Base
   ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-regular);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* =============================================
   ELEMENTS - Elementos HTML base
   ============================================= */

/* -----Accesibilidad navegación por teclado -------*/
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-purple);
  outline-offset: 4px;
}

button {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  border: none;
}

h1,
h2,
h3 {
  color: var(--color-text);
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: .04em;
}

h1,
h2,
h3,
p {
  margin-bottom: 25px;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  line-height: 1.1;
}

h3 {
  font-size: clamp(0.8rem, 1.3rem + 0.5vw, 1.7rem);
  line-height: 1.1;
}

p {
  line-height: 1.4;
}

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

/* =============================================
   OBJECTS - Patrones de layout reutilizables
   ============================================= */

/* Contenedor de sección */
header,
section,
footer {
  position: relative;
  width: min(var(--container-max-width), var(--container-width));
  margin-inline: auto;
}

section {
  padding-block: var(--section-padding-y);
}

.section-header {
  text-align: center;
}

.section-descri {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  align-items: start;
}

.section-descri-block {
  margin-inline: auto;
  max-width: 800px;
  text-align: center;
}

.section-descri,
.section-descri-block {
  margin-bottom: 60px;
}

.section-descri img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-fast);
  border-radius: 20px;
}

.section-descri img:hover {
  transform: scale(1.05);
}

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid img {
  justify-self: center;
  margin-inline: auto;
  /* Si es Flex o Bloque, ayuda a centrarlas */
  display: block;
  /* Evita espacios en blanco residuales de elementos en línea */
}

/* --- Tarjetas glass --- */
.glass-card,
.contact-card {
  border: 2px solid var(--color-gold);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(203, 202, 202, 0.04);
  border-radius: 24px;
  padding: 40px;
}

.glass-card {
  transition: var(--transition-fast);
}

.glass-card:hover {
  transform: scale(1.05);
}

.glass-card ul {
  display: table;
  margin-inline: auto;
  text-align: left;
}

.glass-card ul li {
  margin-bottom: 10px;
}

.glass-card img {
  width: 100%;
  height: auto;
  display: block;
  margin-block: 40px;
}

/* --- Botones --- */
.btn-primary{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform var(--transition-fast);
  margin-top: 32px;
}

.btn-primary {
  color:white;
  border:2px solid var(--color-gold);
  background:rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: scale(1.06);
}

.btn-link {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 3px solid var(--color-gold);
}

.btn-link:hover {
  color:var(--color-gold);
  border: none;
}

/* Contenedor flex para centrar */
.container-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* --- Eyebrow --- */
.eyebrow {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  padding-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--color-gold);
}

.eyebrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  transform: translateX(-50%);
}

/* =============================================
   HEADER & NAVEGACIÓN
   ============================================= */
header {
  z-index: 1000;
}

.navbar {
  max-height: 100%;
  margin-inline: auto;
  padding: 1rem clamp(15px, 5vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  max-width: clamp(180px, 30vw, 353px);
  height: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(0.5rem, 2vw, 2rem);
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-gold);
  text-decoration: none;
  padding: 10px;
  white-space: nowrap; /* Evita que palabras largas se rompan */
  transition: color var(--transition-fast);
  font-size:1rem;
}

.nav-links a:hover {
  color: white;
}

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  border-radius: 5px;
  transition: var(--transition-fast);
  background-color: white;
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* =============================================
    HERO
   ============================================= */
.hero-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
}

.hero-visual {
  width: 100%;
}

.hero-visual img {
  width: clamp(650px, 50vw, 850px);
  max-width: 100%;
  height: auto;
}

/* =============================================
    SECTIONS - Estilos específicos de sección
   ============================================= */



/* =============================================
    CONTACTO
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-item {
  margin-bottom: 24px;
}

.contact-item h3 {
  margin-bottom: 10px;
}

.contact-item label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 4px;
}

/* ==========================================
   FORMULARIO
========================================== */

.mf-form-group {
  position: relative;
  margin-bottom: 32px;
}

/* Sólo para los select */
.mf-select-group {
  position: relative;
}

/* ==========================================
   INPUTS
========================================== */

.mf-input,
.mf-textarea {
  width: 100%;
  border: none;
  border-bottom: var(--mf-border) solid var(--color-text);
  background: transparent;
  padding: var(--mf-padding-y) var(--mf-padding-x);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--mf-font-size);
  font-weight: inherit;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--mf-transition);
}

/* Foco accesible (independiente del input-highlight) */
.mf-input:focus,
.mf-textarea:focus {
  border-bottom-color: var(--color-accent, var(--color-text));
}

/* Estado disabled */
.mf-input:disabled,
.mf-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-bottom-style: dashed;
}

.mf-input:disabled~.mf-label,
.mf-textarea:disabled~.mf-label {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================
   TEXTAREA
========================================== */

.mf-textarea {
  resize: none;
  min-height: 140px;
}

/* ==========================================
   SELECT
========================================== */

select.mf-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  cursor: pointer;
  padding-right: 36px;
  color: inherit;
}

select.mf-input:disabled {
  cursor: not-allowed;
}

/* Flecha */
.mf-select-group::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  /* centra el icono respecto al eje vertical */
  border-right: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
  transform: rotate(45deg);
  transform-origin: center;
  pointer-events: none;
}

/* ==========================================
   LABELS
========================================== */

.mf-label {
  position: absolute;
  left: 4px;
  color: var(--color-text);
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--mf-transition), font-size var(--mf-transition), opacity var(--mf-transition);
}

/* Input y textarea: posición base (sin flotar) */
input.mf-input~.mf-label,
textarea.mf-textarea~.mf-label {
  top: 12px;
  font-size: var(--mf-font-size);
}

/* Select: posición base (oculta arriba del todo) */
select.mf-input~.mf-label {
  top: calc(-1 * var(--mf-padding-y) - var(--mf-label-size) + 3px);
  font-size: var(--mf-label-size);
  opacity: 0;
  transform: translateY(18px);
}

/* Mostrar label del select cuando hay valor seleccionado */
select.mf-input.has-value~.mf-label {
  opacity: 1;
  transform: translateY(0);
}

/* Floating: input y textarea */
input.mf-input:focus~.mf-label,
input.mf-input:not(:placeholder-shown)~.mf-label,
textarea.mf-textarea:focus~.mf-label,
textarea.mf-textarea:not(:placeholder-shown)~.mf-label {
  transform: translateY(-24px);
  font-size: var(--mf-label-size);
}

/* ==========================================
   LÍNEA ANIMADA
========================================== */

.input-highlight {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-text);
  transition: width var(--mf-transition);
}

.mf-input:focus~.input-highlight,
.mf-textarea:focus~.input-highlight {
  width: 100%;
}

/* ==========================================
   AUTOFILL
========================================== */

.mf-input:-webkit-autofill,
.mf-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--color-text) !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
}

/* =============================================
    FOOTER
   ============================================= */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  flex-direction: column;
  text-align: center;
  color: white;
}

.footer-copyright {
  margin-top: 30px;
}

.footer-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 30px;
}

.footer-links a {
  font-size: 14px;
  text-decoration: none;
  color: white;
  padding: 10px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copyright p {
  margin: 0;
}

/* COOKIE */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 15px 10px;
  display: none;
  z-index: 800;
}

#cookie-banner {
  color: #ffffff;
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--color-gold);
  color: var(--color-bg);
  border: none;
  border-radius: 4px;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 999;
}

.scroll-top.show {
  display: block;
}

/* =============================================
   8. RESPONSIVE - Media Queries
   ============================================= */
@media (max-width: 1024px) {
    .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 80vw);
    height: 100dvh;
    background: var(--color-bg);
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 100px 2rem 2rem;
    gap: 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-menu);
    z-index: 1000;
    overflow-y: auto;
  }

  .menu-toggle:checked ~ .nav-links {
    right: 0;
  }

  .menu-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

/* =============================================
   MÓVIL PEQUEÑO (768px hacia abajo) - otros ajustes
   ============================================= */
@media (max-width: 768px) {
  section {
    padding-block: var(--section-padding-y-mobile);
  }

  .grid-2,
  .grid-3,
  .hero-grid,
  .contact-grid,
  .section-descri {
    grid-template-columns: 1fr;
  }

  .hero-text {
    text-align: center;
  }

  .glass-card,
  .contact-card {
    padding: 20px;
  }
}