:root {
  --bg: #f8f9fb;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0f172a;
  --surface: #ffffff;
  --border: #e2e8f0;
  --highlight: #0ea5e9;
  --radius: 14px;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  --container-padding: clamp(18px, 3vw, 24px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 12px;
  position: relative;
}

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

.logo {
  font-weight: 700;
  font-size: 18px;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

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

.logo .logo-text {
  line-height: 1.2;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.menu-toggle .menu-icon,
.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle .menu-icon::before {
  top: -5px;
}

.menu-toggle .menu-icon::after {
  top: 5px;
}

.menu-toggle .menu-label {
  font-size: 0.95em;
}

.menu-toggle:hover {
  background: #0b1225;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
}

.menu-toggle:active {
  transform: translateY(1px);
}

.menu-toggle:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

nav a {
  font-weight: 600;
  color: var(--text);
}

.nav-open .menu-toggle .menu-icon {
  transform: rotate(45deg);
}

.nav-open .menu-toggle .menu-icon::before {
  transform: rotate(-90deg);
  top: 0;
}

.nav-open .menu-toggle .menu-icon::after {
  opacity: 0;
}

@keyframes menu-fade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  body.nav-enhanced header {
    z-index: 14;
  }

  body.nav-enhanced .header-inner {
    align-items: center;
    gap: 10px;
  }

  body.nav-enhanced .logo .logo-mark {
    height: 26px;
  }

  body.nav-enhanced .menu-toggle {
    display: inline-flex;
  }

  body.nav-enhanced nav {
    position: absolute;
    left: calc(var(--container-padding) * -1);
    width: calc(100% + (var(--container-padding) * 2));
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px var(--container-padding) 14px;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
    display: none;
  }

  body.nav-enhanced nav.is-open {
    display: block;
    animation: menu-fade 0.14s ease-out;
  }

  body.nav-enhanced nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 70vh;
  }

  body.nav-enhanced nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    text-align: left;
  }
}

main {
  padding: 16px 0 64px;
}

section {
  padding: 56px 0;
  scroll-margin-top: 92px;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-header h1,
.section-header h2,
.section-header h3 {
  margin: 0 0 8px 0;
  letter-spacing: 0.01em;
}

.lead {
  color: var(--muted);
  max-width: 780px;
  text-wrap: pretty;
}

.hero {
  position: relative;
  padding: 72px var(--container-padding) 56px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.12), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(14, 165, 233, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 52%, #f3f7ff 100%);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.hero-title {
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 16px 0;
  line-height: 1.3;
  text-wrap: balance;
}

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

.hero-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: clamp(18px, 4vw, 32px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 16px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  filter: blur(32px);
  opacity: 0.9;
  z-index: 0;
  transform: translateZ(0);
}

.hero-glow-1 {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28) 0%, transparent 52%);
  translate: -26% -14%;
}

.hero-glow-2 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.24) 0%, transparent 50%);
  translate: 24% 8%;
}

.hero-frame {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #ffffff, #f7fbff);
  border-radius: 16px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 8px;
}

.hero-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  max-height: clamp(240px, 36vw, 320px);
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-frame figcaption {
  color: var(--muted);
  font-size: 0.95em;
  text-wrap: pretty;
}

.hero-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95em;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.12);
}

.pill-strong {
  color: #0f172a;
  background: #0ea5e9;
  border-color: #0ea5e9;
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.28);
}

.pill-strong::before {
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.24);
}

.pill-soft {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.2);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.highlight-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(4px);
}

.highlight-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0ea5e9;
  color: #ffffff;
  font-weight: 900;
  font-size: 1em;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.25);
}

.highlight-title {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 46px;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: #111827;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card h3 {
  margin-top: 0;
}

.cardLink {
  color: inherit;
  text-decoration: none;
}

.cardLink:hover .more,
.cardLink:focus .more {
  text-decoration: underline;
}

.cardBody {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cardThumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subLink {
  margin-top: 8px;
  font-size: 0.95em;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9em;
}

.meta {
  font-weight: 700;
  color: #0ea5e9;
  margin-bottom: 4px;
}

.more {
  font-weight: 700;
  margin-top: 4px;
  display: inline-block;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.case-card .note + .note {
  margin-top: 6px;
}

.list {
  padding-left: 18px;
  margin: 12px 0 0 0;
  color: var(--muted);
}

.list li {
  margin-bottom: 8px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-table th {
  width: 240px;
  text-align: left;
  background: #f8fafc;
  font-weight: 700;
}

.legal-table tr:last-child th,
.legal-table tr:last-child td {
  border-bottom: none;
}

.footer {
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-language {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9em;
}

.footer-language-label {
  color: var(--muted);
}

.language-link {
  color: var(--muted);
  font-weight: 600;
}

.language-link.is-active {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.language-link:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.tagline {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0c4a6e;
  font-weight: 700;
  margin-bottom: 12px;
}

.note {
  color: var(--muted);
  font-size: 0.95em;
}

@media (max-width: 960px) {
  section {
    padding: 48px 0;
  }

  .hero {
    padding: 56px var(--container-padding) 40px;
  }

  .hero-layout {
    gap: 18px;
  }

  nav ul {
    gap: 12px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  nav {
    width: 100%;
  }

  nav ul {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .card {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.7;
  }

  .container {
    padding-left: calc(var(--container-padding) + env(safe-area-inset-left));
    padding-right: calc(var(--container-padding) + env(safe-area-inset-right));
  }

  main {
    padding: 12px 0 40px;
  }

  section {
    padding: 40px 0;
  }

  .hero {
    padding: 48px calc(var(--container-padding) + env(safe-area-inset-left)) 32px
      calc(var(--container-padding) + env(safe-area-inset-right));
  }

  nav {
    width: calc(100% + (var(--container-padding) * 2));
    margin-left: calc(var(--container-padding) * -1);
  }

  nav ul {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px var(--container-padding) 10px;
    margin: 0;
    scrollbar-width: none;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav li {
    flex: 0 0 auto;
  }

  nav a {
    padding: 10px 14px;
    font-size: 0.95em;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    white-space: nowrap;
  }

  .hero-title {
    font-size: clamp(26px, 6vw, 32px);
    line-height: 1.35;
  }

  .lead {
    font-size: 1em;
  }

  .cardThumb {
    height: 160px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .legal-table {
    display: block;
    overflow-x: auto;
  }

  .footer-nav {
    flex-direction: column;
    gap: 8px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-language {
    margin-left: 0;
  }
}
