/* ═══════════════════════════════════════════════════════════
   VELIAN SpA — Estilos principales
   Diseño oscuro intencional: ciberseguridad + tech
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:         #070e1b;
  --bg-mid:     #0b1522;
  --bg-surf:    #0d1a2a;
  --bg-card:    #101f32;
  --bg-card-h:  #132538;

  --teal:       #0dd4e4;
  --blue:       #1a7dc4;
  --teal-glow:  rgba(13, 212, 228, .09);
  --teal-bdr:   rgba(13, 212, 228, .18);

  --text:       #dceaf8;
  --text-b:     #a0bbcf;
  --text-c:     #607a95;
  --text-d:     #354e68;

  --edge:       rgba(255, 255, 255, .065);
  --edge-a:     rgba(13, 212, 228, .16);

  --r:          3px;
  --rl:         8px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── TIPOGRAFÍA ── */
h1, h2, h3 { font-family: 'Syne', sans-serif; text-wrap: balance; }
h1 { font-weight: 800; line-height: 1.04; letter-spacing: -.035em; }
h2 { font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
h3 { font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }

.mono { font-family: 'JetBrains Mono', monospace; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal);
}

/* ── LAYOUT ── */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }

/* ── NAV ── */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 1rem 0;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(7, 14, 27, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--edge);
}
.nav-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem;
}

/* Logo nav (ícono SVG + wordmark) */
.logo-link {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none;
}
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.logo-wm {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1.15rem; letter-spacing: .05em;
  color: var(--text); line-height: 1;
}
.logo-wm small {
  display: block; font-size: .48em;
  letter-spacing: .22em; color: var(--teal);
  font-weight: 500; margin-top: 3px;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-c); text-decoration: none;
  font-size: .875rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem;
  background: var(--teal); color: #07101e;
  text-decoration: none; font-size: .85rem; font-weight: 600;
  border-radius: var(--r);
  transition: opacity .2s, transform .2s;
}
.btn-nav:hover { opacity: .88; transform: translateY(-1px); }

/* ── HERO ── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; opacity: .55;
}
.hero-inner {
  position: relative; z-index: 2;
  padding: 9rem 0 6rem; max-width: 880px;
}
.hero-eye {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 2rem;
}
.hero-eye::before {
  content: ''; display: block;
  width: 2.5rem; height: 1px; background: var(--teal);
}
.hero h1 { font-size: clamp(3rem, 8.5vw, 5.8rem); margin-bottom: 1.5rem; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-b); max-width: 560px;
  margin-bottom: 2.75rem;
  font-weight: 300; line-height: 1.8;
}
.hero-ctas { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .9rem 1.9rem;
  background: var(--teal); color: #07101e;
  text-decoration: none; font-weight: 600; font-size: .95rem;
  border-radius: var(--r);
  transition: opacity .2s, transform .2s, box-shadow .3s;
}
.btn-primary:hover {
  opacity: .9; transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 212, 228, .25);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .9rem 1.9rem;
  color: var(--text-b); text-decoration: none;
  font-weight: 500; font-size: .95rem;
  border-radius: var(--r); border: 1px solid var(--edge);
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--edge-a); }

.hero-metrics {
  display: flex; align-items: flex-start; gap: 3rem; flex-wrap: wrap;
  margin-top: 5rem; padding-top: 2rem;
  border-top: 1px solid var(--edge);
}
.metric-val {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 2.1rem; letter-spacing: -.04em;
  color: var(--text); line-height: 1;
}
.metric-val b { color: var(--teal); }
.metric-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-d);
  margin-top: .4rem;
}

/* ── TICKER ── */
.ticker {
  background: var(--bg-surf);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  padding: .7rem 0; overflow: hidden;
}
.ticker-track { display: flex; width: max-content; animation: roll 32s linear infinite; }
.t-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-d);
  padding: 0 2.25rem; white-space: nowrap;
  display: flex; align-items: center; gap: 1rem;
}
.t-item::after { content: '·'; color: var(--teal); opacity: .5; }
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── SERVICIOS ── */
.services { padding: 7rem 0; }
.sec-hd { margin-bottom: 3.5rem; }
.sec-hd .eyebrow { margin-bottom: .6rem; }
.sec-hd h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); margin-bottom: .65rem; }
.sec-hd p { color: var(--text-b); font-weight: 300; max-width: 480px; }

.svc-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--edge);
  border: 1px solid var(--edge); border-radius: var(--rl); overflow: hidden;
}
.svc-card {
  background: var(--bg-card); padding: 2.25rem 1.9rem;
  transition: background .2s;
}
.svc-card:hover { background: var(--bg-card-h); }
.svc-ico { margin-bottom: 1.4rem; color: var(--teal); }
.svc-ico svg { width: 38px; height: 38px; }
.svc-card h3 { font-size: 1.05rem; margin-bottom: .55rem; }
.svc-card p { font-size: .865rem; color: var(--text-c); font-weight: 300; line-height: 1.72; }

/* ── INDUSTRIAS ── */
.industries {
  padding: 7rem 0;
  background: var(--bg-surf);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}
.ind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.ind-txt h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); margin-bottom: 1rem; }
.ind-txt > p { color: var(--text-b); font-weight: 300; line-height: 1.8; margin-bottom: 2.25rem; }

.ind-list { display: flex; flex-direction: column; gap: .5rem; }
.ind-item {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--edge); border-radius: var(--r);
  transition: border-color .2s, background .2s;
}
.ind-item:hover { border-color: var(--teal-bdr); background: var(--bg-card-h); }
.ind-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem; letter-spacing: .1em;
  color: var(--teal); padding-top: .25rem; flex-shrink: 0;
}
.ind-name {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: .98rem; color: var(--text); margin-bottom: .2rem;
}
.ind-desc { font-size: .845rem; color: var(--text-c); font-weight: 300; }

/* Panel dashboard industrias */
.ind-panel {
  background: var(--bg-card);
  border: 1px solid var(--edge); border-radius: var(--rl);
  overflow: hidden; font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
}
.ind-pbar {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem 1rem;
  background: var(--bg-mid); border-bottom: 1px solid var(--edge);
}
.dd { width: 9px; height: 9px; border-radius: 50%; }
.ind-ptitle { font-size: .62rem; color: var(--text-d); margin: 0 auto; letter-spacing: .08em; }
.ind-pbody { padding: 1.25rem; }
.dash-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .45rem 0; border-bottom: 1px solid var(--edge);
  color: var(--text-c); line-height: 1.4;
}
.dash-row:last-of-type { border-bottom: none; }
.dash-row .dv  { color: var(--text); }
.dash-row .dvg { color: #42c97a; }
.dash-divider  { height: 1px; background: var(--edge); margin: .75rem 0; }
.dash-bar-wrap { margin-top: .75rem; }
.dash-bar-label {
  display: flex; justify-content: space-between;
  color: var(--text-d); margin-bottom: .4rem; font-size: .64rem;
}
.dash-bar-track { height: 3px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.dash-bar-fill  { height: 100%; background: var(--teal); border-radius: 2px; width: 79%; }
.dash-live {
  display: flex; align-items: center; gap: .5rem;
  margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--edge);
}
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: #42c97a; animation: pdot 2s ease-in-out infinite; }
.live-lbl { color: var(--text-d); font-size: .62rem; letter-spacing: .1em; }

/* ── CIBERSEGURIDAD ── */
.cyber { padding: 7rem 0; position: relative; overflow: hidden; }
.cyber::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 55% at 75% 50%, rgba(13,212,228,.05), transparent 70%);
  pointer-events: none;
}
.cyber-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }

.cyber-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .3rem .9rem;
  border: 1px solid var(--teal-bdr); border-radius: 2rem;
  font-family: 'JetBrains Mono', monospace; font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 1.5rem;
}
.cyber-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: pdot 2s ease-in-out infinite; }
.cyber h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); margin-bottom: 1rem; }
.cyber-lead { color: var(--text-b); font-weight: 300; line-height: 1.85; margin-bottom: 1.5rem; }

/* Diferenciadores clave */
.cyber-diff { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.cyber-diff-card {
  padding: 1.1rem 1.25rem 1.1rem 1.4rem;
  border: 1px solid var(--teal-bdr);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--teal-glow);
  transition: background .2s;
}
.cyber-diff-card:hover { background: rgba(13,212,228,.13); }
.cyber-diff-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: .95rem; color: var(--text); margin-bottom: .3rem;
}
.cyber-diff-desc { font-size: .845rem; color: var(--text-c); font-weight: 300; line-height: 1.65; }

.caps { border: 1px solid var(--edge); border-radius: var(--rl); overflow: hidden; }
.cap {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.4rem;
  border-bottom: 1px solid var(--edge);
  transition: background .15s;
}
.cap:last-child { border-bottom: none; }
.cap:hover { background: var(--teal-glow); }
.cap-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); opacity: .7; flex-shrink: 0; }
.cap-text { font-size: .875rem; color: var(--text-c); }

/* Terminal */
.term {
  background: #030a14;
  border: 1px solid var(--edge); border-radius: var(--rl);
  overflow: hidden; font-family: 'JetBrains Mono', monospace;
  font-size: .74rem; line-height: 1.9;
}
.term-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .72rem 1rem;
  background: #060e1c; border-bottom: 1px solid var(--edge);
}
.td2 { width: 9px; height: 9px; border-radius: 50%; }
.term-ttl { font-size: .62rem; color: var(--text-d); margin: 0 auto; letter-spacing: .08em; }
.term-body { padding: 1.4rem 1.5rem; }
.tp  { color: var(--teal); }
.tc  { color: #6a90c0; }
.tm  { color: var(--text-d); }
.to  { color: var(--text-c); }
.ts2 { color: #42c97a; }
.tw  { color: #e8a030; }
.cur {
  display: inline-block; width: 7px;
  background: var(--teal); height: .9em;
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

/* ── NOSOTROS ── */
.about {
  padding: 7rem 0;
  background: var(--bg-surf);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; }
.about h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); }
.about-body p { color: var(--text-b); font-weight: 300; line-height: 1.85; margin-bottom: 1.25rem; }
.pillars {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--edge);
  border: 1px solid var(--edge); border-radius: var(--rl);
  overflow: hidden; margin-top: 2rem;
}
.pillar { background: var(--bg-card); padding: 1.5rem; }
.pillar-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.pillar-desc { font-size: .8rem; color: var(--text-d); }

/* ── FORMULARIO DE CONTACTO ── */
.contact {
  padding: 7rem 0;
  background: var(--bg-surf);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem; align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); margin-bottom: 1rem; }
.contact-info p  { color: var(--text-b); font-weight: 300; line-height: 1.8; margin-bottom: 2rem; }
.contact-detail  { display: flex; flex-direction: column; gap: .75rem; }
.contact-row {
  display: flex; align-items: center; gap: .85rem;
  font-size: .88rem; color: var(--text-c);
}
.contact-row svg  { width: 16px; height: 16px; color: var(--teal); flex-shrink: 0; }
.contact-row a    { color: var(--text-c); text-decoration: none; transition: color .2s; }
.contact-row a:hover { color: var(--teal); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: .45rem; }
.form-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-d);
}
.form-optional {
  font-family: 'DM Sans', sans-serif;
  font-size: .7rem; letter-spacing: 0; text-transform: none;
  color: var(--text-d); opacity: .6;
}
.form-input,
.form-select,
.form-textarea {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--edge); border-radius: var(--r);
  padding: .75rem 1rem; font-size: .9rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s, background .2s;
  width: 100%; outline: none;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--teal-bdr); background: var(--bg-card-h); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-d); }
.form-select { cursor: pointer; color: var(--text); background-image: none; }
.form-select option { background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 2rem; width: 100%;
  background: var(--teal); color: #07101e;
  border: none; border-radius: var(--r);
  font-family: 'DM Sans', sans-serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: opacity .2s, transform .2s, box-shadow .3s;
}
.btn-submit:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13,212,228,.25); }
.form-success {
  display: none; text-align: center; padding: 2.5rem;
  border: 1px solid var(--teal-bdr); border-radius: var(--rl);
  background: var(--teal-glow);
}
.form-success.show { display: block; }
.form-success-icon { font-size: 2rem; margin-bottom: .75rem; }
.form-success h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.form-success p  { font-size: .9rem; color: var(--text-b); font-weight: 300; }

/* ── FOOTER ── */
footer { background: var(--bg-mid); border-top: 1px solid var(--edge); }

/* Franja del logo */
.foot-logo-strip {
  display: flex; flex-direction: column; align-items: center;
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--edge);
  gap: 1.25rem;
}
.foot-logo-img {
  height: 130px; width: auto;
  display: block; object-fit: contain;
}
.foot-logo-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-d);
}

/* Info de contacto */
.foot-contact {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; padding: 2.25rem 0;
  border-bottom: 1px solid var(--edge);
}
.foot-contact-item { display: flex; flex-direction: column; gap: .35rem; }
.foot-contact-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); opacity: .7;
}
.foot-contact-val {
  font-size: .88rem; color: var(--text-b); font-weight: 300;
}
.foot-contact-val a {
  color: var(--text-b); text-decoration: none; transition: color .2s;
}
.foot-contact-val a:hover { color: var(--text); }

/* Fila inferior */
.foot-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  padding: 1.75rem 0;
}
.foot-links { display: flex; gap: 2rem; list-style: none; }
.foot-links a { color: var(--text-d); text-decoration: none; font-size: .82rem; transition: color .2s; }
.foot-links a:hover { color: var(--text-c); }
.foot-copy { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: var(--text-d); }

/* ── RESPONSIVE (añadido) ── */
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .foot-contact { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── ANIMACIONES ── */
@keyframes pdot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .svc-grid      { grid-template-columns: 1fr 1fr; }
  .ind-grid,
  .cyber-grid,
  .about-grid    { grid-template-columns: 1fr; gap: 3rem; }
  .ind-panel     { display: none; }
  .nav-links     { display: none; }
}
@media (max-width: 600px) {
  .wrap          { padding: 0 1.25rem; }
  .svc-grid      { grid-template-columns: 1fr; }
  .hero-metrics  { gap: 2rem; }
  .pillars       { grid-template-columns: 1fr; }
}
