/* ============================================
   JAVIERA ROMERO — Portfolio
   Paleta y tipografías
   ============================================ */
:root {
  --burdeo: #4A1A3F;
  --burdeo-dark: #3A1230;
  --morado-medio: #7E6E9A;
  --lavanda-fondo: #DCD4EA;
  --lavanda-suave: #E8E2F2;
  --lavanda-header: #B8A8C9;
  --azul-claro-btn: #B5BFE0;
  --crema: #F4EFE5;
  --blanco: #ffffff;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: #2c1a2a;
  background: var(--lavanda-fondo);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--lavanda-header);
  border-bottom: 1px solid rgba(74,26,63,0.08);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; }
.logo-svg { width: 72px; height: 54px; }
.logo-img { width: 80px; height: auto; display: block; }

.nav-desktop {
  display: flex;
  gap: 48px;
}

.nav-desktop a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--burdeo);
  letter-spacing: 0.2px;
  padding: 6px 2px;
  position: relative;
  transition: color .2s;
}

.nav-desktop a:hover { color: var(--burdeo-dark); }
.nav-desktop a:hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--burdeo);
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--burdeo);
  border-radius: 2px;
  transition: transform .3s, opacity .2s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--lavanda-header);
  padding: 12px 32px 24px;
  border-top: 1px solid rgba(74,26,63,0.1);
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--burdeo);
  padding: 12px 0;
  border-bottom: 1px dashed rgba(74,26,63,0.18);
}

/* ============================================
   GENERAL
   ============================================ */
.section-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 64px);
  color: var(--burdeo);
  letter-spacing: 1px;
  line-height: 1.05;
  margin: 0 0 36px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-heading-row .section-title { margin: 0; }

.title-trail {
  width: 320px;
  height: 50px;
  max-width: 60%;
}

/* Polaroid base — para imágenes que YA traen marco blanco en el PNG,
   solo aplicamos sombra e inclinación */
.polaroid {
  background: #fff;
  filter: drop-shadow(0 14px 22px rgba(60, 25, 70, 0.18));
  transition: transform .35s ease;
}
.polaroid:hover { transform: rotate(0) scale(1.02); }

/* Polaroid construida con CSS (foto sin marco propio).
   Proporciones tomadas del polaroid original: ~5% lateral/top, ~18% inferior. */
.polaroid-frame {
  background: #fff;
  padding: 5% 5% 18%;
  border-radius: 3px;
  box-shadow: 0 18px 28px rgba(60, 25, 70, 0.22);
  display: inline-block;
  transition: transform .35s ease;
  box-sizing: border-box;
}
.polaroid-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px;
}
.polaroid-frame:hover { transform: rotate(0) scale(1.02); }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 80px 0 100px;
  background: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-title {
  margin: 0 0 28px;
  line-height: 1;
}

.hero-title-italic {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(38px, 5.5vw, 76px);
  color: var(--morado-medio);
  letter-spacing: -0.5px;
}

.hero-title-bold {
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(40px, 6.5vw, 90px);
  color: var(--burdeo);
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.hero-bio {
  font-family: var(--serif);
  font-size: clamp(18px, 1.4vw, 22px);
  color: #5e4a64;
  max-width: 540px;
  margin: 0 0 36px;
}
.hero-bio strong { color: var(--burdeo); font-weight: 700; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 44px;
  border-radius: var(--radius-pill);
  font-family: var(--serif);
  font-size: 26px;
  color: var(--burdeo);
  background: var(--azul-claro-btn);
  box-shadow: 0 6px 14px rgba(74,26,63,0.18);
  transition: transform .2s, box-shadow .2s;
}
.btn-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(74,26,63,0.24);
}

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}
.polaroid-hero {
  width: min(420px, 90%);
  transform: rotate(3deg);
  /* Sombra reforzada en todos los lados: contorno fino + sombra cercana + sombra proyectada.
     Sobreescribe el filter del .polaroid base para que la polaroid se despegue del fondo blanco. */
  filter:
    drop-shadow(0 0 1px rgba(60, 25, 70, 0.35))
    drop-shadow(0 4px 10px rgba(60, 25, 70, 0.15))
    drop-shadow(0 22px 36px rgba(60, 25, 70, 0.32));
}

/* ============================================
   SOBRE MÍ
   ============================================ */
.sobre-mi {
  padding: 80px 0;
  background: var(--lavanda-suave);
}

.sobre-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}

.sobre-text p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.25vw, 21px);
  color: #5e4a64;
  margin: 0 0 22px;
}
.sobre-text p strong { color: var(--burdeo); font-weight: 700; }

.sobre-photos {
  position: relative;
  /* Altura se ajusta al ancho disponible según el ratio de las polaroids
     (fotos ~0.83 ratio y se solapan ~50%). */
  aspect-ratio: 1 / 1.05;
}
.polaroid-sobre-1 {
  position: absolute;
  width: 56%;
  top: 0; left: 5%;
  transform: rotate(-7deg);
  z-index: 1;
}
.polaroid-sobre-2 {
  position: absolute;
  width: 56%;
  bottom: 0; right: 4%;
  transform: rotate(6deg);
  z-index: 2;
}

.plane-trail {
  position: absolute;
  width: 130px;
  height: 70px;
  pointer-events: none;
}
.trail-top { top: -10px; right: -10px; }
.trail-bottom { bottom: 0; left: -20px; }

/* ============================================
   DIFERENCIAL
   ============================================ */
.diferencial {
  padding: 90px 0;
  background: var(--blanco);
}

.dif-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.dif-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dif-icon { width: 90px; height: 90px; margin-bottom: 20px; }

.dif-pill {
  background: var(--burdeo);
  color: var(--crema);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 2px;
  padding: 12px 50px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 16px rgba(74,26,63,0.18);
  margin-bottom: 18px;
}

.dif-card p {
  font-family: var(--serif);
  font-size: 17px;
  color: #5e4a64;
  max-width: 280px;
  margin: 0 auto;
}

/* ============================================
   PROYECTOS
   ============================================ */
.proyectos {
  padding: 90px 0;
  background: var(--lavanda-suave);
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.proyecto-card {
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.proyecto-card img {
  width: 100%;
  filter: drop-shadow(0 12px 20px rgba(60,25,70,0.18));
  transition: transform .35s;
}
.proyecto-card:nth-child(1) img { transform: rotate(-2deg); }
.proyecto-card:nth-child(2) img { transform: rotate(2deg); }
.proyecto-card:nth-child(3) img { transform: rotate(-1deg); }
.proyecto-card:nth-child(4) img { transform: rotate(2.5deg); }
.proyecto-card:hover img { transform: rotate(0) scale(1.03); }

.proyecto-card figcaption {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--burdeo);
  margin-top: 22px;
  font-weight: 500;
}

/* ============================================
   SERVICIOS
   ============================================ */
.servicios {
  padding: 90px 0;
  background: var(--blanco);
}

.serv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  align-items: stretch;
}

.serv-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.serv-icon { width: 100px; height: 100px; display: block; }

.serv-pill {
  background: var(--burdeo);
  color: var(--crema);
  font-family: var(--serif);
  font-size: 22px;
  text-align: center;
  padding: 0 30px;
  border-radius: 36px;
  box-shadow: 0 10px 18px rgba(74,26,63,0.20);
  width: 100%;
  max-width: 280px;
  min-height: 96px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* ============================================
   CONTACTO
   ============================================ */
.contacto {
  padding: 70px 0 0;
  background: var(--lavanda-header);
}

.contacto-box {
  background: var(--lavanda-suave);
  border: 3px solid var(--burdeo);
  padding: 50px 56px;
  margin-bottom: 0;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contacto-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--burdeo);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}

.contacto-sub {
  font-family: var(--serif);
  font-size: 19px;
  color: #5e4a64;
  margin: 0 0 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.contacto-form input,
.contacto-form textarea {
  width: 100%;
  background: #fff;
  border: 2px solid var(--burdeo);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--burdeo);
  padding: 16px 18px;
  border-radius: 0;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.contacto-form input::placeholder,
.contacto-form textarea::placeholder {
  color: var(--burdeo);
  opacity: 0.85;
}
.contacto-form input:focus,
.contacto-form textarea:focus {
  border-color: var(--burdeo-dark);
  box-shadow: 0 0 0 3px rgba(74,26,63,0.15);
}
.contacto-form textarea {
  resize: vertical;
  margin-bottom: 18px;
  min-height: 110px;
}

.btn-enviar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--lavanda-header);
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 28px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--burdeo);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(74,26,63,0.18);
  transition: transform .15s, box-shadow .2s;
}
.btn-enviar:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(74,26,63,0.24); }

.enviar-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--burdeo);
  display: flex; align-items: center; justify-content: center;
}

.form-status {
  margin: 12px 0 0;
  font-family: var(--serif);
  color: var(--burdeo);
  min-height: 1.2em;
}

.contacto-info-col {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.contacto-line {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--serif);
  font-size: 24px;
  color: #5e4a64;
  transition: color .2s;
}
.contacto-line:hover { color: var(--burdeo); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #fff;
  margin-top: 0;
  padding: 24px 0;
  border-top: 3px solid var(--burdeo);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 20px;
}
.logo-footer .logo-svg { width: 60px; height: 46px; }
.copyright {
  text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  color: #5e4a64;
  margin: 0;
}
.socials {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}
.social-link {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  transition: transform .2s;
}
.social-link:hover { transform: translateY(-2px); }

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
  .proyectos-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .hero-grid, .sobre-grid, .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .sobre-photos { aspect-ratio: 1 / 1.1; }
  .polaroid-hero { transform: rotate(2deg); width: min(360px, 80%); }
}

/* ============================================
   RESPONSIVE — MÓVIL
   ============================================ */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding: 0 22px; }

  .nav-desktop { display: none; }
  .hamburger { display: flex; }

  .header-inner { padding: 12px 22px; }
  .logo-svg { width: 58px; height: 44px; }

  /* HERO */
  .hero { padding: 50px 0 60px; }
  .hero-grid { gap: 30px; }
  .hero-title-italic { font-size: 38px; }
  .hero-title-bold { font-size: 40px; }
  .hero-bio { font-size: 17px; }
  .btn-pill { font-size: 20px; padding: 14px 32px; gap: 14px; }
  .polaroid-hero { width: min(280px, 75%); }

  /* SOBRE MÍ */
  .sobre-mi { padding: 60px 0; }
  .sobre-photos { aspect-ratio: 1 / 1.15; }
  .polaroid-sobre-1 { width: 60%; left: 0; }
  .polaroid-sobre-2 { width: 60%; right: 0; }

  /* DIFERENCIAL */
  .diferencial { padding: 60px 0; }
  .dif-grid { grid-template-columns: 1fr; gap: 50px; }
  .dif-pill { font-size: 22px; padding: 10px 38px; }
  .section-heading-row { gap: 12px; }
  .title-trail { width: 100%; max-width: 280px; }

  /* PROYECTOS — carrusel horizontal en móvil como en el PDF */
  .proyectos { padding: 60px 0; }
  .proyectos-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 70%;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .proyecto-card { scroll-snap-align: center; }
  .proyecto-card figcaption { font-size: 16px; margin-top: 16px; }

  /* SERVICIOS */
  .servicios { padding: 60px 0; }
  .serv-grid { grid-template-columns: 1fr; gap: 32px; }
  .serv-icon { width: 90px; height: 90px; }
  .serv-pill { font-size: 22px; padding: 14px 28px; min-width: 220px; }

  /* CONTACTO */
  .contacto { padding: 50px 0 0; }
  .contacto-box { padding: 32px 24px; }
  .contacto-grid { gap: 36px; }
  .contacto-title { font-size: 44px; }
  .form-row { grid-template-columns: 1fr; }
  .contacto-line { font-size: 18px; gap: 16px; }
  .contacto-line svg { width: 38px; height: 38px; }

  /* FOOTER */
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "logo socials" "copy copy";
    gap: 16px;
  }
  .logo-footer { grid-area: logo; }
  .socials { grid-area: socials; }
  .copyright { grid-area: copy; }
}

/* ============================================
   ANIMACIONES
   ============================================ */

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease-out, transform .8s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Float sutil del polaroid del hero — preserva la rotación de 3° */
@keyframes hero-float {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-14px); }
}
.polaroid-hero {
  animation: hero-float 5s ease-in-out infinite;
}

/* Hero entra con fade-in al cargar la página */
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero { animation: hero-enter .9s ease-out both; }

/* Respeta preferencia de motion reducido del SO */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .polaroid-hero,
  .hero { animation: none !important; }
}
