/* =========================================================
   ARP Applied IIoT Solutions — landing page
   Brand: navy #1E3246 · gold #EBB54A · red #B0091E
   ========================================================= */
:root {
  --ink: #0b1624;
  --ink-2: #0f1e31;
  --navy: #1e3246;
  --navy-2: #26405a;
  --gold: #ebb54a;
  --gold-soft: #f3cd7e;
  --red: #b0091e;
  --red-bright: #e0313f;
  --text: #e8eef5;
  --muted: #9fb0c3;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.035);
  --radius: 16px;
  --wrap: 1180px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: 0 8px 30px -8px rgba(235, 181, 74, .55); }
.btn--gold:hover { background: var(--gold-soft); }
.btn--ghost { border-color: rgba(255,255,255,.22); color: var(--text); background: rgba(255,255,255,.03); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--gold); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(11, 22, 36, .82); backdrop-filter: blur(14px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__chip { background: #fff; border-radius: 8px; padding: 5px 6px; display: grid; place-items: center; }
.brand__chip img { width: 54px; height: auto; }
.brand__text { font-size: 15px; color: var(--text); font-weight: 500; letter-spacing: .01em; }
.brand__text b { color: var(--red-bright); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .25s ease; }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu { display: grid; gap: 4px; padding: 8px 16px 20px; background: rgba(11, 22, 36, .96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 12px; }
@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .brand__text { display: none; }
}

/* ---------- Shared ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 0 0 rgba(224, 49, 63, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(224, 49, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 49, 63, 0); } }
.grad { background: linear-gradient(90deg, var(--gold) 0%, #f6d58d 45%, var(--red-bright) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.section { padding: 120px 0; position: relative; }
@media (max-width: 700px) { .section { padding: 80px 0; } }
.section__head { max-width: 720px; margin-bottom: 56px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; }
.section__lead { margin-top: 18px; color: var(--muted); font-size: 17.5px; }
.note { margin-top: 18px; font-size: 13.5px; color: var(--muted); font-style: italic; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 120px 0 90px; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 15% 50%, rgba(11,22,36,.92) 0%, rgba(11,22,36,.55) 55%, rgba(11,22,36,0) 100%),
    linear-gradient(180deg, rgba(11,22,36,0) 70%, var(--ink) 100%);
}
.no-webgl .hero { background: radial-gradient(ellipse at 70% 40%, var(--navy-2), var(--ink) 70%); }
.hero__content { position: relative; z-index: 2; }
.hero__title { font-size: clamp(40px, 7vw, 84px); font-weight: 800; letter-spacing: -0.035em; max-width: 14ch; }
.hero__title .line { display: block; }
.hero__lead { margin-top: 24px; max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); color: #c3d0de; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__telemetry { list-style: none; padding: 0; margin: 56px 0 0; display: flex; flex-wrap: wrap; gap: 12px; max-width: 760px; }
.tchip {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 12px;
  background: rgba(15, 30, 49, .66); border: 1px solid var(--line); backdrop-filter: blur(8px);
  font-family: var(--mono);
}
.tchip__k { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.tchip__v { font-size: 15px; color: var(--text); font-weight: 600; }
.tchip--ota .tchip__v { color: var(--gold); }
.hero__scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,.3); border-radius: 14px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 600px) {
  .hero__veil { background: linear-gradient(180deg, rgba(11,22,36,.55) 0%, rgba(11,22,36,.85) 60%, var(--ink) 100%); }
  .hero__telemetry { margin-top: 40px; }
  .tchip { flex: 1 1 calc(50% - 12px); }
  .hero__scroll { display: none; }
}

/* ---------- Protocols marquee ---------- */
.protocols { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-2); overflow: hidden; }
.marquee { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; gap: 56px; padding: 26px 0; animation: marquee 38s linear infinite; }
.marquee__track span { font-family: var(--mono); font-size: 15px; color: var(--muted); white-space: nowrap; letter-spacing: .04em; }
.marquee__track span::before { content: "◆"; color: var(--gold); margin-right: 14px; font-size: 9px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stack ---------- */
.stack__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.layers { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.layer {
  display: flex; gap: 20px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.layer:hover, .layer.is-active { border-color: rgba(235, 181, 74, .55); background: rgba(235, 181, 74, .06); transform: translateX(6px); }
.layer__n { font-family: var(--mono); color: var(--gold); font-weight: 600; font-size: 14px; padding-top: 3px; }
.layer h3 { font-size: 19px; margin-bottom: 6px; }
.layer p { color: var(--muted); font-size: 15px; }
.flow { margin: 0; padding: 24px; border-radius: 24px; background: radial-gradient(circle at 50% 40%, rgba(38,64,90,.6), rgba(15,30,49,.4) 70%); border: 1px solid var(--line); }
.flow__svg { width: 100%; height: auto; overflow: visible; }
.flow__nodes circle { fill: var(--navy); stroke: var(--gold); stroke-width: 2; }
.flow__nodes rect { fill: var(--navy); stroke: rgba(255,255,255,.25); stroke-width: 1.2; }
.flow__nodes .node--core rect { fill: var(--gold); stroke: none; }
.flow__nodes .node--core text { fill: var(--ink); font-weight: 700; }
.flow__nodes .node--core text.sub { font-weight: 500; font-size: 10.5px; }
.flow__nodes text { fill: var(--text); font-size: 12.5px; text-anchor: middle; font-family: var(--font); font-weight: 500; }
.pkt { fill: var(--gold); stroke: rgba(235,181,74,.35); stroke-width: 5; }
.pkt--red { fill: var(--red-bright); stroke: rgba(224,49,63,.35); }
@media (max-width: 900px) { .stack__grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Platform features ---------- */
.platform { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 50%, var(--ink) 100%); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  padding: 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  position: relative; overflow: hidden; transition: border-color .3s, transform .3s;
}
.feature::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(235,181,74,.12), transparent 40%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.feature:hover { border-color: rgba(235,181,74,.4); transform: translateY(-4px); }
.feature:hover::after { opacity: 1; }
.feature__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(235,181,74,.12); margin-bottom: 20px; }
.feature__icon svg, .card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- Demo panel ---------- */
.demo__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: #c3d0de; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: rgba(235,181,74,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23ebb54a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.panel { border-radius: 20px; background: #0d1a2b; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(235,181,74,.06); overflow: hidden; }
.panel__bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); }
.panel__title { font-family: var(--mono); font-size: 12.5px; color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 999px; }
.badge--live { background: rgba(224,49,63,.15); color: #ff8a93; }
.panel__kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.kpi { padding: 18px; display: grid; gap: 4px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi__k { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.kpi__v { font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi__v--ok { color: #6fdc9b; }
.kpi__v--warn { color: var(--gold); }
.panel__chart { padding: 18px 18px 8px; }
.chart__legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); font-family: var(--mono); margin-bottom: 8px; }
.lg::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: 3px; }
.lg--gold::before { background: var(--gold); }
.lg--red::before { background: var(--red-bright); }
#spark { width: 100%; height: 180px; }
.panel__log { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 12px 18px 16px; border-top: 1px solid var(--line); height: 92px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.panel__log time { color: var(--gold); margin-right: 8px; }
.panel__log .warn { color: #ff8a93; }
@media (max-width: 900px) { .demo__grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Industries ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  padding: 30px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(38,64,90,.35), rgba(15,30,49,.2));
  display: flex; flex-direction: column; gap: 10px; transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(224,49,63,.45); }
.card__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(235,181,74,.35); margin-bottom: 8px; }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); font-size: 15px; flex: 1; }
.card__tags { font-family: var(--mono); font-size: 12px; color: var(--gold); margin-top: 6px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Services ---------- */
.services { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.svc__item { padding: 34px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; transition: background .3s; }
.svc__item:nth-child(3n) { border-right: 0; }
.svc__item:nth-last-child(-n+3) { border-bottom: 0; }
.svc__item::before { content: ""; position: absolute; left: 30px; top: 0; width: 34px; height: 3px; background: var(--red-bright); transform-origin: left; transition: width .3s; }
.svc__item:hover { background: rgba(255,255,255,.025); }
.svc__item:hover::before { width: 70px; }
.svc__item h3 { font-size: 19px; margin-bottom: 10px; }
.svc__item p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .svc { grid-template-columns: 1fr 1fr; }
  .svc__item:nth-child(3n) { border-right: 1px solid var(--line); }
  .svc__item:nth-child(2n) { border-right: 0; }
  .svc__item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .svc__item:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 600px) {
  .svc { grid-template-columns: 1fr; }
  .svc__item { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .svc__item:last-child { border-bottom: 0 !important; }
}

/* ---------- Process ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps__line { position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: var(--line); }
.steps__fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold), var(--red-bright)); transform-origin: left; transform: scaleX(var(--p, 1)); }
.step { position: relative; }
.step__dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); border: 2px solid var(--gold); color: var(--gold); font-weight: 700; font-family: var(--mono); margin-bottom: 22px; position: relative; z-index: 1; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 34px; padding-left: 0; }
  .steps__line { left: 22px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; }
  .steps__fill { transform-origin: top; transform: scaleY(var(--p, 1)); }
  .step { padding-left: 70px; }
  .step__dot { position: absolute; left: 0; top: 0; }
}

/* ---------- Contact ---------- */
.contact { background: radial-gradient(ellipse 70% 80% at 85% 30%, rgba(176,9,30,.18), transparent 60%), radial-gradient(ellipse 60% 60% at 10% 90%, rgba(235,181,74,.1), transparent 60%); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__mail { display: inline-block; margin-top: 30px; font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; color: var(--gold); border-bottom: 2px solid rgba(235,181,74,.35); padding-bottom: 4px; }
.contact__mail:hover { border-color: var(--gold); }
.form { display: grid; gap: 16px; padding: 32px; border-radius: 22px; background: rgba(15,30,49,.75); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 15px; color: var(--text); background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 12px 14px; width: 100%;
  transition: border-color .2s, background .2s;
}
.form select option { background: var(--ink-2); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); background: rgba(235,181,74,.05); }
.form .is-invalid { border-color: var(--red-bright); }
.form textarea { resize: vertical; min-height: 110px; }
.form__hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.form__hint.is-error { color: var(--red-bright); }
.form__hint.is-success { color: var(--gold); font-size: 14px; }
.form__req { color: var(--red-bright); }
.form__err { font-size: 12.5px; color: var(--red-bright); min-height: 0; }
.form__err:empty { display: none; }
.form .form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.form button[disabled] { opacity: .65; cursor: progress; transform: none; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 520px) { .form { padding: 22px; } .form__row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: #08111c; }
.footer__inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer__brand img { width: 180px; height: auto; background: #fff; border-radius: 14px; padding: 14px; }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__cols div { display: grid; gap: 10px; align-content: start; }
.footer__cols h4 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin-bottom: 6px; font-weight: 600; }
.footer__cols a { color: var(--muted); font-size: 15px; }
.footer__cols a:hover { color: var(--text); }
.footer__legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 18px 36px; padding: 22px 16px; }
  .marquee__track span[aria-hidden] { display: none; }
}
