/* ===========================================================
   Grupo Sandstorm GAM — Design system
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-red: #9B1C24;
  --color-red-dark: #7E161D;
  --color-black: #1C1C1C;
  --color-black-soft: #232323;
  --color-cream: #FAF9F7;
  --color-white: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #6B6B6B;
  --color-border: #E4E1DC;

  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container-max: 1200px;
  --space-section: clamp(60px, 8vw, 120px);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 14px;
}
.eyebrow--light { color: rgba(255,255,255,0.75); }

h1, h2, h3 { line-height: 1.15; font-weight: 800; margin: 0 0 16px; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
p { margin: 0 0 16px; color: var(--color-text-muted); }
p:last-child { margin-bottom: 0; }

section { padding: var(--space-section) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 2px;
  border: 1px solid currentColor;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-outline-dark { color: var(--color-text); border-color: var(--color-text); }
.btn-outline-dark:hover { background: var(--color-text); color: var(--color-white); }
.btn-outline-light { color: var(--color-white); border-color: var(--color-white); }
.btn-outline-light:hover { background: var(--color-white); color: var(--color-black); }
.btn-solid { background: var(--color-black); color: var(--color-white); border-color: var(--color-black); }
.btn-solid:hover { background: var(--color-red); border-color: var(--color-red); }
.btn-arrow::after { content: "\2197"; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: 42px; width: auto; display: block; }
.main-nav ul { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.main-nav a:hover { color: var(--color-red); }
.main-nav a.nav-contact {
  border: 1px solid var(--color-text);
  padding: 10px 20px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.main-nav a.nav-contact:hover { background: var(--color-black); color: var(--color-white); border-color: var(--color-black); }
.main-nav a.active { color: var(--color-red); }

.nav-toggle { display: none; }

/* dark header variant (FAQ pages) */
.site-header--dark { background: var(--color-black); border-color: rgba(255,255,255,0.1); }
.site-header--dark .main-nav a { color: rgba(255,255,255,0.85); }
.site-header--dark .main-nav a.nav-contact { border-color: var(--color-white); color: var(--color-white); }
.site-header--dark .main-nav a.nav-contact:hover { background: var(--color-white); color: var(--color-black); }

/* ---------- Image placeholders ----------
   Real photography should replace these; kept as CSS
   gradients tuned to the tone of each source photo. */
.ph {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 6px);
}
.ph-bw     { background: linear-gradient(160deg, #4a4a4a, #1a1a1a 60%, #060606); }
.ph-bw-2   { background: linear-gradient(160deg, #5c5c5c, #2b2b2b 55%, #0d0d0d); }
.ph-concrete { background: linear-gradient(160deg, #b9b3a8, #8d867a 55%, #57524a); }
.ph-site   { background: linear-gradient(160deg, #7b8a94, #3f4a52 55%, #1c2226); }
.ph-rebar  { background: linear-gradient(160deg, #8a7f6f, #4a4038 55%, #241f1a); }
.ph-survey { background: linear-gradient(160deg, #9aa79a, #4d5a4d 55%, #21281f); }
.ph-air    { background: linear-gradient(160deg, #8fa3ad, #40525a 55%, #182126); }

/* ---------- Real photography ---------- */
.bg-hero-home            { background-image: url('../assets/img/hero-home.jpg'); }
.bg-about                { background-image: url('../assets/img/about-concrete.jpg'); }
.bg-pillar-geotecnia     { background-image: url('../assets/img/pillar-geotecnia.jpg'); }
.bg-pillar-construccion  { background-image: url('../assets/img/pillar-construccion.jpg'); }
.bg-pillar-calidad       { background-image: url('../assets/img/pillar-calidad.jpg'); }
.bg-project-gap          { background-image: url('../assets/img/project-gap-aeropuertos.jpg'); }
.bg-project-oracle       { background-image: url('../assets/img/project-oracle.jpg'); }
.bg-project-central-park { background-image: url('../assets/img/project-central-park.jpg'); }
.bg-project-andares      { background-image: url('../assets/img/project-plaza-andares.jpg'); }
.bg-project-akron        { background-image: url('../assets/img/project-estadio-akron.jpg'); }
.bg-project-landmark     { background-image: url('../assets/img/project-landmark.jpg'); }
.bg-project-riu          { background-image: url('../assets/img/project-riu.jpg'); }
.bg-texture-stock        { background-image: url('../assets/img/texture-stock.jpg'); }
.bg-process-drilling     { background-image: url('../assets/img/process-drilling.jpg'); }

/* ---------- Photo hover zoom ----------
   Frame = fixed-size container with overflow:hidden.
   Inside it, .photo-img carries the actual background-image and
   scales up smoothly on hover without affecting overlaid text. */
.photo-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pillar-image:hover .photo-img,
.about-image:hover .photo-img,
.service-row-image:hover .photo-img,
.project-card:hover .photo-img,
.process-image:hover .photo-img {
  transform: scale(1.08);
}

/* ---------- Hero (page-level) ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  color: var(--color-white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero:hover .hero-bg {
  transform: scale(1.08);
}
.hero-bg--grayscale { filter: grayscale(1); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.35) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 48px 0;
  width: 100%;
}
.hero .hero-logo {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  width: 150px;
  height: auto;
}
.hero-title-1 { font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; margin-bottom: 6px; color: var(--color-white); }
.hero-title-2 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; max-width: 720px; color: var(--color-white); margin-bottom: 0; }
.hero-service-title { font-size: clamp(40px, 7vw, 84px); font-weight: 800; letter-spacing: -0.01em; color: var(--color-white); }

/* ---------- Text hero (no image) ---------- */
.text-hero { padding-top: var(--space-section); }
.text-hero p { max-width: 640px; font-size: 17px; }

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.section-head--dark { border-color: rgba(255,255,255,0.12); }
.section-head p { max-width: 560px; margin: 8px 0 0; }
.section-head h2 { margin: 0; }

/* ---------- Portfolio cards ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  position: relative;
  height: 340px;
  border-radius: 2px;
  color: var(--color-white);
  overflow: hidden;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0) 55%);
}
.project-card-label {
  position: absolute;
  left: 20px;
  bottom: 18px;
  right: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}
.project-card-label .arrow { opacity: 0.85; }

/* ---------- Pillars (dark section) ---------- */
.section-dark {
  background: var(--color-black);
  color: var(--color-white);
}
.section-dark p { color: rgba(255,255,255,0.65); }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar-card { display: flex; flex-direction: column; }
.pillar-image { position: relative; overflow: hidden; height: 220px; margin-bottom: 24px; }
.pillar-card h3 { color: var(--color-white); }
.pillar-card .btn { margin-top: 20px; align-self: flex-start; }

/* ---------- About split ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.about-image {
  position: relative;
  height: 420px;
}
.about-image-frame {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  overflow: hidden;
}
.about-badge {
  position: absolute;
  z-index: 2;
  right: -28px;
  bottom: -28px;
  background: var(--color-black);
  color: var(--color-white);
  padding: 18px 22px;
  font-weight: 800;
  font-size: 15px;
  max-width: 220px;
  line-height: 1.3;
  border-left: 4px solid var(--color-red);
}

/* ---------- Stats band ---------- */
.stats-band {
  position: relative;
  color: var(--color-white);
  padding: 0;
}
.stats-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
}
.stats-band .container {
  position: relative;
  z-index: 1;
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stat-item.in-view {
  opacity: 1;
  transform: translateY(0);
}
.stat-number {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

/* ---------- Process list ---------- */
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.process-image { height: 460px; border-radius: 2px; position: sticky; top: 110px; overflow: hidden; }
.process-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--color-border);
}
.process-list--light li { border-bottom-color: var(--color-border); }
.section-dark .process-list li { border-bottom-color: rgba(255,255,255,0.12); }
.process-list li:first-child { padding-top: 0; }
.process-list li:last-child { border-bottom: none; padding-bottom: 0; }
.process-num { font-size: 20px; font-weight: 800; color: var(--color-red); }
.process-item h3 { margin-bottom: 8px; }
.process-item p { margin: 0; font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-black-soft);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-section) 0;
}
.cta-band h2 { max-width: 720px; margin: 0 auto 32px; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-red);
  color: var(--color-white);
  padding: 72px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.footer-logo { height: 80px; width: auto; display: block; margin-bottom: 24px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; font-weight: 700; }
.footer-col a, .footer-col p { color: rgba(255,255,255,0.85); font-size: 14px; margin: 0; }
.social-row { display: flex; gap: 12px; }
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.footer-bottom { padding-top: 32px; text-align: center; }
.footer-phone { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 8px; }
.footer-office { font-size: 14px; opacity: 0.85; margin-bottom: 6px; }
.footer-cities { font-size: 13px; opacity: 0.75; }
.footer-cities span { margin: 0 6px; }

/* ---------- Services list (overview page) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
}
.service-row:nth-child(even) { background: var(--color-white); }
.service-row-image { position: relative; overflow: hidden; height: 380px; border-radius: 2px; }
.service-num { color: var(--color-red); font-weight: 800; font-size: 15px; margin-bottom: 12px; display: block; }
.service-caps { margin-top: 20px; }
.service-caps-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 14px; display: block; }
.service-caps ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.service-caps li { font-size: 14px; font-weight: 600; color: var(--color-text); }
.service-row .btn { margin-top: 24px; }

/* ---------- Capabilities grid (service detail pages) ---------- */
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 48px;
}
.capabilities-grid li {
  font-weight: 700;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
}
.capabilities-grid li .cap-num { color: var(--color-red); margin-right: 10px; }

/* ---------- Projects gallery ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.projects-grid .project-card { height: 300px; }
.project-card--cta {
  background: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.contact-info dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 28px 0 8px;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 0; font-size: 16px; font-weight: 600; }

.form-panel { background: var(--color-white); border: 1px solid var(--color-border); padding: 48px; border-radius: 2px; }
.step-indicator { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.step-indicator .step.active { color: var(--color-red); }
.step-indicator .line { flex: 1; height: 1px; background: var(--color-border); position: relative; max-width: 60px; }
.step-indicator .line.filled { background: var(--color-red); }

.field-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 16px; }
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; }
.chip {
  border: 1px solid var(--color-border);
  padding: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  background: transparent;
}
.chip.selected, .chip:hover { border-color: var(--color-red); color: var(--color-red); }

textarea.form-textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  min-height: 90px;
  background: transparent;
  margin-bottom: 32px;
}
textarea.form-textarea:focus, .line-input:focus { outline: none; border-color: var(--color-red); }

.line-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.line-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
  font-family: inherit;
  font-size: 15px;
  background: transparent;
}
.form-step { display: none; }
.form-step.active { display: block; }

.confirmation { text-align: center; padding: 60px 0; }
.confirmation h2 { color: var(--color-red); }
.confirmation .note { font-style: italic; margin-top: 20px; font-size: 14px; }

/* ---------- FAQ page ---------- */
.faq-section { padding-top: 56px; }
.faq-title { display: flex; align-items: center; gap: 12px; color: var(--color-white); margin-bottom: 48px; }
.faq-title .icon { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.faq-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.faq-sidebar { background: var(--color-white); border-radius: 2px; padding: 8px; }
.faq-sidebar-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); padding: 16px 16px 8px; }
.faq-sidebar button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  color: var(--color-text);
}
.faq-sidebar button.active { background: var(--color-red); color: var(--color-white); }
.faq-cards { display: grid; gap: 20px; }
.faq-card { display: none; background: var(--color-white); padding: 32px; border-radius: 2px; }
.faq-card.active { display: grid; gap: 20px; }
.faq-q { color: var(--color-red); font-weight: 800; font-size: 17px; }
.faq-a { font-size: 15px; color: var(--color-text); }
.faq-a ul { margin-top: 8px; }
.faq-a li { position: relative; padding-left: 14px; margin-bottom: 4px; }
.faq-a li::before { content: "-"; position: absolute; left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav ul { gap: 18px; }
  .main-nav a { font-size: 13px; }
  .pillars-grid, .portfolio-grid, .projects-grid { grid-template-columns: 1fr; }
  .about-grid, .process-grid, .service-row, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .process-image { position: static; height: 300px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .faq-layout { grid-template-columns: 1fr; }
  .capabilities-grid, .service-caps ul, .chip-grid, .line-fields { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
}
@media (max-width: 640px) {
  .site-header .container { height: 68px; }
  .main-nav ul { gap: 12px; }
  .main-nav a:not(.nav-contact) { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .form-panel { padding: 28px; }
}
