/* ============================================================
   PLC 3D: Design System
   Deep navy / electric blue. Industrial digital-twin premium.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  /* Backgrounds */
  --bg:        #060A14;
  --bg-2:      #0A0F1E;
  --panel:     #0E1424;
  --panel-2:   #121A2E;
  --panel-3:   #16203A;

  /* Accent: electric blue */
  --blue:      #2E7BFF;
  --blue-2:    #5B9BFF;
  --blue-deep: #1B4FCC;
  --blue-glow: rgba(46,123,255,0.45);
  --blue-soft: rgba(46,123,255,0.12);

  /* Alive / online: subtle cyan (sparingly) */
  --cyan:      #28E0C8;
  --cyan-soft: rgba(40,224,200,0.14);

  /* Status */
  --ok:    #2FD27A;
  --warn:  #F5B544;
  --bad:   #FF5C6C;

  /* Text */
  --text:  #EAF0FB;
  --muted: #9AA7BE;
  --dim:   #5E6B82;
  --faint: #3A465C;

  /* Lines */
  --line:    rgba(255,255,255,0.07);
  --line-2:  rgba(255,255,255,0.12);
  --line-blue: rgba(46,123,255,0.30);

  /* Radius */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Type */
  --display: 'Sora', 'Chakra Petch', sans-serif;
  --body:    'Inter', 'Archivo', sans-serif;
  --mono:    'JetBrains Mono', 'IBM Plex Mono', monospace;

  --maxw: 1240px;
  --shadow:  0 24px 60px -20px rgba(0,0,0,0.7);
  --shadow-blue: 0 0 0 1px var(--line-blue), 0 24px 60px -24px var(--blue-glow);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--body);
  color:var(--text);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
  background-color:var(--bg);
  background-image:
    radial-gradient(900px 620px at 78% -6%, rgba(46,123,255,0.16), transparent 60%),
    radial-gradient(760px 520px at 4% 6%, rgba(40,80,180,0.12), transparent 60%),
    linear-gradient(rgba(120,160,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,0.045) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-size: auto, auto, 56px 56px, 56px 56px, auto;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, fixed;
}

a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background:var(--blue); color:#fff; }

/* ---------- Layout ---------- */
.wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 28px; }
.section{ position:relative; padding:96px 0; }
.section.tight{ padding:64px 0; }

/* ---------- Type helpers ---------- */
.eyebrow{
  font-family:var(--mono);
  font-size:12px; font-weight:500;
  letter-spacing:.22em; text-transform:uppercase;
  color:var(--blue-2);
  display:inline-flex; align-items:center; gap:9px;
}
.eyebrow::before{
  content:""; width:22px; height:1px; background:var(--blue);
  box-shadow:0 0 8px var(--blue-glow);
}
h1,h2,h3,h4{ font-family:var(--display); font-weight:600; line-height:1.08; letter-spacing:-0.02em; }
.h-display{ font-size:clamp(38px,6vw,72px); font-weight:700; letter-spacing:-0.03em; }
.h-1{ font-size:clamp(30px,4vw,48px); }
.h-2{ font-size:clamp(24px,3vw,34px); }
.lead{ color:var(--muted); font-size:clamp(16px,1.5vw,19px); max-width:60ch; }
.grad{
  background:linear-gradient(120deg,#fff 0%, var(--blue-2) 55%, var(--blue) 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.mono{ font-family:var(--mono); }
.muted{ color:var(--muted); }
.dim{ color:var(--dim); }

.section-head{ max-width:760px; margin:0 auto 56px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:18px; }
.section-head.left{ margin-left:0; text-align:left; align-items:flex-start; }
.section-head .lead{ text-wrap:pretty; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--body); font-weight:600; font-size:15px;
  padding:13px 22px; border-radius:12px; border:1px solid transparent;
  transition:transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  white-space:nowrap;
}
.btn svg{ width:17px; height:17px; }
.btn-primary{
  background:linear-gradient(180deg, var(--blue-2), var(--blue));
  color:#fff; box-shadow:0 8px 24px -8px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 14px 34px -8px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost{
  background:rgba(255,255,255,0.03); color:var(--text);
  border-color:var(--line-2); backdrop-filter:blur(8px);
}
.btn-ghost:hover{ border-color:var(--line-blue); background:var(--blue-soft); transform:translateY(-2px); }
.btn-outline{ background:transparent; color:var(--blue-2); border-color:var(--line-blue); }
.btn-outline:hover{ background:var(--blue-soft); transform:translateY(-2px); }
.btn-lg{ padding:16px 28px; font-size:16px; }
.btn-sm{ padding:9px 15px; font-size:13.5px; border-radius:10px; }

/* ---------- Chips / badges ---------- */
.chip{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--mono); font-size:11.5px; letter-spacing:.04em;
  padding:6px 11px; border-radius:999px;
  border:1px solid var(--line-2); color:var(--muted);
  background:rgba(255,255,255,0.02);
}
.chip.on{ color:var(--cyan); border-color:var(--cyan-soft); background:var(--cyan-soft); }
.chip.blue{ color:var(--blue-2); border-color:var(--line-blue); background:var(--blue-soft); }
.dot{ width:7px; height:7px; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor; }
.dot.live{ animation:pulse 1.8s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.35} }

.tag-lvl{ font-family:var(--mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase; padding:4px 9px; border-radius:6px; font-weight:600; }
.tag-lvl.basic{ color:var(--ok); background:rgba(47,210,122,.12); }
.tag-lvl.inter{ color:var(--warn); background:rgba(245,181,68,.12); }
.tag-lvl.adv{ color:var(--bad); background:rgba(255,92,108,.12); }

/* ---------- Cards / panels ---------- */
.card{
  background:linear-gradient(180deg, var(--panel-2), var(--panel));
  border:1px solid var(--line); border-radius:var(--r-lg);
  position:relative;
}
.card.glow{ box-shadow:var(--shadow); }
.card-pad{ padding:26px; }
.panel{
  background:rgba(14,20,36,0.72); backdrop-filter:blur(14px);
  border:1px solid var(--line); border-radius:var(--r);
}
.hairline{ height:1px; background:var(--line); border:0; }

/* glowing top edge accent used on feature cards */
.edge-top::before{
  content:""; position:absolute; top:0; left:22px; right:22px; height:1px;
  background:linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity:.6;
}

/* ---------- Navbar ---------- */
.nav{
  position:sticky; top:0; z-index:60;
  transition:background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom:1px solid transparent;
}
.nav.scrolled{
  background:rgba(8,12,22,0.82); backdrop-filter:blur(16px) saturate(1.2);
  border-bottom-color:var(--line);
}
.nav-inner{ display:flex; align-items:center; gap:28px; height:72px; }
.brand{ display:flex; align-items:center; gap:11px; font-family:var(--display); font-weight:700; font-size:18px; letter-spacing:-0.01em; }
.brand img{ width:34px; height:34px; border-radius:9px; box-shadow:0 0 0 1px var(--line-blue), 0 0 14px -2px var(--blue-glow); transition:box-shadow .25s, transform .25s; }
.brand:hover img{ box-shadow:0 0 0 1px var(--blue), 0 0 20px 0 var(--blue-glow); transform:translateY(-1px); }
.brand b{ color:var(--blue-2); }

/* ---------- Logo essence: marco de escaneo neón (reutilizable) ---------- */
.scan-corners{ position:relative; }
.scan-corners::before{
  content:""; position:absolute; inset:10px; border:2px solid var(--blue); border-radius:16px; z-index:3; pointer-events:none; opacity:.65;
  box-shadow:0 0 20px -3px var(--blue-glow), inset 0 0 22px -8px var(--blue-glow);
  -webkit-mask:
    linear-gradient(#000 0 0) top left / 30px 30px no-repeat,
    linear-gradient(#000 0 0) top right / 30px 30px no-repeat,
    linear-gradient(#000 0 0) bottom left / 30px 30px no-repeat,
    linear-gradient(#000 0 0) bottom right / 30px 30px no-repeat;
          mask:
    linear-gradient(#000 0 0) top left / 30px 30px no-repeat,
    linear-gradient(#000 0 0) top right / 30px 30px no-repeat,
    linear-gradient(#000 0 0) bottom left / 30px 30px no-repeat,
    linear-gradient(#000 0 0) bottom right / 30px 30px no-repeat;
  animation:scanpulse 3.4s ease-in-out infinite;
}
@keyframes scanpulse{ 0%,100%{ opacity:.5 } 50%{ opacity:.8 } }
.nav-links{ display:flex; align-items:center; gap:3px; margin-left:8px; }
.nav-links a{
  font-size:13.5px; font-weight:500; color:var(--muted);
  padding:8px 11px; border-radius:9px; transition:color .2s, background .2s; white-space:nowrap;
}
.nav-links a:hover{ color:var(--text); background:rgba(255,255,255,0.04); }
.nav-links a.active{ color:var(--text); background:var(--blue-soft); }
/* Comunidad · acento premium (corona + dorado), solicitado por el usuario */
.nav-links a.premium{ color:#e9c45a; font-weight:700; display:inline-flex; align-items:center; gap:5px; }
.nav-links a.premium:hover{ color:#f6dd86; background:rgba(233,196,90,.08); }
.nav-links a.premium.active{ color:#f6dd86; background:rgba(233,196,90,.12); }
.nav-links a.premium .crown, .mobile-menu a.premium .crown{ width:14px; height:14px; flex:none; fill:#e9c45a; filter:drop-shadow(0 0 5px rgba(233,196,90,.45)); }
.mobile-menu a.premium{ color:#e9c45a; font-weight:700; display:flex; align-items:center; gap:7px; }
.nav-cta{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.nav-toggle{ display:none; background:none; border:1px solid var(--line-2); border-radius:10px; padding:9px; color:var(--text); }
.nav-toggle svg{ width:20px; height:20px; }

.mobile-menu{
  display:none; position:fixed; inset:72px 0 auto 0; z-index:55;
  background:rgba(8,12,22,0.97); backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line); padding:14px 28px 24px;
}
.mobile-menu.open{ display:block; }
.mobile-menu a{ display:block; padding:13px 6px; font-size:16px; color:var(--muted); border-bottom:1px solid var(--line); }
.mobile-menu a.active{ color:var(--blue-2); }
.mobile-menu .btn{ margin-top:16px; width:100%; }

/* ---------- Stat blocks ---------- */
.stat .n{ font-family:var(--display); font-weight:700; font-size:clamp(28px,3vw,40px); letter-spacing:-0.02em; }
.stat .n .u{ color:var(--blue-2); }
.stat .l{ color:var(--dim); font-size:13px; font-family:var(--mono); letter-spacing:.04em; margin-top:4px; }

/* ---------- Tabs ---------- */
.tabs{ display:inline-flex; gap:5px; padding:5px; border-radius:14px; background:rgba(255,255,255,0.03); border:1px solid var(--line); }
.tab{
  border:0; background:transparent; color:var(--muted);
  font-family:var(--body); font-weight:600; font-size:14px;
  padding:10px 18px; border-radius:10px; transition:all .2s; white-space:nowrap;
}
.tab.active{ background:linear-gradient(180deg,var(--blue-2),var(--blue)); color:#fff; box-shadow:0 6px 18px -8px var(--blue-glow); }
.tab:not(.active):hover{ color:var(--text); }

/* ---------- Footer ---------- */
.footer{ border-top:1px solid var(--line); padding:64px 0 40px; margin-top:40px; position:relative; }
.footer-grid{ display:grid; grid-template-columns:1.6fr repeat(3,1fr); gap:40px; }
.footer h5{ font-family:var(--mono); font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--dim); margin-bottom:16px; }
.footer ul{ list-style:none; display:flex; flex-direction:column; gap:11px; }
.footer ul a{ color:var(--muted); font-size:14.5px; transition:color .2s; }
.footer ul a:hover{ color:var(--blue-2); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; margin-top:48px; padding-top:24px; border-top:1px solid var(--line); color:var(--dim); font-size:13px; }

/* ---------- Reveal (entrance) ---------- */
/* Content is ALWAYS visible (no hidden state) for maximum robustness across
   environments. A gentle entrance plays only when motion is OK and JS marks the
   element in-view; it animates FROM the visible state so nothing can get stuck hidden. */
.reveal{ opacity:1; transform:none; }
@media (prefers-reduced-motion: no-preference){
  html.reveal-on .reveal.in{ animation: plcReveal .6s cubic-bezier(.2,.7,.2,1); }
}
@keyframes plcReveal{ from{ transform:translateY(18px); } to{ transform:none; } }

/* ---------- Image slot styling ---------- */
image-slot{ --is-bg:rgba(255,255,255,0.02); }

/* ---------- Grid utils ---------- */
.grid{ display:grid; gap:22px; }
.g-2{ grid-template-columns:repeat(2,1fr); }
.g-3{ grid-template-columns:repeat(3,1fr); }
.g-4{ grid-template-columns:repeat(4,1fr); }
.flex{ display:flex; }
.center{ align-items:center; }
.between{ justify-content:space-between; }
.gap-s{ gap:10px; } .gap-m{ gap:18px; } .gap-l{ gap:28px; }
.wrap-w{ flex-wrap:wrap; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero{ padding:72px 0 36px; }
.page-hero .h-1{ margin:14px 0 16px; }

/* ---------- Responsive ---------- */
@media (max-width:1080px){
  .footer-grid{ grid-template-columns:1fr 1fr; gap:32px; }
}
@media (max-width:880px){
  .nav-links{ display:none; }
  .nav-cta .btn-list{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .g-3,.g-4{ grid-template-columns:1fr 1fr; }
  .section{ padding:72px 0; }
}
@media (max-width:620px){
  .wrap{ padding:0 18px; }
  .g-2,.g-3,.g-4{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; }
  .nav-cta .btn-demo{ display:none; }
}
