/* ==========================================================
   GITECH — styles.css
   Mobile-first. Breakpoints: 768px, 1024px, 1200px y 1400px
   Paleta: verde oscuro de fondo, verde #22E58B y amarillo #FFD60A (del logo)
   Tipografía: Archivo (títulos, como el logo) · IBM Plex Sans (cuerpo) · IBM Plex Mono (detalles)
   ========================================================== */

/* ---------- 1. VARIABLES ---------- */
:root {
  --bg-primary: #070B09;
  --bg-secondary: #0B100D;
  --bg-card: #111815;
  --border: #1C2822;
  --border-light: #2B3F35;
  --text-primary: #EDF7F1;
  --text-muted: #94A59C;
  --accent-green: #22E58B;
  --accent-yellow: #FFD60A;

  --font-title: "Archivo", "Arial Black", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 6px;
  --container: 1840px;
  --nav-h: 64px;

  /* Movimiento: una sola curva y dos duraciones (interfaz 180 ms, entradas 600 ms) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-ui: 180ms;
  --t-enter: 600ms;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg-primary); color: var(--text-primary);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
::selection { background: var(--accent-green); color: var(--bg-primary); }
:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }
section { padding: 56px 0; }
.section-title { font-size: clamp(32px, 6vw, 52px); margin-bottom: 14px; }
.section-sub { color: var(--text-muted); font-size: 17px; max-width: 520px; }
.section-head { margin-bottom: 28px; }
.bars { display: flex; gap: 5px; margin-bottom: 28px; }
.bars i { display: block; height: 4px; border-radius: 2px; background: var(--accent-green); width: 44px; }
.bars i + i { width: 16px; background: var(--accent-yellow); }

/* Enlace para saltar al contenido (solo se ve con el teclado) */
.skip { position: absolute; left: 16px; top: -60px; z-index: 400; padding: 10px 16px; border-radius: var(--radius); background: var(--accent-green); color: var(--bg-primary); font-weight: 600; transition: top var(--t-ui) var(--ease-out); }
.skip:focus { top: 12px; }

/* ---------- 3. BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--t-ui) var(--ease-out), color var(--t-ui) var(--ease-out), border-color var(--t-ui) var(--ease-out);
}
.btn-primary { background: var(--accent-green); color: var(--bg-primary); }
.btn-primary:hover { background: #4CF0A4; }
.btn-ghost { border-color: var(--border-light); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--text-primary); }
.btn-dark { background: var(--bg-primary); color: #fff; }
.btn-dark:hover { background: #000; }
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }

/* ---------- 4. NAVBAR ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  background: rgba(7,11,9,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.navbar.scrolled { background: rgba(7,11,9,.94); border-bottom-color: var(--border); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; }
.logo-word { width: auto; height: 34px; overflow: visible; }
.footer .logo-word { height: 56px; }
.nav-links { display: none; gap: 30px; font-size: 15px; color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-toggle { width: 44px; height: 44px; background: none; border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); cursor: pointer; display: grid; place-items: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; content: ""; }
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }
.nav-links.open {
  display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-primary); border-bottom: 1px solid var(--border); padding: 4px 20px 12px;
}
.nav-links.open a { min-height: 52px; display: flex; align-items: center; font-size: 18px; border-bottom: 1px solid var(--border); }
.nav-links.open a:last-child { border-bottom: 0; }

/* ---------- 5. HERO ---------- */
.hero {
  padding: calc(var(--nav-h) + 56px) 0 56px; min-height: 92vh; min-height: 92svh; display: flex; align-items: center;
  background: var(--bg-primary);
}
.hero h1 { font-size: clamp(42px, 11.5vw, 104px); line-height: .98; letter-spacing: -0.035em; margin-bottom: 26px; }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--accent-green); }
.hero-sub { font-size: 18px; color: var(--text-muted); max-width: 560px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin-bottom: 44px; }
.tech { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); letter-spacing: .02em; }
.tech b { color: var(--accent-green); font-weight: 400; }

.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-visual { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1 / .82; margin: 8px auto 0; }
.frame { position: absolute; height: auto; border-radius: 8px; border: 1px solid var(--border-light); background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.55); object-fit: cover; object-position: top left; }
.f1 { width: 78%; top: 0; right: 0; z-index: 1; animation: rise var(--t-enter) var(--ease-out) .05s both; }
.f2 { width: 56%; left: 0; bottom: 4%; z-index: 2; animation: rise var(--t-enter) var(--ease-out) .2s both; }
.f3 { width: 50%; right: 4%; bottom: 0; z-index: 3; animation: rise var(--t-enter) var(--ease-out) .35s both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
/* Panel sólido detrás de las capturas: da profundidad sin degradados */
.hero-visual::before { content: ""; position: absolute; inset: 8% 0 0 10%; z-index: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; }
.chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border-light); font-family: var(--font-mono); font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); }
.c1 { top: 6%; left: 2%; z-index: 4; animation: rise var(--t-enter) var(--ease-out) .5s both; }
.c2 { top: 44%; left: 0; z-index: 4; animation: rise var(--t-enter) var(--ease-out) .6s both; }
.c3 { top: 30%; right: 0; z-index: 4; animation: rise var(--t-enter) var(--ease-out) .7s both; }
.c2 i { background: var(--accent-yellow); }

/* ---------- 6. SERVICIOS ---------- */
.services, .contact { background: var(--bg-primary); }
.split { display: grid; gap: 28px; }
.svc-list li { display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; padding: 16px 0; border-top: 1px solid var(--border); }
.svc-list li:last-child { border-bottom: 1px solid var(--border); }
.n { font-family: var(--font-mono); font-size: 13px; color: var(--accent-green); padding-top: 6px; }
.svc-list h3 { font-size: 22px; margin-bottom: 4px; letter-spacing: -0.02em; }
.svc-list p { color: var(--text-muted); font-size: 15px; }

/* ---------- 7. PROYECTOS ---------- */
.projects, .more { background: var(--bg-secondary); }
.grid-projects { display: grid; gap: 20px; }
.card-project-link { display: block; }
.card-project { height: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: border-color var(--t-ui) var(--ease-out); }
.card-project:hover { border-color: var(--accent-green); }
.proj-img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--border); margin-bottom: 14px; }
.proj-img.real { aspect-ratio: 3 / 2; object-fit: cover; object-position: top left; background: #fff; }
.proj-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.tag { color: var(--accent-yellow); }
.card-project h3 { font-size: 24px; margin-bottom: 6px; }
.card-project p { color: var(--text-muted); font-size: 15px; }
.proj-more { display: inline-block; margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--accent-green); }

/* ---------- 8. MÁS INFORMACIÓN (plegable) ---------- */
.acc { border-top: 1px solid var(--border); }
.acc:last-child { border-bottom: 1px solid var(--border); }
.acc > summary { list-style: none; cursor: pointer; min-height: 64px; padding: 16px 48px 16px 0; font-family: var(--font-title); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; position: relative; display: flex; align-items: center; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 26px; font-weight: 400; color: var(--accent-green); }
.acc[open] > summary::after { content: "−"; }
.acc[open] > summary { color: var(--accent-green); }
.acc-body { padding: 4px 0 32px; }
.acc-body .grid-pricing { margin: 20px 0 28px; }

.grid-testi { display: grid; gap: 28px; }
.testi blockquote { border-left: 3px solid var(--accent-green); padding-left: 18px; font-size: 18px; line-height: 1.55; margin-bottom: 14px; }
.testi figcaption { padding-left: 21px; font-size: 14px; color: var(--text-muted); }
.testi figcaption b { display: block; color: var(--text-primary); font-weight: 600; }
.testi-ref { margin-top: 34px; color: var(--text-muted); }
.testi-ref a { color: var(--accent-green); font-weight: 600; }

.about-text { color: var(--text-muted); font-size: 18px; margin-bottom: 16px; max-width: 540px; }

.steps { display: grid; gap: 26px; }
.step { border-top: 2px solid var(--border-light); padding-top: 16px; }
.step-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent-green); }
.step h3 { font-size: 24px; margin: 6px 0; }
.step p { color: var(--text-muted); font-size: 16px; }

.grid-pricing { display: grid; margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--radius); }
.price-card { padding: 26px 22px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.price-card:last-child { border-bottom: 0; }
.price-card h3 { font-size: 22px; line-height: 1.2; }
.price-card ul { color: var(--text-muted); font-size: 16px; flex: 1; }
.price-card li { padding: 3px 0; }
.price-alt { font-family: var(--font-mono); font-size: 14px; color: var(--accent-green); }
.pay-note { color: var(--text-muted); margin-bottom: 40px; max-width: 640px; }
.guarantee { border-top: 1px solid var(--border); padding-top: 24px; }
.guarantee h3 { font-size: 26px; margin-bottom: 14px; }
.guarantee ul { display: grid; gap: 12px; }
.guarantee li { color: var(--text-muted); font-size: 16px; padding-left: 26px; position: relative; }
.guarantee li::before { content: "→"; position: absolute; left: 0; color: var(--accent-green); }
.guarantee b { color: var(--text-primary); font-weight: 600; }

.faq details { border-top: 1px solid var(--border); }
.faq details:first-child { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; min-height: 60px; padding: 16px 44px 16px 0; font-weight: 600; font-size: 18px; position: relative; display: flex; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 24px; font-weight: 400; color: var(--accent-green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--text-muted); max-width: 640px; }

/* ---------- 9. CTA ---------- */
.cta { background: var(--accent-green); color: var(--bg-primary); padding: 72px 0; }
.cta h2 { font-size: clamp(34px, 7vw, 68px); margin-bottom: 14px; max-width: 760px; }
.cta p { font-size: 19px; font-weight: 500; margin-bottom: 30px; max-width: 520px; }

/* ---------- 10. CONTACTO ---------- */
.contact-grid { display: grid; gap: 40px; }
.contact h2 { font-size: clamp(42px, 8vw, 76px); margin-bottom: 16px; }
.contact-info > p { color: var(--text-muted); font-size: 18px; margin-bottom: 28px; max-width: 440px; }
.contact-list { display: grid; gap: 16px; }
.contact-list small { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.contact-list a { color: var(--accent-green); font-weight: 600; }
.form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; }
.field label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-primary); font-family: var(--font-body); font-size: 16px; }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #6F8E7E; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-green); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--accent-yellow); }
.form .btn { width: 100%; }
.form-note { font-size: 14px; color: var(--accent-green); min-height: 18px; }
.form-note.error { color: var(--accent-yellow); }
.form-note a { text-decoration: underline; font-weight: 600; }

/* ---------- 11. FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding: 44px 0 28px; }
.footer-grid { display: grid; gap: 24px; margin-bottom: 32px; }
.footer .tagline { color: var(--text-muted); font-size: 15px; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 26px; font-size: 15px; color: var(--text-muted); }
.footer-links a { padding: 8px 0; }
.footer-links a:hover { color: var(--accent-green); }
.copy { font-size: 14px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 22px; }

/* ---------- 12. WHATSAPP FLOTANTE ---------- */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 150;
  width: 56px; height: 56px; border-radius: 50%; background: #0E7C3F; color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out);
}
.wa-float.show { opacity: 1; transform: none; pointer-events: auto; }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- 13. ENTRADA SUAVE (solo si hay JavaScript) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--t-enter) var(--ease-out), transform var(--t-enter) var(--ease-out); }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- 14. PÁGINA DE PROYECTO ---------- */
.proj-page { padding-top: calc(var(--nav-h) + 48px); }
.back { display: inline-block; color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.back:hover { color: var(--accent-green); }
.proj-page h1 { font-size: clamp(42px, 9vw, 84px); margin: 10px 0 14px; }
.proj-page .lead { font-size: 19px; color: var(--text-muted); max-width: 620px; margin-bottom: 34px; }
.proj-page .hero-img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 40px; }
.proj-page .tag { font-family: var(--font-mono); font-size: 13px; }
.feat-list { display: grid; margin-bottom: 36px; border-top: 1px solid var(--border); }
.feat-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.feat-list li::before { content: "→ "; color: var(--accent-green); }

.gallery { display: grid; gap: 22px; margin-bottom: 40px; }
.gallery figure { margin: 0; }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.shot img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.gallery figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-primary); font-size: 26px; line-height: 1; cursor: pointer; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 380px) {
  .nav-right .btn-sm { padding: 8px 12px; font-size: 14px; }
  .logo-word { height: 30px; }
}
@media (min-width: 768px) {
  body { font-size: 16px; }
  section { padding: 80px 0; }
  .container { padding: 0 32px; }
  .nav-toggle { display: none; }
  .nav-links { display: flex; }
  .hero-cta { flex-direction: row; }
  .hero-sub { font-size: 20px; }
  .chip { padding: 7px 14px; font-size: 13px; }
  .c2 { left: -2%; }
  .c3 { right: -2%; }
  .grid-projects { grid-template-columns: repeat(3, 1fr); }
  .grid-testi { grid-template-columns: repeat(3, 1fr); gap: 36px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .grid-pricing { grid-template-columns: repeat(3, 1fr); }
  .price-card { border-bottom: 0; border-right: 1px solid var(--border); }
  .price-card:last-child { border-right: 0; }
  .guarantee ul { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .footer-links { justify-content: flex-end; }
  .cta { padding: 96px 0; }
  .acc > summary { font-size: 26px; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .hero { min-height: 92svh; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; }
  .hero-visual { margin: 0; max-width: none; }
  .hero h1 { font-size: clamp(52px, 5.4vw, 72px); }
}
@media (max-width: 1023px) { .hero { min-height: 0; } }
@media (min-width: 1200px) {
  .container { padding: 0 clamp(40px, 4vw, 80px); }
  .split { grid-template-columns: 340px 1fr; gap: 72px; }
  .split .section-head { position: sticky; top: 100px; align-self: start; }
  .grid-projects { gap: 24px; }
}
@media (min-width: 1400px) { .hero h1 { font-size: clamp(72px, 5vw, 116px); } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .frame, .chip { animation: none; }
}

/* ---------- 15. AJUSTES FINALES ---------- */
html { -webkit-tap-highlight-color: transparent; }
/* La página de proyecto: espacio antes del pie */
.proj-page { padding-bottom: 96px; }
.proj-page .btn { margin-bottom: 8px; }
.swipe-hint { display: none; }

/* Botón flotante de WhatsApp con texto (más claro en celular) */
.wa-float { width: auto; height: 52px; padding: 0 20px 0 16px; border-radius: 999px; gap: 8px; grid-auto-flow: column; font-weight: 600; font-size: 16px; }
.wa-float svg { width: 24px; height: 24px; }

/* ---------- Celular: proyectos en carrusel que se desliza ---------- */
@media (max-width: 767px) {
  .grid-projects { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 -20px; padding: 0 20px 6px; scroll-padding-left: 20px; }
  .grid-projects::-webkit-scrollbar { display: none; }
  .card-project-link { flex: 0 0 82%; scroll-snap-align: start; }
  .js .grid-projects .reveal { opacity: 1; transform: none; }
  .swipe-hint { display: block; margin-top: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
  .hero { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 40px; }
  .hero-sub { margin-bottom: 26px; }
  .hero-cta { margin-bottom: 28px; }
  .hero-grid { gap: 28px; }
  body { padding-bottom: 76px; } /* el botón flotante no tapa el final */
}
