/* =========================================================
   SC ARQUITECTOS — hoja de estilos
   Paleta fría: grises + azules · Tipografía: Fraunces + Inter
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f3f1;
  --surface: #ffffff;
  --ink: #131211;
  --ink-soft: #4a4845;
  --ink-faint: #8c8985;
  --line: #e5e3df;
  --blue: #b3812f;
  --blue-deep: #101010;
  --blue-soft: #e3c98d;
  --accent: #b3812f;
  --whatsapp: #25d366;

  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1240px;
  --gap: clamp(1rem, 2vw, 2rem);
  --radius: 4px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--blue-deep);
}

p { margin: 0 0 1em; color: var(--ink-soft); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

section { position: relative; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* safety net: if JS fails or data-split conflicts, content must stay readable */
.reveal[data-split] { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn-primary {
  background: var(--surface);
  color: var(--blue-deep);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--blue-soft); }

.btn-outline {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn-outline:hover { transform: translateY(-2px); background: rgba(255,255,255,0.08); }

.btn-dark {
  background: var(--blue-deep);
  color: #fff;
}
.btn-dark:hover { transform: translateY(-2px); background: var(--blue); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}
.btn-whatsapp:hover { transform: translateY(-2px); background: #1fb959; }
.btn-whatsapp svg { width: 20px; height: 20px; fill: currentColor; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header.is-scrolled {
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(10px);
  padding: 0.9rem 0;
  border-color: var(--line);
  box-shadow: 0 8px 30px -20px rgba(28, 37, 48, 0.35);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: #fff;
  font-weight: 600;
  transition: color 0.4s var(--ease);
}
.logo span { color: var(--blue-soft); }
.is-scrolled .logo { color: var(--blue-deep); }
.is-scrolled .logo span { color: var(--blue); }

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 2vw, 2.4rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.4s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.is-scrolled .nav-links a { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.header-actions .btn { padding: 0.7rem 1.3rem; font-size: 0.75rem; }
.is-scrolled .header-actions .btn-outline { color: var(--ink); border-color: var(--ink); }

.nav-toggle {
  display: none;
  width: 26px; height: 20px;
  position: relative;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), background .4s;
}
.is-scrolled .nav-toggle span,
.is-scrolled .nav-toggle::before,
.is-scrolled .nav-toggle::after { background: var(--ink); }
.nav-toggle::before { top: 0; }
.nav-toggle span { top: 9px; }
.nav-toggle::after { top: 18px; }
.nav-toggle.is-open::before { transform: translateY(9px) rotate(45deg); }
.nav-toggle.is-open::after { transform: translateY(-9px) rotate(-45deg); }
.nav-toggle.is-open span { opacity: 0; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  position: relative;
  background: var(--blue-deep);
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg svg, .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%; /* mantiene a la persona de la foto en encuadre, no el techo */
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,29,41,0.35) 0%, rgba(20,29,41,0.55) 55%, rgba(15,22,32,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  padding-top: 8rem;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 1.4rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  margin-bottom: 0.4em;
  max-width: 16ch;
}
.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255,255,255,0.82);
  max-width: 42ch;
  margin-bottom: 2.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.scroll-cue {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: 2.2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 46px;
  background: rgba(255,255,255,0.5);
  display: block;
  animation: scrollcue 2.2s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.001% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =========================================================
   MARCO DE FOTOGRAFÍA (hero, Nosotros, Portafolio)
   ========================================================= */
.art-frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.art-frame svg, .art-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* =========================================================
   NOSOTROS
   ========================================================= */
.about {
  padding: clamp(5rem, 10vw, 9rem) 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about-art { aspect-ratio: 3 / 4; }
.about-art img { object-fit: contain; }
.about-text h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.about-text p { font-size: 1.06rem; }

.mv-grid {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.mv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 3vw, 2.6rem);
}
.mv-card .eyebrow { margin-bottom: 0.8rem; }
.mv-card h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.mv-card p { margin-bottom: 0; font-size: 0.97rem; }

/* =========================================================
   SERVICIOS
   ========================================================= */
.services {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--blue-deep);
  color: #fff;
}
.services .section-head h2 { color: #fff; }
.section-head h2.section-title-xl {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}
.services .section-head p { color: rgba(255,255,255,0.68); }
.services .eyebrow { color: var(--blue-soft); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
}
.service-card {
  background: var(--blue-deep);
  padding: clamp(2rem, 3vw, 2.6rem) clamp(1.5rem, 2.5vw, 2rem);
  transition: background 0.4s var(--ease);
}
.service-card:hover { background: #253b52; }
.service-icon {
  width: 46px; height: 46px;
  margin-bottom: 1.6rem;
  color: var(--blue-soft);
}
.service-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.3; }
.service-card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}
.service-card p { color: rgba(255,255,255,0.66); font-size: 0.94rem; margin-bottom: 0; }
.service-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
  display: block;
}

/* =========================================================
   PROCESO
   ========================================================= */
.process {
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.process-track::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.process-num {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--blue);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex: none;
}
.process-step h3 { font-size: 1.05rem; margin: 0; }
.process-step p { font-size: 0.9rem; margin: 0; }
.process-note {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* =========================================================
   PORTAFOLIO
   ========================================================= */
.portfolio { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(5rem, 10vw, 9rem); }

.portfolio-list {
  border-top: 1px solid var(--line);
}
.portfolio-row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.portfolio-row:hover { background: var(--bg-alt); }
.portfolio-row-index {
  flex: none;
  width: 2.4rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.portfolio-row-name {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1.4rem, 3.6vw, 2.4rem);
  color: var(--blue-deep);
  transition: color 0.3s var(--ease);
}
.portfolio-row:hover .portfolio-row-name { color: var(--blue); }
.portfolio-row-plus {
  flex: none;
  font-size: 1.7rem;
  font-weight: 300;
  color: var(--ink-faint);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.portfolio-row:hover .portfolio-row-plus { color: var(--blue); transform: rotate(45deg); }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg-alt);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.contact-info h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.contact-list {
  list-style: none;
  margin: 2rem 0 2.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1rem;
  color: var(--ink);
}
.contact-list .c-icon {
  width: 22px; height: 22px;
  flex: none;
  margin-top: 2px;
  color: var(--blue);
}
.contact-list .c-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.5; }
.contact-list a:hover { color: var(--blue); }
.contact-list small { display: block; color: var(--ink-faint); margin-top: 2px; }

.social-row { display: flex; gap: 0.9rem; margin-top: 2rem; }
.social-row a {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.social-row a svg { width: 17px; height: 17px; fill: currentColor; }
.social-row a:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
}
.contact-form h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.contact-form > p { font-size: 0.9rem; margin-bottom: 1.6rem; }
.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.contact-form .btn { width: 100%; justify-content: center; margin-top: 0.4rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.65);
  padding: 2.6rem 0;
  font-size: 0.85rem;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-row .logo { font-size: 1.05rem; }
.back-top {
  border: 1px solid rgba(255,255,255,0.25);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.35s var(--ease);
}
.back-top:hover { background: rgba(255,255,255,0.12); }
.back-top svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 1.6; }

/* =========================================================
   WHATSAPP FLOATING BUTTON
   ========================================================= */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.6);
  transition: transform 0.35s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-art { aspect-ratio: 16/9; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .process-track::before { display: none; }
}

@media (max-width: 560px) {
  .process-track { grid-template-columns: 1fr; }
}

/* Oculto en todos los tamaños de pantalla salvo cuando el botón hamburguesa lo abre (clase .is-open) */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--blue-deep);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav a { color: #fff; font-family: var(--font-display); font-size: 1.6rem; }
.mobile-nav .btn { margin-top: 1rem; }

@media (max-width: 760px) {
  .nav-links, .header-actions .btn-outline { display: none; }
  .nav-toggle { display: block; }

  .mv-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-content { padding-top: 7rem; }
  .scroll-cue { display: none; }
}

/* Respect explicit user preference without killing the whole site's motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; }
}
