/* style.css - Mobile First */
/* RESET simple */
* { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; height: auto; }

/* Variables */
:root{
  --bg: #001944;    /* azul oscuro de la maqueta */
  --accent: #ffffff;
  --container-max: 1200px;
}

/* GLOBAL */
body {
  background: var(--bg);
  color: var(--accent);
  line-height: 1.4;
  font-size: 16px;
}

/*====== GSAP ======*/
.hero.panel{
  height: 150vh;
}

.panel-2 {
  height: 200vh; 
}

.hero__content--middle {
  background-color: transparent
}


.section__ciencia {
  position: relative;
  overflow: visible;
}

.hero__image--ciencia {
  will-change: transform, opacity;
}

.hero__paragraph {
  will-change: transform, opacity;
}

.panel-4 {
  position: relative;
  height: 100vh; /* visible area */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.panel-4__inner {
  text-align: center;
  padding: 0 1.5rem;
}

/*=====MODAL======*/
.hero__content--contact {
  padding: 0;
}

.hero__button {
  transition: transform 0.3s ease;
}

.hero__button:hover {
  transform: scale(1.05);
}

#formWrapper {
  max-width: 600px;
  margin: 0 auto;
}

/* HERO  */
.hero {
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero.panel-1 {
  justify-content: start;
}

.hero--chocolate, .carousel {
  height: 100vh;
}

/* inner container con layout */
.hero__inner {
  display: grid;
  grid-template-columns: 3fr 9fr;
  align-items: start;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1600px;
}

.hero__inner--chocolate {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* texto principal */
.hero__content { text-align: center; display: flex; align-self: center; position: relative; left: 100px;}
.hero__content--chocolate { text-align: center; }
.hero__title {
  font-size: 2rem;
  line-height: .8;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

/* visual */
.hero__visual { display:flex; justify-content:center; align-items:center; }
.hero__visual--chocolate { display:flex; justify-content:center; align-items:center; }
.hero__image {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6));
  transition: transform .35s ease;
}
.hero__image--chocolate {
  width: 80%;
  max-width: 420px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6));
  transition: transform .35s ease;
}

.hero__cta-title {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}
.hero__cta-sub {
  font-size: 1rem;
  opacity: 0.9;
}

.hero__content--contact {
  display: grid;
  grid-template-columns: 5fr 2fr 5fr;
  justify-content: center;
  gap: 0;
  align-items: center;
  margin-top: 8rem;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero__text {
  font-size: 1.6rem;
  line-height: 1;
  max-width: 250px;
  display: flex;
  min-height: 200px;
  position: relative;
}

.hero__text--chocolate {
  font-size: 1.6rem;
  line-height: 1;
  max-width: 250px;
  display: flex;
  min-height: 200px;
  position: relative;
}

.hero__logo img {
  max-width: 350px;
  height: auto;
}

.hero__text--left {
  display: flex;
  align-items: flex-start;
  text-align: right;
  right: -20px;
}

.hero__text--click {
  white-space: normal !important;
  display: flex;
  align-items: center;
  text-align: center !important;
  justify-self: end;
}

.hero__text--right {
  display: flex;
  align-items: flex-end;
  text-align: left;
  left: -30px;
}

/* Botón principal */
.hero__button {
  display: inline-block;
  padding: 0.6em 2em;
  background-color: #c5af7a;     /* Color beige/dorado */
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid #b39c6f;
  border-radius: 2em;           /* Bordes completamente redondeados */
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
  max-width: 200px;
  margin-left: 0;
}

.hero__button:focus {
  outline: none;      /* Accesibilidad: foco visible */
  outline-offset: 2px;
  background-color: transparent;
  border-color: #b39c6f;
  box-shadow:none;
}

.hero__button:hover {
  background-color: #b39c6f;    /* Oscurece ligeramente al pasar el mouse */
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-color: #b39c6f;
}

/* Para estados deshabilitados */
.hero__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.hero__presentaciones-title {
  text-align: center;
}

.hero__image--presentaciones {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  will-change: transform;
}

/* CIENCIA */
.hero--ciencia{
  display:grid;
  grid-template-columns: 8fr 4fr; 
  align-items:end;
  justify-content:center;
  margin-top: 0;
  width: 100%;
  padding-left: 0px;
  padding-right: 0px;
  margin-right: 0;
  max-width: 1500px;
  position: relative;
  gap: 20px
}

/* Content (left column) */
.hero__content--ciencia{
  width:100%;
  display: flex;
  position: relative;
  gap: 20px;
  justify-content: end;
  align-items: center;
  padding-right: 50px;
}

/* Title: stacked lines to match maqueta */
.hero__title--ciencia{
  display:flex;
  flex-direction:column;
  text-align: right;
  position: relative;
  max-width: 300px;
  margin-bottom: 0;
  position: relative;
  top: -30px;
}

.hero__title-line{
  display:block;
}

/* Variants for color/weight */
.hero__title-line--light{
  font-size: 4rem;
  background: linear-gradient(90deg, #AB9464 0%, #FEF5CA 22%, #F6DDB3 39%, #AB9464 58%, #FBEDC2 75%, #AB9464 89%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  line-height: .8;
}

.hero__title-line--accent{
  color:var(--accent);
  font-weight:700;
}

/* Eyebrow text beside the title in desktop; on mobile, it's below */
.hero__eyebrow{
  font-size: 2rem;
  max-width: 280px;
  line-height: 1;
  white-space: normal;
  text-align: left;
  margin-right: 0;
  margin-bottom: 0;
}

/* Media */
.hero__media{
  width:100%;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  pointer-events:none; /* purely decorative */
  margin:0;
}

.hero__image--ciencia{
  width:100%;
  max-width:100%;
  height:auto;
  display:block;
  transform-origin:top right;
  will-change:transform,opacity;
}

/* Sub text centered below */
.hero__sub--ciencia{
  text-align: center;
  max-width: 700px;
  margin-right: 0;
  padding: 0;
}

.hero__ciencia--col {
  display: flex;
  align-items: end;
  gap: 100px;
  flex-direction: column;
}

.hero__paragraph{
  font-size: 2rem;
  margin: 0 auto;
  line-height: 1;
  white-space: normal;
  text-align: right;
}

/* Small utility */
.hero__muted{ color:var(--accent); font-weight:600; }


/* ============ Sección Certificaciones ============ */
  .certs{
    padding: clamp(24px, 6vw, 56px) 0;
    background-color: #fff
  }
  .certs__container{
    width: 100%;
    display:flex;
    flex-direction:row;
    justify-content: center;
    align-items:center;
    gap: 35px;
    text-align:center;
  }
  .certs__title{
    margin:0;
    font-size: clamp(24px, 4.8vw, 45px);
    font-weight: 700;
    letter-spacing: .2px;
    color: #001944;
  }

  /* Fila de logos */
  .certs__list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap: clamp(20px, 5vw, 20px);
  }
  .certs__item{
    display:flex;
    align-items:center;
    gap: 10px;
  }
  .certs__logo{
    display:block;
    height: clamp(34px, 7vw, 50px);
    width:auto;
    filter: none;
    max-width: 250px;
  }
  .certs__caption{
    font-size: clamp(11px, 2.6vw, 14px);
    max-width: 160px;
    line-height:1.2;
  }

  /* ============ Accesibilidad foco ============ */
  a:focus-visible, button:focus-visible{
    outline: none;
    outline-offset: 3px;
    border-radius:4px;
  }
  
  .carousel:focus-visible{
    outline: none;
  }


  /* ======= CAROUSEL ======= */
  /* Screen-reader-only helper */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Carousel wrapper */
.carousel {
  padding: 0;
  margin: 0;
  position: relative;
}

.carousel__viewport {
  overflow: hidden;
  width: 100%;
}

.carousel__track {
  display: flex;
  gap: 1rem;
  will-change: transform;
  padding-bottom: 0.5rem;
}

/* slide */
.carousel__slide {
  flex: 0 0 85%; 
  scroll-snap-align: start;
  outline: none;
}

/* Card inside slide */
.card {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  border:none
}

.card img { display:block; width:100%; height:auto; object-fit:cover; }

/* Card body */
.card__body { padding: 1rem; }
.card__title {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: #fff;
  font-family: 'arquitecta';
  margin-bottom: 0;
}

.card__title span {
  font-family: 'arquitecta-black';
}

/* Controls */
.carousel__controls {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none; 
  padding: 0 0.5rem;
}
.carousel__btn {
  pointer-events: all;
  background: rgba(255,255,255,0.95);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  cursor: pointer;
}

/* Indicators */
.carousel__indicators {
  display:flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}
.carousel__indicator {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e6e6e6; border: none; cursor:pointer;
}
.carousel__indicator[aria-selected="true"] { background: #c9a66b } 

.hero__image--mobile {
  display: none;
}


/* Desktop / tablet styles */
@media (min-width: 768px) {
  .hero {
    padding: 0;
  }

  .hero__inner {
    grid-template-columns: 2fr 10fr; 
    gap: 0;
    align-items: center;
    margin: 0;
    align-self: flex-end;
  }
  
  .hero__inner--chocolate {
    grid-template-columns: 2fr 1fr; 
    gap: 0;
    align-items: center;
    margin: 0;
    align-self: flex-end;
  }

  .hero__content { text-align: left; padding-left: 0; position: relative; right: -90px;}
  .hero__content--chocolate { text-align: left; padding-left: 0; position: relative;}
  .hero__title { font-size: 4rem; }
  .hero__title--presentaciones { font-size: 4rem; text-align: center; margin-bottom: 0;}
  .hero__title--chocolate { font-size: 4rem; background: linear-gradient(90deg, #AB9464 0%, #FEF5CA 22%, #F6DDB3 39%, #AB9464 58%, #FBEDC2 75%, #AB9464 89%
  ); -webkit-background-clip: text;  -webkit-text-fill-color: transparent; background-clip: text; color: transparent; line-height: 1; margin-bottom:  20px;}

  .hero__visual { justify-content: flex-end; }
  .hero__visual--chocolate { justify-content: flex-start; }
  .hero__image {
    width: 100%;
    max-width: 520px;
  }
  .hero__image--chocolate {
    width: 100%;
    max-width: 90%;
  }

  .hero--chocolate {
    width: 100%;
  }

  .hero--presentaciones {
    padding-top: 0px;
    width: 100%;
    height: 100vh;
  }

  .hero__cta-title { font-size: 4rem; margin-bottom: 0;}
  .hero__cta-sub { font-size: 2.8rem; }

  .hero__content--midle {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 3rem;
  }

  .hero__logo img {
    max-width: 350px;
  }

  .hero__text {
    font-size: 2rem;
    max-width: 300px;
    flex: 1;
    white-space: nowrap;
  }
  
  .hero__text--chocolate {
    font-size: 2rem;
    max-width: 300px;
    flex: 1;
    white-space:normal;
  }
  
  .hero__subtitle--chocolate {
    font-size: 2rem;
    text-align: center;
    flex: 1;
    white-space:normal;
    text-align: center;
    line-height: 1;
    background: linear-gradient(90deg, #AB9464 0%, #FEF5CA 22%, #F6DDB3 39%, #AB9464 58%, #FBEDC2 75%, #AB9464 89%
    ); -webkit-background-clip: text;  -webkit-text-fill-color: transparent; background-clip: text; color: transparent; line-height: 1;
  }
  
  .hero__desc--chocolate {
    font-size: 2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1;
    text-align: center;
    white-space:normal;
    text-align: center;
  }

  .hero__desc--chocolate span {
    font-family: 'arquitecta-black';
  }

  .carousel__slide { flex: 0 0 48%; } /* two columns-ish on tablet */
  .carousel__track { gap: 1.5rem; }
  .card__title { font-size: 2rem; }

}

@media (min-width: 1200px) {
  .hero__title { font-size: 5.8rem; text-align: right;}
  .hero__cta-title, .hero__title--chocolate, .hero__title--presentaciones { font-size: 4.8rem; line-height: .8;}
  .hero__cta-sub, .hero__text--chocolate, .hero__subtitle--chocolate, .hero__desc--chocolate { font-size: 2.5rem; line-height: .9;}
  .hero__text { font-size: 2rem; line-height: .9;}
  .hero__text--left {right: 135px}
  .hero__logo img { max-width: 460px; }
  .hero__logo.hero__logo--footer img { max-width: 360px; }
  .hero__image { max-width: 1300px; }
  .hero__content {right: -120px; min-width: 330px;}
  .hero__text { max-width: 380px;}
  .hero__image--chocolate {max-width: 100%;}
  .hero__text {white-space: normal; right: 0; max-width: 350px;}

  .hero__inner--chocolate { grid-template-columns: 8fr 4fr; max-width: 1200px; margin: 0 auto;}
  .hero__text--chocolate {
    max-width: 400px;
  }

  .hero__cta {
    height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .content__middle {
    height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    text-align: center;
  }

  .hero__content--contact { max-width: 1000px; }

  .hero__desc--chocolate {
    max-width: 680px;
  }

  .carousel__slide { flex: 0 0 33.3333%; } /* show 3 cards on wide screens */
  .carousel__track { gap: 2rem; }
  /* larger card text */
  .card__title { font-size: 2rem; }

  .hero--presentaciones {
    height: 200vh;
    transform: none;
  }

  .hero__inner--presentaciones {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    background-image: url(../img/bg-presentaciones.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .hero__subtitle--chocolate {
    margin-bottom: 0;
  }

}

/* focus styles */
.carousel__btn:focus, .carousel__indicator:focus, .carousel__link:focus {
  outline: none;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .hero.panel-1, .panel-2 {
    height: 100vh;
    will-change: transform;
  }

  .panel-4 {
    height: 150vh;
    will-change: transform;
  }

  .hero__inner {
    height: 150vh;
    align-items: center;
  }

  .content__middle {
    height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
  }

  .panel-4__inner {
    justify-content: center
  }

  .panel-4__inner div {
    text-align: center;
  }

  .hero__content {
    align-self: start
  }

  .hero__title {
    font-size: 6rem;
  }

  .hero__cta-title, .hero__title--chocolate, .hero__title--presentaciones, .hero__title-line--light, .certs__title {
    font-size: 4.5rem;
    line-height: .8;
    max-width: 400px;
    margin: 0 auto;
    margin-bottom: 3px;
  }

  .hero__cta-sub, .hero__text, .hero__text--chocolate, .card__title, .hero__subtitle--chocolate, .hero__desc--chocolate, .hero__eyebrow, .hero__paragraph {
    font-size: 2.5rem;
    line-height: 1;
  }

  .hero__image--chocolate {
    width: 100%;
    max-width: 100%; 
  }
  
  .hero__cta-sub {
    max-width: 400px;
  }

  .hero__button {
    margin: 0 auto !important;
    display: block;
  }

  .panel-4 {
    align-items: start;
    padding-top: 100px;
  }

  .hero__content--ciencia {
    overflow: hidden;
  }

  .hero__image--presentaciones {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin: 20px auto;
  }  

  .hero__subtitle--chocolate {
    max-width: 400px;
    margin: 0 auto;
  }

  .hero__content--middle {
    flex-direction: column;
  }
  
  .hero__text, .hero__text--chocolate {
    min-height: auto;
    max-width: 400px;
  }

  .hero__cta {
    padding: 0;
    text-align: center;
    height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .hero__text--left, .hero__text--right {
    text-align: center;
    left: initial;
    right: initial;
  }

  .hero__text--chocolate {
    margin: 0 auto;
  }

  .hero__inner--presentaciones {
    text-align: center;
  }

  .hero__content--ciencia {
    flex-direction: column;
    padding-right: 0;
    top: 0px;
  }

  .hero__title--ciencia {
    text-align: left;
    top: 0;
  }

  .hero--ciencia {
    grid-template-columns: 1fr;
  }

  .hero__ciencia--col {
    order: 2;
    gap: 50px;
  }

  .col-xs-1 {
    order: 1;
  }

  .col-xs-2 {
    position: relative;
    top: -130px;
    padding: 0 20px;
  }

  .hero__desc--chocolate {
    padding: 0 20px;
  }

  .hero__content--contact {
    grid-template-columns: 1fr;
    margin-bottom: 0px;
    margin-top: 6rem;
    margin-bottom: 6rem;
  }

  .hero__text, .hero__logo img, .hero__button {
    margin: 0 auto;
  }

  .hero__button {
    padding: 0.4em 2em;
    max-width: 300px;
    font-size: 1.5rem;
  }

  .certs__container {
    flex-direction: column;
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__content {
    order: 2;
    left: 0;
    margin: 0 auto;
  }
  
  .hero__visual {
    order: 1;
  }

  .hero.panel-1 {
    justify-content: center;
  }

  .carousel {
    margin: 0;
    padding-bottom: 0;
  }

  .hero--chocolate, .carousel {
    height: auto;
    display: flex;
    align-items: center;
  }

  .hero__image--mobile {
    display: block;
  }
  
  .hero__image--desktop {
    display: none;
  }
  
  .certs__logo {
    height: clamp(50px, 7vw, 50px);
  }

  .hero__image--ciencia {
    transform: translateY(0)
  }
}

@media (max-width: 500px) {
    .hero__cta-title, .hero__title--chocolate, .hero__title--presentaciones, .hero__title-line--light, .certs__title {
        font-size: 4rem;
    }
    
    .hero__text--chocolate {
      margin-bottom: 80px;
    }
}

