@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600&family=Manrope:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --forest: #1a4630;
  --forest-deep: #122e1f;
  --forest-black: #0b1f14;
  --forest-light: #2b5c40;
  --wood: #9b683f;
  --wood-light: #c79261;
  --wood-pale: #e4c9a4;
  --paper: #f4f1e9;
  --paper-deep: #ebe6d9;
  --ink: #14291d;
  --ink-soft: rgba(20, 41, 29, 0.72);
  --cream-soft: rgba(244, 241, 233, 0.72);
  --line-dark: rgba(20, 41, 29, 0.16);
  --line-light: rgba(244, 241, 233, 0.16);
  --pad: clamp(1.4rem, 4vw, 4.5rem);
  --font-display: "Bricolage Grotesque", "Manrope", Arial, sans-serif;
  --font-body: "Manrope", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--forest-deep);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--wood-light);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1rem var(--pad);
  border-bottom: 1px solid var(--line-light);
  background: rgba(18, 46, 31, 0.85);
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  width: clamp(7rem, 11vw, 9.5rem);
}

.brand img {
  width: 100%;
  height: auto;
}

.header-tag {
  margin: 0;
  padding-left: 1.4rem;
  border-left: 1px solid var(--line-light);
  color: rgba(244, 241, 233, 0.5);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.5vw, 2.2rem);
  margin-left: auto;
}

.site-nav a {
  color: var(--cream-soft);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 160ms ease;
}

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

.site-nav .nav-cta {
  padding: 0.55rem 1.15rem;
  border: 1px solid rgba(199, 146, 97, 0.55);
  border-radius: 999px;
  color: var(--wood-pale);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.site-nav .nav-cta:hover {
  border-color: var(--wood-light);
  background: var(--wood-light);
  color: var(--ink);
}

/* ============ Hero ============ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 82% 20%, rgba(66, 112, 82, 0.4), transparent 34rem),
    linear-gradient(160deg, var(--forest) 0%, var(--forest-deep) 62%, var(--forest-black) 100%);
}

.hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.26;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(244, 241, 233, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 233, 0.045) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: radial-gradient(ellipse at 70% 40%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, black 30%, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  align-items: center;
  gap: clamp(3rem, 6vw, 6.5rem);
  max-width: 90rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 7.5rem) var(--pad) clamp(4rem, 8vh, 6.5rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.5rem;
  color: var(--wood-light);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  flex-shrink: 0;
  width: 2.4rem;
  height: 1px;
  content: "";
  background: currentColor;
}

.eyebrow-dark {
  color: var(--wood);
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.7rem, 5.4vw, 5.1rem);
  line-height: 1.02;
}

.lead {
  max-width: 34rem;
  margin: clamp(1.6rem, 3vw, 2.4rem) 0 0;
  color: var(--cream-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--wood-light);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--wood-pale);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--line-light);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: rgba(244, 241, 233, 0.4);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.15rem 2.3rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

/* ---- Technical drawing ---- */

.hero-drawing {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 34rem;
}

.frame-svg {
  width: 100%;
  height: auto;
}

.frame-lines rect,
.frame-lines line {
  fill: none;
  stroke: var(--wood-pale);
  stroke-width: 1.4;
  opacity: 0.85;
}

.frame-lines .opening {
  stroke: rgba(228, 201, 164, 0.45);
  stroke-dasharray: 5 6;
}

.frame-dims line {
  stroke: rgba(244, 241, 233, 0.4);
  stroke-width: 1;
}

.frame-dims text {
  fill: rgba(244, 241, 233, 0.55);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hero .frame-lines rect {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2200ms 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* dark variant for paper background */

.frame-svg-dark {
  max-width: 26rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.frame-svg-dark .frame-lines rect {
  stroke: rgba(20, 41, 29, 0.45);
}

.frame-svg-dark .frame-dims line {
  stroke: rgba(20, 41, 29, 0.35);
}

.frame-svg-dark .frame-dims text {
  fill: rgba(20, 41, 29, 0.55);
}

/* ============ Sections ============ */

.section {
  position: relative;
}

.section-inner {
  position: relative;
  z-index: 1;
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7.5rem) var(--pad);
}

.section-paper {
  background: var(--paper);
  color: var(--ink);
}

.section-head {
  max-width: 46rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.08;
}

.section-sub {
  max-width: 38rem;
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.section-forest .section-sub,
.section-black .section-sub,
.section-cta .section-sub {
  color: var(--cream-soft);
}

.chip {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--wood-light);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

/* ---- Qué hacemos ---- */

.split-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
  margin-bottom: clamp(2.8rem, 5vw, 4.5rem);
}

.head-photo {
  position: relative;
  margin: 0;
}

.head-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
  filter: saturate(0.88) contrast(1.02);
}

.head-photo::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(26, 70, 48, 0.08), rgba(26, 70, 48, 0.22));
  pointer-events: none;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: baseline;
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-bottom: 1px solid var(--line-dark);
  transition: background 200ms ease;
}

.row-num {
  color: var(--wood);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.row h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.65;
}

/* ---- El sistema ---- */

.section-sistema .section-inner {
  padding-top: 0;
}

.sistema-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-dark);
}

.specs {
  margin: 0;
}

.spec {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-dark);
}

.spec:first-child {
  border-top: 1px solid var(--line-dark);
}

.spec dt {
  color: var(--wood);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.spec dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.specs-note {
  margin: 1.1rem 0 0;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* ---- Por qué entramado ---- */

.section-forest {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(66, 112, 82, 0.32), transparent 30rem),
    var(--forest-deep);
}

.why-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(10rem, 22vw, 20rem);
  margin: 0;
  opacity: 0.35;
  pointer-events: none;
}

.why-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7);
}

.why-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--forest-deep) 0%, rgba(18, 46, 31, 0.35) 60%, rgba(18, 46, 31, 0.55) 100%);
}

.section-why .section-head {
  margin-bottom: clamp(2.8rem, 5vw, 4.5rem);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 5rem);
  max-width: 62rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.why-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.3rem;
  align-items: start;
}

.why-num {
  padding-top: 0.3rem;
  color: var(--wood-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.why-list h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
}

.why-list p {
  margin: 0;
  color: var(--cream-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- Presupuesto online ---- */

.section-black {
  border-top: 1px solid var(--line-light);
  background:
    radial-gradient(ellipse at 85% 15%, rgba(155, 104, 63, 0.14), transparent 34rem),
    var(--forest-black);
}

.chip-invert {
  margin-left: 0.8rem;
}

.presu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.section-black .section-head {
  margin-bottom: clamp(2.4rem, 4vw, 3.5rem);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line-light);
}

.step-num {
  padding-top: 0.2rem;
  color: var(--wood-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.step p {
  margin: 0;
  color: var(--cream-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* mock budget document */

.presu-doc {
  margin: 0;
  position: sticky;
  top: 7rem;
}

.doc {
  padding: 1.4rem 1.5rem 1.1rem;
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.4);
  transform: rotate(0.6deg);
}

.doc-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 1rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--line-dark);
}

.doc-head img {
  width: 2rem;
  padding: 0.35rem;
  border-radius: 0.55rem;
  background: var(--forest);
}

.doc-head span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px dashed rgba(20, 41, 29, 0.18);
}

.doc-row span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.doc-row i {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(20, 41, 29, 0.14);
}

.doc-row:nth-child(2) i { width: 5.5rem; }
.doc-row:nth-child(3) i { width: 4rem; }
.doc-row:nth-child(4) i { width: 5rem; }
.doc-row:nth-child(5) i { width: 4.6rem; }
.doc-row:nth-child(6) i { width: 3.2rem; }
.doc-row:nth-child(7) i { width: 4.2rem; }

.doc-total {
  border-bottom: none;
  margin-top: 0.3rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.doc-total span {
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.doc-total i {
  width: 6rem;
  height: 0.9rem;
  background: var(--wood-light);
}

.presu-doc figcaption {
  max-width: 24rem;
  margin-top: 1.3rem;
  color: rgba(244, 241, 233, 0.55);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.65;
}

/* ---- CTA ---- */

.section-cta {
  overflow: hidden;
  border-top: 1px solid var(--line-light);
  background: var(--forest-black);
}

.cta-photo {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
}

.cta-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: saturate(0.75);
}

.cta-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(11, 31, 20, 0.55) 0%, rgba(11, 31, 20, 0.88) 85%);
}

.cta-inner {
  max-width: 60rem;
  padding-top: clamp(5.5rem, 11vw, 9rem);
  padding-bottom: clamp(5.5rem, 11vw, 9rem);
}

.cta-inner h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  line-height: 1.05;
}

.cta-inner .btn {
  margin-top: clamp(1.8rem, 3.5vw, 2.8rem);
}

/* ============ Footer ============ */

.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad) 1.8rem;
  border-top: 1px solid var(--line-light);
  background: var(--forest-black);
}

.footer-wordmark {
  width: clamp(11rem, 22vw, 18rem);
  opacity: 0.9;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-light);
  color: rgba(244, 241, 233, 0.5);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-meta p {
  margin: 0;
}

.footer-meta p:last-child {
  margin-left: auto;
}

/* ============ Reveal ============ */

.reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.rows .row:nth-child(2),
.why-list li:nth-child(2),
.steps .step:nth-child(2) {
  transition-delay: 90ms;
}

.rows .row:nth-child(3),
.why-list li:nth-child(3),
.steps .step:nth-child(3) {
  transition-delay: 180ms;
}

.why-list li:nth-child(4),
.steps .step:nth-child(4) {
  transition-delay: 270ms;
}

/* ============ Responsive ============ */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-drawing {
    justify-self: start;
    max-width: 30rem;
  }

  .split-head {
    grid-template-columns: 1fr;
  }

  .head-photo {
    max-width: 28rem;
  }

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

  .row p {
    grid-column: 2;
  }

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

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

  .presu-doc {
    position: static;
    max-width: 26rem;
  }

  .why-photo {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-tag {
    display: none;
  }

  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .why-list {
    grid-template-columns: 1fr;
  }

  .spec {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .footer-meta p:last-child {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero .frame-lines rect {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
