/* GomuLabs — main stylesheet
   Dark industrial theme · accent #c6f24e */

:root {
  --bg: #0a0b0d;
  --panel: #0b0d10;
  --panel-hover: #10141a;
  --ink: #e8eae6;
  --muted: #9aa0a6;
  --dim: #6b7075;
  --faint: #7d8288;
  --soft: #8f959b;
  --accent: #c6f24e;
  --accent-hi: #dcf77e;
  --blue: #5ec8f2;
  --orange: #f2a94e;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-btn: rgba(255, 255, 255, 0.22);
  --mono: 'JetBrains Mono', monospace;
  /* page accent (overridden per product) */
  --pa: #c6f24e;
  --pa-border: rgba(198, 242, 78, 0.35);
  --pa-glow: rgba(198, 242, 78, 0.1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', 'Noto Sans SC', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
input, textarea { font-family: inherit; }
::selection { background: var(--accent); color: var(--bg); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sweep { 0% { transform: translateY(-100%); } 100% { transform: translateY(600%); } }
@keyframes dash { to { stroke-dashoffset: -1000; } }

/* ---------- page scaffolding ---------- */
.page { position: relative; min-height: 100vh; overflow-x: hidden; }

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, var(--pa-glow), transparent 62%);
  filter: blur(20px);
}

.main { position: relative; z-index: 1; max-width: 1220px; margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  background: rgba(10, 11, 13, 0.7);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: 1220px; margin: 0 auto; padding: 15px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo svg { display: block; }
.logo-text { font-weight: 700; letter-spacing: 0.12em; font-size: 16px; }
.logo-text .accent { color: var(--accent); }
.main-nav { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.nav-link { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--accent); }
.lang-btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--ink); background: transparent; border: 1px solid var(--line-btn);
  padding: 7px 12px; cursor: pointer; border-radius: 2px;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- shared elements ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em;
  color: var(--accent); border: 1px solid rgba(198, 242, 78, 0.3);
  padding: 6px 12px; border-radius: 2px;
}
.dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; animation: blink 1.8s infinite; flex: none; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: var(--bg);
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 3px;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hi); color: var(--bg); }
.btn-primary.pa { background: var(--pa); }
.btn-primary.pa:hover { filter: brightness(1.1); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); font-weight: 500; font-size: 15px; padding: 13px 22px;
  border: 1px solid var(--line-btn); border-radius: 3px;
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.btn-outline-mono {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  border: 1px solid var(--line-btn); padding: 11px 18px; border-radius: 3px;
}
.btn-outline-mono:hover { border-color: var(--accent); color: var(--accent); }

.section-head {
  display: flex; align-items: baseline; gap: 18px;
  border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 40px; flex-wrap: wrap;
}
.section-num { font-family: var(--mono); font-size: 13px; color: var(--pa); }
.section-title { font-size: clamp(26px, 3vw, 38px); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.section-title.sm { font-size: clamp(24px, 2.6vw, 32px); }
.section-intro { color: var(--muted); font-size: 14.5px; margin: 0 0 0 auto; max-width: 440px; text-align: right; }

/* joined-cell grid (1px gap trick) */
.grid-cells {
  display: grid; gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft);
  border-radius: 4px; overflow: hidden;
}
.cells-lg { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .cells-lg { grid-template-columns: 1fr; } }
.cells-md { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- hero ---------- */
.hero {
  padding: 74px 0 66px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 52px; align-items: center;
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 84px); line-height: 0.98; font-weight: 700;
  letter-spacing: -0.02em; margin: 0 0 26px;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.62; color: var(--muted); max-width: 520px; margin: 0 0 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.anim-1 { animation: fadeUp 0.7s 0.05s both; }
.anim-2 { animation: fadeUp 0.7s 0.12s both; }
.anim-3 { animation: fadeUp 0.7s 0.2s both; }
.anim-4 { animation: fadeUp 0.7s 0.28s both; }

/* ---------- 3D viewer panel ---------- */
.viewer {
  position: relative;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #101318, #0a0b0d 78%);
}
.viewer.home { height: clamp(360px, 46vw, 520px); animation: fadeUp 0.8s 0.18s both; }
.viewer.product { height: clamp(340px, 42vw, 480px); }
.viewer canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.viewer-sweep {
  position: absolute; top: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(var(--pa-glow), transparent);
  animation: sweep 6s linear infinite; pointer-events: none;
}
.corner { position: absolute; width: 16px; height: 16px; }
.corner.tl { top: 12px; left: 12px; border-top: 1px solid var(--pa-border); border-left: 1px solid var(--pa-border); }
.corner.tr { top: 12px; right: 12px; border-top: 1px solid var(--pa-border); border-right: 1px solid var(--pa-border); }
.corner.bl { bottom: 12px; left: 12px; border-bottom: 1px solid var(--pa-border); border-left: 1px solid var(--pa-border); }
.corner.br { bottom: 12px; right: 12px; border-bottom: 1px solid var(--pa-border); border-right: 1px solid var(--pa-border); }
.hud { position: absolute; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--dim); }
.hud.tl { top: 20px; left: 24px; }
.hud.tr { top: 20px; right: 24px; }
.hud.bl { bottom: 20px; left: 24px; }
.hud.br { bottom: 20px; right: 24px; }
.hud.live { color: var(--pa); display: flex; align-items: center; gap: 7px; }
.hud.live .dot { width: 5px; height: 5px; animation-duration: 1.4s; }
.hud.floaty { animation: floaty 2.6s ease-in-out infinite; }
.visual-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ---------- product cards (home) ---------- */
.product-card {
  background: var(--panel); padding: 32px 30px;
  display: flex; flex-direction: column; gap: 16px; min-height: 296px;
  transition: background 0.25s; color: var(--ink);
}
.product-card:hover { background: var(--panel-hover); color: var(--ink); }
.product-card .card-top { display: flex; align-items: center; justify-content: space-between; }
.product-card .card-index { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.product-card h3 { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.product-card .card-tagline { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; margin-top: -6px; }
.product-card .card-desc { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0; flex: 1; }
.product-card .card-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.product-card .card-more { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 5px 10px; border-radius: 2px; border: 1px solid;
}
.status-pill .dot { width: 5px; height: 5px; animation: none; }
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  border: 1px solid rgba(255, 255, 255, 0.12); padding: 4px 9px; border-radius: 2px;
}

/* ---------- repo cards ---------- */
.repo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.repo-grid.wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.repo-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 24px; color: var(--ink);
  transition: border-color 0.2s, transform 0.2s;
}
.repo-card:hover { border-color: rgba(198, 242, 78, 0.45); transform: translateY(-3px); color: var(--ink); }
.repo-card .repo-head { display: flex; align-items: center; gap: 9px; }
.repo-card .repo-name { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.repo-card .repo-badge {
  margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--faint); border: 1px solid rgba(255, 255, 255, 0.12); padding: 3px 7px; border-radius: 2px;
}
.repo-card .repo-desc { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; flex: 1; }
.repo-card .repo-meta { display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.repo-card .repo-lang { display: flex; align-items: center; gap: 7px; }
.repo-card .lang-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- focus tags ---------- */
.focus-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.focus-tag {
  font-family: var(--mono); font-size: 12.5px; color: var(--accent);
  border: 1px solid rgba(198, 242, 78, 0.28); padding: 6px 12px; border-radius: 2px;
}
.focus-tag.lg { font-size: 13px; padding: 8px 14px; }
.focus-tag.pa { color: var(--pa); border-color: var(--pa-border); }

/* ---------- section layouts ---------- */
.section { padding: 56px 0 30px; }
.section.last { padding-bottom: 40px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 44px; align-items: start; }
.split .aside { border-left: 1px solid var(--line); padding-left: 32px; }
.aside-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--dim); margin-bottom: 16px; }
.lead-lg { font-size: clamp(18px, 1.9vw, 23px); line-height: 1.55; color: var(--ink); margin: 0 0 22px; letter-spacing: -0.01em; }
.body-text { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0; }

/* ---------- contact cards ---------- */
.contact-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 28px; display: flex; flex-direction: column; gap: 8px; color: var(--ink);
}
a.contact-card:hover { border-color: rgba(198, 242, 78, 0.45); color: var(--ink); }
.contact-card .contact-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--dim); }
.contact-card .contact-value { font-size: 19px; color: var(--ink); font-weight: 500; }
.contact-card.sm { padding: 22px 24px; gap: 6px; }
.contact-card.sm .contact-value { font-size: 18px; }
.contact-note { font-family: var(--mono); font-size: 12px; color: var(--dim); margin: 20px 0 0; }

/* ---------- contact form ---------- */
.contact-form {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
}
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form .field-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--soft); }
.contact-form input, .contact-form textarea {
  background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 3px;
  padding: 12px 14px; color: var(--ink); font-size: 15px; outline: none;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form .btn-primary { justify-content: center; padding: 13px; }
.form-sent { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }

/* ---------- CTA banner ---------- */
.cta-banner {
  border: 1px solid rgba(198, 242, 78, 0.25); border-radius: 6px; padding: 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(198, 242, 78, 0.05), transparent);
}
.cta-banner h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; margin: 0 0 8px; }
.cta-banner p { color: var(--muted); font-size: 15px; margin: 0; }
.cta-banner .btn-primary { padding: 14px 24px; }

/* ---------- sub-page hero ---------- */
.page-hero { padding: 80px 0 50px; max-width: 760px; }
.page-hero.wide { max-width: 820px; padding-bottom: 60px; }
.page-hero h1 {
  font-size: clamp(38px, 5.4vw, 66px); line-height: 1.04; font-weight: 700;
  letter-spacing: -0.02em; margin: 0 0 24px;
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero .lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--muted); margin: 0; }
.page-hero .badge { margin-bottom: 28px; }

/* ---------- product detail page ---------- */
.breadcrumb {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--dim);
  padding: 26px 0 0; display: flex; gap: 10px; align-items: center;
}
.breadcrumb a { color: var(--dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--pa); }

.product-hero {
  padding: 40px 0 60px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 52px; align-items: center;
}
.product-hero h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1.02; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; }
.product-hero .tagline { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--pa); margin-bottom: 22px; }
.product-hero .lead { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.62; color: var(--muted); max-width: 520px; margin: 0 0 32px; }
.product-hero .status-pill { margin-bottom: 24px; color: var(--pa); border-color: var(--pa-border); }
.product-hero .status-pill .dot { animation: blink 1.8s infinite; }

.feature-cell {
  background: var(--panel); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 12px; min-height: 180px;
}
.feature-cell .feat-no { font-family: var(--mono); font-size: 12px; color: var(--pa); }
.feature-cell h3 { font-size: 18px; font-weight: 600; margin: 0; }
.feature-cell p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.feature-cell.tall { padding: 30px 28px; min-height: 170px; }
.feature-cell.tall h3 { font-size: 19px; }
.feature-cell.short { min-height: 150px; }

.overview-text { font-size: clamp(16px, 1.7vw, 20px); line-height: 1.6; color: var(--ink); margin: 0; }

.others-row { display: flex; gap: 12px; flex-wrap: wrap; }
.other-card {
  flex: 1; min-width: 200px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 20px;
  display: flex; flex-direction: column; gap: 6px; color: var(--ink);
}
.other-card:hover { border-color: rgba(198, 242, 78, 0.4); color: var(--ink); }
.other-card .other-code { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.other-card .other-name { font-size: 16px; font-weight: 600; }

.anim-dash { animation: dash 22s linear infinite; }
.anim-floaty { animation: floaty 4s ease-in-out infinite; }
.anim-floaty-a { animation: floaty 3.4s ease-in-out infinite; }
.anim-floaty-b { animation: floaty 3.4s 0.4s ease-in-out infinite; }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); }
.site-footer.mt { margin-top: 40px; }
.footer-big { max-width: 1220px; margin: 0 auto; padding: 44px 28px 28px; }
.footer-cols { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; margin-bottom: 36px; }
.footer-brand { max-width: 320px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo-text { font-size: 15px; }
.footer-tag { color: var(--faint); font-size: 13.5px; line-height: 1.6; margin: 0; }
.footer-links { display: flex; gap: 52px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col-title { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--dim); margin-bottom: 3px; }
.footer-col a { color: var(--muted); font-size: 13.5px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-slim {
  max-width: 1220px; margin: 0 auto; padding: 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-fine { font-family: var(--mono); font-size: 12px; color: var(--dim); }
a.footer-fine:hover { color: var(--muted); }
