/* =====================================================
   CAMILISTICA — Sistema de diseño completo
   Inspirado en barbenvakil.nyc
   ===================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Inter:wght@300;400;500&display=swap');

/* --- Variables --- */
:root {
  --cream: #FAFAF8;
  --cream-dark: #F2F0ED;
  --ink: #141414;
  --ink-light: #2A2A2A;
  --ink-muted: #6B6B6B;
  --ink-subtle: #9E9E9E;
  --white: #FFFFFF;
  --accent: #C8A97A;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;

  --header-h: 72px;
  --section-pad: clamp(80px, 10vw, 140px);
  --gutter: clamp(24px, 5vw, 80px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --trans: 0.4s var(--ease-out);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* --- Typography scale --- */
.t-display {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8vw, 120px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.t-heading {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.t-subheading {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
}
.t-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.t-body {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-light);
}
.t-caption {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.5s ease, backdrop-filter 0.5s ease;
}
.site-header.scrolled {
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20,20,20,0.06);
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.header-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: invert(0);
}
.header-logo-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
}
.header-nav a {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  transition: color var(--trans);
}
.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.header-nav a:hover::after,
.header-nav a.active::after { transform: scaleX(1); }

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 110;
}
.burger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}
.mobile-nav a:hover { color: var(--ink-muted); }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
  transition: opacity 0.5s ease;
}
.hero-ink-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: none;
}
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--white);
  pointer-events: none;
  user-select: none;
  padding: 0 var(--gutter);
}
.hero-pretitle {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #2a2a2a;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(64px, 11vw, 160px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: #2a2a2a;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 300;
  font-style: italic;
  color: #2a2a2a;
  letter-spacing: 0.04em;
}
.hero-actions {
  z-index: 4;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.hero-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  animation: bounce 2s ease-in-out infinite;
}
.hero-hint svg {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.hero-hint:hover svg {
  opacity: 0.85;
  transform: translateY(3px);
}
/* Label hidden on desktop */
.hero-hint-label {
  display: none;
}
/* Hide Encargos button on desktop, only show Ver obra */
.hero-hint-encargos {
  display: none;
}
/* Mobile & tablet: show both buttons as pills */
@media (max-width: 1024px) {
  .hero-actions {
    gap: 12px;
    margin-top: 32px;
  }
  .hero-hint {
    flex-direction: row;
    gap: 10px;
    color: rgba(255,255,255,0.75);
    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 40px;
    padding: 12px 22px 14px;
  }
  .hero-hint-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.85);
  }
  .hero-hint svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
  }
  .hero-hint-encargos {
    display: flex;
  }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =====================================================
   SECTIONS — Common
   ===================================================== */
.section {
  padding: var(--section-pad) var(--gutter);
}
.section-alt {
  background: var(--cream-dark);
}
.section-header {
  margin-bottom: clamp(48px, 7vw, 96px);
}
.section-number {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  display: block;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 24px;
}
.section-desc {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-light);
  max-width: 560px;
}
section[id] {
  scroll-margin-top: 100px;
}

/* =====================================================
   MASONRY GALLERY
   ===================================================== */
.masonry-container {
  column-count: 4;
  column-gap: 0;
  width: 100%;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out), opacity 0.4s ease;
}
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.25);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.masonry-item:hover::after {
  opacity: 1;
}
.masonry-item:hover img {
  transform: scale(1.03);
}

@media (max-width: 1200px) {
  .masonry-container {
    column-count: 3;
    column-gap: 0;
  }
  .masonry-item {
    margin-bottom: 20px;
  }
}
@media (max-width: 800px) {
  .masonry-container {
    column-count: 2;
    column-gap: 16px;
  }
  .masonry-item {
    margin-bottom: 16px;
  }
}
@media (max-width: 480px) {
  .masonry-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .masonry-item {
    break-inside: auto;
    margin-bottom: 0;
    width: 100%;
  }
  .masonry-container.reveal {
    opacity: 1;
    transform: none;
  }
}
.artwork-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--white);
  display: block;
  margin-bottom: 4px;
}
.artwork-meta {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

/* =====================================================
   SECTION LAYOUT — Header left, gallery right
   ===================================================== */
.section-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.section-split .section-header {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .section-split {
    grid-template-columns: 1fr;
  }
  .section-split .section-header {
    position: static;
    margin-bottom: 40px;
  }
}

/* =====================================================
   SOBRE MÍ
   ===================================================== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.about-image-wrap {
  position: relative;
  overflow: hidden;
}
.about-image-wrap::after {
  content: '';
  display: block;
  padding-top: 130%;
}
.about-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.about-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.about-quote {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 28px;
  margin: 8px 0;
}
.about-text {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.4vw, 15px);
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink-light);
}
.about-text p + p { margin-top: 16px; }
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   CONTACTO
   ===================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-info-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.contact-info-value {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  color: var(--ink);
  transition: color var(--trans);
}
.contact-info-value:hover { color: var(--ink-muted); }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.form-input, .form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(20,20,20,0.2);
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color var(--trans);
  width: 100%;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--ink);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--ink-subtle);
}
.form-textarea {
  resize: none;
  min-height: 120px;
}
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 1px solid rgba(20,20,20,0.25);
  padding: 14px 28px;
  cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
  align-self: flex-start;
}
.form-submit:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  padding: 48px var(--gutter);
  border-top: 1px solid rgba(20,20,20,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.footer-copy {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
}
.footer-social {
  display: flex;
  gap: 20px;
}
.footer-social a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color var(--trans);
}
.footer-social a:hover { color: var(--ink); }

/* =====================================================
   WHATSAPP FLOAT BUTTON
   ===================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  opacity: 0.9;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  opacity: 1;
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}
.whatsapp-float svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

/* =====================================================
   LIGHTBOX
   ===================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 20, 20, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.lightbox-overlay.open {
  display: flex;
  opacity: 1;
}
.lightbox-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.lightbox-img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.lightbox-caption {
  text-align: center;
}
.lightbox-caption .artwork-name {
  font-size: 22px;
  color: var(--white);
}
.lightbox-caption .artwork-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}
.lightbox-close {
  position: fixed;
  top: 28px;
  right: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.25s ease;
  z-index: 310;
}
.lightbox-close:hover { color: var(--white); }

/* Lightbox Navigation Buttons */
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 48px;
  font-family: var(--font-serif);
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
  z-index: 310;
  user-select: none;
  background: rgba(20, 20, 20, 0.3);
  border-radius: 50%;
}
.lightbox-prev {
  left: 24px;
}
.lightbox-next {
  right: 24px;
}
.lightbox-prev:hover, .lightbox-next:hover {
  color: var(--white);
  background-color: rgba(20, 20, 20, 0.65);
}
.lightbox-prev:active {
  transform: translateY(-50%) scale(0.95) translateX(-2px);
}
.lightbox-next:active {
  transform: translateY(-50%) scale(0.95) translateX(2px);
}
@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next {
    width: 48px;
    height: 48px;
    font-size: 36px;
    background: rgba(20, 20, 20, 0.5);
  }
  .lightbox-prev {
    left: 12px;
  }
  .lightbox-next {
    right: 12px;
  }
}

/* =====================================================
   SCROLL REVEAL ANIMATIONS
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =====================================================
   DIVIDER
   ===================================================== */
.divider {
  width: 48px;
  height: 1px;
  background: var(--ink-subtle);
  margin: 24px 0;
}

/* =====================================================
   RESPONSIVE MISC
   ===================================================== */
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .header-nav { display: none; }
  .burger { display: flex; }
  .hero-title { font-size: clamp(52px, 14vw, 90px); }
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .whatsapp-float { bottom: 20px; right: 20px; width: 46px; height: 46px; }
  .whatsapp-float svg { width: 22px; height: 22px; }
}

/* =====================================================
   CURSOR CUSTOM
   ===================================================== */
.hero-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  mix-blend-mode: difference;
  display: none;
}
.hero:hover ~ .hero-cursor,
.hero .hero-ink-canvas:hover { cursor: none; }
