/* ── Tokens ── */
:root {
  --bg: #0a0c10;
  --bg-alt: #11141b;
  --bg-card: #161a24;
  --surface: #1c2230;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.12);
  --accent-2: #818cf8;
  --warn: #fbbf24;
  --radius: 12px;
  --radius-lg: 20px;
  --font: "IBM Plex Sans JP", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --container: 1120px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
strong { color: #fff; font-weight: 600; }

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

/* ── Grain overlay ── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Typography helpers ── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.eyebrow--light { color: var(--accent); }

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #2dd4bf 100%);
  color: #0a0c10;
}

.btn--primary:hover { filter: brightness(1.05); }

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }

.btn--sm { padding: 10px 18px; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 12, 16, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.logo--sm { font-size: 0.95rem; }

.logo__mark {
  color: var(--accent);
  font-size: 1.1em;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  padding: calc(var(--header-h) + 80px) 0 100px;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(94, 234, 212, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(129, 140, 248, 0.06), transparent);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero__stats dt {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.hero__stats dd {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Terminal visual */
.hero__visual { position: relative; }

.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.terminal__bar span:nth-child(1) { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.terminal__bar span:nth-child(2) { width: 12px; height: 12px; border-radius: 50%; background: #febc2e; }
.terminal__bar span:nth-child(3) { width: 12px; height: 12px; border-radius: 50%; background: #28c840; }

.terminal__title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal__body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.8;
}

.prompt { color: var(--accent); }
.prompt.ai { color: var(--accent-2); }
.dim { color: var(--text-muted); padding-left: 4px; }

.cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__badge {
  position: absolute;
  bottom: -16px;
  left: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--mono);
  font-size: 0.6875rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.badge--ok { color: var(--accent); }
.badge--warn { color: var(--warn); }

/* ── Sections ── */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: linear-gradient(180deg, var(--bg-alt) 0%, #0d1118 100%);
  border-block: 1px solid var(--border);
}

.section__head {
  margin-bottom: 56px;
  max-width: 640px;
}

.section__head--center {
  text-align: center;
  margin-inline: auto;
}

.section__head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.section__lead {
  margin-top: 16px;
  color: var(--text-muted);
  max-width: 560px;
}

.section__head--center .section__lead {
  margin-inline: auto;
}

/* ── Cards ── */
.cards {
  display: grid;
  gap: 24px;
}

.cards--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s;
}

.card:hover { border-color: rgba(94, 234, 212, 0.25); }

.card__icon {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Features ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.feature {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.feature__num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.feature h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Compare */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
}

.compare__col {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.compare__col--before {
  background: rgba(255, 255, 255, 0.02);
}

.compare__col--after {
  background: var(--accent-dim);
  border-color: rgba(94, 234, 212, 0.2);
}

.compare__col h3 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.compare__col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.compare__col li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.compare__col li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.compare__col--after li::before {
  content: "✓";
  color: var(--accent);
}

.compare__arrow {
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--accent);
}

/* ── Timeline ── */
.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.timeline__item {
  position: relative;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.timeline__step {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.timeline__item h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.timeline__item p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Use cases ── */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.usecase {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.2s, border-color 0.2s;
}

.usecase:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.3);
}

.usecase h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.usecase p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Engineer block ── */
.engineer-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.engineer-block__text h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.35;
  margin-bottom: 16px;
}

.engineer-block__text p {
  color: var(--text-muted);
}

.checklist {
  list-style: none;
  display: grid;
  gap: 14px;
}

.checklist li {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  padding-left: 44px;
  position: relative;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  color: var(--accent);
  font-weight: 600;
}

/* ── Pricing ── */
.pricing-card {
  display: grid;
  gap: 32px;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-image: radial-gradient(ellipse at top right, rgba(94, 234, 212, 0.06), transparent 60%);
}

.pricing-card h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.pricing-card > div > p {
  color: var(--text-muted);
}

.pricing-card__items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pricing-card__items div {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.pricing-card__items strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.pricing-card__items span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── CTA ── */
.cta {
  padding-bottom: 120px;
}

.cta__inner {
  max-width: 560px;
  text-align: center;
}

.cta__inner h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.35;
  margin-bottom: 12px;
}

.cta__inner > p {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.cta__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}

.cta__form label {
  display: grid;
  gap: 6px;
}

.cta__form label.full {
  grid-column: 1 / -1;
}

.cta__form span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.cta__form input,
.cta__form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.cta__form input:focus,
.cta__form textarea:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.4);
}

.cta__form textarea {
  resize: vertical;
  min-height: 88px;
}

.cta__form button {
  grid-column: 1 / -1;
  margin-top: 8px;
}

/* ── Footer ── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .nav { display: none; }

  .hero__grid,
  .engineer-block,
  .feature-grid,
  .compare,
  .timeline,
  .usecase-grid,
  .pricing-card__items {
    grid-template-columns: 1fr;
  }

  .compare__arrow {
    transform: rotate(90deg);
    padding: 8px 0;
  }

  .cards--3 {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .hero__stats {
    flex-wrap: wrap;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .section { padding: 72px 0; }

  .hero { padding-top: calc(var(--header-h) + 48px); }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .cta__form {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    padding: 28px;
  }
}
