:root {
  /* ─── Dani Butera Palette - Inspired by her paintings ─── */
  /* Violetas profundos, doradoscálidos, azules del mar */
  
  --bg-base:         oklch(10% 0.015 285);        /* Negro profundo de atelier */
  --bg-surface:      oklch(15% 0.02 285);
  --bg-surface-high: oklch(20% 0.025 285);

  --glass-panel:     oklch(25% 0.025 285 / 0.15);
  --glass-border:    oklch(100% 0 0 / 0.08);
  --glass-highlight: oklch(100% 0 0 / 0.04);

  --text-primary:    oklch(95% 0.005 285);
  --text-secondary: oklch(65% 0.015 285);
  --text-tertiary:   oklch(42% 0.012 285);

  /* ─── Dani Accent: Violeta profundo + Dorado cálido (de sus pinturas) ─── */
  --accent-base:     oklch(55% 0.22 280);       /* Violeta intenso */
  --accent-glow:   oklch(55% 0.22 280 / 0.4);
  --accent-faint:   oklch(55% 0.22 280 / 0.1);
  --accent-2:      oklch(70% 0.18 45);        /* Dorado ocaso */
  --accent-2-glow: oklch(70% 0.18 45 / 0.35);

  /* ─── Gradient accent ─── */
  --grad-accent: linear-gradient(135deg, oklch(55% 0.22 280), oklch(70% 0.18 45));

  /* ─── Geometry ─── */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --gap-sys:   20px;

  /* ─── Spring Physics ─── */
  --spring-snappy: linear(
    0, 0.41 11%, 0.72 23%, 0.91 35%, 1.05 48%, 1.08 55%, 1.05 64%, 1.01 74%, 0.99 83%, 1
  );
  --spring-bouncy: linear(
    0, 0.03 2%, 0.15 4%, 0.73 13%, 0.95 17%, 1.02 19%, 1.08 23%, 1.12 28%, 1.12 34%, 1.05 44%, 1.01 53%, 0.99 64%, 1 76%, 1
  );
  --t-fast: 0.3s var(--spring-snappy);
  --t-med:  0.5s var(--spring-snappy);
  --t-slow: 0.8s var(--spring-bouncy);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding: var(--gap-sys);
  padding-top: calc(90px + var(--gap-sys));
  overflow-x: hidden;
  /* Rich background with dual-accent tint */
  background-image:
    radial-gradient(ellipse 60% 50% at 10% 0%, oklch(72% 0.19 15 / 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 90% 100%, oklch(70% 0.14 195 / 0.1) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, oklch(20% 0.025 285 / 0.4) 0%, transparent 80%);
  background-attachment: fixed;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.clamp-hero {
  font-size: clamp(2.8rem, 7vw + 0.5rem, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  /* Gradient text */
  background: linear-gradient(135deg, var(--text-primary) 40%, oklch(72% 0.19 15 / 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.clamp-h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
.clamp-h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }

/* ─── Glassmorphism ─── */
.glass {
  background: var(--glass-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 0 var(--glass-highlight),
    0 12px 50px -12px oklch(0% 0 0 / 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* ─── Bento Grid ─── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-sys);
  max-width: 1440px;
  margin: 0 auto;
}

/* ─── Navigation ─── */
.main-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1440px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  border-radius: 100px;
  /* Gradient border trick */
  background: oklch(17% 0.02 285 / 0.75);
  border: 1px solid oklch(100% 0 0 / 0.1);
}

.nav-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  /* Subtle accent on brand */
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--t-fast);
  letter-spacing: 0.01em;
}

.nav-links a:hover { color: var(--text-primary); }

/* Hamburger hidden on desktop */
.hamburger-btn { display: none; }
.mobile-nav-drawer { display: none; }

/* ─── Interactions ─── */
.interactive {
  transition: transform var(--t-med), border-color var(--t-fast), box-shadow var(--t-med);
  cursor: pointer;
  will-change: transform;
}

.interactive:hover {
  transform: scale(0.985);
  border-color: oklch(72% 0.19 15 / 0.25);
  box-shadow: 0 20px 50px -10px oklch(0% 0 0 / 0.5), inset 0 1px 0 0 oklch(100% 0 0 / 0.12);
}

.interactive:active { transform: scale(0.96); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--grad-accent);
  color: oklch(100% 0 0 / 0.95);
  box-shadow: 0 4px 20px oklch(72% 0.19 15 / 0.35);
}

.btn-primary:hover {
  transform: scale(0.96);
  box-shadow: 0 8px 30px oklch(72% 0.19 15 / 0.5);
}

.btn-icon {
  margin-left: 8px;
  transition: transform var(--t-fast);
  display: inline-block;
}

.btn:hover .btn-icon { transform: translateX(5px); }

/* ─── Grid Column Helpers ─── */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.row-2 { grid-row: span 2; }

/* ─── Hero Cell ─── */
.hero-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  min-height: 520px;
  /* Gradient accent border */
  border: 1px solid oklch(72% 0.19 15 / 0.2) !important;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.55;
  transition: transform 12s ease-out, opacity var(--t-med);
}

.hero-cell:hover .hero-bg {
  transform: scale(1.06);
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content p {
  font-size: 1.1rem;
  margin: 16px 0 32px;
  max-width: 85%;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Bio / Manifiesto Cell ─── */
.bio-cell {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bio-cell h2 {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.bio-cell p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ─── Mini Cards ─── */
.mini-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  min-height: 180px;
}

.mini-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-faint);
  color: var(--accent-base);
  margin-bottom: 20px;
  border: 1px solid oklch(72% 0.19 15 / 0.15);
}

.mini-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.mini-card p { font-size: 0.9rem; }

/* ─── Gallery Section ─── */
.gallery-section {
  padding-top: var(--gap-sys);
}

/* Desktop: horizontal carousel */
.gallery-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: var(--gap-sys);
  margin-top: var(--gap-sys);
  padding-bottom: 8px;
  scrollbar-width: none;
}

.gallery-carousel::-webkit-scrollbar { display: none; }

.gallery-carousel .artwork-card {
  min-width: 290px;
  width: 290px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.artwork-card {
  aspect-ratio: 3/4;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.artwork-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.85;
  transition: transform var(--t-slow), opacity var(--t-fast);
}

.artwork-card:hover .artwork-img {
  transform: scale(1.07);
  opacity: 1;
}

.artwork-info {
  position: relative;
  z-index: 1;
  background: linear-gradient(to top, oklch(12% 0.018 285 / 0.95) 0%, transparent 100%);
  padding: 40px 20px 20px;
  margin: -20px;
  transform: translateY(8px);
  opacity: 0;
  transition: transform var(--t-med), opacity var(--t-med);
}

.artwork-card:hover .artwork-info,
.artwork-card:focus-within .artwork-info {
  transform: translateY(0);
  opacity: 1;
}

/* ─── Contact / Form ─── */
.contact-section { padding: 40px; }

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

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-group.full { grid-column: span 2; }

.glass-input {
  background: oklch(0% 0 0 / 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  outline: none;
}

.glass-input:focus {
  border-color: var(--accent-base);
  background: oklch(0% 0 0 / 0.3);
  box-shadow: 0 0 0 3px var(--accent-faint);
}

.glass-input::placeholder { color: var(--text-tertiary); }

/* ─── Responsive: Tablet ─── */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .col-4 { grid-column: span 2; }
  .hero-cell { grid-column: span 2; }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 768px) {
  :root { --gap-sys: 14px; }

  body {
    padding: 12px;
    padding-top: 88px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .col-1, .col-2, .col-3, .col-4 { grid-column: span 1 !important; }
  .row-2 { grid-row: span 1 !important; }

  /* Hero full-bleed on mobile */
  .hero-cell {
    min-height: 420px;
    padding: 24px 20px;
    border-radius: var(--radius-md) !important;
  }
  .hero-content p {
    max-width: 100%;
    font-size: 1rem;
    margin: 12px 0 24px;
  }

  .bio-cell { padding: 24px 20px; }
  .mini-card { padding: 24px 20px; min-height: 150px; }
  .contact-section { padding: 24px 20px; }

  /* Nav: compact pill */
  .main-nav {
    top: 10px;
    height: 56px;
    padding: 0 16px;
    width: calc(100% - 20px);
  }
  .nav-brand { font-size: 1rem; }
  .nav-links { display: none !important; }

  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
  }

  .hamburger-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--t-fast), opacity var(--t-fast);
    transform-origin: center;
  }

  .hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Mobile nav drawer */
  .mobile-nav-drawer {
    position: fixed;
    top: 76px;
    left: 10px;
    right: 10px;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
    transform: translateY(-12px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t-med), opacity var(--t-fast);
    background: oklch(17% 0.02 285 / 0.95);
  }

  .mobile-nav-drawer.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
  }

  .mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    transition: color var(--t-fast), padding-left var(--t-fast);
  }

  .mobile-nav-link:last-child { border-bottom: none; }
  .mobile-nav-link:hover, .mobile-nav-link:active {
    color: var(--accent-base);
    padding-left: 8px;
  }

  /* ── Gallery: 2-column grid on mobile ── */
  .gallery-carousel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .gallery-carousel .artwork-card {
    min-width: unset;
    width: 100%;
    flex-shrink: unset;
    scroll-snap-align: none;
  }

  /* On mobile, always show artwork info (no hover) */
  .artwork-info {
    transform: translateY(0) !important;
    opacity: 1 !important;
  }

  /* Carousel nav buttons: hide on mobile (swipe/grid replaces them) */
  .carousel-nav { display: none !important; }

  /* Form */
  .form-grid { grid-template-columns: 1fr; }
  .input-group.full { grid-column: span 1; }
}

/* ─── Very small phones ─── */
@media (max-width: 380px) {
  .gallery-carousel {
    grid-template-columns: 1fr;
  }
  .clamp-hero { font-size: 2.4rem; }
}

/* ─── Spring Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(8% 0.02 285 / 0.7);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-sys);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  transform: scale(0.92) translateY(40px);
  opacity: 0;
  transition: transform var(--t-med), opacity var(--t-fast);
  border: 1px solid oklch(72% 0.19 15 / 0.15);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@media (max-width: 900px) {
  .modal-content {
    grid-template-columns: 1fr;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
  }
}

.modal-image-col {
  background: oklch(8% 0.02 285);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 45vh;
}

@media (max-width: 900px) {
  .modal-image-col {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: 35vh;
  }
  .modal-info-col {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
  }
}

.modal-info-col {
  padding: 36px;
  background: var(--bg-surface-high);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--glass-panel);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform var(--t-fast), background var(--t-fast);
  z-index: 10;
}

.modal-close:hover {
  transform: scale(0.9) rotate(90deg);
  background: oklch(72% 0.19 15 / 0.15);
}

/* ─── Floating Chat Widget ─── */
.floating-chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.floating-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--grad-accent);
  border: none;
  box-shadow: 0 8px 24px oklch(72% 0.19 15 / 0.45);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.floating-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px oklch(72% 0.19 15 / 0.6);
}

.floating-chat-modal {
  width: 370px;
  height: 510px;
  max-height: calc(100vh - 110px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px oklch(0% 0 0 / 0.4), 0 0 0 1px oklch(72% 0.19 15 / 0.15);
  transform: translateY(16px) scale(0.93);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-med), opacity var(--t-fast);
  transform-origin: bottom right;
}

.floating-chat-modal.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, oklch(72% 0.19 15 / 0.1), oklch(70% 0.14 195 / 0.1));
}

.window-close-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  transition: color var(--t-fast);
}

.window-close-btn:hover { color: var(--text-primary); }

/* ─── Mobile chat: full-screen overlay ─── */
@media (max-width: 480px) {
  .floating-chat-widget {
    bottom: 20px;
    right: 16px;
  }

  .floating-chat-modal {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 75vh;
    max-height: 75vh;
    border-radius: 20px 20px 0 0;
    transform-origin: bottom center;
  }
}
