/* ===== Tokens ===== */
:root {
  --bg: #05070b;
  --bg-2: #0a0e15;
  --surface: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef2f7;
  --muted: #8a94a6;
  --dim: #5b6475;
  --accent: #5fd4ff;
  --accent-2: #7c8cff;
  --radius: 18px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Inter", "Noto Sans JP", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.accent { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--text);
  color: #05070b;
  font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -10px rgba(95, 212, 255, .6); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: var(--surface); box-shadow: none; }
.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn--lg { padding: 18px 36px; font-size: 18px; font-family: var(--mono); font-weight: 500; }

/* ===== Nav ===== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(5, 7, 11, .72); backdrop-filter: blur(16px) saturate(140%); border-color: var(--line); }
.nav__inner { width: min(var(--wrap), 100% - 48px); margin: auto; height: 68px; display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .14em; font-size: 15px; margin: 0; }
.brand b { color: var(--accent); font-weight: 700; }
.brand__mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); position: relative; }
.brand__mark::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-size: 13px; color: var(--muted); }
.nav__links a { transition: color .2s; }
.nav__links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero { position: relative; padding: 160px 0 110px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 75% 35%, rgba(95, 212, 255, .16), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(124, 140, 255, .10), transparent 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .08em; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); margin: 0 0 28px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 10px #3ee08f; }
.hero__title {
  font-size: clamp(48px, 6.4vw, 100px);
  line-height: .95; letter-spacing: -.035em; font-weight: 700; margin: 0; white-space: nowrap;
}
.hero__sub { font-size: clamp(18px, 2vw, 24px); font-weight: 300; letter-spacing: .3em; color: var(--muted); margin: 18px 0 32px; }
.hero__lead { font-size: 16px; color: #c3cad6; margin: 0 0 40px; line-height: 2; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__visual { margin: 0; perspective: 1600px; }
.screen {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-2);
  background: #000;
  box-shadow: 0 50px 120px -30px rgba(95, 212, 255, .35), 0 0 0 1px rgba(255,255,255,.04) inset;
  transform: rotateY(-9deg) rotateX(4deg);
  transform-origin: left center;
  transition: transform 1.2s var(--ease);
}
.hero__visual:hover .screen { transform: rotateY(-3deg) rotateX(1deg); }
.screen__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #0d1219; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--dim); font-family: var(--mono); }
.screen__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a313d; }
.screen__bar span { margin-left: 10px; }
.hero__visual figcaption, .note { font-size: 12px; color: var(--dim); margin-top: 14px; }

/* ===== Cert strip ===== */
.cert { border-block: 1px solid var(--line); background: var(--bg-2); }
.cert__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.cert__item { padding: 26px 24px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.cert__item:first-child { border-left: 0; padding-left: 0; }
.label { font-size: 11px; letter-spacing: .14em; color: var(--dim); }
.value { font-size: 14px; font-weight: 500; line-height: 1.6; }

/* ===== Section common ===== */
section { position: relative; }
.section-tag { font-family: var(--mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.section-head { margin-bottom: 56px; }
.section-head h2, .contact h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.3; letter-spacing: -.01em; font-weight: 600; margin: 0; }
.section-lead { color: var(--muted); margin: 16px 0 0; font-size: 15px; }

/* ===== Purpose ===== */
.purpose { padding: 140px 0; }
.purpose__inner { max-width: 920px; }
.purpose__quote {
  margin: 0; font-size: clamp(22px, 2.8vw, 34px); line-height: 1.75; font-weight: 300; letter-spacing: .04em;
  padding-left: 32px; border-left: 2px solid; border-image: linear-gradient(var(--accent), var(--accent-2)) 1;
}
.purpose__src { color: var(--dim); font-size: 13px; margin: 24px 0 0 34px; }

/* ===== Gears ===== */
.gears { padding: 40px 0 140px; }
.gear-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gear {
  position: relative; padding: 32px 28px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .4s, transform .5s var(--ease), background .4s;
  overflow: hidden;
}
.gear::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(95,212,255,.12), transparent 50%);
}
.gear:hover { border-color: var(--line-2); transform: translateY(-4px); }
.gear:hover::before { opacity: 1; }
.gear__icon { width: 76px; height: 76px; object-fit: contain; border-radius: 16px; background: #000; padding: 6px; margin-bottom: 26px; box-shadow: 0 0 0 1px var(--line); }
.gear h3 { font-size: 20px; font-weight: 600; margin: 0 0 8px; letter-spacing: 0; }
.gear p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.8; }
.gear--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; align-items: center; }
.gear__head { display: flex; gap: 24px; align-items: center; }
.gear__head .gear__icon { margin: 0; flex: none; }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tool-list li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px 14px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--line); text-align: center; transition: border-color .3s; }
.tool-list li:hover { border-color: var(--line-2); }
.tool-list img { width: 56px; height: 56px; object-fit: contain; border-radius: 50%; }
.tool-list span { font-size: 12px; font-weight: 500; color: #c3cad6; line-height: 1.3; }

/* ===== Screens ===== */
.screens { padding: 140px 0; background: linear-gradient(180deg, var(--bg), var(--bg-2) 30%, var(--bg-2) 70%, var(--bg)); }
.tabs { position: relative; display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.4); margin-bottom: 28px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .3s; }
.tabs button[aria-selected="true"] { color: #05070b; }
.tabs__ink { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--text); transition: transform .5s var(--ease), width .5s var(--ease); }
.stage { position: relative; display: grid; }
.panel { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.99); transition: opacity .6s var(--ease), transform .8s var(--ease), visibility 0s .6s; }
.panel.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.zoom { display: block; width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #000; cursor: zoom-in; box-shadow: 0 40px 100px -40px rgba(0,0,0,.9); }
.zoom img { width: 100%; transition: transform 1.2s var(--ease); }
.zoom:hover img { transform: scale(1.015); }
.panel figcaption { display: flex; gap: 18px; align-items: baseline; margin-top: 20px; color: var(--muted); font-size: 14px; }
.panel figcaption b { color: var(--text); font-weight: 600; font-size: 15px; min-width: 110px; }

/* ===== Contact ===== */
.contact { padding: 150px 0; text-align: center; overflow: hidden; border-top: 1px solid var(--line); }
.contact__glow { position: absolute; left: 50%; top: 50%; width: 900px; height: 500px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(95,212,255,.18), transparent); pointer-events: none; }
.contact__inner { position: relative; }
.contact p { color: var(--muted); margin: 20px 0 40px; }
.contact__notice { font-size: 12px; color: var(--dim) !important; margin: 48px 0 0 !important; }

/* ===== Device ===== */
.device { padding: 80px 0 100px; background: var(--bg-2); border-top: 1px solid var(--line); }
.device__table { margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.device__table div { display: grid; grid-template-columns: 140px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.device__table div:nth-child(odd) { padding-right: 32px; }
.device__table dt { color: var(--dim); }
.device__table dd { margin: 0; }

/* ===== Footer ===== */
.footer { padding: 56px 0 32px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__addr { color: var(--dim); font-size: 12px; margin: 12px 0 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 13px; color: var(--muted); align-content: start; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--dim); font-size: 11px; margin-top: 40px; }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 4vw; background: rgba(2,3,6,.92); backdrop-filter: blur(10px); animation: fade .3s; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; width: auto; border-radius: 10px; border: 1px solid var(--line-2); }
.lightbox__close { position: absolute; top: 20px; right: 28px; font-size: 32px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.gear-grid .reveal:nth-child(2) { transition-delay: .08s; }
.gear-grid .reveal:nth-child(3) { transition-delay: .16s; }
.gear-grid .reveal:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .screen { transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== Embed mode (?embed=1) ===== */
.is-embed [data-chrome] { display: none; }
.is-embed .hero { padding-top: 96px; }

/* ===== Responsive ===== */
.pc-hide { display: none; }
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .screen { transform: none; }
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .gear--wide { grid-template-columns: 1fr; }
  .cert__grid { grid-template-columns: repeat(2, 1fr); }
  .cert__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .cert__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .wrap, .nav__inner { width: calc(100% - 32px); }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .hero { padding: 120px 0 72px; }
  .sp-hide { display: none; }
  .pc-hide { display: inline; }
  .hero__lead { font-size: 15px; }
  .cert__grid { grid-template-columns: 1fr; }
  .cert__item { border-left: 0 !important; padding: 18px 0 !important; border-top: 1px solid var(--line); }
  .cert__item:first-child { border-top: 0; }
  .purpose, .gears, .screens { padding-block: 88px; }
  .gears { padding-top: 0; }
  .purpose__quote { padding-left: 20px; }
  .purpose__src { margin-left: 22px; }
  .gear-grid { grid-template-columns: 1fr; gap: 12px; }
  .gear:not(.gear--wide) { display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; padding: 22px 20px; }
  .gear:not(.gear--wide) .gear__icon { width: 56px; height: 56px; margin: 0; grid-row: span 2; border-radius: 12px; }
  .gear h3 { font-size: 17px; margin-bottom: 2px; }
  .gear__head { flex-direction: column; align-items: flex-start; }
  .tool-list { grid-template-columns: repeat(3, 1fr); }
  .panel figcaption { flex-direction: column; gap: 4px; }
  .device__table { grid-template-columns: 1fr; }
  .device__table div { grid-template-columns: 110px 1fr; padding-right: 0 !important; }
  .contact { padding-block: 100px; }
  .btn--lg { font-size: 15px; padding: 16px 24px; }
}
