/* ==========================================================================
   C27tech — Hoja de estilos principal
   Paleta: Verde Oliva / Militar · Blanco · Dorado Oscuro
   Mobile-first, CSS3 moderno con variables nativas.
   ========================================================================== */

:root {
  /* Paleta de marca */
  --olive-950: #1c2415;
  --olive-900: #29331f;   /* fondo header/footer, igual al fondo del logo */
  --olive-800: #38452a;
  --olive-700: #4a5a38;
  --olive-600: #5e7047;
  --olive-100: #eef1e6;

  --gold-800: #6e551a;
  --gold-700: #8a6a20;
  --gold-600: #a9822b;    /* dorado oscuro principal */
  --gold-500: #c6a253;
  --gold-300: #e6d2a0;

  --white: #ffffff;
  --cream: #faf8f2;
  --ink: #1c2016;
  --ink-soft: #52584a;
  --border-soft: rgba(169, 130, 43, 0.25);

  /* Tipografía */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --container-w: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-md: 0 10px 30px -12px rgba(28, 36, 21, 0.35);
  --shadow-lg: 0 20px 50px -18px rgba(28, 36, 21, 0.45);
  --header-h: 76px;
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset básico ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; color: var(--olive-900); }
p {
  margin: 0 0 1em;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold-600);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(169, 130, 43, 0.6);
}
.btn-gold:hover { box-shadow: 0 12px 26px -8px rgba(169, 130, 43, 0.75); }
.btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.15); }
.btn-dark {
  background: var(--olive-900);
  color: var(--white);
}
.btn-dark:hover { background: var(--olive-800); }
.btn-lg { padding: 16px 34px; font-size: 1rem; }
.btn-sm { padding: 9px 20px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--header-h);
  z-index: 500;
  background: var(--olive-900);
  border-bottom: 1px solid rgba(230, 210, 160, 0.18);
  box-shadow: 0 4px 18px -10px rgba(0, 0, 0, 0.55);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-header.is-scrolled {
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.4);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 52px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav ul { display: flex; gap: 28px; }
.nav-link {
  color: var(--olive-100);
  font-size: 0.94rem;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold-500);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--gold-300); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { flex-shrink: 0; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  padding: 0;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  margin-inline: auto;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 36, 21, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 490;
}
.nav-overlay.is-visible { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.08);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(28,36,21,0.82) 0%, rgba(28,36,21,0.5) 42%, rgba(28,36,21,0.18) 72%, rgba(28,36,21,0.08) 100%),
    linear-gradient(180deg, rgba(28,36,21,0.35) 0%, rgba(28,36,21,0.08) 38%, rgba(28,36,21,0.15) 65%, rgba(28,36,21,0.8) 100%);
}
.hero-content {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
  max-width: 760px;
}
.eyebrow {
  color: var(--gold-300);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  margin-bottom: 20px;
}
.hero h1 span { color: var(--gold-500); }
.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
}
.scroll-indicator span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: var(--gold-500);
  border-radius: 3px;
  transform: translateX(-50%);
  animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { top: 6px; opacity: 1; }
  70% { top: 22px; opacity: 0; }
  100% { top: 22px; opacity: 0; }
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section { padding: 88px 0; }
.section-alt { background: var(--cream); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-eyebrow {
  color: var(--gold-700);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.section-lead { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 0; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Sobre Nosotros ===== */
.about-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
.about-grid > * { min-width: 0; }
.about-media { position: relative; min-width: 0; }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 9 / 10;
  object-fit: cover;
}
.about-media-badge {
  position: absolute;
  bottom: -20px;
  right: 20px;
  background: var(--olive-900);
  color: var(--white);
  border: 1.5px solid var(--gold-600);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.about-media-badge strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-500); }
.about-media-badge span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--olive-100); }

.about-copy h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.about-copy p { color: var(--ink-soft); }
.check-list { margin: 24px 0 32px; display: flex; flex-direction: column; gap: 14px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--ink);
  font-weight: 500;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: -1px;
  width: 22px; height: 22px;
  background: var(--gold-600);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Servicios ===== */
.services-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
.services-grid > * { min-width: 0; }
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-img { aspect-ratio: 16 / 10; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.service-card:hover .service-img img { transform: scale(1.06); }
.service-body { padding: 28px 26px 32px; }
.service-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--olive-900);
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.service-body h3 { font-size: 1.25rem; margin-bottom: 12px; }
.service-body p { color: var(--ink-soft); font-size: 0.96rem; }
.service-body ul { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.service-body ul li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-left: 20px;
  position: relative;
}
.service-body ul li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 2px;
  background: var(--gold-600);
}

/* ===== Por qué elegirnos ===== */
.why-band { background: var(--olive-900); padding: 64px 0; }
.why-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  text-align: center;
}
.why-grid > * { min-width: 0; }
.why-icon { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.why-item h3 { color: var(--white); font-size: 1.15rem; }
.why-item p { color: rgba(255, 255, 255, 0.72); font-size: 0.94rem; margin: 0; }

/* ===== CTA Banner ===== */
.cta-banner {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  isolation: isolate;
}
.cta-media { position: absolute; inset: 0; z-index: -2; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(28,36,21,0.94), rgba(41,51,31,0.82));
}
.cta-content { text-align: center; max-width: 640px; margin-inline: auto; }
.cta-content h2 { color: var(--white); font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.cta-content p { color: rgba(255, 255, 255, 0.82); margin-bottom: 30px; font-size: 1.05rem; }

/* ===== Contacto ===== */
.contact-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
.contact-grid > * { min-width: 0; }
.contact-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.contact-icon {
  font-size: 1.4rem;
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--olive-900);
  border-radius: 10px;
}
.contact-card h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-card p { margin: 0; color: var(--ink-soft); }
.contact-card a:hover { color: var(--gold-700); }

.map-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16/10;
  width: 100%;
  min-width: 0;
}
.map-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 12px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; margin-top: 14px; margin-bottom: 6px; color: var(--olive-900); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid #e2e0d5;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold-600);
  box-shadow: 0 0 0 3px rgba(169, 130, 43, 0.15);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.consent-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 400 !important;
  color: var(--ink-soft);
}
.consent-check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--gold-600); }
.consent-check a { color: var(--gold-700); text-decoration: underline; }
.contact-form button { margin-top: 22px; }

/* ===== Política de Datos ===== */
.policy-container { max-width: 900px; }
.policy-content h3 {
  font-size: 1.1rem;
  color: var(--olive-900);
  margin-top: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.policy-content h3:first-child { margin-top: 0; }
.policy-content p, .policy-content ul { color: var(--ink-soft); font-size: 0.96rem; }
.policy-content ul { margin: 10px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.policy-content ul li { padding-left: 20px; position: relative; }
.policy-content ul li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 2px;
  background: var(--gold-600);
}
.policy-content a { color: var(--gold-700); text-decoration: underline; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--olive-900); color: var(--olive-100); }
.footer-inner {
  padding: 64px 0 40px;
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
.footer-inner > * { min-width: 0; }
.footer-logo { height: 46px; width: auto; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.92rem; max-width: 320px; }
.social-link {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold-600);
  color: var(--gold-500);
  margin-top: 8px;
  transition: background var(--transition), color var(--transition);
}
.social-link:hover { background: var(--gold-600); color: var(--white); }

.footer-nav h4, .footer-contact h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.footer-nav ul, .footer-contact ul { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a, .footer-contact li {
  display: block;
  color: rgba(255,255,255,0.68);
  font-size: 0.92rem;
  text-align: justify;
  text-align-last: left;
  transition: color var(--transition);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--gold-400, var(--gold-500)); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom-inner {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ==========================================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,0.4);
  z-index: 600;
  animation: pulse 2.6s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.06); }
@keyframes pulse {
  0% { box-shadow: 0 10px 24px -6px rgba(0,0,0,0.4), 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 10px 24px -6px rgba(0,0,0,0.4), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 10px 24px -6px rgba(0,0,0,0.4), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   RESPONSIVE — Tablet (>=768px) y Desktop (>=1024px)
   ========================================================================== */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 0.85fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }

  .menu-toggle { display: none; }
  .main-nav {
    position: static;
    background: none;
    flex-direction: row;
    width: auto;
    height: auto;
    box-shadow: none;
    padding: 0;
  }
}

@media (max-width: 1023px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(320px, 84vw);
    height: calc(100svh - var(--header-h));
    background: var(--olive-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 28px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -12px 0 30px -12px rgba(0,0,0,0.35);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 22px; width: 100%; }
  .nav-cta { width: 100%; text-align: center; }
}

@media (min-width: 1280px) {
  .hero-content { padding-top: calc(var(--header-h) + 60px); }
}
