/* Analemma Construcciones — brochure corporativo llevado a web */

:root {
  --paper: #f4f2ec;        /* off-white del brochure */
  --paper-soft: #ece9e1;
  --white: #ffffff;
  --ink: #161616;          /* casi negro de títulos */
  --ink-soft: #57534c;     /* gris de cuerpo */
  --navy: #0c1c28;         /* secciones oscuras */
  --navy-2: #112736;
  --gold: #b7a26a;         /* acento dorado/tan */
  --blue: #0063b2;         /* azul del logo */
  --line: rgba(22, 22, 22, 0.14);
  --line-soft: rgba(22, 22, 22, 0.08);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 4.75rem;
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --pad-y: clamp(3.5rem, 7vw, 6.5rem);
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
strong { font-weight: 600; color: inherit; }

/* ───────── Navbar (conservado) ───────── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.site-header.scrolled {
  background: rgba(244, 242, 236, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  width: 100%;
  height: 100%;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-mark { height: 1.9rem; width: auto; filter: brightness(0) saturate(100%); }
.site-header:not(.scrolled) .brand-mark { filter: brightness(0) invert(1); }
.brand-divider { width: 1px; height: 1.25rem; background: currentColor; opacity: 0.3; }
.brand-tag {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; opacity: 0.9;
}
.site-header:not(.scrolled) .brand,
.site-header:not(.scrolled) .site-nav a { color: var(--white); }
.site-nav {
  display: flex; align-items: center; gap: clamp(0.6rem, 1.6vw, 1.4rem);
  flex-wrap: wrap; justify-content: flex-end;
}
.site-nav a {
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em; opacity: 0.9; transition: opacity 0.2s;
}
.site-nav a:hover { opacity: 1; }
.nav-cta { padding: 0.5rem 1rem; border: 1px solid currentColor; border-radius: 999px; }
.site-header.scrolled .nav-cta { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.nav-toggle {
  display: none; width: 2.5rem; height: 2.5rem; border: 0; background: transparent; padding: 0; cursor: pointer;
}
.nav-toggle span { display: block; width: 1.35rem; height: 2px; margin: 0.35rem auto; background: currentColor; }
.site-header:not(.scrolled) .nav-toggle { color: var(--white); }

/* ───────── Portada (pág. 1) ───────── */
.cover {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
  background: var(--navy);
}
.cover-media { position: absolute; inset: 0; }
.cover-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
}
.cover-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,14,22,0.55) 0%, rgba(8,14,22,0.2) 40%, rgba(8,14,22,0.85) 100%),
    linear-gradient(90deg, rgba(8,14,22,0.75) 0%, rgba(8,14,22,0.15) 60%);
}
.cover-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) var(--pad-x) clamp(3rem, 7vw, 6rem);
}
.cover-mark { height: 2.75rem; width: auto; margin-bottom: 1.75rem; filter: brightness(0) invert(1); }
.cover-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.cover-title span { color: var(--gold); }
.cover-tagline {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  color: rgba(255,255,255,0.9);
}
.cover-contact {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}
.cover-contact a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* ───────── Hoja base ───────── */
.sheet {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}
.sheet-soft { max-width: none; background: var(--white); }
.sheet-soft > * { max-width: var(--maxw); margin-inline: auto; }
.sheet-dark { max-width: none; background: var(--navy); color: var(--white); }
.sheet-dark > * { max-width: var(--maxw); margin-inline: auto; }

.sheet-head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sheet-mark { width: 6.6rem; height: auto; flex: none; align-self: flex-start; }
.sheet-rule { flex: 1; height: 1px; background: var(--line); }

.kicker {
  margin: 0 0 0.75rem; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.display {
  margin: 0 0 1.25rem;
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.display.light { color: var(--white); }
.accent-bar { display: block; width: 3.25rem; height: 4px; background: var(--gold); margin: 0.25rem 0 0; }

/* ───────── Sobre nosotros (pág. 2) ───────── */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

/* Tríptico: una sola imagen partida en tres franjas horizontales escalonadas
   (top / mid / bottom), tal cual el brochure. */
.about-triptych { display: flex; flex-direction: column; gap: clamp(0.9rem, 2vw, 1.6rem); }
.about-slice {
  display: block;
  aspect-ratio: 2 / 1;            /* cada franja = un tercio vertical de la foto */
  background-image: url("../assets/images/about-1.jpg");
  background-repeat: no-repeat;
  background-size: 100% auto;     /* la foto ocupa el ancho de la franja */
}
.about-triptych { align-items: flex-start; }
.about-slice--top    { width: 60%; background-position: left 0%; }
.about-slice--mid    { width: 76%; background-position: left 50%; }
.about-slice--bottom { width: 92%; background-position: left 100%; }
.about-copy h2 {
  margin: 0 0 1.25rem; font-weight: 700; font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.02; letter-spacing: -0.025em;
}
.about-copy p { margin: 0 0 1rem; color: var(--ink-soft); font-size: 1.02rem; text-align: left; }
.about-pillars { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.85rem; }
.about-pillars li {
  position: relative; padding-left: 1.25rem; color: var(--ink-soft); font-size: 0.98rem;
}
.about-pillars li::before {
  content: ""; position: absolute; left: 0; top: 0.6em; width: 0.5rem; height: 0.5rem;
  background: var(--gold); border-radius: 50%;
}

/* ───────── Prosa centrada ───────── */
.prose-block { max-width: 56rem; }
.prose-block p { margin: 0 0 1.15rem; color: var(--ink-soft); font-size: 1.08rem; text-align: left; }

/* ───────── Misión & Visión (pág. 3) ───────── */
.promise-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.promise-visual { margin: 0; }
.promise-visual img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: grayscale(100%) contrast(1.05);
}
.promise-copy .display { white-space: nowrap; }
.promise-list { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 2rem; }
.promise-list li { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.promise-num {
  display: flex; align-items: center; justify-content: center;
  width: 3.25rem; height: 3.25rem; border: 1px solid rgba(255,255,255,0.35);
  font-weight: 600; font-size: 0.95rem; color: var(--gold); flex: none;
}
.promise-list h3 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 600; color: var(--white); }
.promise-list p { margin: 0; color: rgba(255,255,255,0.82); font-size: 0.98rem; text-align: left; }

/* ───────── Valores (pág. 7) ───────── */
.why-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.why-head .sheet-mark { margin-bottom: 1.25rem; }
.why-intro { margin: 1.25rem 0 0; max-width: 44rem; color: var(--ink-soft); font-size: 1.05rem; }
.values-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.value-col {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.value-col:last-child { border-right: 0; }
.value-col h3 {
  margin: 0 0 0.65rem; font-size: 1.02rem; font-weight: 700;
  padding-bottom: 0.65rem; border-bottom: 2px solid var(--gold); align-self: flex-start;
}
.value-col p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; text-align: left; }
.value-chevron { display: none; }

/* ───────── Servicios (pág. 5) ───────── */
.services-wrap { position: relative; }
.services-title {
  text-align: center; margin: 0 0 2.5rem; font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.025em;
}
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.service-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
}
.sheet-soft .service-box { background: var(--white); }
.service-index {
  display: inline-block; margin-bottom: 0.85rem; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.16em; color: var(--gold);
}
.service-box h3 {
  margin: 0 0 0.75rem; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--line);
}
.service-box p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; text-align: left; }

/* ───────── Cadena de valor (pág. 6) ───────── */
.method-header { display: grid; gap: 1rem 3rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.method-header .display { margin: 0; }
.method-lead { margin: 0; color: var(--ink-soft); font-size: 1.08rem; text-align: left; align-self: center; }
.method-grid { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: stretch; }
.method-visual { margin: 0; height: 100%; }
.method-visual img {
  width: 100%; height: 100%; min-height: 420px; object-fit: cover; filter: grayscale(100%) contrast(1.05);
}
.method-steps { display: flex; flex-direction: column; }
.steps-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 1.4rem; height: 100%;
}
.steps-list li { padding-left: 1.1rem; border-left: 3px solid var(--gold); }
.steps-list h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 700; }
.steps-list p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; text-align: left; }
.method-note {
  margin: clamp(2rem, 4vw, 3rem) 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: 0.95rem; text-align: left;
}

/* ───────── Experiencia + carrusel (pág. 7 superior) ───────── */
.exp-intro { display: grid; gap: 1rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.exp-intro .display { margin: 0; }
.exp-body { display: grid; gap: 1rem; }
.exp-body p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; text-align: left; }

.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; margin: 0; flex: 0 0 clamp(260px, 80%, 460px);
  scroll-snap-align: center; overflow: hidden; border-radius: 0.75rem;
}
.slide img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: grayscale(100%) contrast(1.05);
  transition: transform 0.6s ease, filter 0.4s ease;
}
.slide:hover img { transform: scale(1.04); filter: grayscale(0%) contrast(1); }
.slide figcaption {
  position: absolute; inset: auto 0 0; padding: 1.25rem 1.25rem 1.1rem;
  background: linear-gradient(transparent, rgba(8,14,22,0.85));
  color: var(--white); font-size: 1.02rem; font-weight: 600;
}
.slide figcaption span {
  display: block; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 0.3rem;
}
.carousel-btn {
  position: absolute; top: calc(50% - 1.5rem); transform: translateY(-50%);
  width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--ink); font-size: 1.5rem; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.18); transition: background 0.2s, transform 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: var(--white); transform: translateY(-50%) scale(1.06); }
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }
.carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.carousel-dots button {
  width: 0.55rem; height: 0.55rem; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.carousel-dots button.active { background: var(--gold); transform: scale(1.3); }

/* ───────── Contacto (pág. 8) ───────── */
.sheet-contact { max-width: none; padding: 0; background: var(--white); }
.contact-grid { display: grid; min-height: 540px; }
.contact-visual { margin: 0; }
.contact-visual img {
  width: 100%; height: 100%; min-height: 320px; object-fit: cover; filter: grayscale(100%) contrast(1.05);
}
.contact-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad-x);
}
.contact-panel .sheet-mark { margin-bottom: 1.5rem; }
.contact-panel h2 { margin-bottom: 1rem; }
.contact-lead { margin: 1.5rem 0 0; color: var(--ink-soft); font-size: 1.05rem; max-width: 30rem; }
.contact-data {
  margin-top: 2rem; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 30rem;
}
.contact-data a, .contact-data span {
  padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-soft);
}
.contact-data a { color: var(--ink); font-weight: 600; }
.contact-data a:hover { color: var(--blue); }
.btn-whatsapp {
  align-self: flex-start; margin-top: 2rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.02em;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn-whatsapp svg { flex: 0 0 auto; }
.btn-whatsapp:hover { background: transparent; color: var(--ink); transform: translateY(-2px); }

/* ───────── Footer ───────── */
.site-footer { width: 100%; padding: 2rem var(--pad-x) 2.25rem; border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 1.5rem;
}
.footer-brand { justify-self: start; }
.footer-brand img { height: 1.6rem; width: auto; filter: brightness(0) saturate(100%); }
.footer-brand p { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.footer-copy { margin: 0; font-size: 0.82rem; color: var(--ink-soft); text-align: center; justify-self: center; }
.back-top {
  justify-self: end; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
}
.back-top:hover { text-decoration: underline; }

/* ───────── Reveal (visible sin JS) ───────── */
.reveal { opacity: 1; transform: none; }
.reveal.reveal-animate { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.reveal-animate.visible { opacity: 1; transform: translateY(0); }

/* ───────── Responsive ───────── */

/* Desktop grande */
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 0.9fr 1.1fr; }
  .promise-grid { grid-template-columns: 0.8fr 1.2fr; }
  .method-header { grid-template-columns: 0.85fr 1.15fr; }
  .method-grid { grid-template-columns: 0.85fr 1.15fr; }
  .exp-intro { grid-template-columns: 0.85fr 1.15fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .slide { flex-basis: calc((100% - 2rem) / 3); }
}

/* Tablet horizontal */
@media (min-width: 600px) and (max-width: 959px) {
  .about-grid { grid-template-columns: 1fr; }
  .promise-grid { grid-template-columns: 1fr; }
  .method-header { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .method-visual img { min-height: 0; aspect-ratio: 16/9; }
  .steps-list { gap: 1.4rem; }
  .exp-intro { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .values-row { grid-template-columns: repeat(3, 1fr); }
  .value-col:nth-child(3) { border-right: 0; }
  .value-col:nth-child(n+4) { border-top: 1px solid var(--line); }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .services-grid .service-box:last-child { grid-column: 1 / -1; }
  .slide { flex-basis: calc((100% - 1rem) / 2); }
}

/* Móvil */
@media (max-width: 599px) {
  .about-grid,
  .promise-grid,
  .method-header,
  .method-grid,
  .exp-intro,
  .contact-grid { grid-template-columns: 1fr; }
  .promise-list li { grid-template-columns: 1fr; gap: 0.75rem; }
  .promise-copy .display { white-space: normal; }
  .method-visual img { min-height: 0; aspect-ratio: 16/10; }
  .values-row { grid-template-columns: 1fr; }
  .value-col { border-right: 0; border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
  .value-col:last-child { border-bottom: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-visual img { min-height: 240px; }
  .slide { flex-basis: 85%; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1rem; }
  .footer-brand { justify-self: center; }
  .footer-copy { justify-self: center; }
  .back-top { justify-self: center; }
}

/* Menú móvil */
@media (max-width: 768px) {
  .nav-toggle { display: block; color: var(--ink); }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch;
    padding: 1rem var(--pad-x) 1.5rem; background: rgba(244,242,236,0.98); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
  }
  .site-header:not(.scrolled) .site-nav { background: rgba(12,28,40,0.98); }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { color: var(--ink); padding: 0.6rem 0; }
  .site-header:not(.scrolled) .site-nav a { color: var(--white); }
  .nav-cta { align-self: flex-start; }
}

/* Portada en móvil */
@media (max-width: 599px) {
  .cover { align-items: flex-end; }
  .cover-contact { flex-direction: column; gap: 0.5rem; }
}
