:root {
  --sh-bg: #f4f7fb;
  --sh-surface: #ffffff;
  --sh-ink: #0f172a;
  --sh-muted: #64748b;
  --sh-line: rgba(15, 23, 42, 0.12);
  --sh-accent: #0ea5e9;
  --sh-accent-dark: #0369a1;
  --sh-navy: #071526;
  --sh-navy-2: #0c1f35;
  --sh-container: 1180px;
  --sh-radius: 20px;
  --sh-shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
  --sh-header-height: 82px;
  --sh-hero-min: clamp(560px, 76vh, 850px);
  --sh-font: "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: var(--sh-bg);
  color: var(--sh-ink);
  font-family: var(--sh-font);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

img, video, iframe, svg, canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { color: var(--sh-accent); }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.55em;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--sh-ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 5.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: #fff;
  color: #000;
}

/* Header */
.site-header {
  background: rgba(7, 21, 38, 0.96);
  color: #fff;
  width: 100%;
  z-index: 999;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow .25s ease, backdrop-filter .25s ease;
}

.has-sticky-header .site-header {
  position: sticky;
  top: 0;
}

.site-header.is-scrolled {
  box-shadow: 0 14px 50px rgba(0,0,0,0.18);
  backdrop-filter: blur(14px);
}

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

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo img, .custom-logo {
  display: block;
  width: 54px;
  max-height: 54px;
  object-fit: contain;
}

.brand-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--sh-accent), #2563eb);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
  position: relative;
  overflow: hidden;
}

.brand-mark span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.95);
  position: absolute;
}
.brand-mark span:nth-child(1) { top: 12px; left: 12px; }
.brand-mark span:nth-child(2) { top: 22px; right: 12px; }
.brand-mark span:nth-child(3) { bottom: 12px; left: 20px; }
.brand-mark.small { width: 40px; height: 40px; flex-basis: 40px; display: inline-block; }

.brand-text { min-width: 0; }
.site-title {
  display: block;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-description {
  color: rgba(255,255,255,0.68);
  font-size: .78rem;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-navigation {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.primary-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.primary-navigation li { position: relative; }

.primary-navigation a {
  display: block;
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  font-size: .93rem;
  padding: 10px 12px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
  background: rgba(14,165,233,0.16);
  color: #fff;
}

.primary-navigation .sub-menu {
  position: absolute;
  right: 0;
  top: 100%;
  display: grid;
  min-width: 210px;
  padding: 10px;
  background: #fff;
  color: var(--sh-ink);
  border-radius: 16px;
  box-shadow: var(--sh-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.primary-navigation li:hover > .sub-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.primary-navigation .sub-menu a { color: var(--sh-ink); white-space: normal; }
.primary-navigation .sub-menu a:hover { background: rgba(14,165,233,0.12); color: var(--sh-accent-dark); }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.menu-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  margin: 3px auto;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Hero */
.home-hero {
  min-height: var(--sh-hero-min);
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--sh-navy);
}

.hero-media, .hero-overlay, .hero-media img, .hero-media video, .hero-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-media img, .hero-media video {
  object-fit: cover;
  transform: scale(1.02);
}
.hero-gradient {
  background:
    radial-gradient(circle at 72% 20%, rgba(14,165,233,0.5), transparent 32%),
    linear-gradient(135deg, #071526 0%, #0c2844 52%, #0ea5e9 140%);
}
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7,21,38,0.92) 0%, rgba(7,21,38,0.68) 42%, rgba(7,21,38,0.28) 100%),
    linear-gradient(0deg, rgba(7,21,38,0.38), rgba(7,21,38,0.06));
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-block: 96px;
  max-width: min(var(--sh-container), calc(100% - 40px));
}
.hero-content h1 {
  color: #fff;
  max-width: 880px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero-lead {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--sh-accent-dark);
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow.light { color: #7dd3fc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  background: linear-gradient(135deg, var(--sh-accent), #2563eb);
  color: #fff;
  box-shadow: 0 16px 34px rgba(14,165,233,.28);
}
.button.ghost {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.22);
}

/* Sections */
.section { padding: clamp(60px, 8vw, 110px) 0; }
.surface-section { background: #fff; }
.quick-stats {
  margin-top: -52px;
  position: relative;
  z-index: 4;
}
.quick-stats.no-overlap {
  margin-top: 0;
  padding-top: 40px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 24px;
  box-shadow: var(--sh-shadow);
}
.stat-card span {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
  color: var(--sh-accent-dark);
  line-height: 1.1;
}
.stat-card p { margin: 8px 0 0; color: var(--sh-muted); font-weight: 700; }

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 6vw, 76px);
  align-items: start;
}
.split-layout p { color: #334155; font-size: 1.08rem; }

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.text-link { font-weight: 900; color: var(--sh-accent-dark); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.service-card {
  min-width: 0;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--sh-shadow); }
.service-number {
  color: var(--sh-accent);
  font-weight: 900;
  letter-spacing: .14em;
}
.service-card p { color: var(--sh-muted); }

.process-section {
  background:
    linear-gradient(135deg, rgba(7,21,38,.96), rgba(12,31,53,.95)),
    radial-gradient(circle at right top, rgba(14,165,233,.25), transparent 35%);
  color: #fff;
}
.process-section h2 { color: #fff; }
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.timeline-item {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--sh-radius);
  padding: 24px;
  background: rgba(255,255,255,.06);
}
.timeline-item span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: var(--sh-accent);
  color: #fff;
  font-weight: 900;
  margin-bottom: 16px;
}
.timeline-item strong { display: block; font-size: 1.15rem; margin-bottom: 8px; }
.timeline-item p { color: rgba(255,255,255,.78); }


/* CTA */
.cta-section {
  background:
    linear-gradient(135deg, rgba(14,165,233,.95), rgba(37,99,235,.92)),
    radial-gradient(circle at right top, rgba(255,255,255,.35), transparent 34%);
  color: #fff;
}
.cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 58px);
  box-shadow: 0 28px 72px rgba(15, 23, 42, .22);
}
.cta-box h2 { color: #fff; }
.cta-box p:not(.eyebrow) { color: rgba(255,255,255,.9); font-size: 1.08rem; margin-bottom: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.cta-section .button.ghost { background: rgba(255,255,255,.14); }

/* Page header / Featured Image hero */
.page-hero.slim {
  position: relative;
  width: 100%;
  min-height: clamp(260px, 34vw, 420px);
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(6,17,31,.94), rgba(6,17,31,.62)),
    radial-gradient(circle at right top, rgba(14,165,233,.28), transparent 38%);
  color: #fff;
  padding: clamp(70px, 9vw, 120px) 0;
  overflow: hidden;
}
.page-hero.slim.has-featured-image {
  background:
    linear-gradient(90deg, rgba(6,17,31,.94), rgba(6,17,31,.56)),
    var(--page-hero-image) center/cover no-repeat;
}
.page-hero.slim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(6,17,31,.16) 100%);
  pointer-events: none;
}
.page-hero.slim .sh-container { position: relative; z-index: 1; }
.page-hero .eyebrow {
  color: var(--sh-accent);
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 1.1;
  letter-spacing: .08em;
  max-width: 1000px;
  margin: 0;
}
.page-hero p:not(.eyebrow) { color: rgba(255,255,255,.88); max-width: 820px; }
.page-hero-description {
  margin-top: 20px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.9;
  font-weight: 700;
}

.page-content-wrap { background: var(--sh-bg); }
.block-content {
  background: transparent;
  padding: clamp(44px, 6vw, 76px) 0;
}
.block-content.narrow { max-width: 860px; }
.block-content > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.block-content > .alignwide { max-width: min(var(--sh-container), calc(100vw - 40px)); }
.block-content > .alignfull {
  max-width: 100vw;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.block-content p {
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.95;
}
.block-content p.has-text-align-justify,
.block-content .is-style-justify,
.jp-justify {
  text-align: justify;
  text-justify: inter-character;
}
.block-content img {
  border-radius: 16px;
}
.wp-block-image { margin-block: 28px; }
.wp-block-columns { gap: clamp(18px, 3vw, 40px); }
.wp-block-media-text { gap: 28px; }
.wp-block-button__link { border-radius: 999px; font-weight: 800; }
.wp-block-table { overflow-x: auto; }
.wp-block-table table { min-width: 680px; }
.single-featured-image { margin: 0 0 32px; }
.single-featured-image img { width: 100%; border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); }

/* Posts */
.content-layout { padding: 64px 0; }
.post-list { display: grid; gap: 20px; }
.post-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(15,23,42,.08);
}
.post-card-image img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; }
.post-card-body { padding: 28px; }
.post-card h2 { font-size: 1.45rem; }
.post-meta { color: var(--sh-muted); font-size: .9rem; font-weight: 700; }
.pagination-wrap { margin-top: 30px; }

/* Footer */
.site-footer {
  background: #06111f;
  color: rgba(255,255,255,.82);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 28px;
  align-items: start;
}
.footer-logo-row { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 1.1rem; }
.footer-logo img { width: 40px; max-height: 40px; object-fit: contain; }
.footer-brand p { color: rgba(255,255,255,.68); margin-top: 14px; }
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}
.footer-nav a { color: rgba(255,255,255,.78); font-weight: 700; }
.footer-copy {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  font-size: .9rem;
}

/* Responsive */
@media (max-width: 1024px) {
  :root { --sh-header-height: 74px; }
  .sh-container { width: min(var(--sh-container), calc(100% - 32px)); }
  .primary-navigation a { font-size: .86rem; padding: 8px 8px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid, .timeline { grid-template-columns: 1fr 1fr; }
  .split-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  body.menu-open { overflow: hidden; }
  .header-inner { min-height: 70px; }
  .menu-toggle { display: grid; flex: 0 0 46px; }
  .primary-navigation {
    position: fixed;
    inset: 70px 0 auto 0;
    width: 100%;
    max-width: 100%;
    background: rgba(7, 21, 38, 0.98);
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 18px 60px rgba(0,0,0,.32);
    display: block;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .primary-navigation.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .primary-navigation ul {
    width: min(100%, 720px);
    margin: 0 auto;
    display: grid;
    gap: 0;
    padding: 14px 16px 20px;
  }
  .primary-navigation a {
    white-space: normal;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .primary-navigation .sub-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background: rgba(255,255,255,.06);
    color: #fff;
    box-shadow: none;
    min-width: 0;
    margin: 6px 0 8px 12px;
  }
  .primary-navigation .sub-menu a { color: #fff; }

  .site-title { font-size: 1rem; max-width: 58vw; }
  .site-description { display: none; }
  .brand-logo img, .custom-logo, .brand-mark { width: 46px; height: 46px; flex-basis: 46px; }

  .home-hero { min-height: 620px; align-items: end; }
  .hero-overlay {
    background: linear-gradient(0deg, rgba(7,21,38,0.94) 0%, rgba(7,21,38,0.78) 50%, rgba(7,21,38,0.36) 100%);
  }
  .hero-content { padding-block: 82px 58px; }
  .hero-content h1 { font-size: clamp(2.1rem, 11vw, 4rem); letter-spacing: .04em; }
  .hero-lead { font-size: 1.02rem; }
  .service-grid, .timeline { grid-template-columns: 1fr; }
  .section-title-row { align-items: start; flex-direction: column; }
  .post-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav ul { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .sh-container { width: calc(100% - 28px); }
  h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  h2 { font-size: clamp(1.55rem, 8vw, 2.2rem); }
  p, li { font-size: 15.5px; }

  .home-hero { min-height: 560px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .quick-stats { margin-top: 0; padding-top: 16px; }
  .quick-stats.no-overlap { padding-top: 24px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card, .service-card, .timeline-item { padding: 20px; border-radius: 16px; }

  .block-content { padding: 38px 0; }
  .block-content > * { max-width: 100%; }
  .block-content > .alignwide,
  .block-content > .alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .wp-block-columns { display: block; }
  .wp-block-column { width: 100% !important; max-width: 100% !important; margin-bottom: 20px; }
  .wp-block-media-text { display: block; }
  .wp-block-media-text__media, .wp-block-media-text__content { width: 100% !important; padding: 0 !important; }
  .wp-block-cover { min-height: 360px; }
  .page-hero.slim { min-height: 250px; padding: 56px 0; }
  .footer-copy { font-size: .82rem; }
}

/* Final overflow safety net */
@media (max-width: 820px) {
  html, body, .wp-site-blocks, .site-main, main { max-width: 100%; overflow-x: hidden; }
  body * { min-width: 0; }
}
