/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fafafa;
  --bg-surface: #fff;
  --bg-card: #fff;
  --bg-code: #111;
  --border: #e5e7eb;
  --border-hover: #c5c8ce;
  --text: #0f0f0f;
  --text-secondary: #555;
  --text-muted: #999;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  --glow: 0 4px 40px rgba(37, 99, 235, 0.08);
  --max-w: 900px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

header, main, footer {
  position: relative;
  z-index: 1;
}

/* Mouse interaction area */
@media (hover: hover) {
  #bg-canvas {
    pointer-events: auto;
  }
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  height: 32px;
  width: auto;
}

.logo-text {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Hero logo */
.hero-logo {
  height: 120px;
  width: auto;
  margin-bottom: 2rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent);
}

/* Main */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* Section labels */
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

/* Hero */
#hero {
  padding: 8rem 0 6rem;
  text-align: center;
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  background: rgba(37, 99, 235, 0.04);
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-line {
  display: block;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.03em;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
}

/* Philosophy cards */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.philosophy-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.philosophy-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.philosophy-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* Featured Apps */
.featured-apps {
  margin-bottom: 1.5rem;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.app-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.app-card__icon {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  border-radius: 16px;
  flex-shrink: 0;
}

.app-card__info {
  flex: 1;
}

.app-card__info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.app-card__info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.app-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--gradient);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.app-card__arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.app-card:hover .app-card__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* Terminal — ダーク維持（コード感） */
.terminal-window {
  background: var(--bg-code);
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #191919;
  border-bottom: 1px solid #222;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #555;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
  color: #ccc;
}

.terminal-line {
  white-space: nowrap;
  overflow: hidden;
}

.t-prompt { color: #3b82f6; }
.t-dim { color: #555; }
.t-green { color: #28c840; font-weight: 600; }
.t-yellow { color: #febc2e; font-weight: 600; }

.t-cursor {
  display: inline-block;
  color: #3b82f6;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* About */
.about-grid {
  display: flex;
  flex-direction: column;
}

.about-item {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.about-item:last-child {
  border-bottom: none;
}

.about-key {
  width: 140px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.about-value {
  font-size: 0.95rem;
  color: var(--text);
}

/* Privacy */
.policy-content {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.policy-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.policy-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.policy-content p {
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

/* Contact */
#contact p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Hamburger menu button — hidden on desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 700px) {
  /* Nav — hamburger */
  .menu-toggle {
    display: flex;
  }

  nav {
    padding: 0.75rem 1.25rem;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: 0;
    width: 60vw;
    max-width: 280px;
    height: 100dvh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 150;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.06);
  }

  nav ul.open {
    transform: translateX(0);
  }

  nav ul li {
    border-bottom: 1px solid var(--border);
  }

  nav a {
    display: block;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text);
  }

  /* Hero */
  .hero-logo {
    height: 80px;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  main {
    padding: 0 1.25rem;
  }

  #hero {
    padding: 4.5rem 0 3.5rem;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.75rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.6rem;
  }

  .stat-divider {
    height: 2rem;
  }

  /* Philosophy */
  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .philosophy-card {
    padding: 1.5rem 1.25rem;
  }

  /* Terminal */
  .terminal-body {
    font-size: 0.65rem;
    padding: 1rem;
    overflow-x: auto;
  }

  .terminal-line {
    white-space: nowrap;
  }

  /* About */
  .about-key {
    width: 90px;
    font-size: 0.7rem;
  }

  .about-value {
    font-size: 0.85rem;
  }

  /* Sections */
  section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 1.65rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.1rem;
  }
}
