/* ═══════════════════════════════════════════
   MA — Marianela Victoria
   Sistema de diseño editorial — SPA tabs
═══════════════════════════════════════════ */

:root {
  --lino:    #F9F8F6;
  --grafito: #1A1918;
  --arena:   #E2DFD8;
  --verde:   #6DB83A;
  --cyan:    #7BA5A9;
  --lavanda: #928AA6;

  --bg:    var(--lino);
  --ink:   var(--grafito);
  --lines: rgba(26,25,24,0.08);
  --lines-strong: rgba(26,25,24,0.2);
  --muted: rgba(26,25,24,0.42);

  --f-serif:  'Piazzolla', serif;
  --f-sans:   'Plus Jakarta Sans', sans-serif;
  --f-mono:   'Space Mono', monospace;
  --f-organo: 'Caveat', cursive;

  transition: background-color 0.7s cubic-bezier(0.25,1,0.5,1),
              color 0.7s cubic-bezier(0.25,1,0.5,1);
}

[data-theme="dark"] {
  --bg:    var(--grafito);
  --ink:   var(--lino);
  --lines: rgba(249,248,246,0.08);
  --lines-strong: rgba(249,248,246,0.2);
  --muted: rgba(249,248,246,0.42);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }

/* ── Grain ── */
.grain-overlay {
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3e%3cfilter id='n'%3e%3cturbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3e%3c/filter%3e%3crect width='100%25' height='100%25' filter='url(%23n)'/%3e%3c/svg%3e");
}

/* ── Progress bar ── */
.nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1.5px;
  width: 0%;
  background: var(--verde);
  z-index: 600;
  transition: width 0.4s ease;
}

/* ══════════════════════════════════════════
   FIXED NAV
══════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
}
.site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.92;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--lines);
  z-index: -1;
  transition: background 0.7s;
}
.brand-logo {
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.brand-m {
  font-family: var(--f-serif);
  font-weight: 300;
}
.brand-a {
  font-family: 'Caveat', cursive;
  font-weight: 400;
  font-size: 1.7rem;
  position: relative;
  top: 0.05em;
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}
.nav-btn {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: 0.8rem 1.2rem 1rem 0.9rem;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.nav-btn:hover { color: var(--ink); }
.nav-btn.active {
  color: var(--bg);
  background: var(--ink);
}
.nav-admin { opacity: 0.25; }
.toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--lines-strong);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  transition: all 0.25s;
  flex-shrink: 0;
}
.toggle-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toggle-btn svg { fill: currentColor; }

/* ══════════════════════════════════════════
   TABS / SECTIONS
══════════════════════════════════════════ */
.tab-content {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.25,1,0.5,1);
  background: var(--bg);
  /* transform for entrance animation */
  transform: translateY(12px);
}
.tab-content.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
  z-index: 10;
}
.tab-content.leaving {
  opacity: 0;
  transform: translateY(-8px);
  z-index: 9;
  pointer-events: none;
}
.tab-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem; /* top: space for nav */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Scroll stitch (only on home tab) ── */
.scroll-stitch-svg {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.scroll-stitch-path {
  fill: none;
  stroke: var(--verde);
  stroke-width: 1.2px;
  stroke-dasharray: 5,5;
  opacity: 0.28;
}
#tab-home .tab-inner { position: relative; z-index: 1; }

/* ── Typography ── */
.meta-tag {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.9rem;
}
h1 {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
h2 {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}
h3 { font-family: var(--f-serif); font-weight: 300; font-size: 1.4rem; }
p { font-weight: 300; margin-bottom: 1.25rem; max-width: 560px; }
strong { font-weight: 400; }

/* ── Editorial 2-col grid ── */
.editorial-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  align-items: center;
}
@media (max-width: 720px) {
  .editorial-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── Section intro block ── */
.section-intro { margin-bottom: 2.5rem; }
.section-intro p { opacity: 0.7; }

/* ── Photo frame ── */
.photo-frame {
  overflow: hidden;
  border: 1px solid var(--lines);
  background: var(--arena);
  width: 100%;
}
[data-theme="dark"] .photo-frame { background: #252320; }
.photo-frame.organic {
  border-radius: 48% 52% 45% 55% / 50% 45% 55% 50%;
  aspect-ratio: 1;
}
.photo-frame img {
  width: 100%; height: 100%;
  transition: transform 1.2s cubic-bezier(0.25,1,0.5,1);
}
.photo-frame:hover img { transform: scale(1.04); }
.photo-caption {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  opacity: 0.45;
  margin-top: 0.75rem;
}

/* ── Home specific ── */
.home-text { }
.hero-victoria {
  font-family: var(--f-organo);
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.02em;
}
.hero-italic {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--verde);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  opacity: 1;
  max-width: 100%;
}
.disc-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.75rem; }
.disc-tag {
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--lines-strong);
  padding: 0.28rem 0.7rem;
  color: var(--muted);
  border-radius: 1rem 1.5rem 1.2rem 0.8rem;
}
.cta-link {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.15rem;
  display: inline-block;
  transition: opacity 0.2s;
}
.cta-link:hover { opacity: 0.4; }
.home-social {
  display: flex;
  gap: 0;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  border-top: 1px solid var(--lines);
}

/* ── Social row ── */
.social-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--lines);
  transition: color 0.2s, padding-left 0.3s;
}
.social-row:last-child { border-bottom: none; }
.social-row:hover { color: var(--ink); padding-left: 0.5rem; }
.social-rule {
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--lines-strong);
  transition: width 0.3s;
  flex-shrink: 0;
}
.social-row:hover .social-rule { width: 2.5rem; background: var(--ink); }

/* ── Bio ── */
.bio-image-col { }
.bio-text-col p { opacity: 0.78; }

/* ── Gallery filters ── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
}
.filter-pill {
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--lines-strong);
  padding: 0.28rem 0.75rem;
  color: var(--muted);
  transition: all 0.2s;
  cursor: pointer;
  border-radius: 1rem 1.4rem 1.1rem 0.8rem;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ── Portfolio grid 2-col ── */
.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}
@media (max-width: 600px) { .portfolio-gallery { grid-template-columns: 1fr; } }
.work-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--lines);
  padding-bottom: 1.5rem;
  cursor: pointer;
}
.work-card.hidden { display: none; }
.work-viewport {
  aspect-ratio: 4/3;
  background: var(--arena);
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
  border: 1px solid var(--lines);
}
[data-theme="dark"] .work-viewport { background: #252320; }
.work-viewport img {
  width: 100%; height: 100%;
  filter: grayscale(0.1);
  transition: transform 1s ease, filter 1s ease;
}
.work-card:hover .work-viewport img { transform: scale(1.04); filter: grayscale(0); }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; }
.work-title { font-family: var(--f-serif); font-size: 1rem; font-weight: 300; }
.work-tag {
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde);
  opacity: 0.7;
}

/* Audio wave */
.audio-wave-container {
  width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center;
  background: var(--bg); position: relative;
}
.wave-lines { display: flex; align-items: center; gap: 5px; width: 55%; height: 50px; }
.wave-stroke { flex: 1; height: 2px; background: var(--lavanda); border-radius: 1px; }
.work-card:hover .wave-stroke { animation: waveA 1.2s ease-in-out infinite alternate; }
.work-card:hover .wave-stroke:nth-child(2n) { animation-delay: 0.12s; }
.work-card:hover .wave-stroke:nth-child(3n) { animation-delay: 0.24s; }
.work-card:hover .wave-stroke:nth-child(4n) { animation-delay: 0.36s; }
@keyframes waveA { 0% { height: 8%; } 100% { height: 90%; } }
.play-dot {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 38px; height: 38px;
  border: 1px solid var(--ink); border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-family: var(--f-mono); font-size: 0.55rem;
  background: var(--bg);
  transition: all 0.3s;
}
.play-dot:hover { background: var(--ink); color: var(--bg); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 800;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,25,24,0.94);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-inner { display: flex; gap: 3rem; align-items: center; max-width: 88vw; max-height: 88vh; }
.lightbox-img { max-height: 80vh; max-width: 55vw; object-fit: contain; width: auto; height: auto; }
.lightbox-info { color: var(--lino); max-width: 22ch; }
.lightbox-title { font-family: var(--f-serif); font-size: 1.4rem; font-weight: 300; margin-bottom: 0.6rem; }
.lightbox-desc { font-size: 0.85rem; opacity: 0.55; line-height: 1.7; margin-bottom: 0.75rem; }
.lightbox-meta { font-family: var(--f-mono); font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.3; }
.lightbox-close {
  position: absolute; top: 2rem; right: 2rem;
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--lino); opacity: 0.45; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* ── Servicios ── */
.servicios-list { display: flex; flex-direction: column; }
.servicio-item {
  border-bottom: 1px solid var(--lines);
  padding: 1.5rem 0;
  transition: padding-left 0.3s;
  cursor: pointer;
}
.servicio-item:hover { padding-left: 0.5rem; }
.servicio-kicker {
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde);
  display: block;
  margin-bottom: 0.3rem;
}
.servicio-name { font-family: var(--f-serif); font-size: 1.15rem; font-weight: 300; margin-bottom: 0.4rem; }
.servicio-desc-text { font-size: 0.82rem; line-height: 1.7; opacity: 0.6; margin: 0 0 0.85rem; max-width: 100%; }
.wsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--verde);
  border-radius: 0.8rem 1.4rem 1.2rem 0.9rem;
  padding: 0.4rem 1rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.wsp-btn:hover { opacity: 0.85; }

/* ── Riego ── */
.riego-col { display: flex; flex-direction: column; gap: 0; }
.riego-heading { font-family: var(--f-serif); font-size: 1.4rem; font-weight: 300; margin-bottom: 0.75rem; }
.riego-desc { font-size: 0.82rem; line-height: 1.75; opacity: 0.65; margin-bottom: 1.5rem; max-width: 100%; }
.riego-nurture-area { display: flex; flex-direction: column; align-items: center; }
.riego-btn {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.7rem 1.75rem;
  border-radius: 30px;
  transition: all 0.4s;
  margin-bottom: 1.5rem;
}
.riego-btn:hover { background: var(--cyan); color: var(--lino); }
.garden-container { height: 130px; display: flex; justify-content: center; align-items: flex-end; }

/* ── Sutura ── */
.suture-interactive-container {
  border: 1px solid var(--lines);
  background: var(--bg);
  position: relative;
}
.canvas-canvas {
  height: 300px; width: 100%;
  border-bottom: 1px solid var(--lines);
  cursor: crosshair; position: relative; overflow: hidden;
}
.suture-canvas-lines {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.suture-canvas-lines path {
  fill: none; stroke: var(--verde); stroke-width: 1; stroke-dasharray: 4,4;
}
.suture-cross {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 1rem;
  color: var(--verde);
  user-select: none;
  transform: translate(-50%,-50%);
  transition: color 0.3s, transform 0.3s;
  cursor: pointer;
  line-height: 1;
}
.suture-cross:hover { color: var(--cyan); transform: translate(-50%,-50%) scale(1.4); }
.interactive-board-viewer {
  padding: 1.5rem;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1rem;
  min-height: 5rem;
  text-align: center;
  opacity: 0.7;
}
.minimal-form-row { display: flex; border-top: 1px solid var(--lines); }
.minimal-input {
  background: none; border: none;
  padding: 1rem; color: var(--ink);
  font-family: var(--f-sans); font-size: 0.85rem;
  flex: 1; outline: none;
}
.minimal-input::placeholder { color: var(--ink); opacity: 0.3; }
.minimal-btn {
  background: none; border: none;
  border-left: 1px solid var(--lines);
  padding: 0 2rem; color: var(--ink);
  font-family: var(--f-mono); font-size: 0.62rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  transition: background 0.3s; white-space: nowrap;
}
.minimal-btn:hover { background: var(--lines); }

/* ── Contacto ── */
.contacto-social { display: flex; flex-direction: column; margin-top: 2rem; }
.contacto-form { display: flex; flex-direction: column; }
.form-field { border-bottom: 1px solid var(--lines); }
.form-input, .form-textarea {
  background: transparent; border: none;
  color: var(--ink); font-family: var(--f-sans);
  font-size: 0.9rem; padding: 0.85rem 0;
  outline: none; width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { opacity: 0.32; }
.form-textarea { resize: vertical; min-height: 90px; }
.form-submit {
  margin-top: 1.5rem;
  font-family: var(--f-mono); font-size: 0.6rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--ink); color: var(--bg);
  padding: 0.85rem 1.75rem;
  border-radius: 1.2rem 2rem 1.6rem 1rem;
  transition: opacity 0.2s; align-self: flex-start;
}
.form-submit:hover { opacity: 0.6; }

/* ── Footer ── */
.site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 3rem;
  border-top: 1px solid var(--lines);
  background: var(--bg);
  opacity: 0.92;
  backdrop-filter: blur(12px);
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.footer-tag {
  font-family: var(--f-mono);
  font-size: 0.55rem;
  color: var(--verde);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-dev {
  font-family: var(--f-mono);
  font-size: 0.5rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.footer-dev a { color: var(--muted); border-bottom: 1px solid var(--lines-strong); transition: color 0.2s; }
.footer-dev a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 1rem; align-items: center; }
.footer-social a {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.footer-social a:hover { color: var(--ink); }

/* ── Home: pad above sticky footer ── */
#tab-home .home-social { padding-bottom: 4rem; }

/* ── Responsive nav ── */
@media (max-width: 720px) {
  .site-nav { padding: 1rem 1.25rem; }
  .nav-list { gap: 0; overflow-x: auto; }
  .nav-btn { padding: 0.35rem 0.6rem; font-size: 0.52rem; }
  .toggle-btn { display: none; }
  .site-footer { padding: 0.75rem 1.25rem; }
  .footer-tag { font-size: 0.5rem; }
  .tab-inner { padding: 5rem 1.25rem 3rem; }
  .home-social { padding: 0 1.25rem 4rem; }
}
