/* ================================================
   ARBOLAIRE — Del árbol a tus manos
   Design System
   ================================================ */

:root {
  --bg:        #0d0d0b;
  --bg2:       #141410;
  --bg3:       #1c1c17;
  --gold:      #c8952a;
  --gold-lt:   #e0b050;
  --gold-dim:  #7a5a1a;
  --cream:     #f0ede5;
  --text:      #ddd9d0;
  --muted:     #888078;
  --border:    #2a2920;
  --green:     #2d3a1e;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease:      cubic-bezier(.4,0,.2,1);
  --shadow:    0 4px 32px rgba(0,0,0,.6);
  --radius:    4px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  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; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }
p { max-width: 68ch; }

.serif { font-family: var(--font-serif); }
.gold  { color: var(--gold); }
.muted { color: var(--muted); font-size: .9rem; }
.tag   {
  display: inline-block;
  padding: .2em .7em;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s var(--ease), padding .3s var(--ease);
}
.nav.scrolled {
  background: rgba(13,13,11,.95);
  backdrop-filter: blur(12px);
  padding: .8rem 2rem;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: .05em;
  color: var(--cream);
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex; gap: 2rem; list-style: none;
  font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
}
.nav-links a {
  color: var(--muted);
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--cream); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--cream); transition: .3s; }

/* ── HERO (index) ── */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  overflow: hidden;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.06);
  transition: transform 8s var(--ease);
}
.hero-slide.active img { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.82) 0%,
    rgba(0,0,0,.35) 50%,
    rgba(0,0,0,.15) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  padding: 4rem 3rem;
  max-width: 900px;
}
.hero-eyebrow {
  font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.hero-title { color: var(--cream); margin-bottom: 1rem; }
.hero-sub {
  color: rgba(240,237,229,.7);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-family: var(--font-serif); font-style: italic;
  margin-bottom: 2.5rem; max-width: 52ch;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: .8rem;
  padding: .9rem 2.2rem;
  border: 1px solid var(--gold);
  color: var(--cream);
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.hero-cta:hover { background: var(--gold); color: var(--bg); }
.hero-dots {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: .6rem; z-index: 3;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background .3s, transform .3s;
  cursor: pointer;
}
.hero-dot.active { background: var(--gold); transform: scale(1.4); }
.hero-scroll {
  position: absolute; bottom: 2.5rem; right: 3rem; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.hero-scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── SECTIONS ── */
.section { padding: 6rem 3rem; }
.section-sm { padding: 3rem 3rem; }
.container { max-width: 1400px; margin: 0 auto; }
.section-header { margin-bottom: 3rem; }
.section-header .eyebrow {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: .8rem;
}
.divider {
  width: 3rem; height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin: 1.2rem 0;
}

/* ── CATEGORY CARDS (home) ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5px;
  background: var(--border);
}
.cat-card {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg2);
}
.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.cat-card:hover img { transform: scale(1.07); }
.cat-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 60%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 1.8rem;
  transition: background .3s;
}
.cat-card:hover .cat-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.25) 60%);
}
.cat-card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem; color: var(--cream);
  margin-bottom: .4rem;
}
.cat-card-count { color: var(--muted); font-size: .82rem; }
.cat-card-arrow {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem;
  opacity: 0; transform: translateX(-8px);
  transition: opacity .3s, transform .3s;
}
.cat-card:hover .cat-card-arrow { opacity: 1; transform: translateX(0); }

/* ── MASONRY GALLERY ── */
.gallery-filters {
  display: flex; gap: .8rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .45rem 1.2rem;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 2px;
  transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--gold);
  color: var(--cream);
  background: rgba(200,149,42,.08);
}

.masonry {
  columns: 4 280px;
  column-gap: 3px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 3px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.masonry-item img {
  width: 100%;
  display: block;
  transition: transform .6s var(--ease);
}
.masonry-item:hover img { transform: scale(1.04); }
.masonry-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: flex-end; padding: 1.2rem;
  transition: background .3s;
}
.masonry-item:hover .masonry-item-overlay { background: rgba(0,0,0,.45); }
.masonry-item-caption {
  color: white; font-size: .82rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
  line-height: 1.4;
}
.masonry-item:hover .masonry-item-caption {
  opacity: 1; transform: translateY(0);
}
.masonry-item.hero-item::before {
  content: '★';
  position: absolute; top: .8rem; right: .8rem;
  color: var(--gold); font-size: .9rem; z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.96);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain;
  user-select: none;
}
.lightbox-caption {
  position: absolute; bottom: -2.5rem; left: 0; right: 0;
  text-align: center; color: var(--muted); font-size: .85rem;
}
.lightbox-close {
  position: fixed; top: 1.5rem; right: 2rem;
  color: white; font-size: 1.8rem; line-height: 1;
  opacity: .6; transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  color: white; font-size: 2rem; opacity: .5;
  padding: 1rem; transition: opacity .2s;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }

/* ── FEATURED STRIP ── */
.featured-strip {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: 320px 320px;
  gap: 3px;
}
.feat-item { position: relative; overflow: hidden; cursor: pointer; }
.feat-item.tall { grid-row: span 2; }
.feat-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.feat-item:hover img { transform: scale(1.05); }
.feat-label {
  position: absolute; bottom: 1.2rem; left: 1.2rem;
  background: rgba(0,0,0,.7);
  color: var(--cream); font-size: .8rem; letter-spacing: .08em;
  padding: .3rem .8rem; border-left: 2px solid var(--gold);
}

/* ── QUOTE / PULLOUT ── */
.quote-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.quote-inner {
  max-width: 900px; margin: 0 auto;
  padding: 5rem 3rem;
  text-align: center;
}
blockquote {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--cream); line-height: 1.5;
  margin-bottom: 1.5rem;
}
blockquote::before { content: '"'; color: var(--gold); font-size: 1.2em; }
blockquote::after  { content: '"'; color: var(--gold); font-size: 1.2em; }
cite { color: var(--muted); font-style: normal; font-size: .85rem; letter-spacing: .1em; }

/* ── PAGE HERO (subpages) ── */
.page-hero {
  height: 55vh; min-height: 380px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.page-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 100%);
}
.page-hero-content {
  position: relative; z-index: 2;
  padding: 3rem;
}
.page-hero-content h1 { color: var(--cream); }
.breadcrumb {
  font-size: .8rem; color: var(--muted); letter-spacing: .06em;
  margin-bottom: .8rem;
}
.breadcrumb a { color: var(--gold); }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-img-stack {
  position: relative; height: 600px;
}
.about-img-main {
  position: absolute; top: 0; left: 0; right: 20%; bottom: 15%;
  overflow: hidden;
}
.about-img-accent {
  position: absolute; bottom: 0; right: 0; width: 55%;
  overflow: hidden;
  border: 3px solid var(--bg);
}
.about-img-main img, .about-img-accent img {
  width: 100%; height: 100%; object-fit: cover;
}
.values-list { list-style: none; margin: 2rem 0; }
.values-list li {
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 1rem;
  font-size: .95rem; color: var(--text);
}
.values-list li::before {
  content: '—'; color: var(--gold);
  flex-shrink: 0; margin-top: .05em;
}

/* ── CONTACT / CTA ── */
.cta-section {
  background: var(--green);
  border-top: 1px solid rgba(255,255,255,.06);
}
.cta-inner {
  max-width: 700px; margin: 0 auto;
  padding: 6rem 3rem; text-align: center;
}
.cta-inner h2 { color: var(--cream); margin-bottom: 1rem; }
.cta-inner p { color: rgba(240,237,229,.65); margin: 0 auto 2.5rem; }
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--gold);
  color: #0d0d0b;
  font-size: .9rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600;
  transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--gold-lt); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block;
  padding: .9rem 2.2rem;
  border: 1px solid var(--gold);
  color: var(--cream);
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.btn-ghost:hover { background: var(--gold); color: var(--bg); }

/* ── PROCESO ── */
.proceso-timeline {
  position: relative;
  padding-left: 2.5rem;
}
.proceso-timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.proceso-step {
  position: relative;
  padding-bottom: 4rem;
}
.proceso-step::before {
  content: '';
  position: absolute; left: -2.5rem;
  top: .4rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--gold-dim);
}
.proceso-step-num {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .5rem;
}
.proceso-step h3 { margin-bottom: .8rem; }
.proceso-step p { color: var(--muted); }
.proceso-img-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  margin-top: 1.5rem;
}
.proceso-img-row img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 4rem 3rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem; max-width: 1400px; margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 36ch; margin-top: .8rem; line-height: 1.7; }
.footer-nav h4 {
  font-size: .75rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.footer-nav ul { list-style: none; }
.footer-nav ul li { margin-bottom: .6rem; }
.footer-nav ul a { color: var(--muted); font-size: .9rem; transition: color .2s; }
.footer-nav ul a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1400px; margin: 1.5rem auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--muted);
}

/* ── LOADER / FADE-IN ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── INSTAGRAM STRIP ── */
.ig-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}
.ig-item { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.ig-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ig-item:hover img { transform: scale(1.08); }
.ig-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  transition: background .3s;
}
.ig-item:hover .ig-item-overlay { background: rgba(200,149,42,.35); }
.ig-icon { opacity: 0; color: white; font-size: 1.2rem; transition: opacity .3s; }
.ig-item:hover .ig-icon { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-img-stack { height: 420px; }
  .featured-strip { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .feat-item.tall { grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section { padding: 4rem 1.5rem; }
  .hero-content { padding: 3rem 1.5rem; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; top: 60px;
    background: rgba(13,13,11,.98);
    padding: 3rem 2rem; gap: 2rem; z-index: 99;
    font-size: 1.2rem;
  }
  .masonry { columns: 2 150px; }
  .featured-strip { grid-template-columns: 1fr; grid-template-rows: auto; }
  .ig-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .proceso-img-row { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  .masonry { columns: 1; }
  .cat-grid { grid-template-columns: 1fr; }
}
