/* ═══════════════════════════════════════════════
   A.MAR.TE v2 — Landing Page
   Bienestar corporativo · Bizkaia
   Paleta: rosa protagonista, sin salvia/verde
   ═══════════════════════════════════════════════ */

:root {
  --crema:        #F6F1E8;
  --crema-rosa:   #F4E8E4;
  --rosa:         #E8B4B8;
  --rosa-polvo:   #D9A6A1;
  --rosa-deep:    #C0797C;
  --terracota:    #C4663D;
  --dorado:       #DDA253;
  --lavanda:      #E7E6EC;
  --texto:        #2E2823;
  --texto-claro:  #F6F1E8;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--crema);
  color: var(--texto);
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:focus-visible { outline: 2px solid var(--rosa-deep); outline-offset: 3px; }
img { max-width: 100%; display: block; }

/* ── ONDA NERVIOSA ── */
.nerve-line {
  position: fixed;
  top: 0;
  left: 1.5vw;
  width: 54px;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
}
.nerve-line path {
  fill: none;
  stroke: var(--rosa-polvo);
  stroke-width: 1.5;
  opacity: 0.5;
}

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(46, 40, 35, 0.35) 0%,
    rgba(46, 40, 35, 0.20) 35%,
    rgba(46, 40, 35, 0.35) 55%,
    rgba(46, 40, 35, 0.78) 100%
  );
}
.hero__content {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 12vh;
  padding: 0 6vw;
  max-width: 1100px;
  color: var(--texto-claro);
}
.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--crema);
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 12px rgba(46,40,35,0.55), 0 0 20px rgba(46,40,35,0.3);
}
.hero__title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  line-height: 1.06;
  font-size: clamp(2.2rem, 5.5vw, 5rem);
}
.hero__title .line { display: block; }
.hero__title .line-2 {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--rosa);
}
.hero__subtitle {
  font-weight: 300;
  max-width: 600px;
  margin: 1.8rem 0 2.2rem;
  line-height: 1.6;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}
.hero__cta {
  display: inline-block;
  background: var(--rosa-deep);
  color: var(--crema);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 2px;
  text-decoration: none;
  transition: transform 0.3s, background 0.3s;
}
.hero__cta:hover {
  transform: translateY(-2px);
  background: var(--rosa-polvo);
}

/* estado inicial para animar */
@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow,
  .hero__title .line,
  .hero__subtitle,
  .hero__cta {
    opacity: 0;
  }
}

/* ── CORTES CINEMATOGRÁFICOS ── */
.cinematic {
  width: 100%;
  overflow: hidden;
}
.cinematic img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
}

/* ── SECCIONES ── */
.section {
  padding: 7rem 6vw;
}
.section--compact {
  padding: 4rem 6vw;
}
.section--dark {
  background: var(--texto);
  color: var(--texto-claro);
}
.section:not(.section--dark) {
  background: var(--crema);
  color: var(--texto);
}
.section__eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rosa-deep);
  margin-bottom: 1rem;
}
.section--dark .section__eyebrow,
.coste .section__eyebrow {
  color: var(--rosa-polvo);
}
.section__title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  line-height: 1.1;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  max-width: 18ch;
}
.section__intro {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  max-width: 60ch;
  margin-top: 1.5rem;
}

/* ── COSTE (cifras ancladas, centradas) ── */
.coste {
  background: var(--texto);
  color: var(--texto-claro);
}
.coste__pin {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 6vw;
  position: relative;
}
.coste__stage {
  position: relative;
  height: 48vh;
  width: 100%;
}
.stat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
}
.stat__num {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(6rem, 22vw, 18rem);
  line-height: 0.9;
}
.stat__pct {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 6vw, 5rem);
  color: var(--rosa-deep);
}
.stat__txt {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.5rem);
  max-width: 32ch;
  margin-top: 1rem;
}
.coste__punch {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  max-width: 24ch;
  text-align: center;
  opacity: 0;
  margin-top: 1rem;
}

@media (max-width: 780px) {
  .coste__pin { height: auto; padding: 4.5rem 7vw; align-items: center; text-align: center; }
  .coste__stage { position: static; height: auto; display: flex; flex-direction: column; gap: 3rem; margin-top: 2rem; }
  .stat { position: static; opacity: 1; }
  .coste__punch { opacity: 0; margin-top: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .stat { opacity: 1; }
  .coste__punch { opacity: 1; }
}

/* ── GRID + CARDS ── */
.grid { display: grid; gap: 2rem; margin-top: 2.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2x2 { grid-template-columns: repeat(2, 1fr); }
.grid-proceso { grid-template-columns: repeat(3, 1fr); }
.esti-grid { grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 3rem; }
.esti-portrait { width: 100%; max-height: 65vh; object-fit: cover; }

.card {
  padding: 2rem;
  border-top: 2px solid var(--rosa-polvo);
  background: rgba(0, 0, 0, 0.02);
}
.section--dark .card {
  background: rgba(255, 255, 255, 0.05);
  border-top-color: var(--rosa-deep);
}
.card h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.4rem; margin-bottom: 0.8rem; }
.card p { font-family: 'Poppins', sans-serif; font-weight: 300; line-height: 1.6; font-size: 0.98rem; }
.card--destacada { border-top-width: 4px; border-top-color: var(--terracota); }

/* ── PILARES (tarjetas flip) ── */
.grid-pilares { grid-template-columns: repeat(4, 1fr); }

.pilar-flip {
  perspective: 800px;
  cursor: pointer;
}
.pilar-flip__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.pilar-flip:hover .pilar-flip__inner {
  transform: rotateY(180deg);
}
.pilar-flip__front,
.pilar-flip__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 2px;
  overflow: hidden;
}
.pilar-flip__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pilar-flip__front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(46,40,35,0.75));
}
.pilar-flip__n {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  color: var(--terracota);
  letter-spacing: 0.2em;
  z-index: 1;
}
.pilar-flip__front h3 {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  z-index: 1;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--texto-claro);
  line-height: 1.2;
}
.pilar-flip__back {
  transform: rotateY(180deg);
  background: var(--texto);
  color: var(--texto-claro);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.pilar-flip__back h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--rosa);
  margin-bottom: 1rem;
}
.pilar-flip__back p {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* Flip con tap (móvil y click) */
.pilar-flip.is-flipped .pilar-flip__inner {
  transform: rotateY(180deg);
}

/* Móvil: en táctil el flip se activa con tap */
@media (max-width: 780px) {
  .grid-pilares { grid-template-columns: 1fr 1fr; }
  .pilar-flip__inner { aspect-ratio: 3/4; }
}
@media (max-width: 480px) {
  .grid-pilares { grid-template-columns: 1fr; }
  .pilar-flip__inner { aspect-ratio: 4/3; }
}

/* ── CONTACTO (dos columnas) ── */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contacto-foto img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  border-radius: 2px;
}

/* ── BOTÓN ── */
.btn {
  display: inline-block; background: var(--terracota); color: var(--crema);
  font-family: 'Poppins', sans-serif; font-weight: 500; padding: 1rem 2rem;
  border: none; border-radius: 2px; text-decoration: none; font-size: 1rem;
  cursor: pointer; transition: transform 0.3s, background 0.3s; margin-top: 2.5rem;
}
.btn:hover { transform: translateY(-2px); background: #b35a34; }

/* ── FORMULARIO ── */
.contact-form { max-width: 560px; margin-top: 2.5rem; display: grid; gap: 1rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
  width: 100%; padding: 0.9rem 1rem;
  border: 1px solid rgba(246, 241, 232, 0.25); background: transparent;
  color: var(--texto-claro); font-family: 'Poppins', sans-serif; font-size: 0.95rem; border-radius: 2px;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(246, 241, 232, 0.5); }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--rosa-deep); outline-offset: 2px; }

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(246, 241, 232, 0.7);
  cursor: pointer;
}
.privacy-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--rosa-deep);
}
.privacy-check a {
  color: var(--rosa);
  text-decoration: underline;
}

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── FOOTER ── */
.footer {
  width: 100%; text-align: center; padding: 1.5rem 6vw 1rem;
  background: var(--texto); border-top: 1px solid rgba(246, 241, 232, 0.08);
}
.footer__legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.footer__legal a {
  color: rgba(246, 241, 232, 0.55);
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.3s;
}
.footer__legal a:hover { color: var(--rosa); }
.footer__legal span { color: rgba(246, 241, 232, 0.3); font-size: 0.7rem; }
.footer-erk__link {
  color: rgba(246, 241, 232, 0.4); font-family: 'Poppins', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.05em; text-decoration: none;
  opacity: 0.6; transition: opacity 0.3s;
}
.footer-erk__link:hover { opacity: 1; }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--texto);
  color: var(--crema);
  padding: 1rem 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  border-top: 1px solid rgba(246, 241, 232, 0.12);
}
.cookie-banner p { flex: 1; line-height: 1.5; }
.cookie-banner a { color: var(--rosa); text-decoration: underline; }
.cookie-banner__btn {
  background: var(--rosa-deep);
  color: var(--crema);
  border: none;
  padding: 0.6rem 1.6rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
}
.cookie-banner__btn:hover { background: var(--rosa-polvo); }

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .nerve-line { left: 0; width: 32px; opacity: 0.65; }
  .grid-3, .grid-2x2, .grid-proceso, .esti-grid, .contacto-grid { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 7vw; }
  .section--compact { padding: 3rem 7vw; }
  .cinematic img { height: 35vh; object-position: 70% center; }

  .hero__content { bottom: 8vh; padding: 0 7vw; }
  .hero__eyebrow { font-size: 0.7rem; }
  .hero__subtitle { font-size: 0.95rem; }

  .esti-portrait { max-height: 50vh; }

  .contacto-foto { order: -1; }
  .contacto-foto img { min-height: 200px; max-height: 40vh; }

  .cookie-banner { flex-direction: column; text-align: center; padding: 1rem 5vw; gap: 0.8rem; }
}
