/* ============================================================
   DIAR-Tech — Híbrido Bold: hero oscuro + secciones claras
   ============================================================ */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --slate-bg: #0b1322;
  --slate-soft: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: #67e8f9;
  --cyan-deep: #0e7490;
  --light: #f7f9fb;
  --line: #e2e8f0;
  --txt: #334155;
  --wa: #25d366;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: var(--font-body); color: var(--txt); background: var(--light); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--cyan-deep); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; }
h2 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -0.5px; }
h2.on-dark { color: #fff; }
.mono { font-family: var(--font-mono); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

/* ---------- Reveal on scroll (solo si hay JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(11, 19, 34, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(103, 232, 249, .08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: 1.5px; color: #fff; }
.brand i { font-style: normal; color: var(--cyan); }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { color: #cbd5e1; text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .15s; }
.main-nav a:hover { color: var(--cyan-soft); }
.main-nav .nav-cta {
  border: 1px solid var(--cyan); color: var(--cyan-soft);
  padding: 7px 18px; border-radius: 8px; transition: background .15s, color .15s;
}
.main-nav .nav-cta:hover { background: var(--cyan); color: var(--ink); }
.lang-switch {
  font-family: var(--font-mono); font-size: 13px !important;
  border: 1px solid #334155; padding: 6px 12px; border-radius: 6px;
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0b1322 0%, #0f172a 55%, #0e2233 100%);
  padding: 170px 0 120px; color: #e2e8f0;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(103, 232, 249, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .32; pointer-events: none; }
.glow-a { width: 560px; height: 560px; background: var(--cyan-deep); top: -200px; right: -140px; }
.glow-b { width: 420px; height: 420px; background: #155e75; bottom: -180px; left: -120px; }
.hero-mark {
  position: absolute; right: -60px; top: 50%; transform: translateY(-52%);
  width: 480px; opacity: .07; pointer-events: none; user-select: none;
}
.hero-inner { position: relative; max-width: 760px; }
.kicker {
  font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--cyan-soft); margin-bottom: 22px;
}
.kicker.dark { color: var(--cyan-deep); }
.blink { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 {
  color: #fff; font-size: clamp(36px, 6vw, 62px); font-weight: 800; letter-spacing: -1px;
  animation: rise .8s ease both .1s;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--cyan-soft), var(--cyan) 55%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin-top: 24px; font-size: clamp(16px, 2vw, 19px); color: #b6c2d4; max-width: 600px;
  animation: rise .8s ease both .25s;
}
.hero-ctas { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; animation: rise .8s ease both .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 15.5px;
  padding: 15px 28px; border-radius: 10px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(92deg, var(--cyan), #22a8c8);
  color: #04222b; box-shadow: 0 8px 28px rgba(6, 182, 212, .35);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(6, 182, 212, .5); filter: brightness(1.05); }
.btn-wa { background: rgba(37, 211, 102, .12); border: 1px solid rgba(37, 211, 102, .55); color: #6ee7a0; }
.btn-wa:hover { background: rgba(37, 211, 102, .22); }

/* ---------- Secciones genéricas ---------- */
.section { padding: 100px 0; }
.section.light { background: var(--light); }
.section.light:nth-of-type(odd) { background: #fff; }
.section-sub { margin: 14px 0 0; font-size: 17px; color: #64748b; max-width: 560px; }

/* ---------- Servicios ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; }
.svc-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 28px 30px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.svc-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent 70%);
  opacity: 0; transition: opacity .2s;
}
.svc-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(15, 23, 42, .1); border-color: rgba(6, 182, 212, .45); }
.svc-card:hover::before { opacity: 1; }
.svc-num {
  position: absolute; top: 22px; right: 24px; font-size: 13px; color: #cbd5e1;
}
.svc-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, .12), rgba(6, 182, 212, .04));
  color: var(--cyan-deep); margin-bottom: 22px;
}
.svc-card h3 { font-size: 20px; margin-bottom: 12px; }
.svc-card p { font-size: 15px; color: #5b6b7f; }

/* ---------- Proceso / La brecha ---------- */
.gap-section { position: relative; overflow: hidden; background: linear-gradient(165deg, #0b1322, #102036); color: #b6c2d4; }
.gap-section .hero-grid { mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 70%); }
.gap-section .container { position: relative; }
.gap-intro { margin-top: 26px; font-size: clamp(16px, 2vw, 18.5px); max-width: 800px; }
.gap-intro strong { color: var(--cyan-soft); font-weight: 700; }
.gap-bridge { margin: 38px 0 10px; }
.gap-bridge span {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  font-size: clamp(24px, 3.6vw, 36px); letter-spacing: -0.5px;
  background: linear-gradient(transparent 62%, rgba(6, 182, 212, .35) 62%);
  padding: 0 6px;
}
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; counter-reset: step; }
.steps li {
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(103, 232, 249, .14);
  border-radius: 16px; padding: 30px 26px; backdrop-filter: blur(4px);
  transition: border-color .2s, background .2s, transform .2s;
}
.steps li:hover { border-color: rgba(6, 182, 212, .5); background: rgba(6, 182, 212, .06); transform: translateY(-4px); }
.step-num { font-size: 14px; color: var(--cyan); letter-spacing: 1px; }
.steps h3 { color: #fff; font-size: 19px; margin: 14px 0 10px; }
.steps p { font-size: 14.5px; color: #9fb0c3; }

/* ---------- Casos ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 52px; }
.case-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px 30px;
  position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.case-card::after {
  content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, .1), transparent 70%);
  bottom: -60px; right: -50px; transition: transform .25s;
}
.case-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(15, 23, 42, .1); border-color: rgba(6, 182, 212, .4); }
.case-card:hover::after { transform: scale(1.6); }
.case-tag {
  display: inline-block; font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--cyan-deep); background: rgba(6, 182, 212, .09);
  border: 1px solid rgba(6, 182, 212, .25); padding: 5px 12px; border-radius: 99px; margin-bottom: 18px;
}
.case-card h3 { font-size: 19.5px; margin-bottom: 10px; }
.case-card p { font-size: 14.8px; color: #5b6b7f; }

/* ---------- Equipo ---------- */
.team-section { background: #fff; }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px; margin-top: 56px; max-width: 880px; }
.member { text-align: center; }
.flip { width: 210px; height: 210px; margin: 0 auto; perspective: 900px; cursor: pointer; outline-offset: 4px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2, .7, .3, 1); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 50%; overflow: hidden; border: 3px solid rgba(6, 182, 212, .5);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .16);
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; }
.flip-back { transform: rotateY(180deg); }
.avatar {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(150deg, #0f172a, #134e5e); color: var(--cyan-soft);
}
.avatar span { font-family: var(--font-display); font-weight: 800; font-size: 58px; letter-spacing: 2px; }
.avatar-ring { position: absolute; inset: 6px; color: rgba(103, 232, 249, .5); animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-light { background: linear-gradient(150deg, #e0f2fe, #cffafe); color: var(--cyan-deep); }
.flip-hint { font-size: 11px; color: #94a3b8; margin: 14px 0 18px; letter-spacing: 1px; text-transform: uppercase; }
.member h3 { font-size: 21px; }
.member-role { font-size: 12.5px; color: var(--cyan-deep); letter-spacing: 1px; text-transform: uppercase; margin: 8px 0 14px; }
.member-bio { font-size: 14.8px; color: #5b6b7f; max-width: 380px; margin: 0 auto; }
.member-links { display: flex; justify-content: center; gap: 16px; margin-top: 18px; }
.member-links a {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700;
  color: var(--ink-2); text-decoration: none; border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 8px; transition: border-color .15s, color .15s, transform .15s;
}
.member-links a:hover { border-color: var(--cyan); color: var(--cyan-deep); transform: translateY(-2px); }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 44px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink);
  padding: 22px 4px; transition: color .15s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--cyan-deep); }
.faq-icon { position: relative; width: 18px; height: 18px; flex: none; }
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; background: var(--cyan); border-radius: 2px; transition: transform .25s;
}
.faq-icon::before { width: 18px; height: 2.5px; top: 8px; }
.faq-icon::after { width: 2.5px; height: 18px; left: 8px; }
details[open] .faq-icon::after { transform: scaleY(0); }
.faq-list details p { padding: 0 4px 24px; font-size: 15.2px; color: #5b6b7f; max-width: 700px; }

/* ---------- Contacto ---------- */
.contact-section { position: relative; overflow: hidden; background: linear-gradient(160deg, #0b1322 10%, #0f172a 60%, #0e2233); }
.contact-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-copy .contact-sub { margin-top: 20px; color: #b6c2d4; font-size: 16.5px; }
.contact-direct { margin-top: 36px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan-soft); }
.contact-channels { list-style: none; margin-top: 14px; }
.contact-channels li { margin: 10px 0; }
.contact-channels a { color: #e2e8f0; text-decoration: none; font-size: 16px; border-bottom: 1px solid rgba(103, 232, 249, .3); transition: color .15s, border-color .15s; }
.contact-channels a:hover { color: var(--cyan-soft); border-color: var(--cyan); }
.contact-form {
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(103, 232, 249, .16);
  border-radius: 18px; padding: 36px 32px; backdrop-filter: blur(8px);
}
.contact-form label { display: block; margin-bottom: 18px; }
.contact-form label span { display: block; font-size: 13px; font-weight: 700; color: #cbd5e1; margin-bottom: 7px; letter-spacing: .3px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: rgba(11, 19, 34, .6); border: 1px solid #2c3e54; border-radius: 9px;
  color: #fff; font-family: var(--font-body); font-size: 15px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, .18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .btn { width: 100%; justify-content: center; margin-top: 6px; }
.form-status { margin-top: 14px; font-size: 14.5px; min-height: 22px; }
.form-status.ok { color: #6ee7a0; }
.form-status.error { color: #fda4af; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #070d18; padding: 56px 0; border-top: 1px solid rgba(103, 232, 249, .08); }
.footer-inner { text-align: center; }
.footer-logo { width: 110px; margin: 0 auto 18px; opacity: .9; }
.site-footer .mono { color: var(--slate-soft); font-size: 13.5px; }
.footer-meta { margin-top: 14px; color: #475569; font-size: 13px; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .45);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, .5); animation: wa-pulse 2.2s ease-out infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(.9); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}
.wa-tooltip {
  position: absolute; right: 72px; white-space: nowrap;
  background: #0f172a; color: #e2e8f0; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(103, 232, 249, .25);
  opacity: 0; transform: translateX(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.wa-float:hover .wa-tooltip { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .cards-3, .steps { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-mark { width: 360px; right: -120px; opacity: .05; }
}
@media (max-width: 680px) {
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 88px; }
  .cards-3, .steps, .cases-grid, .team-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: 68px; right: 0; left: 0; flex-direction: column; align-items: stretch;
    background: rgba(11, 19, 34, .97); padding: 18px 24px 26px; gap: 4px;
    transform: translateY(-130%); transition: transform .25s ease; border-bottom: 1px solid rgba(103, 232, 249, .12);
  }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 12px 4px; font-size: 16px; }
  .main-nav .nav-cta { text-align: center; margin-top: 8px; }
  .lang-switch { text-align: center; }
  .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); }
}
