/* ============================================================
   UNICONTROL — Kinetic Production Line (dark / futuristic)
   Palette: near-black canvas · signal red · electric cyan
   Type: Space Grotesk (display) · IBM Plex Sans (body) · Plex Mono (HUD)
   ============================================================ */

:root {
  --bg: #07080a;
  --bg-2: #0d0f13;
  --panel: #101318;
  --panel-2: #14181e;
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.14);
  --ink: #eef1f5;
  --ink-soft: #aeb4bf;
  --ink-dim: #757c88;
  --red: #ff2b2b;
  --red-deep: #e01414;
  --cyan: #17e0d4;
  --cyan-deep: #0bb8ae;

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "IBM Plex Sans", system-ui, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1220px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.mono { font-family: var(--ff-mono); letter-spacing: .02em; }

/* Particle canvas + grain */
#fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5; }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}
main, .site-header, .site-footer { position: relative; z-index: 1; }

/* Cursor ring (desktop) */
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 34px; height: 34px; z-index: 9999;
  border: 1px solid var(--cyan); border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%); opacity: 0;
  transition: opacity .3s, width .25s var(--ease), height .25s var(--ease), border-color .25s, background .25s;
}
.cursor-ring.active { opacity: .6; }
.cursor-ring.grow { width: 60px; height: 60px; border-color: var(--red); background: rgba(255,43,43,.06); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; position: relative;
  font-family: var(--ff-display); font-weight: 500; font-size: .98rem;
  padding: .95em 1.7em; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
  will-change: transform;
}
.btn-primary { background: var(--red-deep); color: #fff; box-shadow: 0 0 0 rgba(255,43,43,0); }
.btn-primary:hover { background: var(--red); transform: translateY(-2px); box-shadow: 0 10px 40px -10px rgba(255,43,43,.6); }
.btn-ghost { background: rgba(255,255,255,.02); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--cyan); color: #fff; transform: translateY(-2px); box-shadow: 0 0 24px -6px rgba(23,224,212,.5); }
.btn-sm { padding: .6em 1.15em; font-size: .88rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(7,8,10,.55); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, transform .4s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(7,8,10,.82); }
.site-header.hide { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand-logo { height: 28px; width: auto; display: block; filter: brightness(0) invert(1); }
.nav { display: flex; gap: 2rem; }
.nav a { font-size: .95rem; color: var(--ink-soft); position: relative; padding: .2em 0; transition: color .25s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1.5px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transition: width .3s var(--ease); }
.nav a:hover { color: #fff; }
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.lang-toggle { background: none; border: none; cursor: pointer; font-family: var(--ff-mono); font-size: .85rem; color: var(--ink-dim); letter-spacing: .04em; }
.lang-toggle .lang-opt { transition: color .2s; }
.lang-toggle .lang-opt.active { color: var(--cyan); }
.lang-sep { margin: 0 .25em; opacity: .4; }

.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-btn span { width: 24px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 74px; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 0%, transparent 78%);
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0; opacity: .5; pointer-events: none; }
.glow-red { width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(255,43,43,.34), transparent 66%); top: -12%; right: -8%; }
.glow-cyan { width: 42vw; height: 42vw; background: radial-gradient(circle, rgba(23,224,212,.26), transparent 66%); bottom: -18%; left: -10%; }

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 9vh, 6rem); width: 100%; }

.eyebrow { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .8rem; letter-spacing: .04em; color: var(--ink-dim); margin-bottom: 1.6rem; text-transform: uppercase; }
.live { display: inline-flex; align-items: center; gap: .5em; color: var(--cyan); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .35; transform: scale(.8);} }

.hero-title { font-family: var(--ff-display); font-weight: 600; font-size: clamp(2.5rem, 5.4vw, 4.9rem); line-height: 1.03; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.hero-sub { font-size: clamp(1rem, 1.35vw, 1.2rem); color: var(--ink-soft); max-width: 44ch; margin-bottom: 2.2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats { display: flex; gap: clamp(1.5rem, 4vw, 3.4rem); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.8rem; }
.hero-stats dt { font-family: var(--ff-display); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1; color: #fff; }
.hero-stats dd { font-size: .85rem; color: var(--ink-dim); margin-top: .5rem; }

/* Hero visual */
.hero-viz { position: relative; z-index: 1; }
.viz-frame {
  position: relative; border: 1px solid var(--line-2); border-radius: 10px;
  background: linear-gradient(160deg, rgba(23,224,212,.05), rgba(255,43,43,.04)), var(--panel);
  padding: 1.2rem; box-shadow: 0 40px 120px -50px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
.viz-corner { position: absolute; width: 14px; height: 14px; border: 2px solid var(--cyan); opacity: .8; }
.viz-corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.viz-corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.viz-corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.viz-corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
#armScene { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 1px rgba(23,224,212,.3)); }
.part { fill: #cfd4dc; stroke: var(--cyan); stroke-width: 1; }
.part.hot { fill: var(--red); stroke: #ff7a7a; }
.roller { fill: #262b33; }
.viz-readout { position: absolute; top: 16px; left: 20px; display: flex; flex-direction: column; gap: .3rem; font-size: .68rem; }
.rd-line { display: flex; gap: .6em; }
.rd-k { color: var(--ink-dim); font-style: normal; }
.rd-v { color: var(--ink); font-style: normal; }
.rd-v.ok { color: var(--cyan); }

/* Status ticker */
.status-ticker { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; border-top: 1px solid var(--line); background: rgba(0,0,0,.4); overflow: hidden; padding: .55rem 0; }
.ticker-track { display: flex; gap: 2.5rem; width: max-content; white-space: nowrap; font-size: .72rem; color: var(--ink-dim); will-change: transform; }
.ticker-track b { color: var(--cyan); font-weight: 500; }
.ticker-track .sep { color: var(--red); }

/* ---------- Marquee ---------- */
.marquee-sec { padding: 3rem 0; border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.marquee-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); text-align: center; margin-bottom: 1.6rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 2.6rem; width: max-content; will-change: transform; }
.mq-item { display: inline-flex; align-items: center; }
.mq-logo { height: clamp(22px, 2.5vw, 32px); width: auto; filter: brightness(0) invert(1); opacity: .5; transition: opacity .3s var(--ease); }
.mq-item:hover .mq-logo { opacity: 1; }
.mq-logo-fallback { font-family: var(--ff-display); font-weight: 500; font-size: clamp(1.2rem, 2.4vw, 1.8rem); color: var(--ink-soft); white-space: nowrap; }
.marquee-track .mq-dot { color: var(--red); font-size: .7em; }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 11vh, 9rem) 0; position: relative; }
.section-alt { background: var(--bg-2); }
.sec-num { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; }
.sec-title { font-family: var(--ff-display); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.015em; max-width: 16ch; color: #fff; }
.sec-head.center { text-align: center; margin: 0 auto 3.6rem; }
.sec-head.center .sec-title { max-width: 22ch; margin: 0 auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.grid-2.align-center { align-items: center; }

.lead { font-size: 1.18rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.about-body p { color: var(--ink-dim); margin-bottom: 1.2rem; }
.check-list { list-style: none; margin-top: 1.6rem; }
.check-list li { position: relative; padding-left: 1.8rem; margin-bottom: .8rem; color: var(--ink-soft); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border: 2px solid var(--cyan); border-top: 0; border-right: 0; transform: rotate(-45deg); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card {
  position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem 1.6rem; min-height: 270px;
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background .35s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--red), var(--cyan)); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.card:hover { z-index: 4; transform: translateY(-6px); border-color: var(--cyan); background: var(--panel-2); box-shadow: 0 22px 38px -26px rgba(0,0,0,.95); }
.card:hover::before { transform: scaleX(1); }
.card-num { font-size: .78rem; color: var(--cyan); margin-bottom: auto; letter-spacing: .05em; }
.card h3 { font-family: var(--ff-display); font-weight: 600; font-size: 1.3rem; margin: 1.4rem 0 .7rem; letter-spacing: -0.01em; color: #fff; }
.card p { font-size: .95rem; color: var(--ink-dim); }

/* ---------- Robotics ---------- */
.robotics { background: radial-gradient(ellipse at 70% 30%, rgba(23,224,212,.08), transparent 60%), var(--bg); }
.robot-brands { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.pill { font-family: var(--ff-mono); font-size: .82rem; padding: .5em 1em; border: 1px solid var(--line-2); border-radius: 100px; color: var(--ink-soft); }
.robotics-media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #0a0c0f; aspect-ratio: 16 / 10; }
.robotics-media img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.robotics-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,224,212,.12), transparent 40%, rgba(7,8,10,.75)); pointer-events: none; }
.robotics-media figcaption { position: absolute; left: 1rem; bottom: 1rem; z-index: 1; font-size: .72rem; color: var(--cyan); letter-spacing: .06em; text-transform: uppercase; }
.pill.pill-hot { border-color: rgba(255,43,43,.55); color: #fff; }
/* Welding-robot scene */
.weld-media { background: radial-gradient(ellipse at 42% 62%, #0e1218, #06080b); }
.weld-media::after { background: linear-gradient(180deg, transparent 78%, rgba(6,8,11,.6)); }
.weld-media svg { width: 100%; height: 100%; display: block; }
.wl-mark { fill: #6b7480; font-family: var(--ff-display); font-weight: 700; font-size: 11px; letter-spacing: 1px; }
.wl-k { fill: var(--cyan); font-family: var(--ff-mono); font-size: 12px; letter-spacing: .08em; }
.wl-v { fill: var(--ink-dim); font-family: var(--ff-mono); font-size: 11px; letter-spacing: .06em; }
.weld-spark { fill: #eafcff; }

/* ---------- Safety ---------- */
.safety { position: relative; padding: clamp(4.5rem, 11vh, 7.5rem) 0; text-align: center; overflow: hidden; background: var(--bg-2); border-block: 1px solid var(--line); }
.safety-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 100% at 50% 50%, rgba(255,43,43,.22), transparent 70%); z-index: 0; }
.safety .wrap { position: relative; z-index: 1; }
.safety-kicker { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 1.4rem; }
.safety-line { font-family: var(--ff-display); font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1.15; letter-spacing: -0.015em; max-width: 20ch; margin: 0 auto; color: #fff; }

/* ---------- Brands ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.brand-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; background: var(--panel); transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; }
.brand-card { position: relative; z-index: 1; }
.brand-card:hover { z-index: 4; border-color: var(--cyan); transform: translateY(-4px); box-shadow: 0 18px 34px -24px rgba(0,0,0,.95); }
.brand-card h3 { font-family: var(--ff-display); font-weight: 600; font-size: 1.2rem; margin-bottom: .5rem; color: #fff; }
.brand-card p { font-size: .92rem; color: var(--ink-dim); }
.assets-note { text-align: center; font-size: .74rem; color: var(--ink-dim); margin-top: 2rem; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.why-item { border-top: 2px solid var(--red); padding-top: 1.4rem; }
.why-n { font-size: .82rem; color: var(--cyan); display: block; margin-bottom: 1rem; }
.why-item h3 { font-family: var(--ff-display); font-weight: 600; font-size: 1.15rem; margin-bottom: .6rem; color: #fff; }
.why-item p { font-size: .92rem; color: var(--ink-dim); }

/* ---------- Contact ---------- */
.contact .grid-2 { align-items: start; }
.contact-list { list-style: none; margin: 2rem 0; }
.contact-list li { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.cl-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.contact-list a { font-size: 1.15rem; font-family: var(--ff-display); font-weight: 500; color: #fff; }
.contact-list a:hover { color: var(--cyan); }

.contact-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.6rem); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .04em; color: var(--ink-dim); margin-bottom: .5rem; }
.field input, .field textarea {
  width: 100%; font-family: var(--ff-body); font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: .85em 1em; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(23,224,212,.14); }
.form-note { font-size: .72rem; color: var(--ink-dim); margin-top: 1rem; }
.form-status { font-size: .82rem; margin-top: 1rem; }
.form-status.ok { color: var(--cyan); }
.form-status.err { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: #050607; color: var(--ink-soft); padding: 4rem 0 2rem; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer-logo { height: 26px; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; color: var(--ink-dim); max-width: 26ch; }
.footer-nav { display: flex; flex-direction: column; gap: .7rem; }
.footer-nav a { font-size: .95rem; color: var(--ink-soft); transition: color .2s; }
.footer-nav a:hover { color: var(--cyan); }
.footer-contact { display: flex; flex-direction: column; gap: .5rem; font-size: .88rem; }
.footer-contact a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 1.6rem; font-size: .78rem; color: var(--ink-dim); }
.to-top:hover { color: var(--cyan); }

/* ---------- Reveal / motion ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); }
.reveal-in [data-reveal], [data-reveal].reveal-in { opacity: 1; transform: none; }
[data-reveal="words"] { opacity: 1; transform: none; }
.word { display: inline-block; overflow: hidden; }
.word > span { display: inline-block; transform: translateY(105%); }
/* conveyor-style entrance: slide in from the right like arriving on a belt */
[data-conveyor] { opacity: 0; transform: translateX(60px); }
[data-conveyor].reveal-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-viz { order: -1; max-width: 460px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-btn { display: flex; }
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(10,12,15,.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad) 1.6rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }
  .nav a::after { display: none; }
  .header-cta { display: none; }
  .hero-viz { order: -1; margin: 0 auto 1rem; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .hero-stats { gap: 1.4rem 2.2rem; }
  .cards, .brand-grid, .why-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .8rem; }
  .sec-title, .sec-head.center .sec-title { max-width: 100%; }
  .status-ticker { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  [data-reveal], [data-conveyor] { opacity: 1 !important; transform: none !important; }
  .word > span { transform: none !important; }
  #fx { display: none; }
  html { scroll-behavior: auto; }
}
