/* ===================================
   Variables CSS
   =================================== */
:root {
  /* Colores */
  --color-primary: #C43A8A;
  --color-primary-dark: #a02e70;
  --color-background: #FFFFFF;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-gray-light: #F5F5F5;

  /* Tipografía */
  --font-main: 'Montserrat', sans-serif;
  --font-cursive: 'Caveat', cursive;

  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Transiciones */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;

  /* Sombras */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

html {
  font-size: clamp(1rem, 1.1vw, 1.75rem);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* ===================================
   Skip Link
   =================================== */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--spacing-sm);
  background: var(--color-background);
  color: var(--color-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 2000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ===================================
   Navbar
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--spacing-md);
  background: rgba(196, 58, 138, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo img {
  height: 2.5rem;
  width: auto;
  border-radius: 6px;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  z-index: 1001;
}

.navbar__hamburger,
.navbar__hamburger::before,
.navbar__hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-background);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.navbar__hamburger {
  position: relative;
}

.navbar__hamburger::before,
.navbar__hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.navbar__hamburger::before {
  top: -7px;
}

.navbar__hamburger::after {
  top: 7px;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.navbar__link {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-background);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-bottom: 2px solid transparent;
  border-radius: 6px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.navbar__link:hover,
.navbar__link--active {
  background-color: rgba(0, 0, 0, 0.15);
  border-bottom-color: var(--color-background);
}

/* Navbar mobile */
@media (max-width: 767px) {
  .navbar__toggle {
    display: block;
  }

  .js .navbar__menu {
    position: fixed;
    inset: 0;
    height: 100vh;
    background: var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
  }

  .js .navbar__menu--open {
    opacity: 1;
    visibility: visible;
  }

  .navbar__toggle--active .navbar__hamburger {
    background: transparent;
  }

  .navbar__toggle--active .navbar__hamburger::before {
    top: 0;
    transform: rotate(45deg);
  }

  .navbar__toggle--active .navbar__hamburger::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .js .navbar__menu .navbar__link {
    font-size: 1.5rem;
    border-bottom: none;
  }

  .js .navbar__menu .navbar__link:hover,
  .js .navbar__menu .navbar__link--active {
    background-color: rgba(0, 0, 0, 0.15);
  }
}

/* Sin JS: menú siempre visible como lista horizontal */
.navbar__menu {
  flex-wrap: wrap;
}

/* ===================================
   Navbar Desktop — Píldora vertical flotante
   =================================== */
@media (min-width: 768px) {
  .navbar {
    /* Desanclar de la barra superior */
    top: 50%;
    left: auto;
    right: 1.5rem;
    transform: translateY(-50%);
    width: auto;
    height: auto;

    /* Píldora vertical */
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem;
    border-radius: 2rem;

    /* Frosted glass blanco */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  }

  .navbar__logo {
    display: none;
  }

  .navbar__toggle {
    display: none !important;
  }

  .navbar__menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  /* Links → dots circulares */
  .navbar__link {
    position: relative;
    font-size: 0;
    padding: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: transparent;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
  }

  /* Touch target expandido (44×44 mínimo WCAG) */
  .navbar__link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }

  .navbar__link:hover {
    background-color: rgba(196, 58, 138, 0.3);
    transform: scale(1.3);
    border-bottom-color: var(--color-primary);
  }

  .navbar__link--active {
    background-color: var(--color-primary);
    border-bottom-color: var(--color-primary);
  }

  /* Tooltip a la izquierda del dot */
  .navbar__link::after {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: var(--color-background);
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
  }

  .navbar__link:hover::after {
    opacity: 1;
  }
}

/* ===================================
   Scroll Snap Container
   =================================== */
.snap-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

/* ===================================
   Secciones
   =================================== */
.section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-lg) var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.section--magenta {
  background-color: var(--color-primary);
  color: var(--color-background);
}

.section--white {
  background-color: var(--color-background);
  color: var(--color-text);
}

.section--gray {
  background-color: var(--color-gray-light);
  color: var(--color-text);
}

.section__content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
  text-align: center;
  align-items: center;
}

.hero .section__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: clamp(14rem, 28vw, 30rem);
  height: auto;
  margin-bottom: var(--spacing-md);
  background-color: #fff;
  padding: clamp(0.75rem, 2.5vw, 2rem);
  border-radius: 20%;
  box-shadow: var(--shadow-soft);
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  letter-spacing: 0.02em;
}

.hero__profession {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.1em;
}

.hero__tagline {
  font-family: var(--font-cursive);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 400;
  opacity: 0.95;
}

/* ===================================
   Sobre mí
   =================================== */
.sobre-mi__content {
  position: relative;
  z-index: 1;
}

/* Heading "Soy Karla" en tipografía cursiva */
.sobre-mi__heading {
  font-family: var(--font-cursive);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: var(--spacing-sm);
  opacity: 0.95;
}

.sobre-mi__desc {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Contenedor de la foto con forma de K */
.sobre-mi__k-frame {
  position: relative;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 3 / 4;
}

/* Sombra decorativa de K detrás (más clara, offset) */
.sobre-mi__k-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  clip-path: polygon(
    0% 0%, 38% 0%, 38% 22%, 70% 0%, 100% 0%,
    100% 15%, 50% 43%, 100% 85%, 100% 100%,
    70% 100%, 38% 78%, 38% 100%, 0% 100%
  );
  z-index: 0;
}

/* Clip K aplicado a la imagen y al placeholder */
.sobre-mi__k-frame .image-placeholder,
.sobre-mi__k-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(
    0% 0%, 38% 0%, 38% 22%, 70% 0%, 100% 0%,
    100% 15%, 50% 43%, 100% 85%, 100% 100%,
    70% 100%, 38% 78%, 38% 100%, 0% 100%
  );
  z-index: 1;
  border-radius: 0;
  max-width: none;
}

/* Círculos decorativos */
.filosofia .split__image-container::before,
.filosofia .split__image-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.filosofia .split__image-container::before {
  width: 80px;
  height: 80px;
  top: -20px;
  right: -10px;
}

.filosofia .split__image-container::after {
  width: 50px;
  height: 50px;
  bottom: -15px;
  left: 10px;
}

/* ===================================
   Split Section (Sobre mí, Filosofía)
   =================================== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.split__text {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.split__image-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.split__image {
  max-width: 350px;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

/* Marco blanco con bordes redondeados */
.film-frame {
  padding: 8px;
  background: #fff;
  border-radius: 16px;
}

.film-frame .image-placeholder,
.film-frame img {
  border-radius: 12px;
}

/* Efecto rasgado/artístico */
.torn-edge {
  position: relative;
}

.torn-edge::before {
  content: '';
  position: absolute;
  top: -5px;
  right: -5px;
  bottom: -5px;
  left: -5px;
  background: var(--color-primary);
  clip-path: polygon(
    0% 5%, 5% 0%, 10% 3%, 15% 0%, 20% 4%, 25% 0%, 30% 2%, 35% 0%,
    40% 3%, 45% 0%, 50% 4%, 55% 0%, 60% 2%, 65% 0%, 70% 3%, 75% 0%,
    80% 4%, 85% 0%, 90% 2%, 95% 0%, 100% 5%, 100% 95%, 95% 100%,
    90% 97%, 85% 100%, 80% 96%, 75% 100%, 70% 98%, 65% 100%, 60% 97%,
    55% 100%, 50% 96%, 45% 100%, 40% 98%, 35% 100%, 30% 97%, 25% 100%,
    20% 96%, 15% 100%, 10% 98%, 5% 100%, 0% 95%
  );
  z-index: -1;
}

/* ===================================
   Para Quién Es
   =================================== */
.para-quien__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

.para-quien__content {
  position: relative;
  z-index: 1;
}

.para-quien__list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
}

.para-quien__item {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  padding-left: var(--spacing-md);
}

.para-quien__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--color-background);
  border-radius: 50%;
}

.para-quien__title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
}

/* ===================================
   Servicios
   =================================== */
.servicios__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.servicios__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.servicios__image {
  display: none;
}

.servicios__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.servicios__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  max-width: 800px;
  margin: 0 auto;
}

.servicio-card {
  background: var(--color-background);
  padding: var(--spacing-md);
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
}

.servicio-card:hover {
  transform: translateY(-5px);
}

.servicio-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.servicio-card__desc {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.servicios__nota {
  text-align: center;
  margin-top: var(--spacing-md);
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: 600;
}

.servicios__title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
  color: var(--color-primary);
}

/* ===================================
   Inspiración
   =================================== */
.inspiracion {
  text-align: center;
  position: relative;
}

.inspiracion__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

.inspiracion__content {
  position: relative;
  z-index: 1;
}

.inspiracion__text {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 600;
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
  line-height: 1.5;
  text-transform: uppercase;
}

.inspiracion__cita {
  font-family: var(--font-cursive);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: var(--spacing-md) 0;
  opacity: 0.95;
}


/* ===================================
   Testimonios
   =================================== */
.testimonios__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.testimonios__title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.testimonios__image {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.testimonios__image img {
  max-width: 180px;
  border-radius: 16px;
  object-fit: cover;
}

/* Marquesina horizontal infinita */
.testimonios__marquee {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.testimonios__track {
  display: flex;
  gap: var(--spacing-lg);
  animation: marquee 40s linear infinite;
  width: max-content;
}

.testimonios__track:hover {
  animation-play-state: paused;
}

.testimonio {
  flex-shrink: 0;
  max-width: 350px;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-style: italic;
  padding: var(--spacing-sm);
  border-left: 3px solid rgba(255, 255, 255, 0.5);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===================================
   Contacto
   =================================== */
.contacto__content {
  position: relative;
  z-index: 1;
}

.contacto {
  text-align: center;
}

.contacto__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
}

.contacto__links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.contacto__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  transition: transform var(--transition-fast);
}

.contacto__link:hover {
  transform: scale(1.1);
}

.contacto__link svg {
  width: 3rem;
  height: 3rem;
}

.contacto__link span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===================================
   Animaciones Fade In (delays)
   =================================== */
.js .fade-in-delay-1 { transition-delay: 0.1s; }
.js .fade-in-delay-2 { transition-delay: 0.2s; }
.js .fade-in-delay-3 { transition-delay: 0.3s; }
.js .fade-in-delay-4 { transition-delay: 0.4s; }

/* ===================================
   Parallax
   =================================== */
.parallax-image {
  will-change: transform;
}

/* ===================================
   Responsive - Tablet
   =================================== */
@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--reverse {
    direction: rtl;
  }

  .split--reverse > * {
    direction: ltr;
  }

  .servicios__image {
    display: block;
    flex: 0 0 35%;
  }

  .servicios__content {
    flex-direction: row;
    align-items: center;
  }

}

/* ===================================
   Responsive - Desktop
   =================================== */
@media (min-width: 1024px) {
  .section {
    padding: var(--spacing-xl);
  }

  .split__image {
    max-width: 500px;
  }

  .servicios__content {
    flex-direction: row;
    align-items: stretch;
  }

  .servicios__image {
    display: block;
    flex: 0 0 40%;
    max-height: 100vh;
  }

  .servicios__image img {
    height: 100%;
  }

  .servicios__title {
    text-align: center;
  }

}

/* ===================================
   Responsive - Móvil pequeño
   =================================== */
@media (max-width: 480px) {
  .section {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .contacto__links {
    gap: var(--spacing-md);
  }

}

/* ===================================
   Responsive - Pantallas grandes
   =================================== */
@media (min-width: 1440px) {
  .section__content {
    max-width: 1400px;
  }
}

@media (min-width: 1920px) {
  .section__content {
    max-width: 1600px;
  }
}

/* ===================================
   Scroll Indicator
   =================================== */
.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: none;
}

.js .scroll-indicator {
  display: block;
}

.scroll-indicator__chevron {
  display: block;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-background);
  border-bottom: 2px solid var(--color-background);
  transform: rotate(45deg);
  animation: bounce 1.5s ease-in-out infinite;
}

.scroll-indicator--hidden {
  opacity: 0;
  transition: opacity var(--transition-fast);
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(8px); }
}

/* ===================================
   No-JS Fallbacks (Progressive Enhancement)
   =================================== */

/* Default: visible (no JS) */
.fade-in {
  opacity: 1;
  transform: none;
}

/* Con JS: ocultar para animar */
.js .fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.js .fade-in.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   Focus Styles
   =================================== */
:focus-visible {
  outline: 2px solid var(--color-background);
  outline-offset: 2px;
}

.section--white :focus-visible,
.servicio-card :focus-visible {
  outline-color: var(--color-primary);
}

/* ===================================
   Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ===================================
   Placeholder para imágenes
   =================================== */
.image-placeholder {
  background: linear-gradient(135deg, var(--color-gray-light) 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  min-height: 300px;
  border-radius: 8px;
}

/* ===================================
   Utilidades
   =================================== */
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
