/* =========================================================
   TH arquitectura — landing (demo)
   Minimalista editorial · alto contraste · acento cálido
   ========================================================= */

:root {
  --ink: #0e0e0d;
  --ink-2: #1a1a18;
  --paper: #f4f2ee;
  --paper-2: #e9e5de;
  --white: #ffffff;
  --line: rgba(14, 14, 13, .14);
  --line-light: rgba(244, 242, 238, .16);
  --muted: #6b6760;
  --muted-light: #a39e95;
  --accent: #b8875a;      /* madera / hormigón cálido */
  --accent-2: #d3a77c;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 13vw, 176px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 26px;
  font: 500 15px/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; border: 1px solid transparent; border-radius: 0;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--accent-2); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-2); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.08); }

.link { font-size: 15px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--paper);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.header.is-solid {
  background: rgba(14, 14, 13, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: var(--line-light);
}
.header.is-scrolled {
  background: rgba(244, 242, 238, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink); border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; position: relative; z-index: 2; }
.brand__mark { width: 22px; height: 31px; fill: none; stroke: currentColor; stroke-width: 9; stroke-linejoin: round; }
.brand__name { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand__name em { font-size: 19px; font-weight: 400; margin-left: 1px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { text-decoration: none; font-size: 14px; position: relative; }
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta { border: 1px solid currentColor; padding: 10px 16px; transition: background .3s, color .3s; }
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.burger { display: none; width: 44px; height: 44px; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 22px; padding: 0 var(--pad); background: var(--ink); color: var(--paper);
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav a { font-family: var(--serif); font-size: 40px; line-height: 1.1; }
  .nav a::after { display: none; }
  .nav__cta { font-family: var(--sans) !important; font-size: 16px !important; margin-top: 16px; padding: 14px 20px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .header { color: var(--paper); background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--paper);
  padding: 128px 0 0;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between;
}
/* grilla isométrica de fondo (eco del logo y del steel frame) */
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(30deg, var(--line-light) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(-30deg, var(--line-light) 0 1px, transparent 1px 56px);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 45%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 75% 45%, #000 0%, transparent 75%);
  opacity: .35;
}
.hero__inner { position: relative; display: grid; gap: 48px; align-items: center; flex: 1; padding-bottom: 48px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.hero__title {
  font-weight: 400; font-size: clamp(46px, min(9.2vw, 13vh), 132px); line-height: .96; letter-spacing: -.035em;
  max-width: 11ch;
}
.hero__title em { color: var(--accent-2); letter-spacing: -.01em; }
.hero__lead { margin-top: 28px; max-width: 34ch; color: var(--muted-light); font-size: clamp(16px, 1.6vw, 19px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.hero__mark { position: relative; justify-self: center; width: min(62vw, 300px); }
.iso { width: 100%; height: auto; overflow: visible; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.iso path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.iso__front path { stroke: var(--paper); stroke-width: 1.6; animation: draw 1.8s var(--ease) .35s forwards; }
.iso__edges path { stroke: var(--accent); stroke-width: 1; animation: draw .7s var(--ease) forwards; }
.iso__back path { stroke: var(--muted-light); stroke-width: 1; opacity: .55; animation: draw 1.8s var(--ease) 1.4s forwards; }
.iso__edges path:nth-child(4n+1) { animation-delay: 1.10s; }
.iso__edges path:nth-child(4n+2) { animation-delay: 1.20s; }
.iso__edges path:nth-child(4n+3) { animation-delay: 1.30s; }
.iso__edges path:nth-child(4n)   { animation-delay: 1.40s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__cota { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 28px; color: var(--muted-light); font-size: 11px; white-space: nowrap; }

.hero__facts {
  position: relative; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line-light);
  color: var(--muted-light); font-size: 11px;
}
.hero__facts li { padding: 16px 0; border-bottom: 1px solid var(--line-light); display: flex; gap: 14px; }
.hero__facts li:last-child { border-bottom: 0; }
.hero__facts span { color: var(--paper); min-width: 3.2em; }

@media (min-width: 768px) {
  .hero__facts { grid-template-columns: repeat(3, 1fr); }
  .hero__facts li { border-bottom: 0; padding: 22px 0; }
  .hero__facts li + li { border-left: 1px solid var(--line-light); padding-left: 24px; }
}
@media (min-width: 1024px) {
  .hero { padding-top: 140px; }
  .hero__inner { grid-template-columns: 1.5fr 1fr; gap: 64px; }
  .hero__mark { width: min(28vw, 360px); }
}

/* ---------- Imágenes de referencia ---------- */
.ref-img { position: relative; overflow: hidden; background: var(--paper-2); }
.ref-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ref-tag {
  position: absolute; left: 12px; bottom: 12px;
  font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  background: rgba(14,14,13,.72); color: var(--paper); padding: 6px 8px;
}

.band { height: clamp(280px, 62vw, 760px); }

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--paper { background: var(--paper-2); }

.h2 { font-weight: 400; font-size: clamp(34px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.03em; max-width: 16ch; }
.h2 em { color: var(--accent); }
.section--dark .h2 em { color: var(--accent-2); }

/* Línea de cota (como en un plano) */
.cota {
  display: flex; align-items: center; gap: 14px; margin-bottom: clamp(40px, 6vw, 72px);
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.cota i { position: relative; flex: 1; height: 1px; background: var(--line); }
.cota i::before, .cota i::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: currentColor; transform: skewX(-35deg); }
.cota i::before { left: 0; }
.cota i::after { right: 0; }
.cota span:first-child { color: var(--accent); }
.cota--light { color: var(--muted-light); }
.cota--light i { background: var(--line-light); }

.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- Estudio ---------- */
.estudio { display: grid; gap: 40px; }
.estudio__body { display: grid; gap: 22px; max-width: 58ch; color: #2f2d29; }
.estudio__body p { font-size: clamp(17px, 1.5vw, 19px); }
.estudio__data { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: 12px; }
.estudio__data div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.estudio__data div:nth-child(odd) { padding-right: 16px; }
.estudio__data dt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.estudio__data dd { font-size: 17px; }
.estudio__img { aspect-ratio: 4 / 3; }

@media (min-width: 1024px) {
  .estudio { grid-template-columns: repeat(12, 1fr); column-gap: 32px; row-gap: 64px; }
  .estudio__head { grid-column: 1 / 8; }
  .estudio__body { grid-column: 1 / 7; }
  .estudio__img { grid-column: 8 / 13; grid-row: 1 / 3; aspect-ratio: 3 / 4; align-self: end; }
}

/* ---------- Servicios ---------- */
.services { margin-top: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line-light); }
.service {
  display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; row-gap: 8px;
  padding: 28px 0; border-bottom: 1px solid var(--line-light);
  transition: background .4s var(--ease);
}
.service__n { color: var(--accent-2); padding-top: 9px; grid-row: span 2; }
.service h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.01em; }
.service p { color: var(--muted-light); max-width: 52ch; font-size: 16px; }
.service--feature h3::after {
  content: "Especialidad"; display: inline-block; vertical-align: middle; margin-left: 14px;
  font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: var(--accent); padding: 6px 8px; transform: translateY(-4px);
}
@media (min-width: 900px) {
  .service { grid-template-columns: 80px 1.1fr 1fr; align-items: baseline; padding: 36px 0; }
  .service__n { grid-row: auto; padding-top: 0; }
  .service:hover { background: linear-gradient(90deg, rgba(184,135,90,.08), transparent 70%); }
}

/* ---------- Proyectos ---------- */
.projects { display: grid; gap: 40px; }
.project figure { aspect-ratio: 4 / 3; }
.project:hover img { transform: scale(1.04); }
.project__meta { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 14px; padding-top: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.project__meta span { color: var(--accent); }
.project__meta h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1; }
.project__meta p { color: var(--muted); font-size: 11px; }

@media (min-width: 768px) {
  .projects { grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 48px; }
}
@media (min-width: 1100px) {
  .projects { grid-template-columns: repeat(3, 1fr); column-gap: 32px; row-gap: 64px; }
  .project:nth-child(3n+2) { margin-top: 96px; }
  .project figure { aspect-ratio: 4 / 5; }
}

/* ---------- Reseñas ---------- */
.reviews__head { display: grid; gap: 40px; margin-bottom: clamp(48px, 7vw, 88px); }
.rating { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: center; }
.rating__num { font-family: var(--serif); font-size: clamp(88px, 12vw, 160px); line-height: .8; letter-spacing: -.03em; grid-row: span 2; }
.rating__stars { color: var(--accent); font-size: 20px; letter-spacing: 4px; align-self: end; }
.rating__count { color: var(--muted); align-self: start; }

.reviews { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.review { background: var(--paper-2); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.review p { font-size: 18px; line-height: 1.5; }
.review--big p { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); line-height: 1.2; letter-spacing: -.01em; }
.review footer { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 12px; align-items: center; }
.review__stars { color: var(--accent); letter-spacing: 2px; }
.reviews__note { margin-top: 24px; color: var(--muted); font-size: 11px; text-transform: none; letter-spacing: .02em; }
.reviews__note a:hover { color: var(--accent); }

@media (min-width: 768px) {
  .reviews { grid-template-columns: 1fr 1fr; }
  .review--big { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .reviews__head { grid-template-columns: 1fr 2fr; align-items: end; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .review--big { grid-column: 1 / 3; grid-row: 1 / 4; justify-content: center; gap: 40px; }
  .review--big p { font-size: 42px; }
}

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 56px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 40px 0 48px; }
.contact__list { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line-light); }
.contact__list div { padding: 20px 0; border-bottom: 1px solid var(--line-light); display: grid; gap: 6px; }
.contact__list dt { color: var(--muted-light); font-size: 11px; }
.contact__list dd { font-size: 17px; line-height: 1.55; }
.contact__list a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s, color .3s; }
.contact__list a:hover { color: var(--accent-2); border-bottom-color: currentColor; }
.pending { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink); background: var(--accent-2); padding: 2px 5px; vertical-align: middle; }
.contact__map { min-height: 380px; position: relative; border: 1px solid var(--line-light); }
.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.contact__map:hover iframe { filter: none; }

@media (min-width: 600px) {
  .contact__list { grid-template-columns: 1fr 1fr; column-gap: 32px; }
}
@media (min-width: 1024px) {
  .contact { grid-template-columns: 1fr 1fr; gap: 64px; align-items: stretch; }
  .contact__map { min-height: 560px; }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--muted-light); border-top: 1px solid var(--line-light); padding: 40px 0 112px; }
.footer__inner { display: flex; flex-direction: column; gap: 16px; }
.footer .brand { color: var(--paper); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); }
@media (min-width: 900px) {
  .footer { padding-bottom: 40px; }
  .footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- WhatsApp flotante (solo mobile) ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translateY(120px); transition: transform .5s var(--ease);
}
.wa-float.is-visible { transform: none; }
.wa-float svg { width: 30px; height: 30px; }
@media (min-width: 900px) { .wa-float { display: none; } }

/* ---------- Animaciones de scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .band.reveal { transform: none; clip-path: inset(8% 6% 0 6%); transition: clip-path 1.4s var(--ease), opacity 1s; }
.js .band.reveal.is-in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .band.reveal { opacity: 1; transform: none; clip-path: none; transition: none; }
  .iso path { animation: none; stroke-dashoffset: 0; }
}
