/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --navy:    #1a2a3a;
  --navy-d:  #0f1b26;
  --navy-l:  #243547;
  --sage:    #8aaa94;
  --sage-d:  #5e8068;
  --white:   #f0f4f8;
  --muted:   #7a8fa0;
  --border:  rgba(138,170,148,.18);
  --glow:    rgba(138,170,148,.12);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--navy-d);
  color: var(--white);
  font-family: 'Lora', Georgia, serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .4;
}

/* ─── NAV ────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: rgba(15,27,38,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo img { height: 42px; }
.nav-logo span {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700; font-size: 1.15rem;
  color: var(--white); letter-spacing: .06em;
}

.nav-links {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; font-weight: 400;
  letter-spacing: .06em;
  padding: 6px 14px; border-radius: 4px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--white); background: var(--glow); }

.nav-cta {
  background: var(--sage) !important;
  color: var(--navy-d) !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--sage-d) !important; }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: transparent; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all .3s;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed; top: 64px; left: 0; width: 100%;
  background: rgba(15,27,38,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  z-index: 190;
  padding: 16px 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  transition: color .2s, background .2s;
}
.mobile-menu a:hover { color: var(--white); background: var(--glow); }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}
.hero::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138,170,148,.08) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(138,170,148,.1);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--sage);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 32px;
  position: relative; z-index:1;
  animation: fadeUp .8s ease both;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--sage);
  animation: pulse 2s ease infinite;
}

.hero-logo {
  width: 150px; margin-bottom: 28px;
  position: relative; z-index:1;
  animation: fadeUp .8s .1s ease both;
}

.hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 2.8vw, 2.9rem);
  line-height: 1.2; letter-spacing: -.01em;
  position: relative; z-index:1;
  animation: fadeUp .8s .2s ease both;
}
.hero h1 em { font-style: italic; color: var(--sage); }

.hero-sub {
  max-width: 640px; margin: 24px auto 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem; color: var(--muted); line-height: 1.8;
  position: relative; z-index:1;
  animation: fadeUp .8s .3s ease both;
}

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 40px;
  position: relative; z-index:1;
  animation: fadeUp .8s .4s ease both;
}

/* Pills */
.hero-pills {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 48px;
  position: relative; z-index:1;
  animation: fadeUp .8s .5s ease both;
}
.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--sage);
  background: rgba(138,170,148,.08);
  border: 1px solid rgba(138,170,148,.2);
  padding: 6px 14px; border-radius: 100px;
  letter-spacing: .06em;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  background: var(--sage); color: var(--navy-d);
  border: none; padding: 14px 28px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: .82rem; letter-spacing: .04em;
  cursor: pointer; text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--sage-d); transform: translateY(-2px); }

.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); padding: 14px 28px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: .82rem;
  cursor: pointer; text-decoration: none;
  transition: color .2s, border-color .2s, transform .2s;
}
.btn-ghost:hover { color: var(--white); border-color: var(--sage); transform: translateY(-2px); }

/* ─── SECTION COMMONS ────────────────────────────────────── */
section { padding: 100px 48px; }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; color: var(--sage);
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: 16px;
}
.section-label::before {
  content: ''; width: 20px; height: 1px; background: var(--sage);
}

.section-title {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1.2; letter-spacing: -.01em; max-width: 700px;
}

.section-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; color: var(--muted);
  line-height: 1.8; margin-top: 16px; max-width: 600px;
}

/* ─── SERVICES ───────────────────────────────────────────── */
.services {
  background: var(--navy);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.services-header { max-width: 1200px; margin: 0 auto 60px; }

.services-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}

.service-card {
  background: var(--navy); padding: 40px 36px;
  position: relative; overflow: hidden;
  transition: background .3s; cursor: default;
}
.service-card:hover { background: var(--navy-l); }
.service-card::before {
  content: '';
  position: absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, transparent, var(--sage), transparent);
  opacity: 0; transition: opacity .3s;
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 52px; height: 52px;
  background: rgba(138,170,148,.1);
  border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.service-icon.icon-emoji { font-size: 1.5rem; }

.service-card h3 { font-family: 'Lora', Georgia, serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -.01em; }
.service-card p {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; color: var(--muted); line-height: 1.8; margin-bottom: 24px;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: 'JetBrains Mono', monospace; font-size: .65rem;
  color: var(--sage); background: rgba(138,170,148,.08);
  border: 1px solid rgba(138,170,148,.2);
  padding: 3px 10px; border-radius: 4px; letter-spacing: .06em;
}

/* ─── CÓMO TRABAJAMOS ────────────────────────────────────── */
#como-trabajamos { background: var(--navy-d); }
.arquitectura { max-width: 1200px; margin: 0 auto; }

.arch-grid {
  margin-top: 60px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start;
}

/* Value cards */
.arch-values { display: flex; flex-direction: column; gap: 16px; }

.value-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px;
  background: var(--navy); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .2s, background .2s;
}
.value-card:hover { border-color: var(--sage); background: var(--navy-l); }
.value-icon { font-size: 1.4rem; min-width: 32px; }
.value-card h4 { font-family: 'Lora', Georgia, serif; font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.value-card p {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--muted); line-height: 1.7;
}

/* Step list */
.arch-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.arch-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 24px; background: var(--navy);
  border: 1px solid var(--border); border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.arch-item:hover { border-color: var(--sage); background: var(--navy-l); }
.arch-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--sage); padding-top: 2px; min-width: 28px;
}
.arch-item h4 { font-family: 'Lora', Georgia, serif; font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.arch-item p {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--muted);
}

/* ─── NOSOTROS ───────────────────────────────────────────── */
.nosotros { border-top: 1px solid var(--border); background: var(--navy); }
.nosotros-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.nosotros-text .section-title { margin-bottom: 32px; }
.nosotros-text p {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; color: var(--muted); line-height: 1.9; margin-bottom: 16px;
}
.nosotros-text p strong { color: var(--white); }

.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--border);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.stat-card {
  background: var(--navy-d); padding: 32px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  min-height: 130px;
  transition: background .2s;
}
.stat-card:hover { background: var(--navy-l); }
.stat-num {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.2rem; font-weight: 700; color: var(--sage);
  line-height: 1; letter-spacing: -.02em;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; color: var(--muted);
  margin-top: 8px; letter-spacing: .06em; text-transform: uppercase;
}

/* ─── CONTACTO ───────────────────────────────────────────── */
.contacto { border-top: 1px solid var(--border); background: var(--navy-d); }
.contacto-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.contacto-info .section-title { margin-bottom: 24px; }
.contacto-info > p {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; color: var(--muted); line-height: 1.8;
}
.contact-detail {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; color: var(--muted);
}
.contact-detail .icon {
  width: 32px; height: 32px; background: rgba(138,170,148,.1);
  border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}

.trust-badges {
  margin-top: 36px;
  display: flex; flex-direction: column; gap: 10px;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem; color: var(--muted);
}
.trust-item span { color: var(--sage); font-size: 1rem; }

/* Form */
.contact-form-wrap {
  background: var(--navy); border: 1px solid var(--border);
  border-radius: 12px; padding: 40px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; color: var(--sage);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  background: var(--navy-d); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; color: var(--white);
  font-family: 'JetBrains Mono', monospace; font-size: .82rem;
  transition: border-color .2s; outline: none; -webkit-appearance: none;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: #3a5068; }
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: var(--sage); }
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row select option { background: var(--navy-d); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Privacy checkbox */
.privacy-row label { display: flex !important; flex-direction: row; align-items: flex-start; gap: 12px; text-transform: none !important; letter-spacing: 0 !important; font-size: .75rem !important; color: var(--muted) !important; cursor: pointer; }
.privacy-row input[type="checkbox"] { display: none; }
.checkmark {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--navy-d);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
  margin-top: 1px;
}
.privacy-row input[type="checkbox"]:checked + .checkmark {
  background: var(--sage); border-color: var(--sage);
}
.privacy-row input[type="checkbox"]:checked + .checkmark::after {
  content: '✓'; font-size: .7rem; color: var(--navy-d); font-weight: 700;
}
.privacy-link {
  background: none; border: none; color: var(--sage);
  text-decoration: underline; cursor: pointer; font-size: inherit;
  font-family: inherit; padding: 0;
}
.privacy-link:hover { color: var(--white); }

.form-submit {
  width: 100%; background: var(--sage); color: var(--navy-d);
  border: none; padding: 14px 28px; border-radius: 8px;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: .82rem;
  cursor: pointer; margin-top: 8px;
  transition: background .2s, transform .2s;
}
.form-submit:hover { background: var(--sage-d); transform: translateY(-2px); }

.hp { display: none; }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; color: var(--muted);
}
footer .footer-logo img { height: 30px; opacity: .7; }
footer .footer-links { display: flex; gap: 24px; align-items: center; }
footer .footer-links a,
footer .footer-privacy-btn {
  color: var(--muted); text-decoration: none;
  background: none; border: none; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: .7rem;
  transition: color .2s;
}
footer .footer-links a:hover,
footer .footer-privacy-btn:hover { color: var(--sage); }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--navy);
  border: 1px solid var(--border); border-radius: 16px;
  max-width: 640px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  animation: fadeUp .3s ease both;
}
.modal-close {
  position: sticky; top: 0; float: right;
  background: var(--navy-l); border: 1px solid var(--border); border-radius: 50%;
  color: var(--muted); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .8rem;
  margin: 16px 16px 0 0;
  transition: color .2s, background .2s;
  z-index: 1;
}
.modal-close:hover { color: var(--white); background: var(--navy-d); }

.modal-body {
  padding: 32px 40px 40px;
  clear: both;
}
.modal-body h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -.01em; margin-bottom: 4px;
}
.modal-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; color: var(--muted); margin-bottom: 28px;
}
.modal-body h3 {
  font-size: .9rem; font-weight: 700;
  color: var(--sage); margin: 24px 0 8px;
  letter-spacing: .04em; text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.modal-body p {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; color: var(--muted); line-height: 1.8;
}
.modal-body a { color: var(--sage); }
.modal-body a:hover { color: var(--white); }
.modal-accept { margin-top: 32px; }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(1.4); }
}

.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 80px 24px; }
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .arch-grid,
  .nosotros-inner,
  .contacto-inner { grid-template-columns: 1fr; gap: 40px; }
  .form-grid { grid-template-columns: 1fr; }

  footer { flex-direction: column; gap: 16px; text-align: center; }
  footer .footer-links { flex-wrap: wrap; justify-content: center; }

  .modal-body { padding: 24px; }
}

@media (max-width: 500px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-pills { flex-direction: column; align-items: center; }
}
* Fallback: si JS no activa las animaciones, mostrar todo */
@media (prefers-reduced-motion: no-preference) {
  /* intencional vacío */
}

/* Para pruebas locales sin servidor */
.reveal:not(.visible) {
  animation: revealFallback 0.1s 1s forwards;
}

@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}
