/* Home page (dark "IT + Coding + AI" theme). Loaded only by layouts/home.php, after tailwind.css and app.css.
   Class names avoid the shared ones in app.css (.btn, .card ...). */


.hv {
  --bg: #0F172A;
  --bg-2: #0B1222;
  --line: rgba(148, 163, 184, .14);
  --text: #E2E8F0;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --cyan: #22D3EE;
  --violet: #8B5CF6;
  --grad: linear-gradient(100deg, var(--cyan) 0%, #60A5FA 45%, var(--violet) 100%);
  --radius: 20px;
  --font: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --nav-h: 72px;
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
:where(.hv) a { color: inherit; text-decoration: none; }   /* :where = no specificity, so utility classes (text-accent ...) on content pages still win */
.hv :focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.hv .wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.hv .skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--cyan); color: #0F172A; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.hv .skip:focus { top: 12px; }
.hv .icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hv .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hv .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hv .ok-text { color: #34D399; }

/* ---------- Header (urgent banners + navbar) ---------- */
.hv .site-head { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.hv .site-head.scrolled { background: rgba(15, 23, 42, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.hv .nav-bar { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hv .brand { display: flex; align-items: center; gap: 12px; }
.hv .brand-mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: #0F172A;
  background: var(--grad); box-shadow: 0 0 24px rgba(34, 211, 238, .35);
}
.hv .brand-text { line-height: 1.25; }
.hv .brand-text b { display: block; font-size: 15px; font-weight: 600; }
.hv .brand-text small { display: block; font-size: 12px; color: var(--muted); }
.hv .menu { display: flex; align-items: center; gap: 4px; font-size: 15px; margin-left: auto; }
.hv .menu a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); transition: color .2s, background .2s; }
.hv .menu a:hover { color: #fff; background: rgba(148, 163, 184, .1); }
.hv .menu a[aria-current="page"] { color: #fff; }
.hv .menu a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 2px; border-radius: 2px; background: var(--grad); }
.hv .menu .hbtn { margin-left: 8px; }
.hv .nav-actions { display: flex; align-items: center; gap: 8px; }
.hv .theme-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: none; color: var(--text); cursor: pointer; transition: border-color .2s, color .2s, box-shadow .2s;
}
.hv .theme-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 20px -6px var(--cyan); }
.hv .theme-btn .icon { width: 20px; height: 20px; }
.hv .theme-btn .i-moon { display: none; }
html[data-theme="light"] .hv .theme-btn .i-sun { display: none; }
html[data-theme="light"] .hv .theme-btn .i-moon { display: block; }
.hv .copyright .visits { font-family: var(--font); }
.hv .burger { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 44px; height: 44px; place-items: center; cursor: pointer; }
.hv .mobile-menu { display: none; }

/* ---------- Buttons (glowing border on hover) ---------- */
.hv .hbtn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 14px;
  font-weight: 600; font-size: 16px; isolation: isolate; transition: transform .2s, box-shadow .3s, color .2s;
}
.hv .hbtn .icon { width: 20px; height: 20px; }
.hv .hbtn-primary { color: #0F172A; background: var(--grad); box-shadow: 0 8px 30px -8px rgba(34, 211, 238, .55); }
.hv .hbtn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 10px 40px -6px rgba(34, 211, 238, .7), 0 0 60px -10px rgba(139, 92, 246, .7); }
.hv .hbtn-ghost { color: var(--text); background: rgba(15, 23, 42, .5); border: 1px solid rgba(148, 163, 184, .28); backdrop-filter: blur(8px); }
.hv .hbtn-ghost::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); z-index: -1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.hv .hbtn-ghost:hover { transform: translateY(-2px); border-color: transparent; box-shadow: 0 0 30px -6px rgba(34, 211, 238, .55), 0 0 50px -12px rgba(139, 92, 246, .6); }
.hv .hbtn-ghost:hover::before { opacity: 1; }
.hv .hbtn-sm { padding: 9px 16px; font-size: 14px; border-radius: 11px; }

/* ---------- Hero ---------- */
.hv .hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: calc(var(--nav-h) + 40px) 0 80px; }
.hv .hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(800px 500px at 78% 35%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(700px 500px at 60% 75%, rgba(34, 211, 238, .14), transparent 60%),
    var(--bg);
}
.hv #net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0; transition: opacity 1.4s ease; }
.hv #net.ready { opacity: 1; }
.hv .hero::after { /* keeps the text side readable over the particles */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .9) 0%, rgba(15, 23, 42, .55) 42%, rgba(15, 23, 42, 0) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0) 22%);
}
.hv .hero > .wrap { position: relative; z-index: 3; }
.hv .hero-content { max-width: 760px; }
.hv .flash-box:empty { display: none; }
.hv .flash-box { margin-bottom: 20px; }
.hv .eyebrow { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: .18em; color: var(--cyan); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.hv .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hv .hero h1 { margin: 18px 0 6px; font-size: clamp(2.4rem, 6.2vw, 4.6rem); line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
.hv .hero h1 .grad-text {
  background-size: 200% auto; filter: drop-shadow(0 0 28px rgba(34, 211, 238, .28)) drop-shadow(0 0 60px rgba(139, 92, 246, .2));
  animation: hv-shimmer 8s linear infinite;
}
@keyframes hv-shimmer { to { background-position: 200% center; } }
.hv .uni { font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 500; color: var(--text-2); margin: 0; }
.hv .terminal-line {
  margin: 28px 0 0; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; flex-wrap: wrap;
  font-family: var(--mono); font-size: clamp(14px, 1.8vw, 17px); padding: 12px 18px; border-radius: 12px;
  background: rgba(2, 6, 23, .55); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.hv .terminal-line .prompt { color: #34D399; }
.hv .terminal-line .typed-wrap { color: #fff; font-family: var(--font); font-weight: 500; }
.hv .terminal-line .chev { color: var(--cyan); font-family: var(--mono); margin-right: 6px; }
.hv .cursor { display: inline-block; width: .6em; color: var(--cyan); animation: hv-blink 1s steps(1) infinite; font-family: var(--mono); }
@keyframes hv-blink { 50% { opacity: 0; } }
.hv .hero-desc { margin: 22px 0 0; font-size: 17px; color: var(--text-2); max-width: 600px; }
.hv .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hv .scroll-hint { position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.hv .scroll-hint span { width: 22px; height: 36px; border: 1.5px solid rgba(148, 163, 184, .45); border-radius: 12px; position: relative; }
.hv .scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: hv-wheel 1.8s ease-in-out infinite; }
@keyframes hv-wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.hv .blueprint { position: relative; overflow-x: clip; }   /* the blurred glow blobs must not widen the page */
.hv .blueprint::before { /* faint blueprint grid behind the lower part of the page */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .07) 1px, transparent 1px),
    linear-gradient(rgba(34, 211, 238, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .035) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.hv .blueprint > * { position: relative; z-index: 1; }
.hv .sec { padding: 96px 0 0; }
.hv .sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.hv .sec-tag { font-family: var(--mono); font-size: 13px; color: var(--cyan); letter-spacing: .08em; }
.hv .sec-head h2 { margin: 6px 0 0; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.3; font-weight: 700; }
.hv .sec-head p { margin: 6px 0 0; color: var(--muted); }
.hv .link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-weight: 500; font-size: 15px; }
.hv .link-more .icon { width: 18px; height: 18px; transition: transform .2s; }
.hv .link-more:hover .icon { transform: translate(2px, -2px); }
.hv .empty { padding: 40px; border: 1px dashed rgba(148, 163, 184, .3); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* ---------- Services: bento + glass ---------- */
.hv .services { position: relative; }
.hv .glow-blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.hv .glow-blob.a { width: 420px; height: 420px; left: -80px; top: 40px; background: rgba(34, 211, 238, .18); }
.hv .glow-blob.b { width: 460px; height: 460px; right: -120px; bottom: -60px; background: rgba(139, 92, 246, .22); }
.hv .bento { position: relative; z-index: 1; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto); perspective: 1200px; }
.hv .svc-card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(30, 41, 59, .55), rgba(15, 23, 42, .45));
  border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px -30px rgba(0, 0, 0, .8);
  transform-style: preserve-3d; transition: transform .25s ease-out, border-color .3s, box-shadow .3s; will-change: transform;
}
.hv .svc-card::before { /* spotlight following the cursor */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(34, 211, 238, .14), rgba(139, 92, 246, .08) 35%, transparent 60%);
}
.hv .svc-card::after { /* glowing border near the cursor */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: .35; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(34, 211, 238, .95), rgba(139, 92, 246, .7) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.hv .svc-card:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -30px rgba(34, 211, 238, .35); }
.hv .svc-card:hover::before, .hv .svc-card:hover::after, .hv .svc-card:focus-visible::after { opacity: 1; }
.hv .svc-card > * { position: relative; z-index: 1; }
.hv .svc-card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--cyan);
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(139, 92, 246, .16)); border: 1px solid rgba(34, 211, 238, .25);
  box-shadow: 0 0 24px -6px rgba(34, 211, 238, .5); transform: translateZ(30px);
}
.hv .svc-card .ico .icon { width: 26px; height: 26px; }
.hv .svc-card h3 { margin: 20px 0 6px; font-size: 1.3rem; line-height: 1.4; font-weight: 600; transform: translateZ(20px); }
.hv .svc-card p { margin: 0; color: var(--text-2); font-size: 15px; }
.hv .svc-card .go { margin-top: auto; padding-top: 22px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--cyan); }
.hv .svc-card .go .icon { width: 18px; height: 18px; transition: transform .2s; }
.hv .svc-card:hover .go .icon { transform: translate(3px, -3px); }
.hv .svc-card .badge-on { position: absolute; top: 24px; right: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: #34D399; display: flex; align-items: center; gap: 6px; }
.hv .svc-card .badge-on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 10px #34D399; }
.hv .svc-card.c1 { grid-column: span 2; grid-row: span 2; }
.hv .svc-card.c2 { grid-column: span 2; }
.hv .svc-card.c1 h3 { font-size: 1.7rem; }
.hv .code-snippet {
  margin: 26px 0 0; padding: 16px 18px; border-radius: 14px; background: rgba(2, 6, 23, .6); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; line-height: 1.85; color: var(--muted); overflow-x: auto; white-space: pre;
}
.hv .code-snippet .k { color: var(--violet); } .hv .code-snippet .s { color: #34D399; } .hv .code-snippet .c { color: #64748B; } .hv .code-snippet .p { color: var(--cyan); }

/* ---------- Stats ---------- */
.hv .stats {
  margin-top: 96px; display: grid; grid-template-columns: repeat(5, 1fr); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(90deg, rgba(34, 211, 238, .06), rgba(139, 92, 246, .08));
}
.hv .stat { padding: 30px 26px; }
.hv .stat .num { font-family: var(--mono); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.1; }
.hv .stat .lbl { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* ---------- News ---------- */
.hv .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hv .news-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: rgba(15, 23, 42, .7); transition: transform .3s, border-color .3s, box-shadow .3s; }
.hv .news-card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, .4); box-shadow: 0 24px 50px -28px rgba(34, 211, 238, .45); }
.hv .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; background: #0B1222; }
.hv .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hv .news-card:hover .thumb img { transform: scale(1.05); }
.hv .thumb.art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; }
.hv .thumb .icon { position: relative; width: 56px; height: 56px; color: rgba(255, 255, 255, .85); stroke-width: 1.4; transition: transform .5s; }
.hv .news-card:hover .thumb .icon { transform: scale(1.12) rotate(-4deg); }
.hv .thumb.t0 { background: linear-gradient(135deg, #0E7490, #312E81); }
.hv .thumb.t1 { background: linear-gradient(135deg, #5B21B6, #1E3A8A); }
.hv .thumb.t2 { background: linear-gradient(135deg, #0F766E, #0E7490 50%, #6D28D9); }
.hv .news-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.hv .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.hv .chip { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(34, 211, 238, .12); color: var(--cyan); border: 1px solid rgba(34, 211, 238, .25); }
.hv .date { font-family: var(--mono); color: var(--muted); }
.hv .news-card h3 { margin: 12px 0 8px; font-size: 1.12rem; line-height: 1.55; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hv .news-card p { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Announcements: code-editor style ---------- */
.hv .editor { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0A1020; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(34, 211, 238, .05); }
.hv .editor-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: #0D1527; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hv .dots { display: flex; gap: 7px; }
.hv .dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.hv .dots i:nth-child(1) { background: #F87171; } .hv .dots i:nth-child(2) { background: #FBBF24; } .hv .dots i:nth-child(3) { background: #34D399; }
.hv .ed-file { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.hv .ed-file .icon { width: 16px; height: 16px; color: var(--cyan); }
.hv .ed-live { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #34D399; font-size: 12px; }
.hv .ed-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 10px #34D399; animation: hv-blink 2s steps(1) infinite; }
.hv .lines { list-style: none; margin: 0; padding: 14px 0; counter-reset: ln; font-size: 15px; }
.hv .lines li { counter-increment: ln; display: grid; grid-template-columns: 56px auto 1fr auto; align-items: center; gap: 14px; padding: 9px 22px 9px 0; transition: background .2s; }
.hv .lines li::before { content: counter(ln); font-family: var(--mono); font-size: 13px; color: #475569; text-align: right; }
.hv .lines li.row:hover { background: rgba(34, 211, 238, .06); }
.hv .lines li.row:hover::before { color: var(--cyan); }
.hv .lines li.comment { grid-template-columns: 56px 1fr; font-family: var(--mono); font-size: 13px; color: #64748B; }
.hv .tag { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 6px; white-space: nowrap; border: 1px solid; }
.hv .tag.alert { color: #FB7185; border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .1); }
.hv .tag.procurement { color: #FBBF24; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); }
.hv .tag.cyber_policy { color: #A78BFA; border-color: rgba(167, 139, 250, .35); background: rgba(167, 139, 250, .1); }
.hv .tag.document { color: var(--cyan); border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .1); }
.hv .tag.general { color: #34D399; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); }
.hv .lines .title { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv .lines .title:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 4px; }
.hv .lines .when { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hv .lines li.cmd { grid-template-columns: 56px 1fr; font-family: var(--mono); font-size: 14px; }
.hv .lines li.cmd a { color: var(--text-2); }
.hv .lines li.cmd a:hover { color: var(--cyan); }
.hv .lines li.cmd .prompt { color: #34D399; }

/* ---------- Footer ---------- */
.hv .site-foot { margin-top: 110px; border-top: 1px solid var(--line); background: var(--bg-2); }
.hv .foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.hv .foot h4 { margin: 0 0 14px; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--cyan); font-weight: 500; }
.hv .foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hv .foot ul a { color: var(--text-2); font-size: 15px; }
.hv .foot ul a:hover { color: var(--cyan); }
.hv .foot p { color: var(--muted); font-size: 15px; margin: 14px 0 0; max-width: 380px; }
.hv .copyright { border-top: 1px solid var(--line); padding: 20px 0; font-size: 13px; color: #64748B; font-family: var(--mono); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Light mode (html[data-theme="light"], set by home-early.js / the toggle) ---------- */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
.hv { transition: background-color .3s, color .3s; }
html[data-theme="light"] .hv {
  --bg: #F8FAFC;
  --bg-2: #EEF2F7;
  --line: rgba(15, 23, 42, .1);
  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --cyan: #0E7490;      /* darker accents keep text contrast >= 4.5:1 on white */
  --violet: #6D28D9;
  --grad: linear-gradient(100deg, #0E7490 0%, #1D4ED8 50%, #6D28D9 100%);
}
/* code-style surfaces (terminal line, snippet, editor) stay dark in both modes */
html[data-theme="light"] .hv .terminal-line,
html[data-theme="light"] .hv .code-snippet,
html[data-theme="light"] .hv .editor {
  --line: rgba(148, 163, 184, .14); --text: #E2E8F0; --text-2: #CBD5E1; --muted: #94A3B8; --cyan: #22D3EE; --violet: #8B5CF6;
}
html[data-theme="light"] .hv .terminal-line,
html[data-theme="light"] .hv .code-snippet { background: #0F172A; }
html[data-theme="light"] .hv .editor { box-shadow: 0 30px 70px -40px rgba(15, 23, 42, .55); }
html[data-theme="light"] .hv .site-head.scrolled { background: rgba(248, 250, 252, .85); }
html[data-theme="light"] .hv .mobile-menu { background: rgba(248, 250, 252, .98); }
html[data-theme="light"] .hv .menu a:hover,
html[data-theme="light"] .hv .menu a[aria-current="page"] { color: var(--text); }
html[data-theme="light"] .hv .brand-mark,
html[data-theme="light"] .hv .hbtn-primary,
html[data-theme="light"] .hv .mobile-menu .hbtn-primary { color: #fff; }
html[data-theme="light"] .hv .brand-mark { box-shadow: 0 0 20px rgba(14, 116, 144, .3); }
html[data-theme="light"] .hv .hbtn-primary { box-shadow: 0 8px 26px -10px rgba(14, 116, 144, .6); }
html[data-theme="light"] .hv .hbtn-primary:hover { box-shadow: 0 10px 34px -8px rgba(14, 116, 144, .6), 0 0 40px -12px rgba(109, 40, 217, .55); }
html[data-theme="light"] .hv .hbtn-ghost { background: rgba(255, 255, 255, .8); border-color: rgba(15, 23, 42, .16); }
html[data-theme="light"] .hv .hbtn-ghost:hover { box-shadow: 0 0 26px -8px rgba(14, 116, 144, .5); }
html[data-theme="light"] .hv .hero-bg {
  background:
    radial-gradient(800px 500px at 78% 35%, rgba(139, 92, 246, .14), transparent 60%),
    radial-gradient(700px 500px at 60% 75%, rgba(34, 211, 238, .16), transparent 60%),
    var(--bg);
}
html[data-theme="light"] .hv .hero::after {
  background:
    linear-gradient(90deg, rgba(248, 250, 252, .93) 0%, rgba(248, 250, 252, .62) 42%, rgba(248, 250, 252, 0) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(248, 250, 252, 0) 22%);
}
html[data-theme="light"] .hv .hero h1 .grad-text { filter: drop-shadow(0 0 22px rgba(14, 116, 144, .14)); }
html[data-theme="light"] .hv .scroll-hint span { border-color: rgba(15, 23, 42, .28); }
html[data-theme="light"] .hv .eyebrow::before { box-shadow: none; }
html[data-theme="light"] .hv .blueprint::before {
  background-image:
    linear-gradient(rgba(15, 23, 42, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .06) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .03) 1px, transparent 1px);
}
html[data-theme="light"] .hv .glow-blob.a { background: rgba(34, 211, 238, .2); }
html[data-theme="light"] .hv .glow-blob.b { background: rgba(139, 92, 246, .16); }
html[data-theme="light"] .hv .svc-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .62));
  box-shadow: 0 1px 0 #fff inset, 0 20px 50px -30px rgba(15, 23, 42, .3);
}
html[data-theme="light"] .hv .svc-card:hover { box-shadow: 0 1px 0 #fff inset, 0 30px 60px -30px rgba(14, 116, 144, .4); }
html[data-theme="light"] .hv .svc-card::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(14, 116, 144, .1), rgba(109, 40, 217, .06) 35%, transparent 60%); }
html[data-theme="light"] .hv .svc-card::after { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(14, 116, 144, .9), rgba(109, 40, 217, .6) 40%, transparent 70%); }
html[data-theme="light"] .hv .svc-card .ico { box-shadow: 0 0 20px -8px rgba(14, 116, 144, .5); border-color: rgba(14, 116, 144, .25); }
html[data-theme="light"] .hv .svc-card .badge-on,
html[data-theme="light"] .hv .ok-text { color: #047857; }
html[data-theme="light"] .hv .stats { background: linear-gradient(90deg, rgba(14, 116, 144, .06), rgba(109, 40, 217, .06)); }
html[data-theme="light"] .hv .news-card { background: #fff; box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .35); }
html[data-theme="light"] .hv .news-card:hover { border-color: rgba(14, 116, 144, .4); box-shadow: 0 24px 50px -28px rgba(14, 116, 144, .45); }
html[data-theme="light"] .hv .chip { background: rgba(14, 116, 144, .08); border-color: rgba(14, 116, 144, .25); }

/* ---------- Reveal (GSAP takes over) ---------- */
.js-anim .hv [data-reveal], .js-anim .hv [data-reveal-group] > * { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hv .bento { grid-template-columns: repeat(2, 1fr); }
  .hv .svc-card.c1 { grid-column: span 2; grid-row: span 1; }
  .hv .svc-card.c2 { grid-column: span 1; }
  .hv .svc-card.c4 { grid-column: span 2; }
  .hv .news-grid { grid-template-columns: repeat(2, 1fr); }
  .hv .news-grid .news-card:nth-child(3) { grid-column: span 2; }
  .hv .stats { grid-template-columns: repeat(3, 1fr); }
  .hv .foot { grid-template-columns: 1fr 1fr; }
  .hv .foot > div:first-child { grid-column: span 2; }
}
@media (max-width: 860px) {
  .hv .menu { display: none; }
  .hv .nav-actions { margin-left: auto; }
  .hv .burger { display: grid; }
  .hv .mobile-menu { padding: 4px 16px 20px; background: rgba(15, 23, 42, .96); border-bottom: 1px solid var(--line); }
  .hv .mobile-menu.open { display: block; }
  .hv .mobile-menu a { display: block; padding: 12px 8px; border-bottom: 1px solid var(--line); color: var(--text-2); }
  .hv .mobile-menu a[aria-current="page"] { color: var(--cyan); }
  .hv .mobile-menu .hbtn { display: flex; margin-top: 14px; width: 100%; justify-content: center; border-bottom: 0; color: #0F172A; }
}
@media (max-width: 640px) {
  .hv .hero { align-items: flex-end; padding-bottom: 96px; }
  .hv .hero::after { background: linear-gradient(0deg, rgba(15, 23, 42, .95) 0%, rgba(15, 23, 42, .7) 55%, rgba(15, 23, 42, .35) 100%); }
  .hv .hero-cta .hbtn { flex: 1 1 100%; justify-content: center; }
  .hv .bento { grid-template-columns: 1fr; }
  .hv .svc-card.c1, .hv .svc-card.c2, .hv .svc-card.c4 { grid-column: span 1; }
  .hv .svc-card { padding: 24px; }
  .hv .news-grid { grid-template-columns: 1fr; }
  .hv .news-grid .news-card:nth-child(3) { grid-column: span 1; }
  .hv .lines li { grid-template-columns: 36px 1fr; row-gap: 4px; padding-right: 16px; }
  .hv .lines li .title { grid-column: 2; white-space: normal; }
  .hv .lines li .when { grid-column: 2; }
  .hv .lines li .tag { justify-self: start; }
  .hv .lines li.comment, .hv .lines li.cmd { grid-template-columns: 36px 1fr; }
  .hv .foot { grid-template-columns: 1fr; }
  .hv .foot > div:first-child { grid-column: span 1; }
  .hv .sec { padding-top: 72px; }
  .hv .stats { grid-template-columns: repeat(2, 1fr); }
  .hv .stat { padding: 22px 20px; }
  .hv .stat:first-child { grid-column: span 2; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hv *, .hv *::before, .hv *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hv .cursor { animation: none; }
  .hv .scroll-hint { display: none; }
}

/* ---------- Shared header / footer on the other public pages (layouts/public.php) ---------- */
.hv .site-head.is-sticky { position: sticky; top: 0; }
.hv .brand .logo-img { height: 44px; }
.hv .site-foot .brand .logo-img { height: 52px; }
.hv .page-main { min-height: 50vh; }
@media (max-width: 520px) { .hv .nav-bar .brand-text { display: none; } }
