@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;500;600;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --c-blue: #3bb1ff;
  --c-red: #ff5252;
  --c-black: #000000;
  --c-white: #ffffff;
  --c-yellow: #ffe566;
  --c-bg: #f5f5f0;
  --c-surface: #ffffff;
  --c-blue-dark: #1a8fe0;

  --border: 3px solid var(--c-black);
  --shadow: 5px 5px 0 var(--c-black);
  --shadow-sm: 3px 3px 0 var(--c-black);
  --shadow-lg: 7px 7px 0 var(--c-black);
  --radius-card: 0px;

  --font-serif: 'Noto Serif JP', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', system-ui, sans-serif;

  --nav-h: 110px;
  --transition: 0.18s ease;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-bg);
}

body.nb-body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-black);
  background: var(--c-bg);
  overflow-x: hidden;
}

/* scroll-margin for anchor sections */
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

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

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

ul, ol, dl {
  list-style: none;
}

/* ===== site-wrapper ===== */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: var(--border);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  border-bottom: 2px solid var(--c-black);
  background: var(--c-blue);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-black);
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 var(--c-black);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  min-height: 44px;
  background: var(--c-red);
  color: var(--c-white);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.header-cta:hover,
.header-cta:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

.header-nav-row {
  background: var(--c-white);
  padding: 0 24px;
}

.main-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-dl {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
}

.nav-dl dt {
  flex-shrink: 0;
}

.nav-dl dt a {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  min-height: 48px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--c-black);
  border-right: 2px solid var(--c-black);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-dl dt:first-child a {
  border-left: 2px solid var(--c-black);
}

.nav-dl dt a:hover,
.nav-dl dt a:focus-visible {
  background: var(--c-blue);
  color: var(--c-white);
}

/* ===== HERO ===== */
.hero-block {
  position: relative;
  min-height: 45vh;
  background: var(--c-yellow);
  border-bottom: var(--border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-text-layer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 24px 80px;
  max-width: 820px;
  margin: 0 auto;
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-black);
  text-shadow: 3px 3px 0 var(--c-white);
  margin-bottom: 16px;
  border: var(--border);
  display: inline-block;
  padding: 10px 22px;
  background: var(--c-white);
  box-shadow: var(--shadow);
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-black);
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  min-height: 48px;
  background: var(--c-red);
  color: var(--c-white);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  border: var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-btn:hover,
.hero-btn:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lg);
}

.hero-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1;
}

.hero-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== MAIN ===== */
.site-main {
  flex: 1;
  width: 100%;
}

/* content-section: aside 左侧 + 主体右侧 */
.content-section.content-with-aside {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr auto;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  gap: 0 32px;
  grid-template-areas:
    "aside figure-top"
    "aside content"
    "aside figure-bottom";
}

.content-aside {
  grid-area: aside;
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.aside-inner {
  background: var(--c-blue);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.aside-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--c-black);
  padding-bottom: 8px;
}

.subtitle.aside-lead {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--c-black);
  margin-bottom: 14px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-nav-list dt {
  width: 100%;
}

.aside-nav-link {
  display: block;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--c-white);
  border: 2px solid var(--c-black);
  box-shadow: 2px 2px 0 var(--c-black);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  line-height: 1.4;
}

.aside-nav-link:hover,
.aside-nav-link:focus-visible {
  background: var(--c-red);
  color: var(--c-white);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--c-black);
}

/* figure decorations */
.content-figure {
  grid-area: figure-top;
  overflow: hidden;
  margin: 0;
}

.content-figure--bottom {
  grid-area: figure-bottom;
}

.figure-deco {
  width: 100%;
  height: 12px;
  border: var(--border);
  border-bottom: none;
}

.figure-deco--top {
  background: var(--c-blue);
  border-bottom: var(--border);
  margin-bottom: 16px;
}

.figure-deco--bottom {
  background: var(--c-red);
  border-top: var(--border);
  margin-top: 24px;
}

/* content body */
.content-body {
  grid-area: content;
  min-width: 0;
}

/* ===== page.content 内部通用样式 ===== */
.content-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-black);
  margin: 48px 0 8px;
  padding: 12px 18px;
  background: var(--c-yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body .subtitle,
.content-body p.subtitle {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 16px;
  font-style: italic;
}

.content-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 8px;
  padding-left: 14px;
  border-left: 5px solid var(--c-blue);
}

.content-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 6px;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 14px;
  color: #1a1a1a;
}

.content-body ul,
.content-body ol {
  margin: 12px 0 16px 0;
  padding-left: 0;
}

.content-body ul li,
.content-body ol li {
  padding: 6px 0 6px 24px;
  position: relative;
  line-height: 1.7;
  font-size: 0.97rem;
  border-bottom: 1px solid #e0e0e0;
}

.content-body ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 10px;
  height: 10px;
  background: var(--c-red);
  border: 2px solid var(--c-black);
  transform: rotate(45deg);
}

.content-body ol {
  counter-reset: nb-ol;
}

.content-body ol li {
  counter-increment: nb-ol;
  padding-left: 32px;
}

.content-body ol li::before {
  content: counter(nb-ol);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  background: var(--c-blue);
  color: var(--c-white);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-black);
}

.content-body a {
  color: var(--c-blue-dark);
  font-weight: 700;
  border-bottom: 2px solid var(--c-blue);
  transition: color var(--transition), border-color var(--transition);
}

.content-body a:hover,
.content-body a:focus-visible {
  color: var(--c-red);
  border-color: var(--c-red);
}

.content-body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--c-blue);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.content-body th {
  background: var(--c-black);
  color: var(--c-white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border: 2px solid var(--c-black);
}

.content-body td {
  padding: 9px 14px;
  border: 2px solid var(--c-black);
  background: var(--c-white);
}

.content-body tr:nth-child(even) td {
  background: #f0f0eb;
}

/* section 分区块 */
.content-body section {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--c-black);
}

.content-body section:last-child {
  border-bottom: none;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--c-black);
  color: var(--c-white);
  border-top: var(--border);
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 3px solid #333;
}

.footer-brand-col,
.footer-contact-col,
.footer-nav-col {
  padding: 36px 28px;
}

.footer-brand-col {
  border-right: 3px solid #333;
}

.footer-contact-col {
  border-right: 3px solid #333;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-blue);
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #aaa;
  margin-top: 8px;
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-yellow);
  margin-bottom: 6px;
  border-bottom: 2px solid #444;
  padding-bottom: 8px;
}

.footer-col-title + .subtitle {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 14px;
}

/* form */
.footer-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-form-label {
  font-size: 0.82rem;
  color: #ccc;
  font-weight: 500;
}

.footer-form-row {
  display: flex;
  gap: 0;
}

.footer-input {
  flex: 1;
  padding: 10px 14px;
  min-height: 44px;
  background: var(--c-white);
  color: var(--c-black);
  border: 3px solid var(--c-white);
  border-right: none;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
}

.footer-input:focus {
  border-color: var(--c-blue);
}

.footer-submit {
  padding: 10px 18px;
  min-height: 44px;
  background: var(--c-red);
  color: var(--c-white);
  font-weight: 700;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  border: 3px solid var(--c-white);
  cursor: pointer;
  transition: background var(--transition);
}

.footer-submit:hover,
.footer-submit:focus-visible {
  background: var(--c-blue);
}

/* footer nav */
.footer-nav-dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.footer-nav-dl dt {
  width: 100%;
}

.footer-nav-link {
  display: flex;
  align-items: center;
  padding: 8px 0;
  min-height: 40px;
  font-size: 0.875rem;
  color: #ddd;
  border-bottom: 1px solid #333;
  transition: color var(--transition), padding-left var(--transition);
}

.footer-nav-link:hover,
.footer-nav-link:focus-visible {
  color: var(--c-blue);
  padding-left: 8px;
}

/* footer bottom */
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-copy {
  font-size: 0.82rem;
  color: #888;
  text-align: center;
}

/* ===== SCROLL REVEAL (JS-assisted via CSS) ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .content-section.content-with-aside {
    grid-template-columns: 1fr;
    grid-template-areas:
      "figure-top"
      "aside"
      "content"
      "figure-bottom";
  }

  .content-aside {
    position: static;
    margin-bottom: 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-brand-col,
  .footer-contact-col {
    border-right: none;
    border-bottom: 3px solid #333;
  }
}

@media (max-width: 680px) {
  :root {
    --nav-h: 100px;
  }

  .header-brand-row {
    padding: 10px 16px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .header-cta {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .header-nav-row {
    padding: 0 8px;
  }

  .nav-dl dt a {
    padding: 12px 10px;
    font-size: 0.78rem;
  }

  .hero-text-layer {
    padding: 40px 16px 70px;
  }

  .content-section.content-with-aside {
    padding: 0 16px;
    margin: 24px auto;
  }

  .footer-brand-col,
  .footer-contact-col,
  .footer-nav-col {
    padding: 24px 16px;
  }

  .footer-form-row {
    flex-direction: column;
  }

  .footer-input {
    border-right: 3px solid var(--c-white);
    border-bottom: none;
  }

  .footer-submit {
    border-top: none;
  }
}

@media (max-width: 400px) {
  .hero-h1 {
    font-size: 1.2rem;
    padding: 8px 12px;
  }

  .content-section.content-with-aside {
    padding: 0 10px;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
