/* =====================================================================
   WiNDS Lab — stylesheet for the website and the admin page.
   Colours and fonts are defined once, here at the top.
   ===================================================================== */

:root {
  color-scheme: light;

  /* brand */
  --navy-950: #071122;
  --navy-900: #0a1628;
  --navy-800: #0f2240;
  --teal: #0d9488;
  --teal-700: #0f766e;
  --teal-bright: #2dd4bf;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --indigo: #4f46e5;
  --indigo-50: #eef2ff;

  /* text & surfaces */
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;

  /* label colours */
  --amber: #b45309;  --amber-50: #fffbeb;  --amber-100: #fde68a;
  --green: #15803d;  --green-50: #f0fdf4;
  --violet: #7c3aed; --violet-50: #f5f3ff;
  --sky: #0369a1;    --sky-50: #f0f9ff;
  --rose: #be123c;   --rose-50: #fff1f2;
  --slate: #475569;  --slate-50: #f1f5f9;
  --danger: #dc2626;

  --font-head: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, .04), 0 14px 30px -10px rgba(15, 23, 42, .16);
  --shadow-lg: 0 30px 60px -22px rgba(15, 23, 42, .28), 0 8px 20px -8px rgba(15, 23, 42, .08);
  --nav-h: 72px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0; }
h1, h2 { text-wrap: balance; }
h3, h4 { text-wrap: pretty; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid rgba(45, 212, 191, .55); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 8px 18px -8px rgba(13, 148, 136, .7); }
.btn-primary:hover { background: var(--teal-700); color: #fff; }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn-glass:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.btn-outline, .btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover, .btn-ghost:hover { border-color: var(--line-strong); background: #f8fafc; color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; color: var(--danger); }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: .84rem; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

/* ---------- navigation ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.logo:hover { text-decoration: none; }
/* navbar logo: dark-background colours over the hero, the original colours once the bar turns white */
.logo-img { display: block; height: 46px; width: auto; }
.logo-img.on-light { display: none; }
.site-nav.scrolled .logo-img.on-dark, .site-nav.menu-open .logo-img.on-dark { display: none; }
.site-nav.scrolled .logo-img.on-light, .site-nav.menu-open .logo-img.on-light { display: block; }
@media (max-width: 640px) { .logo-img { height: 40px; } }
.footer-logo { display: inline-block; }
.footer-logo img { display: block; width: 200px; height: auto; }
.footer-about .footer-tagline { max-width: none; margin: 14px 0 0; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.logo-mark {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #14b8a6, #6366f1); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6);
}
.logo-mark svg { width: 26px; height: 26px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--font-head); font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; }
.logo-text small { font-size: .74rem; font-weight: 500; opacity: .68; letter-spacing: .01em; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.site-nav .nav-links a:not(.btn) {
  color: rgba(255, 255, 255, .78); font-size: .94rem; font-weight: 500;
  padding: 8px 13px; border-radius: 8px; transition: color .2s, background-color .2s;
}
.site-nav .nav-links a:not(.btn):hover,
.site-nav .nav-links a.active { color: #fff; background: rgba(255, 255, 255, .09); text-decoration: none; }
.btn-nav { margin-left: 10px; padding: 9px 18px; }

.site-nav.scrolled, .site-nav.menu-open {
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line); box-shadow: 0 6px 24px -14px rgba(15, 23, 42, .25);
}
.site-nav.scrolled .logo, .site-nav.menu-open .logo { color: var(--ink); }
.site-nav.scrolled .nav-links a:not(.btn) { color: var(--body); }
.site-nav.scrolled .nav-links a:not(.btn):hover,
.site-nav.scrolled .nav-links a.active { color: var(--teal-700); background: var(--teal-50); }

.menu-btn { display: none; position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 27px; }
.site-nav.scrolled .menu-btn, .site-nav.menu-open .menu-btn { color: var(--ink); }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1024px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none; position: absolute; top: calc(var(--nav-h) - 6px); left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  }
  .menu-open .nav-links { display: flex; }
  .site-nav .nav-links a:not(.btn) { color: var(--body); padding: 12px 14px; }
  .site-nav .nav-links a:not(.btn):hover, .site-nav .nav-links a.active { color: var(--teal-700); background: var(--teal-50); }
  .btn-nav { margin: 6px 0 0; padding: 12px; }
}

/* ---------- icons (two-tone line icons from app.js) ----------
   Each tile sets --gi-acc (accent colour) and --gi-bg (its own background) and `color` (line colour). */
.gi { display: block; width: 100%; height: 100%; overflow: visible; }
.gi .l { fill: none; stroke: currentColor; stroke-width: var(--gi-sw, 2); stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s ease; }
.gi .l.thin { stroke-width: 1.3; opacity: .5; }
.gi .bg { fill: var(--gi-bg, #fff); transition: fill .3s ease; }
.gi .a { fill: none; stroke: var(--gi-acc, var(--teal)); stroke-width: var(--gi-sw, 2); stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s ease; }
.gi .af { fill: var(--gi-acc, var(--teal)); transition: fill .3s ease; }
.gi .ck { fill: none; stroke: var(--gi-bg, #fff); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gi .dash { stroke-dasharray: 2.2 3.3; }
.gi .needle { transform-origin: 24px 30px; transform: rotate(-48deg); transition: transform .8s cubic-bezier(.34, 1.56, .64, 1); }
.gi .loop { transform-origin: 24px 24px; }
.gi .pk, .gi .q { transition: transform .3s ease; }
@keyframes gi-flow { to { stroke-dashoffset: -11; } }
@keyframes gi-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes gi-node { 0%, 100% { fill: var(--gi-bg, #fff); } 50% { fill: var(--gi-acc, var(--teal)); } }
@keyframes gi-slide { 0% { transform: translateX(-7px); opacity: 0; } 25%, 75% { opacity: 1; } 100% { transform: translateX(7px); opacity: 0; } }
@keyframes gi-jitter { to { transform: translateX(1.6px); } }
@keyframes gi-spin { to { transform: rotate(-360deg); } }
@keyframes gi-draw { 0% { stroke-dashoffset: 44; opacity: 1; } 40% { stroke-dashoffset: 0; } 88% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes gi-fire { 0%, 60%, 100% { opacity: 0; } 15%, 40% { opacity: 1; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--nav-h) + 96px) 0 152px;
  background:
    radial-gradient(900px 520px at 85% 0%, rgba(20, 184, 166, .22), transparent 60%),
    radial-gradient(720px 480px at 0% 100%, rgba(99, 102, 241, .24), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%); mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-copy { max-width: 640px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  font-size: .86rem; font-weight: 500; color: rgba(255, 255, 255, .85);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(45, 212, 191, .2); }
.hero h1 {
  margin: 26px 0 22px; color: #fff;
  font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em;
}
.hero h1 .accent { background: linear-gradient(90deg, #5eead4, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { max-width: 580px; margin: 0 0 36px; font-size: 1.15rem; line-height: 1.7; color: rgba(255, 255, 255, .74); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* background scene: IoT nodes, robots, a drone and a gateway linked by wireless links */
.hero-scene {   /* sits in the space to the right of the headline, scaled to fit */
  position: absolute; top: var(--nav-h); bottom: 72px; right: 0; max-width: 820px;
  left: calc(max(24px, 50vw - 576px) + 540px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%); mask-image: linear-gradient(90deg, transparent 0, #000 14%);
}
.hero-scene svg { width: 100%; height: 100%; overflow: visible; }
.hero-scene .cov { fill: none; stroke: rgba(148, 163, 184, .12); stroke-width: 1; }
.hero-scene .pulse { fill: none; stroke: rgba(45, 212, 191, .45); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: ping 5.1s ease-out infinite; opacity: 0; }
.hero-scene .links path { fill: none; stroke: rgba(148, 163, 184, .45); stroke-width: 1.3; stroke-dasharray: 2 7; stroke-linecap: round; animation: flow 1.5s linear infinite; }
.hero-scene .d-body { fill: #0c1c35; stroke: rgba(203, 213, 225, .6); stroke-width: 1.5; }
.hero-scene .d-line { fill: none; stroke: rgba(203, 213, 225, .6); stroke-width: 1.5; }
.hero-scene .d-rotor { fill: none; stroke: rgba(203, 213, 225, .42); stroke-width: 1.3; }
.hero-scene .d-acc { fill: #2dd4bf; }
.hero-scene .d-led { fill: #2dd4bf; animation: blink 2.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.hero-scene .d-sig { fill: none; stroke: #2dd4bf; stroke-width: 1.5; opacity: .8; }
.hero-scene .d-rotor { transform-box: fill-box; transform-origin: center; animation: rotor .16s linear infinite; }
.hero-scene .road { fill: none; stroke: rgba(148, 163, 184, .2); stroke-width: 1.2; }
.hero-scene .lane { fill: none; stroke: rgba(148, 163, 184, .22); stroke-width: 1.2; stroke-dasharray: 14 12; }
.hero-scene .links .ln-node { stroke: rgba(148, 163, 184, .26); }
.hero-scene .links .ho { stroke: #5eead4; stroke-width: 2; stroke-dasharray: none; }
.hero-scene .old-link { fill: none; stroke: rgba(203, 213, 225, .6); stroke-width: 1.3; stroke-dasharray: 2 7; animation: fadeout 1s ease-out forwards; }
.hero-scene .burst { fill: none; stroke: #5eead4; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: burst 1.1s ease-out forwards; }
.hero-scene .ho-label { fill: #99f6e4; font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-anchor: middle; animation: holabel 1.8s ease-out forwards; }
@keyframes burst { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
@keyframes holabel { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }
.dev *, .device-art * { vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: -18; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes rotor { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.35); } }

@media (max-width: 960px) {
  .hero { padding: calc(var(--nav-h) + 56px) 0 96px; }
  .hero-scene {   /* phones and tablets: the network sits below the buttons instead of behind the text */
    position: relative; top: auto; bottom: auto; left: auto; right: auto; max-width: none;
    height: clamp(240px, 62vw, 420px); margin: 28px 0 0; -webkit-mask-image: none; mask-image: none;
  }
  .hero-scene .ho-label { font-size: 20px; }
}

/* ---------- stats bar ---------- */
.stats {
  position: relative; z-index: 2; margin-top: -72px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.stat { display: flex; align-items: center; gap: 16px; padding: 28px 28px; border-left: 1px solid var(--line); }
.stat-icon { flex: none; width: 52px; height: 52px; padding: 8px; --gi-sw: 2.2; border-radius: 14px; background: var(--teal-50); color: var(--navy-800); --gi-acc: var(--teal); --gi-bg: var(--teal-50); }
.stat:first-child { border-left: 0; }
.stat-num { font-family: var(--font-head); font-size: 2.3rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.stat-num .unit { margin-left: 3px; font-size: .55em; color: var(--teal); letter-spacing: 0; }
.stat-label { margin-top: 10px; font-size: .9rem; font-weight: 500; color: var(--muted); }
@media (max-width: 1080px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .stat { flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 20px; }
  .stat-icon { width: 42px; height: 42px; padding: 7px; border-radius: 12px; }
  .stat-num { font-size: 1.9rem; }
}

/* ---------- sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  position: relative; color: rgba(255, 255, 255, .75);
  background:
    radial-gradient(760px 380px at 100% 0%, rgba(45, 212, 191, .14), transparent 60%),
    radial-gradient(640px 360px at 0% 100%, rgba(99, 102, 241, .18), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
}
.section-dark .eyebrow { color: var(--teal-bright); }
.section-dark .section-title { color: #fff; }
.section-dark .section-desc { color: rgba(255, 255, 255, .62); }
section[id] { scroll-margin-top: var(--nav-h); }
.section-head { max-width: 700px; margin-bottom: 52px; }
.section-head.with-action { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head.with-action > div { max-width: 700px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-700);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.section-title { margin: 14px 0 16px; font-size: clamp(1.85rem, 3.3vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.14; }
.section-desc { margin: 0; font-size: 1.08rem; color: var(--muted); }
@media (max-width: 760px) { .section { padding: 72px 0; } .section-head { margin-bottom: 36px; } }

/* reveal on scroll (only when JavaScript is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- about ---------- */
.mission { display: grid; grid-template-columns: 1.25fr 1fr; gap: 72px; align-items: end; }
.statement {
  margin: 18px 0 0; font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 700; line-height: 1.28; letter-spacing: -.02em; color: var(--ink);
}
.statement span { color: var(--muted); }
.mission-text p { font-size: 1.04rem; }
.mission-text p:last-child { margin-bottom: 0; }

.process { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.process::before {   /* line connecting the three steps */
  content: ""; position: absolute; top: 32px; left: 32px; right: calc(33.33% - 4px);
  border-top: 2px dashed var(--line-strong);
}
.process li { position: relative; }
.process-icon {
  position: relative; display: block; width: 64px; height: 64px; margin-bottom: 20px; padding: 9px; --gi-sw: 2.2;
  border-radius: 17px; background: var(--navy-900); color: rgba(226, 232, 240, .92);
  --gi-acc: var(--teal-bright); --gi-bg: var(--navy-900);
  box-shadow: 0 0 0 8px #fff, 0 14px 26px -14px rgba(10, 22, 40, .7);
}
.process-icon .gi-simulate .draw { stroke-dasharray: 44; animation: gi-draw 3.4s ease-in-out infinite; }
.process-icon .gi-hardware .arc1 { animation: gi-blink 1.8s ease-in-out infinite; }
.process-icon .gi-hardware .led { animation: gi-blink 1.1s steps(2) infinite; }
.process-icon .gi-learn .lit { opacity: 0; animation: gi-fire 2.4s ease-in-out infinite; }
.process-icon .gi-learn .d1 { animation-delay: .45s; }
.process-icon .gi-learn .d2 { animation-delay: .9s; }
.process-step { display: block; margin-bottom: 4px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-700); }
.process h3 { margin: 0 0 8px; font-size: 1.2rem; }
.process p { margin: 0; color: var(--muted); font-size: .97rem; max-width: 34ch; }
@media (max-width: 960px) {
  .mission { grid-template-columns: 1fr; gap: 24px; }
  .process { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
  .process::before { top: 32px; bottom: 32px; left: 31px; right: auto; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .process li { padding-left: 84px; }
  .process-icon { position: absolute; left: 0; top: 0; }
}

/* ---------- research ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm);
}
.feature { position: relative; display: flex; flex-direction: column; padding: 36px 34px 34px; outline: 1px solid var(--line); transition: background-color .25s ease; }
.feature::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--teal-bright), #6366f1);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.feature:hover { background: #fbfcfd; }
.feature:hover::before { transform: scaleX(1); }
.feature-icon {
  display: block; width: 64px; height: 64px; padding: 9px; margin-bottom: 24px; border-radius: 18px; --gi-sw: 2.1;
  background: var(--teal-50); border: 1px solid var(--teal-100); color: var(--navy-800);
  --gi-acc: var(--teal); --gi-bg: var(--teal-50);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.feature:hover .feature-icon {
  background: var(--navy-900); border-color: var(--navy-900); color: #e2e8f0;
  --gi-acc: var(--teal-bright); --gi-bg: var(--navy-900);
  box-shadow: 0 14px 26px -14px rgba(10, 22, 40, .75); transform: translateY(-2px);
}
.feature:hover .gi-iot .dash, .feature:hover .gi-edge .dash { animation: gi-flow .9s linear infinite; }
.feature:hover .gi-iot .n, .feature:hover .gi-edge .n { animation: gi-node 1.4s ease-in-out infinite; }
.feature:hover .gi-wireless .arc1 { animation: gi-blink 1.2s ease-in-out infinite; }
.feature:hover .gi-wireless .arc2 { animation: gi-blink 1.2s ease-in-out .3s infinite; }
.feature:hover .gi-perf .needle { transform: rotate(52deg); }
.feature:hover .gi-congestion .pk { animation: gi-slide 1s linear infinite; }
.feature:hover .gi-congestion .q { animation: gi-jitter .45s ease-in-out infinite alternate; }
.feature:hover .gi-rl .loop { animation: gi-spin 2.6s linear infinite; }
.feature h3 { margin: 0 0 10px; font-size: 1.18rem; letter-spacing: -.01em; }
.feature p { flex: 1; margin: 0 0 20px; font-size: .97rem; color: var(--muted); }
.feature-tags { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .8rem; font-weight: 600; color: var(--teal-700); }
.feature-tags span + span::before { content: "·"; margin: 0 9px; color: var(--muted); }
@media (max-width: 1024px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } .feature { padding: 28px 24px; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 6px; background: var(--bg-alt); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--body); }

/* ---------- devices (shown on the dark section) ---------- */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.device {
  display: flex; flex-direction: column; margin: 0; overflow: hidden;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}
.device:hover { transform: translateY(-4px); border-color: rgba(45, 212, 191, .45); background: rgba(255, 255, 255, .055); }
.device-media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: radial-gradient(circle at 50% 50%, rgba(45, 212, 191, .12), transparent 70%);
}
.device-media::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
}
.device-media.has-img { background: #0c1c35; }
.device-media.has-img::before { display: none; }
.device-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.device:hover .device-media img { transform: scale(1.04); }
.device-art { position: absolute; top: 22%; bottom: 20%; left: 20%; right: 20%; width: 60%; height: 58%; overflow: visible; transition: transform .4s ease; }
.device:hover .device-art { transform: translateY(-4px); }
.device-art .d-body { fill: #0c1c35; stroke: rgba(226, 232, 240, .8); stroke-width: 1.6; }
.device-art .d-line { fill: none; stroke: rgba(226, 232, 240, .8); stroke-width: 1.6; }
.device-art .d-rotor { fill: none; stroke: rgba(226, 232, 240, .5); stroke-width: 1.4; }
.device-art .d-acc { fill: var(--teal-bright); }
.device-art .d-led { fill: var(--teal-bright); animation: blink 2.8s ease-in-out infinite; }
.device-art .d-sig { fill: none; stroke: var(--teal-bright); stroke-width: 1.6; }
.device-cat {
  position: absolute; top: 14px; left: 14px; padding: 4px 10px; border-radius: 6px;
  background: rgba(10, 22, 40, .7); border: 1px solid rgba(255, 255, 255, .14);
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .88);
}
.device-zoom { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.zoom-ico {
  position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: rgba(10, 22, 40, .72); color: #fff; opacity: 0; transition: opacity .2s ease;
}
.device:hover .zoom-ico, .device-zoom:focus-visible .zoom-ico { opacity: 1; }
.zoom-ico svg { width: 18px; height: 18px; }
.device-body { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
.device-body h3 { margin: 0 0 8px; font-size: 1.12rem; color: #fff; }
.device-body p { flex: 1; margin: 0 0 16px; font-size: .94rem; color: rgba(255, 255, 255, .6); }
.device .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 32px;
  background: rgba(7, 17, 34, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow-lg); background: #fff; }
.lightbox figcaption { margin-top: 14px; color: rgba(255, 255, 255, .85); font-weight: 600; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .16); }
.lightbox-close svg { width: 20px; height: 20px; }

/* ---------- news ---------- */
.news-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.news-feature {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 320px;
  padding: 36px; border-radius: 24px; color: #fff; box-shadow: var(--shadow-md);
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(45, 212, 191, .35), transparent 65%),
    linear-gradient(150deg, var(--teal-700) 0%, var(--navy-800) 75%);
}
.news-feature::after {   /* faint signal rings for texture */
  content: ""; position: absolute; right: -90px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 80px rgba(255, 255, 255, .02);
}
.news-latest { align-self: flex-start; padding: 5px 10px; border-radius: 6px; background: rgba(255, 255, 255, .14); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.news-feature-meta { display: flex; gap: 12px; margin-top: auto; padding-top: 40px; font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.news-feature-meta span::before { content: "·"; margin-right: 12px; }
.news-feature p { position: relative; margin: 10px 0 0; font-family: var(--font-head); font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 700; line-height: 1.32; letter-spacing: -.01em; }
.news-feature strong { color: #99f6e4; }
.news-feature a { color: #99f6e4; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-row { display: grid; grid-template-columns: 104px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news-row:first-child { padding-top: 4px; }
.news-list:not(.show-all) .extra { display: none; }
.news-when { display: flex; flex-direction: column; gap: 4px; }
.news-when time { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.news-tag { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--muted); --tc: var(--slate); }
.news-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
.tag-paper, .tag-papers { --tc: var(--indigo); }
.tag-grant { --tc: var(--green); }
.tag-award { --tc: #d97706; }
.tag-milestone { --tc: var(--violet); }
.tag-talk { --tc: var(--sky); }
.tag-event { --tc: var(--rose); }
.news-row p { margin: 0; color: var(--body); }
.news-row strong { color: var(--ink); }
.news-more { margin-top: 24px; }
@media (max-width: 960px) { .news-layout { grid-template-columns: 1fr; gap: 32px; } .news-feature { min-height: 0; } }
@media (max-width: 480px) { .news-row { grid-template-columns: 1fr; gap: 6px; } .news-when { flex-direction: row; gap: 12px; align-items: center; } }

/* ---------- people ---------- */
.pi-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 200px 1fr; gap: 44px; align-items: start;
  padding: 40px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-md);
}
.pi-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--teal-bright), #6366f1); }
.pi-photo {
  position: relative; overflow: hidden; width: 200px; height: 200px; border-radius: 22px;
  display: grid; place-items: center; background: linear-gradient(140deg, #14b8a6, #6366f1);
  color: #fff; font-family: var(--font-head); font-size: 3.4rem; font-weight: 800;
}
.pi-photo img, .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pi-card h3 { margin: 12px 0 6px; font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; }
.pi-position { margin: 0; font-weight: 600; color: var(--teal-700); }
.pi-affil { margin: 0; font-size: .95rem; color: var(--muted); }
.pi-bio { margin: 18px 0 20px; font-size: 1.02rem; }
.cred { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cred span { padding: 5px 12px; border-radius: 999px; background: var(--teal-50); border: 1px solid var(--teal-100); font-size: .82rem; font-weight: 600; color: var(--teal-700); }
.pi-links { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .pi-card { grid-template-columns: 1fr; gap: 24px; padding: 28px 24px; }
  .pi-photo { width: 120px; height: 120px; font-size: 2.2rem; border-radius: 18px; }
  .pi-card h3 { font-size: 1.5rem; }
}

.group-title { display: flex; align-items: center; gap: 12px; margin: 52px 0 22px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-title .count { padding: 2px 10px; border-radius: 999px; background: var(--teal-50); font-size: .78rem; font-weight: 700; color: var(--teal-700); }

.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px) { .people-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .people-grid { grid-template-columns: 1fr; } }
.person-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 30px 22px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.avatar {
  position: relative; overflow: hidden; flex: none; width: 80px; height: 80px; margin-bottom: 18px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 1.45rem; font-weight: 800;
  background: hsl(var(--h, 172) 70% 94%); color: hsl(var(--h, 172) 55% 32%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line);
}
.person-name { margin: 0 0 6px; font-size: 1.08rem; font-weight: 700; }
.person-name a { color: inherit; }
.person-topic { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.award {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px;
  background: var(--amber-50); border: 1px solid var(--amber-100); font-size: .76rem; font-weight: 700; color: var(--amber);
}
.award svg, .now svg { width: 14px; height: 14px; }
.now {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px;
  background: var(--teal-50); border: 1px solid var(--teal-100); font-size: .76rem; font-weight: 700; color: var(--teal-700);
}
.person-meta { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: auto; padding-top: 14px; width: 100%; border-top: 1px solid var(--line); font-size: .82rem; font-weight: 500; color: var(--muted); }
.person-meta svg { width: 15px; height: 15px; flex: none; }
.person-card.open { background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; color: var(--body); }
.person-card.open:hover { border-color: var(--teal); background: #fff; }
.person-card.open .avatar { background: var(--teal-50); color: var(--teal); font-size: 2rem; font-weight: 500; box-shadow: none; }
.person-card.open .person-meta { color: var(--teal-700); font-weight: 600; border-top-style: dashed; }

/* ---------- publications ---------- */
.pub-filters, .people-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--body);
  font: 600 .9rem/1.2 var(--font-body); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.filter:hover { border-color: var(--line-strong); }
.filter .n { margin-left: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.filter[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter[aria-selected="true"] .n { color: rgba(255, 255, 255, .65); }

.pub-list:not(.show-all) .extra { display: none; }
.more-row { margin-top: 24px; text-align: center; }
.pub-list { list-style: none; margin: 0; padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.pub { display: grid; grid-template-columns: 100px 1fr auto; gap: 28px; align-items: start; padding: 24px 28px; border-top: 1px solid var(--line); transition: background-color .2s; }
.pub:first-child { border-top: 0; }
.pub:hover { background: #fafbfd; }
.pub-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pub-year { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.pub-cat { padding: 3px 8px; border-radius: 6px; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; background: var(--slate-50); color: var(--slate); }
.cat-journal { background: var(--indigo-50); color: var(--indigo); }
.cat-conference { background: var(--teal-50); color: var(--teal-700); }
.cat-patent { background: var(--amber-50); color: var(--amber); }
.cat-book-chapter { background: var(--rose-50); color: var(--rose); }
.pub-title { margin: 0 0 6px; font-family: var(--font-body); font-size: 1.04rem; font-weight: 600; line-height: 1.45; letter-spacing: -.006em; text-wrap: pretty; }
.pub-authors { margin: 0 0 4px; font-size: .94rem; color: var(--body); }
.pub-authors strong { color: var(--ink); font-weight: 700; }
.pub-venue { margin: 0; font-size: .9rem; color: var(--muted); }
.pub-venue em { color: var(--body); }
.pub-link { align-self: center; }
@media (max-width: 760px) {
  .pub { grid-template-columns: 1fr; gap: 10px; padding: 22px 20px; }
  .pub-side { flex-direction: row; align-items: center; gap: 10px; }
  .pub-year { font-size: 1.05rem; }
  .pub-link { justify-self: start; margin-top: 4px; }
}

/* ---------- grants ---------- */
.funding-banner {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; gap: 44px; align-items: center;
  padding: 38px 44px; margin-bottom: 24px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(45, 212, 191, .25), transparent 60%),
    radial-gradient(420px 260px at 0% 100%, rgba(99, 102, 241, .3), transparent 60%),
    linear-gradient(135deg, var(--navy-900), var(--navy-800));
}
.funding-amount { font-family: var(--font-head); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.funding-amount small { margin-left: 6px; font-size: .45em; color: var(--teal-bright); letter-spacing: 0; }
.funding-label { margin-top: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.funding-text { margin: 0; padding-left: 44px; border-left: 1px solid rgba(255, 255, 255, .16); font-size: 1.05rem; color: rgba(255, 255, 255, .78); max-width: 600px; }
@media (max-width: 760px) {
  .funding-banner { grid-template-columns: 1fr; gap: 20px; padding: 30px 26px; }
  .funding-text { padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
}

.grant-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .grant-grid { grid-template-columns: 1fr; } }
.grant {
  display: flex; flex-direction: column; padding: 28px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.grant:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.grant-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.grant-amount { font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--teal-700); }
.role { padding: 4px 10px; border-radius: 6px; background: var(--navy-900); font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: #fff; }
.grant h3 { flex: 1; margin: 0 0 20px; font-family: var(--font-body); font-size: 1.08rem; font-weight: 600; line-height: 1.45; letter-spacing: -.006em; }
.grant-meta { display: grid; gap: 9px; margin: 0; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.grant-meta div { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--body); }
.grant-meta svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.grant-progress { margin-top: 20px; }
.gp-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .8rem; font-weight: 700; color: var(--teal-700); }
.gp-head span:last-child { color: var(--muted); font-weight: 600; }
.gp-bar { height: 6px; border-radius: 99px; background: var(--slate-50); overflow: hidden; }
.gp-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-bright), var(--teal)); }
.gp-done .gp-head { color: var(--slate); }
.gp-done .gp-bar span { background: var(--line-strong); }
.gp-upcoming .gp-head { color: var(--indigo); }

/* ---------- join ---------- */
.join-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 64px; border-radius: 28px; color: #fff;
  background:
    radial-gradient(700px 360px at 100% 0%, rgba(45, 212, 191, .22), transparent 60%),
    radial-gradient(600px 360px at 0% 100%, rgba(99, 102, 241, .3), transparent 60%),
    linear-gradient(135deg, var(--navy-900), var(--navy-800));
}
.join-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000);
}
.join-card > * { position: relative; }
.join-card .eyebrow { color: var(--teal-bright); }
.join-card .section-title { color: #fff; }
.join-card p { color: rgba(255, 255, 255, .74); font-size: 1.05rem; }
.join-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.join-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.join-steps li { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.step-icon {
  flex: none; display: block; width: 46px; height: 46px; padding: 8px; border-radius: 12px; --gi-sw: 2.8;
  background: var(--teal-bright); color: var(--navy-900); --gi-acc: var(--navy-900); --gi-bg: var(--teal-bright);
  transition: transform .25s ease;
}
.join-steps li:hover .step-icon { transform: translateY(-2px) rotate(-4deg); }
.join-steps h3 { margin: 2px 0 4px; font-size: 1.02rem; color: #fff; }
.join-steps p { margin: 0; font-size: .93rem; color: rgba(255, 255, 255, .68); }
.join-steps a { color: var(--teal-bright); font-weight: 600; }
@media (max-width: 960px) { .join-card { grid-template-columns: 1fr; gap: 36px; padding: 40px 26px; border-radius: 22px; } }

/* ---------- footer ---------- */
.footer { padding: 72px 0 32px; background: var(--navy-950); color: rgba(255, 255, 255, .62); font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer-about p { max-width: 40ch; margin: 18px 0 0; }
.footer h4 { margin: 4px 0 16px; font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.footer-links a { display: block; padding: 5px 0; color: rgba(255, 255, 255, .62); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .7); }
.to-top:hover { color: #fff; text-decoration: none; }
.to-top svg { width: 15px; height: 15px; transition: transform .2s ease; }
.to-top:hover svg { transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scene *, .device-art *, .gi * { animation: none !important; transition: none !important; }
  .gi .lit { opacity: 1; }
  .btn, .feature, .device, .person-card, .grant { transition: none; }
}


/* =====================================================================
   Admin page
   ===================================================================== */
.admin { background: #f4f6fa; }
.admin-bar { background: var(--navy-900); color: #fff; }
.admin-bar .nav-inner { height: 64px; }
.admin-logo { gap: 14px; }
.admin-logo img { display: block; height: 38px; width: auto; }
.admin-tag { padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .22); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.admin-nav { display: flex; align-items: center; gap: 6px; }
.admin-nav a { color: rgba(255, 255, 255, .8); font-size: .92rem; font-weight: 500; padding: 7px 12px; border-radius: 8px; }
.admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); text-decoration: none; }
.admin .container { max-width: 1000px; }
.admin main { padding-top: 40px; padding-bottom: 80px; }
.admin-head { margin-bottom: 28px; }
.admin-head h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.admin-head p { margin: 0; color: var(--muted); }
.admin h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }

.panel { margin-bottom: 24px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); scroll-margin-top: 24px; }
.login { max-width: 420px; margin: 56px auto; padding: 34px; text-align: left; }
.login-logo { display: block; height: 48px; width: auto; margin-bottom: 22px; }
.login h1 { font-size: 1.45rem; font-weight: 800; margin-bottom: 4px; }
.login > p { color: var(--muted); margin-bottom: 22px; }
.login .btn { width: 100%; padding: 12px; }
.notice { margin-bottom: 24px; padding: 14px 18px; border-radius: 12px; background: var(--amber-50); border: 1px solid var(--amber-100); color: #78350f; }
.notice code { font-size: .9em; background: rgba(255, 255, 255, .7); padding: 1px 5px; border-radius: 4px; }
.error { margin: 12px 0 0; font-size: .92rem; color: var(--danger); }
.error:empty { display: none; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 6px; font-size: .84rem; font-weight: 600; color: var(--ink); }
.field small { display: block; margin-top: 5px; font-size: .8rem; color: var(--muted); }
.admin input, .admin select, .admin textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
  font: inherit; font-size: .95rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.admin textarea { min-height: 84px; resize: vertical; }
.admin input:focus, .admin select:focus, .admin textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13, 148, 136, .15); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.image-field { display: flex; gap: 8px; align-items: center; }
.image-field input[type="text"] { flex: 1; min-width: 0; }
.image-field .btn { flex: none; padding: 10px 14px; }
.img-preview { display: block; width: 120px; height: 90px; margin-top: 10px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-alt); }

fieldset.app { min-width: 0; margin: 0; padding: 0; border: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tabs button {
  flex: 1 1 auto; padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--body);
  font: 600 .92rem/1.2 var(--font-body); cursor: pointer; transition: background-color .15s, color .15s;
}
.tabs button:hover { background: var(--bg-alt); }
.tabs button[aria-selected="true"] { background: var(--navy-900); color: #fff; }
.tabs .count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(100, 116, 139, .14); font-size: .76rem; }
.tabs button[aria-selected="true"] .count { background: rgba(255, 255, 255, .18); }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 36px 0 12px; }
.list-head h2 { margin: 0; }
.list-head p { margin: 0; }
.items { list-style: none; margin: 0; padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.items li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.items li:first-child { border-top: 0; }
.items li:hover { background: #fafbfd; }
.items li.editing { background: var(--teal-50); box-shadow: inset 3px 0 0 var(--teal); }
.items li.muted { justify-content: center; padding: 28px; }
.item-main { flex: 1; min-width: 0; }
.item-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .96rem; font-weight: 600; color: var(--ink); }
.item-actions { display: flex; flex: none; gap: 6px; }
@media (max-width: 640px) {
  .items li { flex-direction: column; align-items: stretch; }
  .item-main strong { white-space: normal; }
}

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 12px; background: var(--navy-900); color: #fff; font-size: .93rem; font-weight: 500;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }
