/* =========================================================
   MADERAS DEL VALLE — STYLESHEET
   Table of contents:
   1. Variables & Reset
   2. Base typography & utilities
   3. Top utility bar
   4. Header (logo, search, actions, nav + dropdown)
   5. Hero
   6. Project / contact form section
   7. Features bar
   8. Footer
   9. Responsive media queries
   ========================================================= */

/* =========================================================
   1. VARIABLES & RESET
   ========================================================= */
:root{
  /* Colors */
  --green:        #4d5f35;
  --green-dark:   #3b4a28;
  --green-light:  #eef2e6;
  --gold:         #b8935a;
  --gold-light:   #e3cba3;
  --brown-dark:   #2b2014;
  --brown-darker: #1c140c;
  --brown-text:   #4a3826;
  --text-dark:    #241c14;
  --gray-700:     #5c5650;
  --gray-500:     #8a8378;
  --gray-300:     #ded7c9;
  --gray-100:     #f3f1ec;
  --cream:        #faf8f4;
  --white:        #ffffff;

  /* Typography */
  --font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body:    'Inter', 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --container-w: 1260px;
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 10px rgba(30, 20, 10, 0.07);
  --shadow-md: 0 14px 34px rgba(30, 20, 10, 0.12);
  --shadow-lg: 0 25px 60px rgba(20, 14, 8, 0.18);

  --transition: 0.25s ease;
}

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

html, body{
  max-width: 100%;
  overflow-x: hidden;
}

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a{
  text-decoration: none;
  color: inherit;
}

ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

button, input, select, textarea{
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4{
  font-family: var(--font-heading);
  margin: 0;
  color: var(--text-dark);
  line-height: 1.2;
}

p{
  margin: 0;
}

.icon-sprite{
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* =========================================================
   2. BASE TYPOGRAPHY & UTILITIES
   ========================================================= */
.container{
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 3vw, 2.5rem);
}

.icon{
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon--white{ color: var(--white); }
.icon--brown{ color: var(--brown-text); }
.icon--gold{ color: var(--gold); }

.c-white{ color: var(--white); }
.c-olive{ color: #a9c26a; }

.eyebrow{
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green);
  margin: 0 0 0.8rem;
}

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

.rule{
  display: block;
  width: 64px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--green);
  margin: 1.1rem 0 1.3rem;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn--green{
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--green:hover{
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline{
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.75);
}

.btn--outline:hover{
  background: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}

.btn--block{
  width: 100%;
}

/* =========================================================
   3. TOP UTILITY BAR
   ========================================================= */
.topbar{
  background: var(--green);
}

.topbar__inner{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.55rem;
}

.topbar__item{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.92);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

/* =========================================================
   4. HEADER
   ========================================================= */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 1px 0 var(--gray-300);
}

.header__main{
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 1rem;
}

.logo{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo__rings{
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.logo__text{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__title{
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: var(--text-dark);
}

.logo__tagline{
  font-size: 0.72rem;
  font-style: italic;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.search{
  display: flex;
  align-items: stretch;
  flex: 1 1 320px;
  max-width: 560px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.search input{
  flex: 1;
  border: none;
  outline: none;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  min-width: 0;
  background: var(--white);
}

.search input::placeholder{
  color: var(--gray-500);
}

.search button{
  background: var(--green);
  border: none;
  padding: 0 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.search button:hover{
  background: var(--green-dark);
}

.header__actions{
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.8rem);
  flex-shrink: 0;
}

.action-link{
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: color var(--transition);
}

.action-link:hover{
  color: var(--green);
}

.cart-wrap{
  position: relative;
  display: flex;
}

.cart-badge{
  position: absolute;
  top: -6px;
  right: -7px;
  background: var(--green);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle{ display: none; }

.nav-burger{
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.nav-burger span{
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
}

.header__nav{
  border-top: 1px solid var(--gray-100);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.2vw, 2.1rem);
  flex-wrap: wrap;
  padding-block: 0.9rem;
}

.nav a{
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-dark);
  padding-block: 0.35rem;
  position: relative;
  transition: color var(--transition);
}

.nav a:hover{
  color: var(--green);
}

.nav a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--green);
  transition: right var(--transition);
}

.nav a:hover::after{
  right: 0;
}

.nav a.nav--current{
  color: var(--green);
}

.nav a.nav--current::after{
  right: 0;
}

.has-dropdown{
  position: relative;
}

.dropdown{
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 40;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown li a{
  display: block;
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  text-transform: none;
  letter-spacing: normal;
}

.dropdown li a::after{
  display: none;
}

.dropdown li a:hover{
  background: var(--green-light);
  color: var(--green);
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero{
  position: relative;
  min-height: clamp(460px, 58vw, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg{
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__illustration{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(18,13,8,0.93) 0%, rgba(18,13,8,0.78) 30%, rgba(18,13,8,0.4) 58%, rgba(18,13,8,0.08) 82%);
}

.hero__content{
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding-block: clamp(2.5rem, 6vw, 3rem);
}

.hero__title{
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.1rem;
}

.hero__desc{
  color: rgba(255,255,255,0.88);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 1.8rem;
}

.hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.hero__location{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 500;
}

/* =========================================================
   6. PROJECT / CONTACT FORM SECTION
   ========================================================= */
.project{
  background: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.project__grid{
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.project__info h2{
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
}

.project__desc{
  color: var(--gray-700);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.project__feature{
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.project__feature-icon{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project__feature strong{
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.project__feature p{
  font-size: 0.88rem;
  color: var(--gray-700);
}

.project__form-card{
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.form-field{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.form-field > span{
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-field em{
  color: var(--green);
  font-style: normal;
}

.form-field input,
.form-field textarea{
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.95rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
  background: var(--white);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus{
  border-color: var(--green);
}

.form-field textarea{
  resize: none;
  font-family: inherit;
}

.form-field--full{
  margin-bottom: 1.3rem;
}

.select-wrap{
  position: relative;
  display: block;
}

.select-wrap select{
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.72rem 2.4rem 0.72rem 0.95rem;
  font-size: 0.9rem;
  color: var(--gray-500);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  background: var(--white);
}

.select-wrap select:focus{
  border-color: var(--green);
}

.select-chevron{
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

.consent{
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.83rem;
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.consent input{
  margin-top: 0.2rem;
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.consent a{
  color: var(--green);
  text-decoration: underline;
  font-weight: 600;
}

/* =========================================================
   7. FEATURES BAR
   ========================================================= */
.features-bar{
  background: var(--gray-100);
  padding-block: 2.4rem;
}

.features-bar__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}

.feature-item{
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.feature-item strong{
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.feature-item p{
  font-size: 0.82rem;
  color: var(--gray-700);
  line-height: 1.4;
}

/* =========================================================
   8. FOOTER
   ========================================================= */
.footer{
  background: var(--brown-dark);
  background-image: repeating-linear-gradient(100deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 2px, transparent 2px, transparent 26px);
  color: var(--gray-300);
  padding-top: clamp(3rem, 6vw, 4rem);
}

.footer__grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer__brand .logo{
  margin-bottom: 1.1rem;
}

.footer__desc{
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--gray-300);
  margin-bottom: 1.3rem;
  max-width: 300px;
}

.footer__socials{
  display: flex;
  gap: 0.7rem;
}

.footer__socials a{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.footer__socials a:hover{
  background: var(--green);
  transform: translateY(-2px);
}

.footer__col h4{
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.3rem;
}

.footer__col ul{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__col a{
  font-size: 0.86rem;
  color: var(--gray-300);
  transition: color var(--transition);
}

.footer__col a:hover{
  color: var(--gold-light);
}

.footer__contact li{
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.83rem;
  color: var(--gray-300);
  line-height: 1.5;
}

.footer__contact li svg{
  margin-top: 0.2rem;
}

.newsletter{
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.newsletter input{
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  font-size: 0.85rem;
  outline: none;
  background: var(--white);
  color: var(--text-dark);
}

.footer__bottom{
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.footer__bottom-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.3rem;
  font-size: 0.78rem;
  color: var(--gray-500);
}

.footer__legal{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer__legal a{
  color: var(--gray-500);
  transition: color var(--transition);
}

.footer__legal a:hover{
  color: var(--gold-light);
}

/* =========================================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================================= */

/* ----- ≤1440px : tighter container ----- */
@media (max-width: 1440px){
  :root{
    --container-w: 1160px;
  }
}

/* ----- ≤1200px : footer 5→3 columns, tighten nav gaps ----- */
@media (max-width: 1200px){
  .footer__grid{
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer__brand{
    grid-column: 1 / -1;
  }

  .footer__brand .footer__desc{
    max-width: 420px;
  }
}

/* ----- ≤992px : collapse nav, stack project grid ----- */
@media (max-width: 992px){
  .header__actions span:not(.cart-badge){
    display: none;
  }

  .header__nav{
    display: none;
  }

  .nav-toggle:checked ~ .header__nav{
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
  }

  .nav-burger{
    display: flex;
  }

  .nav{
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 1rem clamp(1.25rem, 3vw, 2.5rem) 1.5rem;
  }

  .dropdown{
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    display: none;
    min-width: 0;
    padding-left: 0.8rem;
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown{
    transform: none;
  }

  .has-dropdown:focus-within .dropdown{
    display: block;
  }

  .project__grid{
    grid-template-columns: 1fr;
  }

  .features-bar__grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem 1.2rem;
  }
}

/* ----- ≤768px : header stacking, footer 2 columns ----- */
@media (max-width: 768px){
  .header__main{
    flex-wrap: wrap;
  }

  .logo{
    order: 1;
  }

  .nav-burger{
    order: 2;
    margin-left: auto;
  }

  .search{
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
  }

  .header__actions{
    order: 4;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 1.6rem;
  }

  .header__actions .action-link span{
    display: none;
  }

  .hero__title{
    font-size: 1.85rem;
  }

  .form-row{
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer__grid{
    grid-template-columns: 1fr 1fr;
  }

  .footer__bottom-inner{
    justify-content: center;
    text-align: center;
  }
}

/* ----- ≤576px : mobile ----- */
@media (max-width: 576px){
  .topbar__inner{
    justify-content: center;
  }

  .logo__title{
    font-size: 1rem;
  }

  .logo__tagline{
    display: none;
  }

  .hero{
    min-height: 520px;
  }

  .hero__actions{
    flex-direction: column;
    align-items: stretch;
  }

  .features-bar__grid{
    grid-template-columns: 1fr;
  }

  .footer__grid{
    grid-template-columns: 1fr;
  }

  .footer__brand{
    grid-column: auto;
  }

  .footer__legal{
    justify-content: center;
  }
}

/* ----- ≤480px : small mobile ----- */
@media (max-width: 480px){
  .project__form-card{
    padding: 1.3rem;
  }

  .btn{
    width: 100%;
  }

  .header__actions{
    gap: 1.3rem;
  }
}
