/* =========================================================
   VILLACOSTE SpA — Hoja de estilos principal
   Paleta: naranja de marca + gris pizarra + hormigón
   ========================================================= */

:root{
  /* --- Color --- */
  --orange:        #F2900E;
  --orange-dark:   #C96E00;
  --orange-light:  #FFB454;
  --charcoal:      #1E242B;
  --slate:         #3B4652;
  --slate-2:       #2C353E;
  --slate-light:   #5C6B79;
  --cream:         #F6F3EE;
  --cream-2:       #EFEAE2;
  --white:         #FFFFFF;
  --concrete:      #C9C2B8;
  --line:          rgba(30,36,43,0.10);

  /* --- Tipografia --- */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;

  /* --- Espaciado --- */
  --gap-section: clamp(4rem, 8vw, 8rem);
  --pad-inline: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;

  --ease: cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin:0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ margin:0; font-family: var(--font-display); font-weight:800; line-height:1.05; letter-spacing:0.01em; }
p{ margin:0; }
button{ font-family:inherit; cursor:pointer; }

:focus-visible{
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.container{
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.6em;
  font-family: var(--font-display);
  font-weight:700;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-dark);
}
.eyebrow::before{
  content:"";
  width: 28px; height: 3px;
  background: var(--orange);
  display:inline-block;
}

.section-head{
  max-width: 640px;
  margin-bottom: 3rem;
}
.section-head h2{
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  margin-top: .5rem;
  text-transform: uppercase;
}
.section-head p{
  margin-top: 1rem;
  color: var(--slate-light);
  font-size: 1.08rem;
  max-width: 52ch;
}
.section-head.center{
  margin-inline:auto;
  text-align:center;
}
.section-head.center .eyebrow::before{ display:none; }
.section-head.light p{ color: rgba(255,255,255,0.72); }
.section-head.light h2{ color: var(--white); }

/* ---------- Hazard divider: firma visual del sitio ---------- */
.hazard{
  height: 12px;
  width: 100%;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 22px,
    var(--charcoal) 22px 44px
  );
}

/* ---------- Botones ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  font-family: var(--font-display);
  font-weight:700;
  font-size: 1.05rem;
  letter-spacing:0.03em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn-primary{
  background: var(--orange);
  color: var(--charcoal);
}
.btn-primary:hover{
  background: var(--orange-light);
  transform: translateY(-2px);
}
.btn-outline{
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover{
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
.btn-dark{
  background: var(--charcoal);
  color: var(--white);
}
.btn-dark:hover{ background: var(--slate-2); transform: translateY(-2px); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(246,243,238,0.97);
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease);
  /* Note: intentionally no backdrop-filter here — it would make this fixed
     header a containing block for the fixed mobile nav panel below it,
     shrinking that panel to the header's own height. */
}
.site-header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 78px;
}
.logo{
  display:flex;
  align-items:center;
  gap:.65rem;
}
.logo-mark{
  width: 42px; height:42px;
  background: var(--orange);
  color: var(--charcoal);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  display:flex; align-items:center; justify-content:center;
  border-radius: 3px;
  flex-shrink:0;
}
.logo-text{ display:flex; flex-direction:column; line-height:1; }
.logo-text .name{
  font-family: var(--font-display);
  font-weight:800;
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}
.logo-text .name span{ color: var(--orange); }
.logo-text .sub{
  font-family: var(--font-display);
  font-weight:600;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--slate-light);
  margin-top: 2px;
}

.nav{
  display:flex;
  align-items:center;
  gap: 2.4rem;
}
.nav a{
  font-family: var(--font-display);
  font-weight:600;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--charcoal);
  position:relative;
  padding-block: 4px;
}
.nav a::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-4px;
  height:2px; background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after{ transform: scaleX(1); }

.nav-cta{ margin-left: .5rem; }

.nav-toggle{
  display:none;
  background:none; border:none;
  width: 40px; height:32px;
  position:relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:"";
  position:absolute; left:0; right:0;
  height:3px; background: var(--charcoal);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span{ top:50%; transform: translateY(-50%); }
.nav-toggle span::before{ top:-11px; }
.nav-toggle span::after{ top:11px; }
.nav-toggle[aria-expanded="true"] span{ background: transparent; }
.nav-toggle[aria-expanded="true"] span::before{ top:0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after{ top:0; transform: rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position:relative;
  min-height: 100svh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-top: 78px;
  background: var(--charcoal);
  overflow:hidden;
}
.hero::before{
  /* Textura de plano / blueprint */
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 65% 40%, black 10%, transparent 72%);
}
.hero::after{
  content:"";
  position:absolute;
  right:-10%; top:-15%;
  width:70%; height:130%;
  background: radial-gradient(circle at center, rgba(242,144,14,0.20), transparent 65%);
}
.hero-inner{
  position:relative;
  z-index:2;
  padding-block: 3rem 4.5rem;
}
.hero-tag{
  display:flex; flex-wrap:wrap; row-gap:.4rem; align-items:center; gap:.75rem;
  font-family: var(--font-display);
  color: var(--orange-light);
  font-weight:700;
  letter-spacing:0.22em;
  text-transform:uppercase;
  font-size: 0.9rem;
  margin-bottom: 1.6rem;
}
.hero-tag .dot{ width:8px; height:8px; background: var(--orange); border-radius:50%; }

.hero h1{
  color: var(--white);
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  text-transform: uppercase;
  max-width: 14ch;
}
.hero h1 em{
  font-style:normal;
  color: var(--orange);
}
.hero-sub{
  margin-top: 1.75rem;
  max-width: 46ch;
  color: rgba(255,255,255,0.78);
  font-size: 1.2rem;
}
.hero-actions{
  margin-top: 2.6rem;
  display:flex;
  flex-wrap:wrap;
  gap: 1rem;
}
.hero-stats{
  position:relative;
  z-index:2;
  border-top: 1px solid rgba(255,255,255,0.14);
  display:grid;
  grid-template-columns: repeat(3,1fr);
}
.hero-stat{
  padding: 1.6rem var(--pad-inline);
  border-right: 1px solid rgba(255,255,255,0.14);
}
.hero-stat:last-child{ border-right:none; }
.hero-stat .num{
  font-family: var(--font-display);
  font-weight:800;
  font-size: clamp(1.8rem,3vw,2.6rem);
  color: var(--orange);
  display:block;
}
.hero-stat .label{
  color: rgba(255,255,255,0.68);
  font-size: 0.92rem;
  margin-top:.2rem;
}

/* =========================================================
   SERVICIOS
   ========================================================= */
.services{
  background: var(--cream);
  padding-block: var(--gap-section);
}
.service-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.service-card{
  background: var(--slate);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.4rem 2rem 2.2rem;
  display:flex;
  flex-direction:column;
  transition: transform .22s var(--ease), background .22s var(--ease);
}
.service-card:hover{ transform: translateY(-6px); background: var(--slate-2); }
.service-icon{
  width: 56px; height:56px;
  background: var(--orange);
  border-radius: var(--radius);
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 1.6rem;
}
.service-icon svg{ width:30px; height:30px; stroke: var(--charcoal); }
.service-card h3{
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.service-card ul{ display:flex; flex-direction:column; gap:.65rem; margin-top:auto; }
.service-card li{
  font-size: 0.98rem;
  color: rgba(255,255,255,0.82);
  padding-left: 1.1rem;
  position:relative;
}
.service-card li::before{
  content:"";
  position:absolute; left:0; top:0.55em;
  width:6px; height:6px;
  background: var(--orange);
}

/* =========================================================
   PROYECTOS
   ========================================================= */
.projects{
  background: var(--charcoal);
  padding-block: var(--gap-section);
  position:relative;
}
.project-filters{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  margin-bottom: 2.5rem;
}
.project-filters button{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight:600;
  font-size: 0.92rem;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  transition: all .18s var(--ease);
}
.project-filters button:hover{ border-color: var(--orange); color: var(--white); }
.project-filters button.active{
  background: var(--orange);
  border-color: var(--orange);
  color: var(--charcoal);
}

.project-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card{
  background: var(--slate);
  border-radius: var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.project-media{
  aspect-ratio: 4/3;
  background:
    linear-gradient(135deg, rgba(242,144,14,0.18), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 14px),
    var(--slate-2);
  display:flex;
  align-items:flex-end;
  padding: 1rem;
  position:relative;
}
.project-media .tag{
  font-family: var(--font-display);
  font-weight:700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--orange);
  color: var(--charcoal);
  padding: .3rem .6rem;
}
.project-media .ph{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  color: rgba(255,255,255,0.32);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: .08em;
  text-transform:uppercase;
  text-align:center;
  padding: 1.4rem;
}
.project-body{ padding: 1.4rem 1.5rem 1.7rem; }
.project-body h4{
  color: var(--white);
  font-size: 1.28rem;
  text-transform: uppercase;
  margin-bottom:.35rem;
}
.project-body .loc{
  color: var(--orange-light);
  font-size: 0.85rem;
  font-weight:600;
  letter-spacing:.03em;
  margin-bottom:.6rem;
  display:block;
}
.project-body p{
  color: rgba(255,255,255,0.65);
  font-size: 0.94rem;
}

/* =========================================================
   NOSOTROS
   ========================================================= */
.about{
  background: var(--cream);
  padding-block: var(--gap-section);
}
.about-grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items:start;
}
.about-copy p{
  color: var(--slate);
  font-size: 1.08rem;
  margin-bottom: 1.4rem;
}
.about-copy h3{
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-top: 1.8rem;
  margin-bottom: .6rem;
  color: var(--charcoal);
}
.about-figures{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.figure-card{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.7rem 1.5rem;
  border-top: 4px solid var(--orange);
}
.figure-card .num{
  font-family: var(--font-display);
  font-weight:800;
  font-size: 2.6rem;
  color: var(--charcoal);
  display:block;
}
.figure-card .label{
  color: var(--slate-light);
  font-size: 0.92rem;
  margin-top:.3rem;
}

.team{
  margin-top: 4.5rem;
}
.team-head{
  font-family: var(--font-display);
  font-weight:700;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 1rem;
  color: var(--slate-light);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.team-grid{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.75rem;
}
.team-card{ text-align:left; }
.team-avatar{
  width:100%;
  aspect-ratio: 1;
  background: var(--slate);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align:center;
  padding: 1rem;
}
.team-card h4{
  font-size: 1.25rem;
  text-transform: uppercase;
}
.team-card .role{
  color: var(--orange-dark);
  font-weight:600;
  font-size: 0.92rem;
  margin-top:.15rem;
  display:block;
}

/* =========================================================
   CONTACTO / FOOTER
   ========================================================= */
.contact{
  background: var(--slate);
  color: var(--white);
  padding-block: var(--gap-section);
}
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}
.contact-info-list{
  display:flex;
  flex-direction:column;
  gap: 1.6rem;
  margin-top: 2rem;
}
.contact-info-list li{
  display:flex;
  gap: 1rem;
  align-items:flex-start;
}
.contact-info-list .ic{
  width: 40px; height:40px;
  flex-shrink:0;
  background: rgba(242,144,14,0.15);
  border: 1px solid var(--orange);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.contact-info-list .ic svg{ width:18px; height:18px; stroke: var(--orange-light); }
.contact-info-list .label{
  font-family: var(--font-display);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}
.contact-info-list a, .contact-info-list span.value{
  font-size: 1.08rem;
  font-weight:600;
}
.contact-info-list a:hover{ color: var(--orange-light); }

.social-row{
  display:flex; gap:.75rem; margin-top: 2rem;
}
.social-row a{
  width: 42px; height:42px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition: all .18s var(--ease);
}
.social-row a:hover{ background: var(--orange); border-color: var(--orange); }
.social-row svg{ width:18px; height:18px; stroke: var(--white); }

.contact-form{
  background: var(--slate-2);
  padding: 2.2rem;
  border-radius: var(--radius);
}
.contact-form h3{
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.contact-form .hint{
  color: rgba(255,255,255,0.6);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}
.field{ margin-bottom: 1.1rem; }
.field label{
  display:block;
  font-size: 0.85rem;
  font-weight:600;
  margin-bottom: .4rem;
  color: rgba(255,255,255,0.75);
}
.field input, .field textarea{
  width:100%;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  padding: .8rem .9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 3px;
}
.field textarea{ resize: vertical; min-height: 100px; }
.field input:focus, .field textarea:focus{ border-color: var(--orange); }
.contact-form button{ width:100%; justify-content:center; margin-top:.4rem; }
.form-note{
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: .9rem;
}

.site-footer{
  background: var(--charcoal);
  color: rgba(255,255,255,0.55);
  padding-block: 1.6rem;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap: .75rem;
  font-size: 0.86rem;
}
.footer-inner a{ color: rgba(255,255,255,0.75); }
.footer-inner a:hover{ color: var(--orange-light); }

/* Reveal on scroll */
.reveal{
  opacity:0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible{ opacity:1; transform:none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px){
  .service-grid, .project-grid{ grid-template-columns: repeat(2,1fr); }
  .about-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 900px){
  /* Below this width the desktop nav no longer has room to breathe
     next to the logo, so we switch to the slide-in mobile panel. */
  .nav{
    position:fixed;
    inset: 78px 0 0 0;
    background: var(--cream);
    flex-direction:column;
    align-items:flex-start;
    padding: 2rem var(--pad-inline);
    gap: 1.6rem;
    transform: translateX(100%);
    transition: transform .28s var(--ease);
  }
  .nav.open{ transform: translateX(0); }
  .nav-toggle{ display:block; }
  .nav-cta{ margin-left:0; }
}

@media (max-width: 640px){
  .hero-stats{ grid-template-columns: 1fr; }
  .hero-stat{ border-right:none; border-bottom: 1px solid rgba(255,255,255,0.14); }
  .hero-stat:last-child{ border-bottom:none; }

  .service-grid, .project-grid, .team-grid, .about-figures{ grid-template-columns: 1fr; }

  .hero h1{ font-size: clamp(2.1rem, 10vw, 7.2rem); max-width: 100%; overflow-wrap: normal; }
  .hero-tag{ font-size: 0.78rem; letter-spacing: 0.14em; }
}
