/* ===== CUSTOM PROPERTIES ===== */
:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --cream-50: #fefdf8;
  --cream-100: #fef9ef;
  --cream-200: #fdf3e0;
  --cream-300: #fae8c8;
  --sand-100: #f5f0e8;
  --sand-200: #ebe4d6;
  --neutral-50: #fafafa;
  --neutral-100: #f4f4f5;
  --neutral-200: #e4e4e7;
  --neutral-300: #d4d4d8;
  --neutral-400: #a1a1aa;
  --neutral-500: #71717a;
  --neutral-600: #52525b;
  --neutral-700: #3f3f46;
  --neutral-800: #27272a;
  --neutral-900: #18181b;

  --sidebar-width: 220px;
  --sidebar-collapsed: 72px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 0; }
body {
  font-family: var(--font-body);
  background: var(--cream-50);
  color: var(--neutral-800);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SIDE NAV ===== */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--emerald-950);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 20px;
  z-index: 1000;
  transition: transform var(--transition-med);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream-100);
  line-height: 1.2;
}
.logo-text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--emerald-500);
  margin-top: 2px;
}

.side-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.side-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--neutral-400);
  transition: all var(--transition-fast);
  position: relative;
}
.side-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--emerald-500);
  border-radius: 2px;
  transition: height var(--transition-fast);
}
.side-nav-link:hover,
.side-nav-link.active {
  color: var(--cream-100);
  background: rgba(255,255,255,0.06);
}
.side-nav-link:hover::before,
.side-nav-link.active::before {
  height: 24px;
}
.side-nav-link .nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutral-600);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.side-nav-link.active .nav-dot,
.side-nav-link:hover .nav-dot {
  background: var(--emerald-500);
  box-shadow: 0 0 8px var(--emerald-500);
}

.side-nav-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.side-nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--neutral-500);
  transition: color var(--transition-fast);
}
.side-nav-phone:hover { color: var(--cream-200); }

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--emerald-950);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream-100);
  border-radius: 2px;
  transition: all var(--transition-fast);
}
.hamburger { position: relative; }
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }
.mobile-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.mobile-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.mobile-overlay.visible { opacity: 1; }

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  margin-left: var(--sidebar-width);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(2, 44, 34, 0.88) 0%,
    rgba(6, 78, 59, 0.75) 50%,
    rgba(4, 120, 87, 0.6) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-left: 80px;
  padding: 40px;
}
.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cream-50);
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic;
  color: var(--cream-300);
}
.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--cream-200);
  margin-bottom: 40px;
  max-width: 500px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: calc(var(--sidebar-width) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--cream-300);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--emerald-700);
  color: var(--cream-50);
  border: 2px solid var(--emerald-700);
}
.btn-primary:hover {
  background: var(--emerald-600);
  border-color: var(--emerald-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--cream-100);
  border: 2px solid rgba(254, 253, 248, 0.3);
}
.btn-outline:hover {
  border-color: var(--cream-100);
  background: rgba(254, 253, 248, 0.08);
  transform: translateY(-2px);
}
.btn-full { width: 100%; }

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
  margin-left: var(--sidebar-width);
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}
.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--emerald-700);
  background: rgba(6, 95, 70, 0.08);
  border: 1px solid rgba(6, 95, 70, 0.15);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--neutral-500);
  line-height: 1.8;
}

/* ===== NOSOTROS ===== */
.nosotros { background: var(--cream-50); }
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.nosotros-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.nosotros-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.nosotros-image:hover img { transform: scale(1.03); }
.nosotros-text p {
  font-size: 1rem;
  color: var(--neutral-600);
  line-height: 1.9;
  margin-bottom: 20px;
}
.nosotros-text p:first-of-type { font-size: 1.05rem; color: var(--neutral-700); }
.nosotros-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--sand-200);
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--emerald-800);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--neutral-500);
  font-weight: 500;
}

/* ===== SABORES ===== */
.sabores { background: var(--sand-100); }
.sabores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}
.sabor-card {
  background: var(--cream-50);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.sabor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.sabor-img {
  height: 200px;
  overflow: hidden;
}
.sabor-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.sabor-card:hover .sabor-img img { transform: scale(1.08); }
.sabor-info {
  padding: 24px;
}
.sabor-info h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 8px;
}
.sabor-info p {
  font-size: 0.88rem;
  color: var(--neutral-500);
  line-height: 1.7;
}
.sabores-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--neutral-500);
  font-style: italic;
}

/* ===== CAFÉ ===== */
.cafe { background: var(--cream-50); }
.cafe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.cafe-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--cream-50);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  border: 1px solid var(--sand-200);
}
.cafe-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--emerald-200);
}
.cafe-item-img { height: 100%; overflow: hidden; }
.cafe-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.cafe-item:hover .cafe-item-img img { transform: scale(1.06); }
.cafe-item-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cafe-item-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 10px;
}
.cafe-item-content p {
  font-size: 0.88rem;
  color: var(--neutral-500);
  line-height: 1.7;
}

/* ===== GALERÍA ===== */
.galeria { background: var(--sand-100); }
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.galeria-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.galeria-item:hover img { transform: scale(1.05); }
.galeria-item--large { grid-row: span 2; }
.galeria-item--large img { min-height: 400px; }
.galeria-item--wide { grid-column: span 2; }
.galeria-item--wide img { min-height: 200px; }

/* ===== VISÍTANOS ===== */
.visitanos { background: var(--cream-50); }
.visitanos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.visitanos-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.info-block {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.info-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(6, 95, 70, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-700);
  flex-shrink: 0;
}
.info-block h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 4px;
}
.info-block p {
  font-size: 0.9rem;
  color: var(--neutral-500);
  line-height: 1.7;
}
.info-block a {
  color: var(--emerald-700);
  transition: color var(--transition-fast);
}
.info-block a:hover { color: var(--emerald-500); }
.visitanos-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 400px;
}

/* ===== CONTACTO ===== */
.contacto { background: var(--emerald-950); }
.contacto .section-tag {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
}
.contacto .section-header h2 { color: var(--cream-50); }
.contacto .section-desc { color: var(--neutral-400); }
.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contacto-text .section-tag { margin-bottom: 16px; }
.contacto-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--cream-50);
  line-height: 1.2;
  margin-bottom: 16px;
}
.contacto-text p {
  font-size: 1rem;
  color: var(--neutral-400);
  line-height: 1.8;
}
.contacto-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--neutral-300);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--cream-100);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--neutral-500);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note {
  font-size: 0.78rem;
  color: var(--neutral-500);
  margin-top: 12px;
  text-align: center;
}
.form-success {
  text-align: center;
  padding: 40px;
  color: var(--emerald-400);
}
.form-success svg { margin: 0 auto 16px; }
.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream-50);
  margin-bottom: 8px;
}
.form-success p { color: var(--neutral-400); font-size: 0.95rem; }

/* ===== FOOTER ===== */
.footer {
  background: var(--neutral-900);
  padding: 64px 0 0;
  margin-left: var(--sidebar-width);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand p {
  font-size: 0.9rem;
  color: var(--neutral-500);
  line-height: 1.8;
  margin-top: 16px;
  max-width: 280px;
}
.footer-links h4,
.footer-contact h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neutral-400);
  margin-bottom: 20px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.9rem;
  color: var(--neutral-500);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--emerald-500); }
.footer-contact address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--neutral-500);
  line-height: 1.9;
}
.footer-contact a {
  color: var(--neutral-500);
  transition: color var(--transition-fast);
}
.footer-contact a:hover { color: var(--emerald-500); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 0.8rem;
  color: var(--neutral-600);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root { --sidebar-width: 200px; }
  .hero-content { margin-left: 40px; }
  .hero-scroll { left: calc(var(--sidebar-width) + 24px); }
  .nosotros-grid { gap: 40px; }
  .sabores-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .side-nav {
    transform: translateX(-100%);
  }
  .side-nav.open {
    transform: translateX(0);
  }
  .mobile-toggle { display: flex; }
  .mobile-overlay { display: block; }

  .hero {
    margin-left: 0;
    align-items: flex-end;
    padding-bottom: 80px;
  }
  .hero-content {
    margin-left: 0;
    padding: 0 24px;
    padding-top: 100px;
    background: linear-gradient(to top, rgba(2,44,34,0.9) 0%, transparent 100%);
    width: 100%;
  }
  .hero-scroll { display: none; }

  .section {
    margin-left: 0;
    padding: 64px 0;
  }
  .section-header { margin-bottom: 40px; }

  .nosotros-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .nosotros-image { order: -1; }
  .nosotros-stats { gap: 24px; }

  .sabores-grid { grid-template-columns: 1fr; gap: 20px; }

  .cafe-grid { grid-template-columns: 1fr; }
  .cafe-item {
    grid-template-columns: 160px 1fr;
  }

  .galeria-grid {
    grid-template-columns: 1fr 1fr;
  }
  .galeria-item--large { grid-row: span 1; }
  .galeria-item--large img { min-height: 200px; }
  .galeria-item--wide { grid-column: span 2; }

  .visitanos-grid { grid-template-columns: 1fr; }
  .visitanos-map { min-height: 280px; }

  .contacto-inner { grid-template-columns: 1fr; gap: 40px; }
  .contacto-form { padding: 28px; }
  .form-row { grid-template-columns: 1fr; }

  .footer { margin-left: 0; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cafe-item { grid-template-columns: 1fr; }
  .cafe-item-img { height: 180px; }
  .galeria-grid { grid-template-columns: 1fr; }
  .galeria-item--wide { grid-column: span 1; }
  .nosotros-stats { flex-direction: column; gap: 20px; }
}
