/* ============================================
   ECOYDES A.C. — THEME CSS
   Ecología, Vida, Juventud
   ============================================ */

/* ─── 1. CSS Variables ─── */
:root {
  --green-dark:   #143d25;
  --green:        #2f6b3f;
  --green-light:  #d9f2c6;
  --green-muted:  #5a8c6a;
  --green-pale:   #eef7e6;
  --cream:        #f1f5ee;
  --white:        #ffffff;
  --earth:        #b85c38;
  --earth-dark:   #8b3a20;
  --earth-light:  #c97a54;
  --text-dark:    #1a1a1a;
  --text-muted:   #4a4f46;
  --text-light:   #6b7068;
  --gray-100:     #f4f4f2;
  --gray-200:     #e8e8e5;
  --gray-300:     #d0d0cc;
  --gray-700:     #2e2e2a;

  --font-display: 'Merriweather', serif;
  --font-heading: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;

  --text-display: clamp(1.65rem, 6.5vw, 2.25rem);
  --text-h1:      clamp(1.75rem, 6vw, 2.5rem);
  --text-h2:      clamp(1.4rem, 5vw, 2rem);
  --text-body:    1rem;
  --text-small:   0.875rem;

  @media (min-width: 768px) {
    --text-display: clamp(2.5rem, 7vw, 5rem);
    --text-h1:      clamp(2.5rem, 6vw, 4rem);
    --text-h2:      clamp(1.75rem, 4.5vw, 2.75rem);
    --text-body:    clamp(1.0625rem, 1.6vw, 1.1875rem);
  }

  --transition:       0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast:  0.2s ease;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-card:       0 4px 20px rgba(20, 61, 37, 0.07);
  --shadow-card-hover: 0 10px 28px rgba(20, 61, 37, 0.12);
  --shadow-card-sm:    0 2px 12px rgba(20, 61, 37, 0.06);
}

/* ─── 2. Reset ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: calc(var(--header-height, 64px) + 1rem);
}

[id] {
  scroll-margin-top: calc(var(--header-height, 64px) + 1rem);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── 3. Typography ─── */
.display-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--green-dark);
}

.section-title--light {
  color: var(--white);
}

.section-title--earth-dark {
  color: var(--earth-dark);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

.section-eyebrow--light {
  color: var(--green-light);
}

.body-text {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-muted);
}

.caption-text {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
}

/* ─── 4. Buttons ─── */
.btn-theme {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: 2px solid;
  border-radius: 4px;
  transition: all var(--transition);
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  min-height: 48px;
}

.btn-theme:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 3px;
}

.btn-light { border-color: var(--white); color: var(--white); }
.btn-light:hover,
.btn-light:focus-visible {
  background: var(--white);
  color: var(--green-dark);
}

.btn-theme:active {
  transform: scale(0.97);
}

.btn-dark { border-color: var(--green-dark); color: var(--green-dark); }
.btn-dark:hover,
.btn-dark:focus-visible {
  background: var(--green-dark);
  color: var(--white);
}

.btn-accent { border-color: var(--green); color: var(--green); }
.btn-accent:hover,
.btn-accent:focus-visible {
  background: var(--green);
  color: var(--white);
}

.btn-solid {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.btn-solid:hover,
.btn-solid:focus-visible {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-earth { border-color: var(--earth); color: var(--earth); }
.btn-earth:hover,
.btn-earth:focus-visible {
  background: var(--earth);
  color: var(--white);
}

/* ─── Blockquote / Quote ─── */
.section-quote {
  margin: 0;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--green-pale);
  border-radius: var(--radius-lg);
  position: relative;
  text-align: center;
}

.section-quote::before {
  content: '“';
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
  color: var(--earth);
  opacity: 0.35;
  position: absolute;
  top: 0.75rem;
  left: 1.25rem;
}

.section-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  color: var(--green-dark);
  position: relative;
  z-index: 1;
  padding: 0;
  border-left: none;
}

.section-quote figcaption {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--earth);
  position: relative;
  z-index: 1;
}

/* ─── 5. Dividers ─── */
.divider-line {
  width: 60px;
  height: 3px;
  background: var(--green);
  margin-top: 1rem;
  border-radius: 2px;
}

.divider-line--earth {
  background: var(--earth);
}

.divider-horizontal {
  width: 100%;
  height: 1px;
  background: var(--gray-300);
}

/* ─── 6. Container ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }
}

/* ─── 7. Section Spacing ─── */
.section-padding {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(2.5rem, 7vw, 5rem);
}

.section-padding-lg {
  padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(3rem, 8vw, 6rem);
}

@media (min-width: 768px) {
  .section-padding {
    padding: clamp(4rem, 8vw, 7rem) 0;
  }

  .section-padding-lg {
    padding: clamp(5rem, 9vw, 8rem) 0;
  }
}

/* ─── 8. Scroll Reveal Base ─── */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── 9. Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ─── 10. Focus Styles ─── */
:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: var(--green);
}

/* ─── 11. Selection ─── */
::selection {
  background: var(--green-light);
  color: var(--green-dark);
}

/* ─── 12. Page-specific tweaks ─── */
.page-murcielagos .body-text {
  text-align: justify;
}
