/*
Theme Name: Systems Techno Feed
Theme URI: https://systemstechnofeed.com
Author: Infopid
Description: Tema one-page para Systems Techno Feed SL — sensores IoT para monitorizar silos, depósitos y caudalímetros.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: stf
*/

:root {
  --bg: #070d18;
  --bg-2: #0b1424;
  --surface: #0f1b2f;
  --surface-2: #14233b;
  --line: rgba(148, 178, 220, .14);
  --text: #e6edf7;
  --muted: #8fa2bd;
  --accent: #2ee6a6;
  --accent-2: #22c3ee;
  --warn: #ffb547;
  --danger: #ff6b6b;
  --radius: 16px;
  --max: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 110px 0; position: relative; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: "// "; opacity: .6; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s; font-family: inherit;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #04121a; }
.btn--primary:hover { color: #04121a; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(46, 230, 166, .3); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.03); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 10px 18px; font-size: .9rem; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(7, 13, 24, .85); backdrop-filter: blur(12px); border-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__text { line-height: 1.05; font-size: .95rem; }
.brand__text small { display: block; font-family: var(--mono); font-weight: 400; font-size: .68rem; color: var(--muted); letter-spacing: .12em; }
.custom-logo { max-height: 44px; width: auto; }

.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { color: var(--muted); font-size: .95rem; font-weight: 500; }
.main-nav a:hover, .main-nav a.is-active { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; color: var(--text); cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; transition: .3s; }

/* Hero */
.hero { padding: 160px 0 100px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(34, 195, 238, .16), transparent 70%),
    radial-gradient(500px 400px at 10% 90%, rgba(46, 230, 166, .10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 40px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero__stats strong { display: block; font-size: 1.6rem; font-family: var(--mono); color: var(--text); }
.hero__stats span { color: var(--muted); font-size: .88rem; }

/* Dashboard mock */
.dash {
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; box-shadow: 0 40px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04);
}
.dash__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: .85rem; color: var(--muted); }
.dash__top b { color: var(--text); font-weight: 600; }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .75rem; color: var(--accent); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(46,230,166,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(46,230,166,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,166,0); } }

.silos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.silo { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.silo__shape {
  position: relative; height: 120px; width: 62px; margin: 0 auto 12px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); overflow: hidden;
  clip-path: polygon(0 12%, 50% 0, 100% 12%, 100% 78%, 62% 100%, 38% 100%, 0 78%);
}
.silo__fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); transition: height 1.6s cubic-bezier(.2,.8,.2,1);
}
.silo--low .silo__fill { background: linear-gradient(180deg, var(--warn), #ff8a3d); }
.silo__name { font-size: .78rem; color: var(--muted); }
.silo__val { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; }
.silo--low .silo__val { color: var(--warn); }
.silo__kg { font-family: var(--mono); font-size: .75rem; color: var(--muted); }

.dash__row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.panel__label { font-size: .75rem; color: var(--muted); display: flex; justify-content: space-between; }
.panel__value { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; margin: 4px 0 6px; }
.panel__value small { font-size: .7rem; color: var(--muted); font-weight: 400; }
.spark path.line { fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s ease forwards .3s; }
.spark path.area { fill: url(#sparkGrad); opacity: .5; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.alert { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.alert + .alert { margin-top: 10px; }
.alert i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--warn); }
.alert i.ok { background: var(--accent); }
.alert b { color: var(--text); font-weight: 600; display: block; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(46,230,166,.4); }
.card p { color: var(--muted); }
.card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.card li { padding: 7px 0 7px 26px; position: relative; font-size: .95rem; border-top: 1px solid var(--line); }
.card li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(46,230,166,.1); color: var(--accent); border: 1px solid rgba(46,230,166,.25);
}
.icon svg { width: 28px; height: 28px; }
.tag { position: absolute; top: 24px; right: 24px; font-family: var(--mono); font-size: .7rem; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step); font-family: var(--mono); font-size: .85rem; color: var(--accent);
  display: block; margin-bottom: 14px;
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 40px; right: -21px; width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
.step .icon { width: 46px; height: 46px; margin-bottom: 16px; }
.step .icon svg { width: 22px; height: 22px; }

/* Split / platform */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.checklist li { display: flex; gap: 14px; }
.checklist li svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.checklist b { display: block; }
.checklist span { color: var(--muted); font-size: .95rem; }
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 110px 1fr 56px; gap: 12px; align-items: center; font-size: .85rem; }
.bar__track { height: 10px; background: rgba(255,255,255,.05); border-radius: 99px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.bar__fill.low { background: linear-gradient(90deg, #ff8a3d, var(--warn)); }
.bar span:last-child { font-family: var(--mono); text-align: right; color: var(--muted); }
.connect { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { font-family: var(--mono); font-size: .78rem; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }

/* Benefits */
.benefit { padding: 26px; border-left: 2px solid var(--accent); background: linear-gradient(90deg, rgba(46,230,166,.06), transparent); border-radius: 0 12px 12px 0; }
.benefit h3 { font-size: 1.05rem; }
.benefit p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Sectors */
.sectors { display: flex; flex-wrap: wrap; gap: 14px; }
.sector {
  display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 500;
}
.sector svg { width: 22px; height: 22px; color: var(--accent-2); }

/* CTA band */
.cta-band {
  border-radius: 24px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px;
  background: radial-gradient(500px 200px at 90% 0%, rgba(34,195,238,.25), transparent), linear-gradient(120deg, #0f2a33, #0d1f3a);
  border: 1px solid rgba(46,230,166,.25);
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--muted); margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; }
.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .icon { margin: 0; width: 46px; height: 46px; }
.contact-item .icon svg { width: 22px; height: 22px; }
.contact-item small { display: block; color: var(--muted); font-size: .8rem; }
.contact-item a, .contact-item span { color: var(--text); font-weight: 500; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; font-size: .85rem; color: var(--muted); margin-bottom: 20px; align-items: flex-start; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; }
.notice--ok { background: rgba(46,230,166,.12); border: 1px solid rgba(46,230,166,.4); }
.notice--err { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.4); }

/* Footer */
.site-footer { padding: 64px 0 32px; border-top: 1px solid var(--line); background: #050a13; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer p, .site-footer li { color: var(--muted); font-size: .92rem; }
.site-footer h4 { font-size: .8rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text); }
.site-footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.footer-bottom ul { display: flex; gap: 20px; }
.footer-bottom a { color: var(--muted); }

.footer-claim { margin-top: 16px; max-width: 380px; }
.muted { color: var(--muted); }
.contact-intro { margin-bottom: 32px; }
.section--cta { padding-bottom: 0; }

/* Language switcher (WPML) */
.lang-switch { list-style: none; display: flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a { display: block; padding: 5px 10px; border-radius: 999px; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-current { background: rgba(46,230,166,.14); color: var(--accent); }

/* First-layer data protection info (RGPD) */
.form-legal { font-size: .78rem; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 20px; }
.form-legal b { display: block; color: var(--text); font-size: .8rem; margin-bottom: 4px; }
.form-legal p { margin: 0; }
.form-legal strong { color: #b9c6d8; font-weight: 600; }

/* Generic pages (legal, etc.) */
.page-content { padding: 150px 0 90px; }
.page-content .container { max-width: 820px; }
.page-content .entry p, .page-content .entry li { color: #c3cfe0; }
.page-content .entry h2 { font-size: 1.4rem; margin-top: 2em; }
.page-content .entry table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1em 0 2em; display: block; overflow-x: auto; }
.page-content .entry th, .page-content .entry td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.page-content .entry th { background: var(--surface); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .spark path.line { animation: none; stroke-dashoffset: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero .container, .split, .contact-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-actions .btn { display: none; }
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 20px 24px; visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: transform .3s, opacity .3s, visibility .3s; box-shadow: 0 20px 40px rgba(0,0,0,.5);
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-header.menu-open { backdrop-filter: none; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-header.menu-open { background: var(--bg); }
  .grid-3 { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 76px 0; }
  .hero { padding: 120px 0 70px; }
  .container { padding: 0 16px; }
  .grid-4, .form__row, .footer-top { grid-template-columns: 1fr; }
  .dash { padding: 14px; }
  .silos { gap: 8px; }
  .silo { padding: 10px 6px; }
  .silo__shape { width: 48px; height: 96px; }
  .dash__row { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 84px 1fr 44px; }
  .form { padding: 22px; }
  .hero__stats { gap: 22px; }
  .site-header .container { gap: 10px; }
  .brand { gap: 8px; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__text { font-size: .78rem; white-space: nowrap; }
  .brand__text small { font-size: .6rem; }
  .header-actions { gap: 8px; }
  .lang-switch a { padding: 4px 7px; font-size: .7rem; }
}
@media (max-width: 360px) {
  .brand__text small { display: none; }
}
