:root {
  --ink: #20252b;
  --muted: #68717a;
  --line: #d8dde1;
  --soft: #f4f7f8;
  --accent: #135f7a;
  --accent-deep: #0d455a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family:
    "BIZ UDPGothic", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN",
    Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

.site-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(25, 37, 45, 0.05);
  backdrop-filter: blur(10px);
}

.nav-inner {
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: 58px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-title,
.nav-link {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-link {
  color: var(--accent);
}

.nav-title:hover,
.nav-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-title:focus-visible,
.nav-link:focus-visible,
.book-card:focus-visible {
  outline: 3px solid rgba(19, 95, 122, 0.3);
  outline-offset: 4px;
}

main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  z-index: 0;
  padding: clamp(72px, 10vw, 128px) 0 clamp(68px, 9vw, 112px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.analyzer-screen {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -28px;
  width: clamp(520px, 57vw, 700px);
  height: auto;
  pointer-events: none;
  transform: translateY(-50%);
}

.waterfall-surface {
  fill: var(--accent);
  fill-opacity: 0.01;
  stroke: var(--accent);
  stroke-opacity: 0.05;
  stroke-width: 1;
}

.waterfall-grid,
.card-grid,
.constellation-grid {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.035;
}

.waterfall-traces {
  fill: none;
  stroke: var(--accent);
  stroke-linejoin: round;
  stroke-width: 1.2;
  opacity: 0.055;
}

.waterfall-traces use:nth-child(2n) {
  opacity: 0.72;
}

.waterfall-carriers {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 4;
  opacity: 0.045;
}

.waterfall-carriers .primary {
  stroke-width: 9;
  opacity: 0.7;
}

.analysis-card {
  filter: drop-shadow(0 10px 14px rgba(19, 95, 122, 0.035));
}

.card-shadow {
  fill: var(--accent);
  opacity: 0.018;
}

.card-surface {
  fill: #fff;
  fill-opacity: 0.74;
  stroke: var(--accent);
  stroke-opacity: 0.065;
  stroke-width: 1;
}

.card-spectrum-fill {
  fill: var(--accent);
  opacity: 0.025;
}

.card-spectrum-line {
  fill: none;
  stroke: var(--accent);
  stroke-linejoin: round;
  stroke-width: 1.6;
  opacity: 0.12;
  vector-effect: non-scaling-stroke;
}

.constellation-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.04;
}

.constellation-points {
  fill: var(--accent);
  opacity: 0.095;
}

.eye-grid {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.035;
}

.eye-traces {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 1.25;
  opacity: 0.09;
}

.eye-traces path:nth-child(n + 5) {
  opacity: 0.58;
}

.receiver-metrics {
  font-family:
    "BIZ UDPGothic", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN",
    Meiryo, sans-serif;
  font-variant-numeric: tabular-nums;
  transform: translate(488px, 238px);
}

.metrics-shadow {
  fill: var(--accent);
  opacity: 0.018;
}

.metrics-surface {
  fill: #fff;
  fill-opacity: 0.76;
  stroke: var(--accent);
  stroke-opacity: 0.06;
  stroke-width: 1;
}

.metrics-status {
  fill: var(--accent);
  opacity: 0.16;
}

.metrics-lock,
.metrics-label,
.metrics-value {
  fill: var(--accent);
}

.metrics-lock {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.12;
}

.metrics-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.11;
}

.metrics-value {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.16;
}

.eyebrow,
.section-heading p {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(35px, 6vw, 68px);
  line-height: 1.35;
  letter-spacing: 0.035em;
}

h1 span {
  color: var(--accent-deep);
}

.hero-copy {
  max-width: 720px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 2;
}

.books {
  padding: clamp(64px, 8vw, 100px) 0 112px;
  scroll-margin-top: 58px;
}

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

.section-heading p {
  margin-bottom: 8px;
}

h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: 0.04em;
}

.book-list {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  list-style: none;
}

.book-list li {
  min-width: 0;
}

.book-card {
  display: flex;
  height: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  flex-direction: column;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.book-card:hover {
  border-color: rgba(19, 95, 122, 0.55);
  box-shadow: 0 18px 42px rgba(25, 37, 45, 0.12);
  transform: translateY(-4px);
}

.cover-wrap {
  display: grid;
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(145deg, rgba(19, 95, 122, 0.05), transparent 55%),
    var(--soft);
  place-items: center;
}

.cover-wrap img {
  display: block;
  width: min(100%, 220px);
  height: auto;
  box-shadow:
    0 16px 30px rgba(25, 37, 45, 0.18),
    0 2px 6px rgba(25, 37, 45, 0.12);
}

.card-body {
  display: flex;
  padding: 28px 26px 26px;
  flex: 1;
  flex-direction: column;
}

.book-number {
  display: flex;
  margin: 0 0 14px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.book-number span {
  color: var(--muted);
  font-size: 11px;
}

h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.65;
  letter-spacing: 0.025em;
}

.book-summary {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.card-link {
  display: flex;
  margin-top: auto;
  padding-top: 28px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 2;
}

.card-link span {
  font-size: 18px;
  transition: transform 0.18s ease;
}

.book-card:hover .card-link span {
  transform: translateX(4px);
}

footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 900px) {
  .book-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nav-inner,
  main {
    width: min(100% - 32px, 1120px);
  }

  .nav-inner {
    min-height: 54px;
  }

  .nav-title,
  .nav-link {
    font-size: 11px;
  }

  .hero {
    padding: 64px 0 60px;
  }

  .analyzer-screen {
    top: 45%;
    right: -135px;
    width: 520px;
    opacity: 0.58;
  }

  .receiver-metrics {
    transform: translate(322px, 238px);
  }

  h1 {
    font-size: clamp(30px, 10.5vw, 46px);
  }

  .hero-copy {
    margin-top: 24px;
    line-height: 1.85;
  }

  .books {
    padding: 56px 0 72px;
  }

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

  .book-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cover-wrap {
    padding: 28px clamp(34px, 12vw, 64px);
  }

  .cover-wrap img {
    width: min(100%, 190px);
  }

  .card-body {
    padding: 24px 22px;
  }
}

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

  .book-card,
  .card-link span {
    transition: none;
  }
}

@media print {
  .site-nav {
    position: static;
  }

  .book-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .book-card {
    break-inside: avoid;
  }
}
