:root {
  color-scheme: light;
  --color-bg: #f5f6f8;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-muted: #4b5563;
  --color-border: #e1e4e8;
  --color-shadow: rgba(15, 23, 42, 0.04);
  --color-primary: #1f5f99;
  --color-hero-start: rgba(31, 95, 153, 0.10);
  --color-hero-end: rgba(31, 95, 153, 0.03);
  --radius-lg: 14px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-color: rgba(31, 95, 153, 0.4);
  text-underline-offset: 3px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 24px;
}

/* Header */
.header {
  padding-top: 28px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.nav-list a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus {
  color: var(--color-text);
  border-bottom-color: rgba(31, 95, 153, 0.4);
}

main section {
  margin-top: 32px;
}

/* Typography */
h1,
h2 {
  line-height: 1.2;
  margin: 0 0 8px;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

p {
  margin: 0 0 16px;
}

ul {
  padding-left: 20px;
  margin: 0;
}

li {
  margin-bottom: 8px;
}

/* =========================
   Hero
   ========================= */
.hero-panel {
  position: relative;
  padding: 48px 32px 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden; /* 横スクロール保険 */

  background:
    linear-gradient(135deg,
      rgba(245, 246, 248, 0.70),
      rgba(245, 246, 248, 0.45)),
    url("./images/workflow.webp");

  background-repeat: no-repeat;
  background-position: right 12px bottom 8px;
  background-size: 50% auto;
}

#hero-title {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  max-width: 100%;
  white-space: nowrap; /* PCは1行固定 */
}

.hero-panel p {
  max-width: 56ch;
}

.company-intro {
  margin-top: 8px;
  color: var(--color-muted);
}

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

.hero-note {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-text);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.95);
}

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

.btn-primary:hover {
  background: #1a558a;
}

.btn-ghost {
  border-color: rgba(31, 95, 153, 0.35);
  color: var(--color-primary);
}

/* Card */
.card {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 16px -12px var(--color-shadow);
}

.small,
.note {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* Features */
.features li::marker {
  content: "● ";
  color: var(--color-primary);
}

/* Menu */
.menu-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.menu-item {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fafbfc;
}

.menu-lead {
  color: var(--color-muted);
}

.menu-meta {
  display: grid;
  gap: 10px;
}

.menu-meta > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}

.menu-meta dt {
  font-weight: 650;
}

.menu-meta dd {
  margin: 0;
  color: var(--color-muted);
}

/* Flow */
.flow-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 16px;
}

.flow-list li {
  position: relative;
  padding: 16px 18px 16px 52px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fafbfc;
}

.flow-list li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 6px rgba(31, 95, 153, 0.12);
}

/* Form */
.form-intro {
  color: var(--color-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--color-muted);
  min-width: 0; /* はみ出し対策 */
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 100%;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.form-note {
  margin: 16px 0 12px;
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* Submit button + Spinner */
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
}

.form-submit:hover {
  background: var(--color-primary);
  color: #fff;
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}

.form-submit.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.footer {
  padding-top: 8px;
  padding-bottom: 32px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    background-size: 420px auto;
    padding: 40px 28px 32px;
  }

  #hero-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 24px 18px;
  }

  /* ← 横スクロールの本命対策 */
  #hero-title {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-panel {
    padding: 32px 20px 28px;
    background:
      linear-gradient(180deg,
        rgba(245, 246, 248, 0.98),
        rgba(245, 246, 248, 0.95));
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-list {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}
