@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* =============================================
   VARIABLES — PALETA TLAHUICA
   ============================================= */
:root {
  --bosque-oscuro:  #0a1f14;
  --bosque:         #1a4d2e;
  --bosque-medio:   #2d6a4f;
  --bosque-claro:   #3d8c66;
  --tierra:         #8b4513;
  --adobe:          #c4622d;
  --adobe-claro:    #e07840;
  --maiz:           #d4a017;
  --maiz-claro:     #f0c840;
  --turquesa:       #2d9b8e;
  --crema:          #f5f0e8;
  --crema-oscura:   #e8dfd0;
  --hueso:          #fdf8f0;
  --obsidiana:      #0d0d1a;
  --carbon:         #1a1410;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  background-color: var(--crema);
  color: var(--carbon);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5 { font-family: 'Cinzel', serif; line-height: 1.2; }
.font-accent { font-family: 'Crimson Text', serif; }

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--crema); }
::-webkit-scrollbar-thumb { background: var(--bosque-medio); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--adobe); }

/* =============================================
   SVG PATTERNS — INSPIRADOS EN TEXTIL TLAHUICA
   ============================================= */
.pattern-diamond {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpolygon points='40,4 76,40 40,76 4,40' fill='none' stroke='rgba(212,160,23,0.12)' stroke-width='1.5'/%3E%3Cpolygon points='40,16 64,40 40,64 16,40' fill='none' stroke='rgba(212,160,23,0.08)' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='4' fill='rgba(212,160,23,0.08)'/%3E%3Ccircle cx='40' cy='40' r='2' fill='rgba(212,160,23,0.15)'/%3E%3C/svg%3E");
  background-size: 80px 80px;
}

.pattern-diamond-light {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpolygon points='30,3 57,30 30,57 3,30' fill='none' stroke='rgba(139,69,19,0.1)' stroke-width='1'/%3E%3Cpolygon points='30,11 49,30 30,49 11,30' fill='none' stroke='rgba(139,69,19,0.06)' stroke-width='0.8'/%3E%3Ccircle cx='30' cy='30' r='2.5' fill='rgba(196,98,45,0.08)'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.pattern-greca-top {
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='16'%3E%3Cpath d='M0 8 L8 8 L8 0 L16 0 L16 8 L24 8 L24 16 L32 16 L32 8 L40 8 L40 0 L48 0 L48 8 L56 8 L56 16 L64 16' stroke='%23d4a017' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.5;
}

.pattern-greca-border {
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect x='1' y='1' width='18' height='18' fill='none' stroke='%23d4a017' stroke-width='2'/%3E%3Crect x='5' y='5' width='10' height='10' fill='rgba(212,160,23,0.2)'/%3E%3C/svg%3E") 20 repeat;
}

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
  background: linear-gradient(180deg, rgba(10,31,20,0.95) 0%, rgba(10,31,20,0) 100%);
  transition: all 0.4s ease;
}
#navbar.scrolled {
  background: rgba(10, 31, 20, 0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4), 0 1px 0 rgba(212,160,23,0.2);
}
.nav-link {
  position: relative;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 6px 2px;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--adobe), var(--maiz));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--maiz-claro); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* =============================================
   HERO SECTION
   ============================================= */
.hero-bg {
  background:
    linear-gradient(160deg,
      rgba(10,31,20,0.97)  0%,
      rgba(26,77,46,0.92) 35%,
      rgba(45,106,79,0.85) 60%,
      rgba(139,69,19,0.80) 85%,
      rgba(196,98,45,0.75) 100%
    );
}

.hero-text-shadow { text-shadow: 0 2px 20px rgba(0,0,0,0.6); }

.hero-mountains {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  pointer-events: none;
}

/* Shimmer gradient text */
@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.text-gold-shimmer {
  background: linear-gradient(90deg,
    #d4a017 0%, #f0c840 20%, #fff5cc 40%, #f0c840 60%, #d4a017 80%, #b88010 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0);     }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0);    }
}
@keyframes float {
  0%, 100% { transform: translateY(0px);    }
  50%       { transform: translateY(-12px); }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulseSoft {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1;   }
}

.anim-fade-up       { animation: fadeInUp   0.8s ease both; }
.anim-fade-up-1     { animation: fadeInUp   0.8s 0.15s ease both; }
.anim-fade-up-2     { animation: fadeInUp   0.8s 0.30s ease both; }
.anim-fade-up-3     { animation: fadeInUp   0.8s 0.45s ease both; }
.anim-fade-up-4     { animation: fadeInUp   0.8s 0.60s ease both; }
.anim-float         { animation: float      4s ease-in-out infinite; }
.anim-rotate-slow   { animation: rotateSlow 25s linear infinite; }
.anim-pulse-soft    { animation: pulseSoft  2.5s ease-in-out infinite; }

/* Scroll-triggered reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.left  { transform: translateX(-30px); }
.reveal.right { transform: translateX(30px);  }
.reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--bosque), var(--bosque-medio));
  color: #fff;
  padding: 14px 32px;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26,77,46,0.45);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--maiz), var(--adobe-claro));
  color: var(--obsidiana);
  padding: 14px 32px;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.35s ease;
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(212,160,23,0.45);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--maiz);
  padding: 12px 30px;
  border-radius: 3px;
  border: 2px solid var(--maiz);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s ease;
}
.btn-outline:hover {
  background: var(--maiz);
  color: var(--obsidiana);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(212,160,23,0.35);
}

/* =============================================
   SECTION HEADINGS
   ============================================= */
.section-eyebrow {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--adobe);
}
.section-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  line-height: 1.15;
}
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,160,23,0.5), transparent);
}
.section-divider-diamond {
  width: 10px;
  height: 10px;
  background: var(--maiz);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* =============================================
   SERVICE CARDS
   ============================================= */
.service-card {
  background: white;
  border: 1px solid rgba(212,160,23,0.12);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
              box-shadow 0.4s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--adobe), var(--maiz));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 56px rgba(26,77,46,0.15), 0 0 0 1px rgba(212,160,23,0.2);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.service-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px dashed rgba(212,160,23,0.3);
  animation: rotateSlow 20s linear infinite;
}

/* =============================================
   STATS BAR
   ============================================= */
.stat-number {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  background: linear-gradient(135deg, var(--maiz-claro), var(--adobe-claro));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =============================================
   TIMELINE (HISTORIA)
   ============================================= */
.timeline-line {
  position: absolute;
  left: 20px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--adobe), var(--maiz), var(--bosque-medio));
}
.timeline-dot {
  width: 14px; height: 14px;
  background: var(--maiz);
  border: 3px solid var(--adobe);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* =============================================
   CULTURAL ORNAMENT SVG
   ============================================= */
.ornament-sun {
  position: relative;
  display: inline-block;
}
.ornament-sun::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(212,160,23,0.25);
  animation: rotateSlow 30s linear infinite;
  border-style: dashed;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bosque);
}
.form-input {
  padding: 12px 16px;
  border: 1.5px solid rgba(139,69,19,0.25);
  border-radius: 3px;
  background: rgba(255,255,255,0.7);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  color: var(--carbon);
  transition: all 0.3s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--bosque-medio);
  background: white;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}
.form-select {
  padding: 12px 16px;
  border: 1.5px solid rgba(139,69,19,0.25);
  border-radius: 3px;
  background: rgba(255,255,255,0.7);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  color: var(--carbon);
  cursor: pointer;
  appearance: none;
  transition: all 0.3s ease;
}
.form-select:focus { outline: none; border-color: var(--bosque-medio); box-shadow: 0 0 0 3px rgba(45,106,79,0.12); }

/* =============================================
   MOBILE MENU
   ============================================= */
.mobile-menu-panel {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(320px, 85vw);
  background: var(--bosque-oscuro);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  overflow-y: auto;
}
.mobile-menu-panel.open { transform: translateX(0); }
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

/* =============================================
   GALLERY PANELS (CSS art)
   ============================================= */
.gallery-panel {
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.gallery-panel:hover { transform: scale(1.03); }
.gallery-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,31,20,0);
  transition: background 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.gallery-panel:hover .gallery-panel-overlay { background: rgba(10,31,20,0.6); }

/* =============================================
   UTILITY
   ============================================= */
.text-maiz    { color: var(--maiz); }
.text-adobe   { color: var(--adobe); }
.text-tierra  { color: var(--tierra); }
.text-bosque  { color: var(--bosque); }
.text-turquesa{ color: var(--turquesa); }
.text-crema   { color: var(--crema); }

.bg-bosque-oscuro { background-color: var(--bosque-oscuro); }
.bg-bosque        { background-color: var(--bosque); }
.bg-adobe         { background-color: var(--adobe); }
.bg-tierra        { background-color: var(--tierra); }
.bg-maiz          { background-color: var(--maiz); }
.bg-crema         { background-color: var(--crema); }
.bg-crema-oscura  { background-color: var(--crema-oscura); }

.border-maiz   { border-color: var(--maiz); }
.border-adobe  { border-color: var(--adobe); }
.border-bosque { border-color: var(--bosque); }

/* gradient text */
.gradient-text-gold {
  background: linear-gradient(135deg, var(--maiz), var(--adobe-claro));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gradient-text-green {
  background: linear-gradient(135deg, var(--bosque-claro), var(--turquesa));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Alert boxes */
.alert-success {
  background: rgba(45,106,79,0.1);
  border: 1px solid rgba(45,106,79,0.4);
  color: var(--bosque);
  border-radius: 4px;
  padding: 16px 20px;
}
.alert-error {
  background: rgba(196,98,45,0.1);
  border: 1px solid rgba(196,98,45,0.4);
  color: var(--adobe);
  border-radius: 4px;
  padding: 16px 20px;
}

/* Sticky footer CTA */
.sticky-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  animation: pulseSoft 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .sticky-cta { bottom: 12px; right: 12px; }
}
