/* Resolve Inc. — Cyberpunk × Scientific */

:root {
  --bg-deep: #0A0E1A;
  --surface: #111827;
  --surface-2: #0E1422;
  --primary: #00F0FF;
  --accent: #FF2E9A;
  --accent-2: #8B5CF6;
  --text-1: #E5E7EB;
  --text-2: #9CA3AF;
  --text-3: #6B7280;
  --grid: rgba(0, 240, 255, 0.12);
  --grid-strong: rgba(0, 240, 255, 0.22);
  --border: rgba(229, 231, 235, 0.08);
  --border-strong: rgba(229, 231, 235, 0.16);

  --font-display: "Space Grotesk", "Noto Sans JP", sans-serif;
  --font-jp: "Noto Sans JP", sans-serif;
  --font-body: "Inter", "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-deep);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 768px) {
  body { cursor: auto; }
}

/* Scanline / noise overlay */
.fx-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  mix-blend-mode: overlay;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.5) 0px,
      rgba(255,255,255,0.5) 1px,
      transparent 1px,
      transparent 3px
    );
}

.grid-bg {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
}
.cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(0, 240, 255, 0.6);
  border-radius: 50%;
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}
.cursor-ring.hover {
  width: 48px; height: 48px;
  border-color: var(--accent);
}
@media (max-width: 768px) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px 40px;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 15px;
}
.logo-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  position: relative;
}
.logo-mark svg { width: 100%; height: 100%; }
.logo-text { color: var(--text-1); }
.logo-text .dim { color: var(--text-3); font-weight: 400; margin-left: 4px; }

.nav {
  display: flex; align-items: center; gap: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}
.nav a:hover { color: var(--primary); }
.nav a.active { color: var(--text-1); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
.lang-switch {
  display: flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  color: var(--text-2);
  border: 0;
  padding: 6px 10px;
  cursor: none;
  font: inherit;
  letter-spacing: 0.08em;
}
.lang-switch button.active {
  background: rgba(0, 240, 255, 0.08);
  color: var(--primary);
}

@media (max-width: 900px) {
  .nav a:not(.mobile-keep) { display: none; }
}

/* Sections */
section {
  position: relative;
  padding: 140px 40px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  section { padding: 100px 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 80px;
  align-items: end;
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 60px; }
}
.section-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.section-title .accent { color: var(--primary); }
.section-title .jp {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 0.85em;
  display: block;
  margin-top: 8px;
  color: var(--text-2);
}

/* Hero */
.hero {
  height: 100vh;
  min-height: 720px;
  max-width: 100%;
  padding: 0;
  display: grid;
  align-items: center;
  overflow: hidden;
  position: relative;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual-meta { display: none !important; }
}
@media (max-width: 768px) {
  .hero-content { padding: 0 20px; }
}
.hero-text { max-width: 640px; }
.hero-eyebrow { margin-bottom: 28px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 28px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}
.hero-title .line {
  display: inline;
  white-space: nowrap;
}
.hero-title .en {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.35em;
  letter-spacing: 0.02em;
  color: var(--text-2);
  margin-top: 18px;
  line-height: 1.3;
}
.hero-title .accent { color: var(--primary); text-shadow: 0 0 24px rgba(0, 240, 255, 0.45); }
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--text-2);
  max-width: 460px;
  margin-bottom: 44px;
  line-height: 1.65;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: 2px;
  cursor: none;
  text-decoration: none;
  position: relative;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
  box-shadow: 0 0 0 rgba(0, 240, 255, 0);
}
.btn-primary:hover {
  background: var(--primary);
  color: var(--bg-deep);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}
.btn-ghost {
  color: var(--text-2);
  border-color: var(--border);
  background: transparent;
}
.btn-ghost:hover { color: var(--text-1); border-color: var(--text-2); }
.btn-magenta {
  color: white;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: transparent;
  box-shadow: 0 0 24px rgba(255, 46, 154, 0.35);
}
.btn-magenta:hover {
  box-shadow: 0 0 40px rgba(255, 46, 154, 0.6);
  transform: translateY(-1px);
}
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Hero visual meta (right side HUD text) */
.hero-visual-meta {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-self: end;
  align-self: end;
  padding-bottom: 40px;
  max-width: 280px;
}
.hero-visual-meta .meta-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.hero-visual-meta .meta-line .val { color: var(--primary); }
.hero-visual-meta .meta-line .blink {
  display: inline-block; width: 6px; height: 6px;
  background: var(--primary); margin-right: 6px;
  animation: blink 1.4s infinite;
  box-shadow: 0 0 6px var(--primary);
}
@keyframes blink { 0%,60%{opacity:1} 70%,100%{opacity:0.2} }

/* Hero top crosshair frame */
.hero-frame {
  position: absolute;
  inset: 24px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid var(--border);
}
.hero-frame::before, .hero-frame::after,
.hero-corner {
  position: absolute;
  width: 12px; height: 12px;
}
.hero-corner {
  border: 1px solid var(--primary);
  box-shadow: 0 0 8px rgba(0,240,255,0.6);
}
.hero-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hero-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hero-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.hero-coords {
  position: absolute;
  bottom: 40px; left: 64px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  z-index: 2;
  pointer-events: none;
}
.hero-coords span { color: var(--primary); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-3);
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, var(--primary));
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
  background: linear-gradient(to bottom, transparent, var(--primary));
  animation: scroll-pulse 2s infinite;
}
@keyframes scroll-pulse {
  0% { top: -12px; opacity: 0; }
  30% { opacity: 1; }
  100% { top: 48px; opacity: 0; }
}

/* Services */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 768px) { .bento { grid-template-columns: 1fr; } }
.bento-card {
  background: var(--bg-deep);
  padding: 40px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.bento-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 3px,
      rgba(0, 240, 255, 0.04) 3px,
      rgba(0, 240, 255, 0.04) 4px
    );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.bento-card:hover::before { opacity: 1; }
.bento-card:hover {
  background: #0d1322;
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.4), 0 0 32px rgba(0, 240, 255, 0.08);
}
.bento-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.bento-icon {
  width: 48px; height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--text-1);
  transition: color 0.3s, border-color 0.3s;
}
.bento-card:hover .bento-icon { color: var(--primary); border-color: var(--primary); }
.bento-icon svg { width: 22px; height: 22px; }
.bento-index {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  margin-left: auto;
}
.bento-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin-bottom: 8px;
}
.bento-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.bento-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 380px;
}
.bento-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-top: 24px;
}
.bento-footer .arrow {
  transition: transform 0.3s, color 0.3s;
  color: var(--text-2);
}
.bento-card:hover .bento-footer .arrow {
  transform: translateX(6px) translateY(-6px);
  color: var(--primary);
}

/* Approach */
.approach {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 1024px) {
  .approach { grid-template-columns: 1fr; }
}
.approach-text h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.approach-text p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.approach-graph {
  position: relative;
  height: 280px;
}
@media (max-width: 768px) {
  .approach-graph { height: 560px; }
}

/* Tech stack marquee */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 -40px;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-3);
  filter: grayscale(1);
  transition: filter 0.3s, color 0.3s;
  white-space: nowrap;
}
.marquee-item:hover { filter: grayscale(0); color: var(--text-1); }
.marquee-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* About */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
}
@media (max-width: 1024px) { .about-wrap { grid-template-columns: 1fr; } }

.about-info { display: flex; flex-direction: column; gap: 32px; }
.info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.info-row:last-child { border-bottom: 1px solid var(--border); }
.info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 4px;
}
.info-value {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-1);
  line-height: 1.5;
}
.info-value .en { display: block; color: var(--text-3); font-size: 13px; font-family: var(--font-mono); margin-top: 4px; letter-spacing: 0.04em;}

.map-frame {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
.map-head {
  display: flex; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
}
.map-head .live { color: var(--primary); }
.map-head .live::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 6px;
  animation: blink 1.4s infinite;
}
#map-canvas {
  flex: 1;
  width: 100%;
  display: block;
}
.map-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
}
.map-foot .coord { color: var(--primary); }

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}
@media (max-width: 1024px) { .contact-wrap { grid-template-columns: 1fr; } }

.contact-intro h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  margin-bottom: 16px;
}
.contact-intro p { color: var(--text-2); font-size: 15px; line-height: 1.7; margin-bottom: 28px; max-width: 380px; }
.contact-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.contact-meta div { margin-bottom: 8px; }
.contact-meta .val { color: var(--text-1); margin-left: 8px; }

.form {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex; justify-content: space-between;
}
.field label .required { color: var(--accent); }
.field input, .field textarea {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  padding: 14px 16px;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 14px;
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: 0;
}
.field input:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1), 0 0 16px rgba(0, 240, 255, 0.15);
}
.field input.error, .field textarea.error {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 46, 154, 0.12);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .err-msg {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.form-submit {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
}
.form-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}
.form-status.success { color: var(--primary); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 40px 40px;
  position: relative;
  background:
    linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.02)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 40px,
      var(--grid) 40px,
      var(--grid) 41px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 40px,
      var(--grid) 40px,
      var(--grid) 41px
    );
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-top: 20px;
}
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 2px;
  cursor: none;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
}
.footer-socials a:hover { color: var(--primary); border-color: var(--primary); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero char stagger */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: charIn 0.5s forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Utility */
.mono { font-family: var(--font-mono); }
.cyan { color: var(--primary); }
.magenta { color: var(--accent); }
