/* ============================================================
   ALGOL Construcción y Diseño — Premium corporate site
   ============================================================ */

:root {
  --c-carbon: #0B0D10;
  --c-carbon-2: #14171B;
  --c-graphite: #1E2226;
  --c-line-dark: rgba(246,245,242,0.10);

  --c-white: #F6F5F2;
  --c-white-2: #EFEDE8;
  --c-ink: #14171B;
  --c-steel: #6B7280;
  --c-steel-light: #9AA1A9;
  --c-line-light: rgba(20,23,27,0.10);

  --c-accent: #FF7900;
  --c-accent-dark: #CC5F00;

  --font-display: 'Space Grotesk', 'Segoe UI', -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', -apple-system, sans-serif;

  --container: 1240px;
  --radius: 2px;
  --ease: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  background: var(--c-white);
  color: var(--c-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: .5rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.lead { font-size: 1.05rem; color: var(--c-steel); max-width: 46ch; }
.section-dark .lead { color: var(--c-steel-light); }

.kicker {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .9rem;
  font-weight: 600;
}

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-light { background: var(--c-white); color: var(--c-ink); }
.section-dark { background: var(--c-carbon); color: var(--c-white); }
.section-dark h2, .section-dark h3 { color: var(--c-white); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }
.grid-2.align-center { align-items: center; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 30px;
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-accent { background: var(--c-accent); color: #14100A; }
.btn-accent:hover { background: var(--c-accent-dark); transform: translateY(-2px); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.section-light .btn-ghost:hover { background: rgba(20,23,27,.06); }
.btn-sm { padding: 10px 20px; font-size: .82rem; }
.btn-block { width: 100%; margin-top: .5rem; }

/* ===== HEADER ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid var(--c-line-dark);
}
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(11,13,16,.72);
  backdrop-filter: blur(10px);
  transition: background .3s var(--ease);
}
.site-header.is-scrolled::before { background: rgba(11,13,16,.94); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .3s var(--ease); }
.site-header.is-scrolled .header-inner { height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { border-radius: 4px; }
.brand-word { font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; color: var(--c-white); font-size: 1.05rem; }

.main-nav { display: flex; gap: clamp(16px, 2vw, 30px); }
.main-nav a { color: var(--c-white-2); font-size: .92rem; font-weight: 500; position: relative; padding: 4px 0; }
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-call { color: var(--c-white); opacity: .85; transition: opacity .2s; display: flex; }
.header-call:hover { opacity: 1; color: var(--c-accent); }
.header-whatsapp { color: var(--c-white); opacity: .85; transition: opacity .2s; display: flex; }
.header-whatsapp:hover { opacity: 1; color: #25D366; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 26px; }
.nav-toggle span { display: block; height: 2px; background: var(--c-white); transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 901px) and (max-width: 1150px) {
  .main-nav { gap: 14px; }
  .main-nav a { font-size: .85rem; }
}
@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 64px 0 0 0; background: var(--c-carbon);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 20px clamp(20px,5vw,48px);
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--c-line-dark); font-size: 1.1rem; }
  .header-call { display: none; }
  .header-whatsapp { display: none; }
  .btn.btn-sm.header-cta-hide { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }
}
@media (min-width: 901px) { .nav-toggle { display: none; } }

/* ===== PLACEHOLDER PHOTO ===== */
.ph-photo {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255,121,0,.06) 0 2px, transparent 2px 26px),
    linear-gradient(160deg, #1a1e23, #0e1013);
  min-height: 260px;
  display: flex; align-items: flex-end;
}
.ph-photo::before {
  content: attr(data-ph);
  display: block; margin: 16px;
  font-family: var(--font-body); font-size: .72rem; font-weight: 500;
  color: var(--c-white-2);
  background: rgba(11,13,16,.72);
  border: 1px solid rgba(255,121,0,.4);
  border-radius: 2px;
  padding: 8px 12px;
  max-width: calc(100% - 32px);
  backdrop-filter: blur(4px);
}
.ph-tall { min-height: 420px; }

/* ===== REAL PHOTOS ===== */
.real-photo {
  background-size: cover;
  background-position: center;
  background-color: #1a1e23;
  min-height: 260px;
}

/* ===== HERO ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; min-height: 100%; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,16,.55) 0%, rgba(11,13,16,.82) 65%, rgba(11,13,16,.96) 100%);
}
.hero-lines {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255,121,0,.08) 1px, transparent 1px);
  background-size: 25% 100%;
  opacity: .5;
}
.hero-watermark {
  position: absolute; z-index: 1; pointer-events: none;
  right: clamp(-40px, 2vw, 60px); bottom: -6%;
  width: clamp(280px, 32vw, 560px); height: auto;
  opacity: .1;
}
.hero-content { position: relative; z-index: 2; padding-top: 84px; color: var(--c-white); }
.eyebrow { font-family: var(--font-display); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 1.4rem; font-weight: 600; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.6rem); max-width: 16ch; margin-bottom: 1.4rem; }
.hero-sub { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--c-white-2); max-width: 52ch; margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid rgba(246,245,242,.4); border-radius: 20px; z-index: 2;
}
.scroll-cue span { display: block; width: 4px; height: 8px; background: var(--c-accent); border-radius: 2px; margin: 8px auto 0; animation: cueMove 1.8s infinite ease-in-out; }
@keyframes cueMove { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(10px); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

/* ===== PULL QUOTE / CHECK LIST ===== */
.pull-quote {
  border-left: 2px solid var(--c-accent);
  padding: .2rem 0 .2rem 1.4rem;
  margin: 1.6rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 500;
  color: var(--c-ink);
}
.check-list li { position: relative; padding-left: 26px; margin-bottom: .6rem; color: var(--c-steel); font-size: .95rem; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 12px; height: 1px; background: var(--c-accent); }

/* ===== NOSOTROS — SUBSECCIONES ===== */
.about-block { margin-top: clamp(56px, 8vw, 96px); }

.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.mv-card { border: 1px solid var(--c-line-light); border-top: 3px solid var(--c-accent); padding: 36px 32px; background: var(--c-white-2); }
.mv-icon { color: var(--c-accent); margin-bottom: 1.2rem; }
.mv-card h3 { font-size: 1.25rem; }
.mv-card p { color: var(--c-steel); font-size: .94rem; line-height: 1.75; }
@media (max-width: 860px) { .mv-grid { grid-template-columns: 1fr; } }

.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.value-item { border-top: 1px solid var(--c-line-light); padding-top: 20px; }
.value-icon { color: var(--c-accent); margin-bottom: 1rem; }
.value-item h3 { font-size: 1.02rem; }
.value-item p { color: var(--c-steel); font-size: .88rem; }
@media (max-width: 860px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .values-grid { grid-template-columns: 1fr; } }

.team-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.team-photo { min-height: 280px; position: relative; display: flex; align-items: flex-end; }
.team-caption {
  margin: 16px; font-family: var(--font-body); font-size: .72rem; font-weight: 500;
  color: var(--c-white-2); background: rgba(11,13,16,.72); border: 1px solid rgba(255,121,0,.4);
  border-radius: 2px; padding: 8px 12px; backdrop-filter: blur(4px);
}
@media (max-width: 860px) { .team-gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-gallery { grid-template-columns: 1fr; } }

/* ===== CARD GRID / SERVICES ===== */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--c-line-dark); border: 1px solid var(--c-line-dark); }
.service-card { background: var(--c-carbon); padding: 34px 28px; transition: background .3s var(--ease); }
.service-card:hover { background: var(--c-carbon-2); }
.service-card-wide { grid-column: span 2; }
.service-icon { color: var(--c-accent); margin-bottom: 1.2rem; }
.service-card p { color: var(--c-steel-light); font-size: .92rem; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } .service-card-wide { grid-column: span 2; } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } .service-card-wide { grid-column: span 1; } }

/* ===== SECTORES ===== */
.sector-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.sector-num { font-family: var(--font-display); font-size: .85rem; color: var(--c-accent); font-weight: 600; }
.sector-item h3 { margin-top: .5rem; }
.sector-item p { color: var(--c-steel); font-size: .92rem; }
@media (max-width: 860px) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .sector-grid { grid-template-columns: 1fr; } }

/* ===== PROJECTS ===== */
.filter-bar { display: flex; gap: 10px; margin-bottom: 2.4rem; flex-wrap: wrap; }
.filter-btn {
  padding: 9px 20px; border: 1px solid var(--c-line-dark); border-radius: 999px;
  font-size: .85rem; color: var(--c-white-2); transition: all .25s var(--ease);
}
.filter-btn:hover { border-color: var(--c-accent); }
.filter-btn.is-active { background: var(--c-accent); color: #14100A; border-color: var(--c-accent); }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project-card { cursor: pointer; transition: transform .3s var(--ease); }
.project-card:hover { transform: translateY(-6px); }
.project-photo { min-height: 240px; }
.project-info { padding-top: 16px; }
.tag {
  display: inline-block; font-family: var(--font-display); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-accent); border: 1px solid rgba(255,121,0,.4); border-radius: 999px; padding: 4px 12px; margin-bottom: .7rem;
}
.project-loc { color: var(--c-steel-light); font-size: .9rem; }
.section-light .project-loc, .section-light .tag { color: var(--c-steel); }
.project-card[data-cat] { display: block; }
.project-card.is-hidden { display: none; }
.portfolio-note { margin-top: 2.6rem; color: var(--c-steel-light); font-size: .9rem; }
.portfolio-note a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }

/* ===== TIMELINE ===== */
.timeline { display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 28px; padding: 26px 0; border-top: 1px solid var(--c-line-light); align-items: baseline; }
.timeline li:last-child { border-bottom: 1px solid var(--c-line-light); }
.tl-num { font-family: var(--font-display); font-size: 1.3rem; color: var(--c-accent); font-weight: 600; min-width: 3ch; }
.timeline p { color: var(--c-steel); font-size: .92rem; }

/* ===== DIFERENCIADORES / FACTS ===== */
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; margin-bottom: 4rem; }
.diff-item { border-top: 1px solid var(--c-line-dark); padding-top: 20px; }
.diff-item p { color: var(--c-steel-light); font-size: .92rem; }
@media (max-width: 860px) { .diff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .diff-grid { grid-template-columns: 1fr; } }

.fact-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--c-line-dark); padding-top: 32px; }
.fact strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--c-white); margin-bottom: 6px; }
.fact span { font-size: .8rem; color: var(--c-steel-light); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) { .fact-strip { grid-template-columns: repeat(2, 1fr); } }

/* ===== COMPROMISO ===== */
.commit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.commit-item { border: 1px solid var(--c-line-light); padding: 26px; }
.commit-item p { color: var(--c-steel); font-size: .9rem; }
@media (max-width: 860px) { .commit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .commit-grid { grid-template-columns: 1fr; } }

/* ===== CTA BAND ===== */
.cta-band { position: relative; padding: clamp(80px, 12vw, 140px) 0; color: var(--c-white); overflow: hidden; }
.cta-bg { position: absolute; inset: 0; min-height: 100%; }
.cta-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(11,13,16,.88), rgba(11,13,16,.7)); }
.cta-content { position: relative; z-index: 2; max-width: 640px; }
.cta-content h2 { margin-bottom: 1rem; }
.cta-content p { color: var(--c-white-2); margin-bottom: 2rem; font-size: 1.05rem; }

/* ===== FORM ===== */
.quote-form { display: flex; flex-direction: column; gap: 16px; margin-top: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.quote-form label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--c-white-2); font-weight: 500; }
.quote-form input, .quote-form select, .quote-form textarea {
  background: var(--c-carbon-2); border: 1px solid var(--c-line-dark); color: var(--c-white);
  padding: 12px 14px; border-radius: 2px; transition: border-color .2s;
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { outline: none; border-color: var(--c-accent); }
.form-note { font-size: .78rem; color: var(--c-steel-light); }

.contact-card { background: var(--c-carbon-2); border: 1px solid var(--c-line-dark); padding: 32px; margin-top: 2rem; color: var(--c-white); }
.contact-card h3 { color: var(--c-white); }
.contact-list li { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--c-line-dark); }
.contact-list li:last-child { border-bottom: none; }
.contact-list span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-steel-light); }
.contact-list a, .contact-list address { font-style: normal; font-size: 1rem; }
.contact-list a:hover { color: var(--c-accent); }
.social-links { display: flex; gap: 14px; }
.social-links a { font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.social-links a:hover { color: var(--c-accent); }

.map-embed { margin-top: 20px; border: 1px solid var(--c-line-dark); }
.map-embed iframe { width: 100%; height: 240px; border: 0; filter: grayscale(.3) contrast(1.05); }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.is-open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,13,16,.86); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; z-index: 2; max-width: 720px; margin: 6vh auto; background: var(--c-carbon-2);
  border: 1px solid var(--c-line-dark); max-height: 88vh; overflow-y: auto;
}
.modal-close { position: absolute; top: 14px; right: 18px; font-size: 1.8rem; color: var(--c-white); z-index: 3; line-height: 1; }
.modal-photo { min-height: 300px; }
.modal-body { padding: 32px; color: var(--c-white); }
.modal-body p:last-child { color: var(--c-steel-light); font-size: .95rem; }

/* ===== FLOATING CONTACT BUTTONS ===== */
.float-stack {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.call-float, .wa-float {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: transform .25s var(--ease);
}
.call-float { background: var(--c-accent); color: #14100A; }
.wa-float { background: #25D366; color: #fff; }
.call-float:hover, .wa-float:hover { transform: scale(1.08); }

/* ===== FOOTER ===== */
.site-footer { background: var(--c-carbon); color: var(--c-white-2); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--c-line-dark); }
.footer-brand p { font-size: .88rem; color: var(--c-steel-light); margin: 14px 0 18px; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-white); margin-bottom: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.footer-col a:hover { color: var(--c-accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 24px 0; font-size: .78rem; color: var(--c-steel-light); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
