/* =========================================================
   GranValueCode — Corporate site
   Theme: hacker / near-black / luxe neon
   ========================================================= */

:root {
  --bg:      #05060a;
  --bg-2:    #0a0d15;
  --panel:   rgba(255, 255, 255, 0.025);
  --panel-2: rgba(255, 255, 255, 0.04);
  --ink:     #e9eef5;
  --muted:   #8b95a7;
  --faint:   #5b6577;
  --line:    rgba(255, 255, 255, 0.09);
  --line-2:  rgba(255, 255, 255, 0.16);

  --neon:    #16f2b3;   /* emerald */
  --cyan:    #00e5ff;   /* cyan    */
  --gold:    #d8b46a;   /* luxe    */
  --violet:  #8b6cff;   /* depth   */

  --neon-glow: 0 0 24px rgba(22, 242, 179, 0.45);
  --gold-glow: 0 0 22px rgba(216, 180, 106, 0.35);

  --maxw: 1160px;
  --radius: 14px;

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::selection,
*::selection { background: rgba(22, 242, 179, 0.28); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Background FX layers ---------- */
#fx-rain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.22; pointer-events: none;
}
.fx-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 242, 179, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 242, 179, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.6;
}
.fx-scanlines {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.5;
  background: repeating-linear-gradient(
    to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.16) 3px);
  mix-blend-mode: multiply;
}
.fx-spotlight {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(
    520px circle at var(--mx, 50%) var(--my, 12%),
    rgba(22, 242, 179, 0.10), rgba(124, 108, 255, 0.05) 40%, transparent 70%);
  transition: background 0.18s ease-out;
}
/* base vignette + glow under everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80% 50% at 50% -10%, rgba(22, 242, 179, 0.10), transparent 60%),
    radial-gradient(60% 40% at 100% 0%, rgba(139, 108, 255, 0.10), transparent 55%),
    linear-gradient(180deg, #04050a 0%, #05060a 40%, #04050a 100%);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 200;
  background: var(--neon); color: #04130d; font-weight: 800;
  padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.section { padding: 110px 0; position: relative; z-index: 2; }
.section.band { background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-label {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--neon); margin-bottom: 14px;
  text-transform: uppercase;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; }
.section-text { color: var(--muted); font-size: 16px; margin-top: 16px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 6, 10, 0.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; }
.brand-mark img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--gold-glow); }
.brand-text {
  font-family: var(--mono); font-weight: 800; font-size: 18px;
  letter-spacing: 0.02em; color: #fff;
}
.brand-accent { color: var(--neon); }
.nav-links { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500; color: var(--muted);
  position: relative; padding: 4px 0; transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--neon); box-shadow: var(--neon-glow); transition: width 0.25s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--neon);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 13px 26px; border: 0; cursor: pointer;
  font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: 0.03em;
  border-radius: 10px; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s, color 0.2s;
}
.btn-primary {
  color: #03140d; background: linear-gradient(135deg, var(--neon), #0bd6a6 60%, var(--cyan));
  box-shadow: 0 10px 30px rgba(22, 242, 179, 0.28), inset 0 0 0 1px rgba(255,255,255,0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(22, 242, 179, 0.42); }
.btn-ghost {
  color: var(--ink); background: var(--panel); border: 1px solid var(--line-2);
}
.btn-ghost:hover {
  color: #fff; border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), var(--neon-glow); transform: translateY(-2px);
}
.btn-block { width: 100%; }
.btn.is-disabled { opacity: 0.5; pointer-events: none; cursor: default; }
.nav-cta { min-height: 40px; padding: 9px 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 2;
  min-height: clamp(620px, 92vh, 900px);
  display: flex; align-items: center;
  padding: 80px 24px 60px;
}
.hero-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--neon); margin: 0 0 22px;
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--panel);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: var(--neon-glow); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-title {
  font-family: var(--mono); font-weight: 800;
  font-size: clamp(40px, 8.5vw, 104px); line-height: 0.98; letter-spacing: -0.02em;
  color: #fff; margin: 0;
  text-shadow: 0 0 36px rgba(22, 242, 179, 0.25);
}
.hero-sub { font-family: var(--mono); color: var(--muted); letter-spacing: 0.3em; font-size: 14px; margin: 14px 0 0; }
.hero-lead {
  font-size: clamp(22px, 3.4vw, 36px); font-weight: 900; color: var(--ink);
  margin: 26px 0 0;
  background: linear-gradient(90deg, #fff, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-copy { max-width: 560px; color: var(--muted); font-size: 16px; margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.meta-chip {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
.meta-chip b { color: var(--neon); font-weight: 700; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 1px solid var(--line-2); border-radius: 14px; display: grid; place-items: start center; padding-top: 8px; }
.scroll-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--neon); box-shadow: var(--neon-glow); animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Glitch ---------- */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-decrypt); position: absolute; left: 0; top: 0; width: 100%;
  clip-path: inset(0 0 0 0); opacity: 0.75;
}
.glitch::before { color: var(--cyan); transform: translate(-2px, 0); animation: glitch-x 4.2s infinite steps(2,end); }
.glitch::after  { color: var(--violet); transform: translate(2px, 0);  animation: glitch-y 3.4s infinite steps(2,end); }
@keyframes glitch-x { 0%,92%,100% { clip-path: inset(0 0 100% 0); } 93% { clip-path: inset(8% 0 70% 0); transform: translate(-3px,0);} 96% { clip-path: inset(40% 0 30% 0); transform: translate(3px,0);} }
@keyframes glitch-y { 0%,90%,100% { clip-path: inset(100% 0 0 0); } 91% { clip-path: inset(60% 0 20% 0); transform: translate(2px,0);} 97% { clip-path: inset(20% 0 55% 0); transform: translate(-2px,0);} }

/* ---------- Marquee ---------- */
.marquee { position: relative; z-index: 2; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.3); padding: 16px 0; }
.marquee-track { display: inline-flex; gap: 28px; white-space: nowrap; animation: marquee 28s linear infinite; will-change: transform; }
.marquee-track span { font-family: var(--mono); font-size: 14px; letter-spacing: 0.18em; color: var(--faint); }
.marquee-track span:nth-child(13n+1) { color: var(--neon); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-grid .section-text + .section-text { margin-top: 16px; }

/* Terminal window */
.terminal {
  border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, #0b0f18, #070a11);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(22,242,179,0.06), var(--neon-glow);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--line); }
.tb-dot { width: 11px; height: 11px; border-radius: 50%; background: #2a2f3a; }
.tb-dot:nth-child(1) { background: #ff5f57; } .tb-dot:nth-child(2) { background: #febc2e; } .tb-dot:nth-child(3) { background: #28c840; }
.tb-title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.terminal-body { margin: 0; padding: 20px 22px; font-family: var(--mono); font-size: 13.5px; line-height: 1.9; overflow-x: auto; }
.terminal-body .ln { display: block; }
.terminal-body .prompt { color: var(--neon); }
.terminal-body .path { color: var(--cyan); }
.terminal-body .out { color: var(--muted); }
.terminal-body .tag-live { color: #03140d; background: var(--neon); border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.terminal-body .tag-soon { color: var(--gold); border: 1px solid var(--gold); border-radius: 4px; padding: 0 6px; font-size: 11px; }
.cursor { color: var(--neon); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s, background 0.25s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--cx,50%) var(--cy,0%), rgba(22,242,179,0.10), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover {
  transform: translateY(-4px); border-color: var(--line-2);
  background: var(--panel-2); box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.card:hover::after { opacity: 1; }
.card.neon:hover { border-color: rgba(22,242,179,0.5); box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 0 1px rgba(22,242,179,0.25); }
.card-no { font-family: var(--mono); font-size: 13px; color: var(--neon); letter-spacing: 0.2em; }
.card h3 { font-size: 20px; margin: 14px 0 10px; color: #fff; }
.card p { color: var(--muted); font-size: 15px; }

/* Ventures */
.venture { display: flex; flex-direction: column; }
.venture-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.venture-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  font-family: var(--mono); font-weight: 800; font-size: 20px; color: var(--neon);
  background: rgba(22,242,179,0.08); border: 1px solid rgba(22,242,179,0.25);
}
.venture h3 { margin: 0; }
.venture-tag { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.08em; margin: 6px 0 12px; }
.venture p:not(.venture-tag) { flex: 1; }
.venture .btn { margin-top: 20px; align-self: flex-start; }
.venture.is-soon .venture-icon { color: var(--gold); background: rgba(216,180,106,0.08); border-color: rgba(216,180,106,0.3); }
.venture.is-cta .venture-icon { color: var(--violet); background: rgba(139,108,255,0.1); border-color: rgba(139,108,255,0.3); }

.badge { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; padding: 4px 10px; border-radius: 999px; }
.badge-live { color: #03140d; background: var(--neon); box-shadow: var(--neon-glow); }
.badge-soon { color: var(--gold); border: 1px solid var(--gold); }
.badge-open { color: var(--violet); border: 1px solid var(--violet); }

/* ---------- Info table ---------- */
.info-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.info-table th, .info-table td { padding: 20px 22px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 15px; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { width: 30%; font-family: var(--mono); font-weight: 700; color: var(--neon); background: rgba(22,242,179,0.04); letter-spacing: 0.04em; }
.info-table td { color: var(--ink); }
.info-table a { color: var(--cyan); }
.info-table a:hover { text-shadow: 0 0 16px rgba(0,229,255,0.6); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-direct { margin-top: 26px; color: var(--muted); font-size: 14px; }
.contact-direct a { font-family: var(--mono); color: var(--cyan); font-size: 16px; }
.contact-form {
  display: grid; gap: 18px; padding: 30px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.field { display: grid; gap: 8px; }
.field label, .consent span { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.03em; }
.req { color: var(--neon); }
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px; color: var(--ink);
  background: rgba(0,0,0,0.35); border: 1px solid var(--line-2);
  font-family: var(--sans); font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(22,242,179,0.18);
}
.contact-form select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--neon) 50%), linear-gradient(135deg, var(--neon) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 15px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--neon); }
.consent a { color: var(--cyan); text-decoration: underline; }
.field.invalid input, .field.invalid textarea { border-color: #ff5f57; box-shadow: 0 0 0 3px rgba(255,95,87,0.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-family: var(--mono); font-size: 13.5px; margin-top: 4px; min-height: 1.2em; }
.form-status.ok { color: var(--neon); }
.form-status.err { color: #ff7a72; }
#cf-submit.loading { opacity: 0.7; pointer-events: none; }
#cf-submit.loading .btn-label::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid rgba(3,20,13,0.4); border-top-color: #03140d; border-radius: 50%; vertical-align: -2px; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--line); background: rgba(0,0,0,0.4); padding: 56px 0 30px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand .brand-text { font-size: 20px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-family: var(--mono); font-size: 13px; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--neon); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.footer-bottom a { color: var(--faint); }
.footer-bottom a:hover { color: var(--cyan); }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--neon);
  font-size: 18px; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s; backdrop-filter: blur(8px);
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { box-shadow: var(--neon-glow); border-color: var(--neon); }

/* ---------- Reveal on scroll（JSが有効なときだけ初期非表示。JS無効/失敗時は常に表示） ---------- */
.reveal { transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .section { padding: 84px 0; }
}
@media (max-width: 620px) {
  .grid-3 { grid-template-columns: 1fr; }
  .hero { min-height: 86vh; padding-top: 60px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .info-table th { width: 38%; }
  .footer-bottom { flex-direction: column; }
  #fx-rain { opacity: 0.14; }
}

/* ---------- Reduced motion / fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal, .js .reveal { opacity: 1; transform: none; }
  #fx-rain { display: none; }
  .marquee-track { animation: none; }
  .glitch::before, .glitch::after { display: none; }
}

/* JS無効/失敗時は .reveal を初期表示のままにする（html に .js が付かないため自動的に表示） */
