/* ==========================================================
   RoboInspect — site stylesheet ("digital mesh" dark theme)
   Palette aligned with the Industrial Digitalization and
   Multiscale Modelling Research Division. See /brand/.
   ========================================================== */

@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("../fonts/poppins-light.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/poppins-regular.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/poppins-bold.woff") format("woff"); }

:root {
  --night: #09102A;
  --night-2: #0E1838;
  --navy: #1A3260;
  --blue: #4590B8;
  --silver: #969FA7;
  --magenta: #E04A7F;
  --glow: #4FB3E0;
  --violet: #8F7BD6;
  --cyan: #5CC8E8;

  --text: #DCE4F2;
  --muted: #9AA8C0;
  --line: rgba(255,255,255,.09);
  --glass: rgba(255,255,255,.035);
  --grad: linear-gradient(100deg, var(--glow) 0%, var(--violet) 50%, var(--magenta) 100%);

  --radius: 16px;
  --maxw: 1200px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--night); }
body {
  margin: 0; font-family: var(--font); color: var(--text); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 0% 45%, rgba(69,144,184,.10), transparent 70%),
    radial-gradient(ellipse 50% 35% at 100% 75%, rgba(224,74,127,.09), transparent 70%),
    var(--night);
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; color: #fff; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; }
.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem; display: inline-flex; align-items: center; gap: .65rem;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 62ch; }

/* Division tri-bar */
.tribar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 4px; width: 132px; margin-bottom: 22px; }
.tribar span:nth-child(1) { background: #2F5496; }
.tribar span:nth-child(2) { background: var(--blue); }
.tribar span:nth-child(3) { background: var(--silver); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(9,16,42,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 30px; align-items: center; }
.nav a { color: #C3CDE0; font-size: .94rem; font-weight: 500; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav .nav-cta { padding: 8px 16px; border: 1px solid rgba(92,200,232,.45); border-radius: 999px; color: #fff; }
.nav .nav-cta:hover { background: rgba(92,200,232,.12); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; align-items: center;
  padding: 120px 0 90px; isolation: isolate;
  background:
    radial-gradient(ellipse 55% 60% at 22% 38%, rgba(69,144,184,.28), transparent 65%),
    radial-gradient(ellipse 50% 55% at 88% 82%, rgba(224,74,127,.26), transparent 65%),
    linear-gradient(160deg, #070D24 0%, #0E1942 55%, #1E1644 100%);
}
.hero-floor { position: absolute; inset: auto 0 0 0; height: 100%; z-index: -2; opacity: .9;
  background: url("../img/concept/mesh-floor.svg") center bottom / cover no-repeat;
  mask-image: linear-gradient(to bottom, transparent 30%, #000 70%); -webkit-mask-image: linear-gradient(to bottom, transparent 30%, #000 70%);
}
.hero > .container { width: 100%; }
.hero-part {
  position: absolute; z-index: -1; right: 1.5vw; top: 50%; width: min(55vw, 940px);
  transform: translateY(-34%); animation: float 9s ease-in-out infinite;
}
.hero-part img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(69,144,184,.25)); }
@keyframes float { 0%,100% { transform: translateY(-34%); } 50% { transform: translateY(-37%); } }
/* dimension line under the part (from leftmost to rightmost point of the mesh) */
.hud-dim { position: absolute; left: 3.3%; right: 3.2%; bottom: -9%; height: 24px; border-left: 1.5px solid var(--cyan); border-right: 1.5px solid var(--cyan); display: grid; place-items: center; }
.hud-dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--cyan); opacity: .9; }
.hud-dim span {
  position: relative; font-family: var(--mono); font-size: .88rem; color: #fff; background: rgba(9,16,42,.9);
  border: 1.5px solid var(--cyan); border-radius: 8px; padding: 5px 14px; box-shadow: 0 0 24px rgba(92,200,232,.25);
}
.hero-content { max-width: 580px; position: relative; }
.hero-content::before { /* soft dark halo for text legibility */
  content: ""; position: absolute; inset: -60px -80px -60px -120px; z-index: -1;
  background: radial-gradient(closest-side, rgba(9,16,42,.55), transparent); }
.hero h1 .grad-text { display: inline; }
.hero .lead { color: #B3C0D6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* HUD */
.hud-corners { position: absolute; inset: 88px 28px 28px; pointer-events: none; z-index: 0; }
.hud-corners i { position: absolute; width: 46px; height: 46px; border: 0 solid rgba(255,255,255,.75); }
.hud-corners i:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.hud-corners i:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.hud-corners i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.hud-corners i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
.hud-line {
  position: absolute; left: 50px; right: 50px; bottom: 50px; display: flex; justify-content: space-between; gap: 20px;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; color: #8E9CB6; text-transform: uppercase; z-index: 1;
}
.hud-line .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); margin-right: 10px; box-shadow: 0 0 10px var(--magenta); animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .hero-part, .hud-line .live::before { animation: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(224,74,127,.28); }
.btn-primary:hover { box-shadow: 0 10px 38px rgba(143,123,214,.45); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.22); color: #fff; background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: rgba(255,255,255,.6); }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(14,24,56,.6); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: var(--mono); color: var(--cyan); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; margin-bottom: 6px; }
.stat span { color: #fff; font-weight: 500; }

/* ---------- Sections ---------- */
section { padding: 110px 0; position: relative; }
.section-head { margin-bottom: 52px; max-width: 760px; }
.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }
.about-grid p { color: #C3CDE0; }
.about-grid strong { color: #fff; }
.cards { display: grid; gap: 16px; }
.card { padding: 24px 24px 20px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: rgba(92,200,232,.35); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(69,144,184,.12); }
.card h3 { display: flex; align-items: center; gap: 12px; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.ico {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, rgba(79,179,224,.35), rgba(224,74,127,.35)); border: 1px solid rgba(255,255,255,.12);
}

/* Mesh band (visual divider) */
.mesh-band { position: relative; height: 340px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mesh-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.mesh-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night) 0%, transparent 25%, transparent 75%, var(--night) 100%); }
.mesh-band .band-caption { position: absolute; z-index: 1; left: 50%; bottom: 26px; transform: translateX(-50%); font-family: var(--mono); font-size: .75rem; letter-spacing: .16em; color: #8E9CB6; white-space: nowrap; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; position: relative; }
.steps::before { /* connecting line */
  content: ""; position: absolute; left: 6%; right: 6%; top: 43px; height: 2px; background: var(--grad); opacity: .45;
}
.step { position: relative; padding: 26px 22px 24px; }
.step .node {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; position: relative;
  background: var(--night); border: 2px solid var(--cyan); color: #fff; font-family: var(--mono); font-size: .8rem; font-weight: 600;
  box-shadow: 0 0 18px rgba(92,200,232,.45);
}
.step:nth-child(2) .node { border-color: #7AA2DE; box-shadow: 0 0 18px rgba(122,162,222,.45); }
.step:nth-child(3) .node { border-color: var(--violet); box-shadow: 0 0 18px rgba(143,123,214,.45); }
.step:nth-child(4) .node { border-color: var(--magenta); box-shadow: 0 0 18px rgba(224,74,127,.45); }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Results / videos ---------- */
.video-featured { margin-bottom: 24px; }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video-card { overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s; }
.video-card:hover { border-color: rgba(143,123,214,.4); box-shadow: 0 16px 50px rgba(143,123,214,.14); }
.video-featured.video-card { display: grid; grid-template-columns: 1.65fr 1fr; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #060B1E; }
.video-frame video, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-frame::after {
  content: ""; position: absolute; inset: 12px; pointer-events: none; opacity: .6; transition: opacity .3s;
  background:
    linear-gradient(#fff,#fff) top left / 18px 2px, linear-gradient(#fff,#fff) top left / 2px 18px,
    linear-gradient(#fff,#fff) top right / 18px 2px, linear-gradient(#fff,#fff) top right / 2px 18px,
    linear-gradient(#fff,#fff) bottom left / 18px 2px, linear-gradient(#fff,#fff) bottom left / 2px 18px,
    linear-gradient(#fff,#fff) bottom right / 18px 2px, linear-gradient(#fff,#fff) bottom right / 2px 18px;
  background-repeat: no-repeat;
}
.video-frame.is-playing::after { opacity: 0; }
.video-missing { position: absolute; inset: 0; display: none; place-items: center; font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; }
.video-missing span { background: rgba(9,16,42,.85); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 8px 14px; color: #C3CDE0; }
.video-frame.no-src .video-missing { display: grid; }
.video-frame.no-src video { opacity: .45; pointer-events: none; }
.video-body { padding: 20px 22px 22px; }
.video-featured .video-body { padding: 34px; align-self: center; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(92,200,232,.35); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
}
.video-body p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.contact-box { padding: 34px; position: relative; overflow: hidden; }
.contact-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.contact-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: .96rem; color: #C3CDE0; }
.contact-box dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); padding-top: 4px; }
.contact-box dd { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: .9rem; color: #7F8DA8; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-footer img { height: 30px; width: auto; }
.site-footer a { color: #C3CDE0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero { flex-direction: column; align-items: stretch; padding-bottom: 40px; }
  .hero-part { position: relative; right: auto; top: auto; width: 112%; margin: 30px -6% 50px; transform: none; animation: none; }
  .about-grid, .contact-grid, .video-featured.video-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  section { padding: 72px 0; }
  .hud-corners { inset: 80px 10px 12px; }
  .hud-corners i { width: 28px; height: 28px; }
  .hud-line { left: 28px; right: 28px; bottom: 26px; font-size: .64rem; }
  .hud-line span:last-child { display: none; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(9,16,42,.97); padding: 8px 16px 18px; border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { border: 0; border-radius: 0; padding: 12px 0; }
  .nav-toggle { display: block; }
  .site-header { background: rgba(9,16,42,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .steps, .video-grid { grid-template-columns: 1fr; }
  .brand img { height: 28px; }
  .mesh-band { height: 220px; }
  .hero-part { width: 100%; margin: 10px 0 44px; }
}

/* Contact: mesh floor backdrop */
.contact { overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7;
  background: url("../img/concept/mesh-floor.svg") center 80% / cover no-repeat;
  mask-image: linear-gradient(to bottom, transparent, #000 60%); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
}
main { position: relative; z-index: 0; }

/* ---------- Funding ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); overflow: hidden; margin-top: 22px; }
.fact { padding: 20px 22px; background: #0C1432; }
.fact.wide { grid-column: 1 / -1; }
.fact b { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); font-weight: 500; margin-bottom: 4px; }
.fact span { color: #fff; font-weight: 500; }
.funding-note { color: var(--muted); font-size: .95rem; margin-top: 18px; }
.logo-strip { background: #fff; border-radius: 12px; padding: 18px 22px; display: grid; place-items: center; }
.logo-strip img { width: 100%; height: auto; max-width: 1024px; }
.footer-logos { background: #fff; padding: 14px 0; }
.footer-logos img { margin: 0 auto; width: 100%; max-width: 900px; height: auto; }

/* ---------- WordPress specifics ---------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { color: #C3CDE0; }
.entry-content strong { color: #fff; }
.entry-content img { height: auto; border-radius: 12px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.page-generic { padding: 150px 0 100px; min-height: 70vh; }
.page-generic .entry-content { max-width: 780px; }
.page-generic h2, .page-generic h3 { margin-top: 1.6em; }
.post-list article { padding: 22px 24px; margin-bottom: 16px; }

@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
