:root {
  --background: #f3f6fb;
  --background-accent: #e8eef8;
  --foreground: #1a2332;
  --muted: #5a6a7e;
  --border: #d5dee9;
  --surface: #ffffff;
  --brand: #1a5fb4;
  --brand-soft: #e8f1fb;
  --brand-hover: #154a8f;
  --navy: #1a2332;
  --navy-mid: #243044;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(26, 35, 50, 0.12);
  --shadow-soft: 0 1px 2px rgba(26, 35, 50, 0.04);
  --header-h: 72px;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    Meiryo, sans-serif;
  --font-display: "Outfit", "Noto Sans JP", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1,
h2 {
  text-wrap: balance;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(243, 246, 251, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(213, 222, 233, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand-type {
  width: auto;
  height: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px 22px;
}

.site-nav a {
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:not(.btn):hover {
  color: var(--brand);
  text-decoration: none;
}

.site-nav .btn-primary {
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle-bar:first-of-type {
  transform: translateY(4px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:last-of-type {
  transform: translateY(-4px) rotate(-45deg);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: #c3cedc;
}

.hero .btn-ghost,
.cta .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.hero .btn-ghost:hover,
.cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #1a2332 0%, #243044 52%, #1a5fb4 155%);
  padding: 64px 0 80px;
}

.hero-glow {
  pointer-events: none;
  position: absolute;
  right: -8%;
  top: -20%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(26, 95, 180, 0.45);
  filter: blur(80px);
}

.hero-glow::after {
  content: "";
  position: absolute;
  left: -280px;
  bottom: -180px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(40px);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  font-family: var(--font-display);
}

.eyebrow.light,
.hero .eyebrow,
.cta .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-accent {
  color: #d6e6fb;
}

.lead {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin: 18px 0 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Portal mockup */
.device {
  background: #0f1622;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.device-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #161e2c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.device-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d4a5e;
}

.device-chrome span:nth-child(1) {
  background: #e07a6a;
}
.device-chrome span:nth-child(2) {
  background: #d4b05a;
}
.device-chrome span:nth-child(3) {
  background: #6bb07a;
}

.device-url {
  margin: 0 0 0 10px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255, 255, 255, 0.45);
}

.portal {
  display: grid;
  grid-template-columns: 148px 1fr;
  min-height: 300px;
  background: #f3f6fb;
  color: var(--foreground);
}

.portal-side {
  padding: 16px 12px;
  background: #fff;
  border-right: 1px solid var(--border);
}

.portal-side img {
  height: 20px;
  width: auto;
  margin: 0 6px 16px;
}

.portal-side li {
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
}

.portal-side li.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.portal-main {
  padding: 18px 18px 20px;
}

.portal-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
}

.portal-title {
  margin: 2px 0 14px;
  font-size: 15px;
  font-weight: 700;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 8px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.step i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5d0de;
  margin-bottom: 6px;
}

.step.is-done {
  color: var(--foreground);
}

.step.is-done i {
  background: #1f7a4d;
}

.step.is-now {
  border-color: rgba(26, 95, 180, 0.35);
  background: var(--brand-soft);
  color: var(--brand);
}

.step.is-now i {
  background: var(--brand);
}

.portal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.mini-card span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--brand);
}

.mini-card strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
}

.mini-card em {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-style: normal;
  color: var(--muted);
}

/* ========== Problems ========== */
.problems {
  padding: 80px 0 24px;
}

.section-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}

.problems h2,
.features h2,
.flow h2 {
  margin: 6px 0 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-lead {
  margin: 12px 0 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 1.0625rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.problem-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow-soft);
}

.problem-grid h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.problem-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ========== Features ========== */
.features {
  padding: 72px 0 80px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.feature-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.feature-grid li:hover {
  border-color: rgba(26, 95, 180, 0.28);
  background: #f7fafd;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-grid h3 {
  margin: 14px 0 0;
  font-size: 1.0625rem;
}

.feature-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ========== Story ========== */
.story {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #1a2332 0%, #243044 52%, #1a5fb4 155%);
  padding: 80px 0;
}

.story::before,
.story::after {
  content: "";
  pointer-events: none;
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
}

.story::before {
  width: 180px;
  height: 180px;
  right: 8%;
  top: -40px;
  background: rgba(255, 255, 255, 0.08);
}

.story::after {
  width: 220px;
  height: 220px;
  left: 18%;
  bottom: -80px;
  background: rgba(26, 95, 180, 0.35);
}

.story-inner {
  position: relative;
  max-width: 720px;
}

.story h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.story-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 22px 0 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.pill-inline {
  margin: 0 4px;
  vertical-align: 1px;
}

.muted-word {
  color: rgba(255, 255, 255, 0.45);
}

.times {
  color: rgba(255, 255, 255, 0.32);
}

.result {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}

.story-body {
  margin-top: 28px;
}

.story-body p {
  margin: 0 0 18px;
  font-size: 1.03125rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.8);
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.story-tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

.story-tags span {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.95);
}

/* ========== Flow ========== */
.flow {
  padding: 80px 0;
}

.flow-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
  counter-reset: none;
}

.flow-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.flow-list span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.04em;
}

.flow-list h3 {
  margin: 10px 0 0;
  font-size: 1.0625rem;
}

.flow-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ========== CTA ========== */
.cta {
  background: linear-gradient(145deg, #1a2332 0%, #1e3a62 70%, #1a5fb4 160%);
  color: #fff;
  padding: 64px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}

.cta p {
  margin: 10px 0 0;
  max-width: 36em;
  color: rgba(255, 255, 255, 0.72);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}

.footer-brand img {
  height: 28px;
  width: auto;
}

.footer-brand p,
.footer-meta p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-meta p {
  margin: 4px 0 0;
}

.footer-meta a {
  color: var(--muted);
}

.footer-copy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.footer-copy p {
  margin: 0;
  font-size: 0.75rem;
  color: #8a97a8;
}

/* ========== Focus ========== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .hero-grid,
  .problem-grid,
  .feature-grid,
  .flow-list,
  .cta-inner,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .hero-visual {
    max-width: 640px;
  }

  .cta-inner {
    display: block;
  }

  .cta-actions {
    margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, var(--max));
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 20px;
    background: rgba(243, 246, 251, 0.98);
    border-bottom: 1px solid var(--border);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 12px 8px;
  }

  .site-nav .btn {
    margin-top: 8px;
    width: 100%;
  }

  .portal {
    grid-template-columns: 1fr;
  }

  .portal-side {
    display: none;
  }

  .problems,
  .features,
  .flow,
  .story {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .features {
    padding-bottom: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
