:root {
  --primary: #000468;
  --primary-dark: #00003e;
  --accent: #5a6db8;
  --dark: #1b2a4a;
  --text: #33415c;
  --muted: #6c757d;
  --bg: #f7f9fc;
  --light: #ffffff;
  --radius: 10px;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

/* ---- Header ---- */
header.site-header {
  background: #fff;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.2rem 0 0.35rem;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.nav-links a .en {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.25;
}

.nav-links a .ja {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
}

.nav-links a:hover .en,
.nav-links a.active .en {
  color: var(--primary);
}

.nav-links a:hover,
.nav-links a.active {
  text-decoration: none;
  border-bottom-color: var(--primary);
}

.nav-links .dropdown {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
}

.nav-links .drop-trigger .en::after {
  content: " ▾";
  font-size: 0.8em;
  color: var(--muted);
}

.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
  min-width: 190px;
  z-index: 30;
}

.nav-links .dropdown:hover .dropdown-menu,
.nav-links .dropdown:focus-within .dropdown-menu {
  display: block;
}

.nav-links .dropdown-menu a {
  border-bottom: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
}

.nav-links .dropdown-menu a:hover,
.nav-links .dropdown-menu a.active {
  background: #f2f6fc;
  border-bottom: none;
}

.nav-links .dropdown-menu a .en {
  font-size: 0.9rem;
}

.nav-links .dropdown-menu.product-menu {
  min-width: 240px;
}

.nav-links .dropdown-menu.product-menu a {
  align-items: flex-start;
  padding: 0.55rem 0.9rem;
  gap: 0.1rem;
}

.nav-links .dropdown-menu .desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.3;
}

/* ---- Layout ---- */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 3rem;
  background-image: linear-gradient(135deg, var(--dark) 0%, #24395f 100%);
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #cfd9f0;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
  line-height: 1.3;
}

.btn .ja {
  font-size: 0.7rem;
  font-weight: 400;
  color: #c9d3ef;
}

.btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #fff;
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Sections ---- */
.section {
  margin-bottom: 3rem;
}

.section h2 {
  font-size: 1.9rem;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section p.lead {
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 750px;
}

.section h2 .page-sub {
  font-size: 0.65em;
  font-weight: 400;
  color: var(--muted);
}

/* ---- Cards / Services ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--light);
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ---- Features list ---- */
.checklist {
  list-style: none;
}

.checklist li {
  padding: 0.5rem 0 0.5rem 1.8rem;
  position: relative;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.contact-info h3 {
  color: var(--dark);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.contact-info strong {
  color: var(--text);
}

form {
  background: var(--light);
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

label .ja {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
}

input,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d0d6e2;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* ---- Public notices table ---- */
.table-wrap {
  overflow-x: auto;
  background: var(--light);
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  padding: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e9f0;
}

th {
  background: var(--dark);
  color: #fff;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #f2f6fc;
}

/* ---- Footer ---- */
footer.site-footer {
  background: var(--dark);
  color: #b8c4dc;
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.9rem;
}

footer.site-footer a {
  color: #7cb3ff;
}

.product-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: block;
  margin-bottom: 0.85rem;
}

.hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  display: block;
  margin: 0 auto 1.25rem;
}

/* ---- Products ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--light);
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-card h3 {
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.product-card .tagline {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.product-card p {
  margin-bottom: 0.9rem;
}

.product-card ul {
  margin: 0 0 1rem 1.1rem;
}

.product-card li {
  margin-bottom: 0.35rem;
}

.product-card .actions {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e8edf9;
  color: var(--primary);
  vertical-align: middle;
}

.badge.free {
  background: #e6f6ec;
  color: #1c6b3c;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: #eef2fb;
}

.download-box {
  background: var(--light);
  border: 1px solid #e5e9f0;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.download-box h3 {
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.download-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.download-meta code {
  font-size: 0.8rem;
  word-break: break-all;
}

.notice {
  background: #fff8e6;
  border: 1px solid #f0d999;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.promo {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  background-image: linear-gradient(135deg, var(--dark) 0%, #24395f 100%);
}

.promo h3 {
  color: #fff;
  margin-bottom: 0.35rem;
}

.promo p {
  color: #cfd9f0;
  margin: 0;
  max-width: 640px;
}

.promo .btn {
  flex: none;
}

.steps {
  counter-reset: step;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding-left: 2.4rem;
  position: relative;
  margin-bottom: 0.9rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem 1.1rem;
  }

  /* Flatten dropdowns into direct links on small screens. */
  .nav-links .dropdown {
    display: contents;
  }

  .nav-links .drop-trigger {
    display: none;
  }

  .nav-links .dropdown-menu {
    display: contents;
  }

  .nav-links .dropdown-menu a {
    padding: 0.2rem 0;
    border-radius: 0;
  }

  .nav-links .dropdown-menu .desc {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

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

  .btn-secondary {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
