:root {
  --primary: #005bac;
  --primary-light: #e6f0fb;
  --accent: #00a86b;
  --text-main: #222;
  --text-muted: #666;
  --bg: #f6f7fb;
  --white: #fff;
  --border: #e0e0e0;
  --shadow-soft: 0 8px 25px rgba(0,0,0,0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN","Yu Gothic", Meiryo, sans-serif;
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.7;
}

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

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

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.logo-text-main {
  font-weight: 700;
  font-size: 18px;
}

.logo-text-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  font-size: 14px;
  align-items: center;
  flex-wrap: wrap;
}

nav li { margin: 0; }

nav a {
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
  border-radius: 999px;
  transition: background 0.2s, border-bottom-color 0.2s, color 0.2s;
}

nav a:hover {
  border-bottom-color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-contact-btn {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,91,172,0.25);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 42px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  font-size: 11px;
  color: var(--primary);
  margin-bottom: 12px;
}

.hero-badge span { font-size: 16px; }

.hero h1 {
  font-size: clamp(26px, 3.2vw, 34px);
  margin: 0 0 12px;
  line-height: 1.3;
}

.hero h1 small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.hero-lead {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-list li { margin-bottom: 4px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-primary-btn {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,91,172,0.35);
}

.hero-primary-btn:hover { background: #004481; }

.hero-secondary-link {
  font-size: 13px;
  color: var(--text-muted);
}
.hero-secondary-link span { font-size: 15px; margin-left: 4px; }

.hero-visual {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 15% 20%, #ffffff 0, #eff5ff 35%, #dfefff 70%, #bcdfff 100%);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-visual-footer {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.hero-visual-footer strong {
  font-size: 13px;
  color: var(--primary);
}

/* Sections */
section {
  margin-bottom: 46px;
}

.section-title {
  font-size: 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-title small {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

.section-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.02);
}

.card + .card { margin-top: 16px; }

.card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.card h4 {
  font-size: 14px;
  margin: 14px 0 6px;
}

.card p {
  font-size: 13px;
  margin: 0 0 6px;
}

.card ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.card li { margin-bottom: 4px; }

.philosophy-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  font-size: 13px;
}

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

.service-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.company-table th,
.company-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

/* Map */
.map-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
}

.map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px 26px;
  font-size: 11px;
  color: var(--text-muted);
  background: #fff;
  margin-top: 20px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* Responsive */
@media (max-width: 840px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .services-grid { grid-template-columns: 1fr; }
  .company-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-inner { padding-inline: 14px; }
  main { padding-inline: 14px; }
  .card { padding: 16px; }
  .hero h1 { font-size: 22px; }
}

/* ===== Smooth scrolling FIX (THE IMPORTANT PART) ===== */
html {
  scroll-behavior: smooth;
}

/* Fix section scroll position so menu links stop exactly at correct location */
#message,
#philosophy,
#services,
#company,
#access,
#contact {
  scroll-margin-top: 120px;
}

@media (max-width: 840px) {
  #message,
  #philosophy,
  #services,
  #company,
  #access,
  #contact {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 480px) {
  #message,
  #philosophy,
  #services,
  #company,
  #access,
  #contact {
    scroll-margin-top: 85px;
  }
}
/* ===== Fix anchor scrolling for sticky header ===== */
html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 150px !important;  /* ← Strong offset so title always shows at top */
}

@media (max-width: 768px) {
  section[id] {
    scroll-margin-top: 120px !important;  /* Mobile header smaller */
  }
}

@media (max-width: 480px) {
  section[id] {
    scroll-margin-top: 100px !important;  /* Small phones */
  }
}
