@charset "UTF-8";

:root{
  color-scheme: dark;
  /* font */
  --font-sans: "Inter", "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", monospace, sans-serif;
  /* color */
  --bg: #111517;
  --surface: #191f22;
  --ink: #e5e8e7;
  --muted: #a8b2b6;
  --accent: #aac7ce;
  --line: #3b474c;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
}

h1, h2, h3, p, figure, dl, dd {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 600;
}

h1, h2, h3, p, dd {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(32px, 4.2vw, 60.8px);
  letter-spacing: 0.015em;
  line-height: 1.45;
}

.heading-accent {
  color: var(--accent);
}

h2 {
  font-size: clamp(23px, 2.4vw, 32px);
  letter-spacing: -0.025em;
  line-height: 1.55;
}

h3 {
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

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

.icon-img,
.brand img {
  width: 24px;
  height: 24px;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

::selection {
  color: var(--bg);
  background: var(--accent);
}

[id] {
  scroll-margin-top: 96px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 20px;
  z-index: 10;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--bg);
}

/* 共通レイアウトとセクション見出し */
.page-shell,
.header-frame,
.site-footer {
  width: min(1248px, calc(100% - 96px));
  margin-inline: auto;
}

.page-shell {
  padding-bottom: 80px;
}

.page-intro > * {
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: -0.009em;
}

.section-heading {
  margin-bottom: 32px;
}

.eyebrow {
  margin-bottom: 11px;
}

.section-description {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  max-width: 48em;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  column-gap: 5%;
  row-gap: 24px;
  padding: 64px 0 44px;
}

.page-intro > .eyebrow {
  grid-column: 1 / -1;
}

.intro-copy {
  align-self: end;
  color: var(--muted);
  max-width: 576px;
}

/* サイトナビゲーション・本文リンク */
.main-nav-list,
.page-index-list,
.footer-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav-list > li,
.page-index-list > li,
.footer-nav-list > li {
  display: flex;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-frame {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.05em;
}

.site-caption {
  max-width: 208px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
}

.main-nav {
  margin-left: auto;
}

.main-nav-list {
  display: flex;
  gap: 26px;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.main-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  font-size: 15px;
}

.page-index {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-block: 10px;
  border-block: 1px solid var(--line);
  background: var(--bg);
}

.page-index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 28.8px;
}

.page-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.page-index a:hover,
.page-index a:focus-visible {
  border-bottom-color: var(--accent);
}

.figure-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* footer */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-identity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 16px;
}

.footer-identity strong {
  font-family: var(--font-mono);
  font-size: 16px;
}

.footer-identity span,
.site-footer small {
  color: var(--muted);
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
}

.site-footer small {
  font-size: 12px;
}

@media (max-width: 1050px) {
  .page-shell,
  .header-frame,
  .site-footer {
    width: calc(100% - 64px);
  }
  .site-caption {
    max-width: 176px;
  }
  .main-nav-list {
    gap: 16px;
  }
  .page-intro {
    column-gap: 32px;
  }
}

@media (max-width: 760px) {
  .page-shell,
  .header-frame,
  .site-footer {
    width: calc(100% - 40px);
  }
  .header-frame {
    flex-wrap: wrap;
    gap: 5px 19px;
    padding-top: 13px;
    padding-bottom: 6px;
  }
  .site-caption {
    max-width: none;
    font-size: 11px;
  }
  .main-nav {
    width: 100%;
    margin-left: 0;
  }
  .main-nav-list {
    justify-content: space-between;
    gap: 8px;
  }
  .main-nav a {
    font-size: 13px;
  }
  .page-shell {
    padding-bottom: 48px;
  }
  h1 {
    font-size: clamp(28px, 5.5vw, 40px);
  }
  .page-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 20.8px;
    padding-block: 40px 32px;
  }
  .intro-copy {
    max-width: none;
    font-size: 15px;
  }
  .section-heading {
    margin-bottom: 24px;
  }
  .page-index-list {
    gap: 3px 20px;
  }
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }
  [id] {
    scroll-margin-top: 140px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero,
  .page-intro {
    animation: page-enter 420ms ease-out both;
  }

  a,
  button {
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
  }

  .reading-arrow,
  .primary-link > span {
    transition: transform 160ms ease;
  }

  .reading-list a:hover .reading-arrow,
  .primary-link:hover > span {
    transform: translateX(4px);
  }

  @keyframes page-enter {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
