:root {
  --bg: #0a1018;
  --bg-soft: rgba(15, 24, 36, 0.78);
  --panel: rgba(18, 29, 43, 0.72);
  --panel-strong: rgba(12, 20, 31, 0.92);
  --line: rgba(181, 216, 255, 0.18);
  --text: #f3f6fb;
  --text-muted: #b7c3d4;
  --accent: #7dcfff;
  --accent-2: #b8f1ff;
  --danger: #c6a2ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --maxw: 1180px;
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(88, 140, 200, 0.22), transparent 0 28%),
    radial-gradient(circle at 80% 10%, rgba(150, 111, 255, 0.15), transparent 0 22%),
    radial-gradient(circle at 50% 100%, rgba(0, 162, 255, 0.12), transparent 0 28%),
    linear-gradient(180deg, #091019 0%, #0b1320 42%, #070b13 100%);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.03em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 85%);
  opacity: 0.16;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.82), rgba(5, 10, 18, 0.28));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  width: min(calc(100% - 32px), var(--maxw));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #eef3ff;
  text-transform: none;
  text-shadow: 0 0 14px rgba(106, 118, 178, 0.18);
}

.brand:hover {
  opacity: 0.88;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav a:hover {
  color: #dfe4ff;
  text-shadow: 0 0 10px rgba(106, 118, 178, 0.22);
  transform: translateY(-1px);
}

main {
  width: min(calc(100% - 32px), var(--maxw));
  margin: 0 auto;
  padding: 88px 0 96px;
}

.hero,
.section {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 32px 0 20px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-2);
  font-size: 0.78rem;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 9vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-shadow: 0 0 26px rgba(125, 207, 255, 0.18);
}

.hero-sub {
  margin: 18px 0 0;
  max-width: 42rem;
  color: var(--text-muted);
  line-height: 1.95;
  font-size: 1rem;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  cursor: pointer;
  font: inherit;
}

.button:hover {
  transform: translateY(-2px);
  background: rgba(106, 118, 178, 0.10);
  border-color: rgba(106, 118, 178, 0.26);
  box-shadow: 0 8px 24px rgba(106, 118, 178, 0.10);
}

.button.primary {
  background: linear-gradient(135deg, rgba(125, 207, 255, 0.22), rgba(184, 241, 255, 0.12));
  border-color: rgba(125, 207, 255, 0.28);
  box-shadow: 0 10px 30px rgba(125, 207, 255, 0.12);
}

.button.primary:hover {
  background: linear-gradient(135deg, rgba(106, 118, 178, 0.24), rgba(184, 241, 255, 0.14));
  border-color: rgba(106, 118, 178, 0.34);
  box-shadow: 0 12px 28px rgba(106, 118, 178, 0.14);
}

.accent-letter {
  color: #6a76b2;
  text-shadow: 0 0 10px rgba(106, 118, 178, 0.22);
}

.hero-visual {
  position: relative;
  aspect-ratio: 900 / 1262;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7,12,19,0.16), rgba(7,12,19,0.76)),
    url("img/pae_main.png") center 18% / cover no-repeat;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.08);
  transform: translateY(0);
  transition:
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    filter 0.35s ease;
  filter: brightness(1.04) saturate(1.02);
}

.hero-visual:hover {
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.40);
  border-color: rgba(255, 255, 255, 0.12);
  filter: brightness(1.06) saturate(1.03);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.10), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32%);
  opacity: 0.48;
  mix-blend-mode: screen;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 18, 0.88));
}

.hero-card {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(7, 13, 21, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-card dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hero-card dd {
  margin: 0;
  font-size: 0.95rem;
}

.section {
  margin-top: 44px;
  padding: 28px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.08em;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.summary {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.summary-copy p,
.character-body p {
  margin: 0;
  line-height: 2;
  color: #e9eff8;
}

.link-panel {
  display: grid;
  gap: 14px;
}

.link-box {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.link-box small {
  display: block;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.link-box strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.link-box span {
  display: block;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.92rem;
  margin-bottom: 14px;
}

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

.character-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 520px;
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.1), rgba(10, 18, 28, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
  border-color: rgba(255, 255, 255, 0.14);
}

.character-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: brightness(1.05) saturate(0.95) contrast(0.99);
  transform: scale(1.02);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.character-card:hover .character-image {
  transform: scale(1.035);
  filter: brightness(1.08) saturate(0.98) contrast(1.01);
}

.character-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 13, 20, 0.05), rgba(8, 13, 20, 0.42) 40%, rgba(8, 13, 20, 0.95)),
    linear-gradient(90deg, rgba(8, 13, 20, 0.1), rgba(8, 13, 20, 0) 45%, rgba(8, 13, 20, 0.38));
}

.character-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px;
  z-index: 1;
}

.character-label {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.character-body h3 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: 0.08em;
}

.character-meta {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.story-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: stretch;
}

.story-card {
  min-height: 360px;
  padding: 34px 34px 30px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(14, 24, 38, 0.88), rgba(8, 14, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.story-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -10%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 207, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.story-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.story-kicker {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  opacity: 0.88;
}

.story-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.story-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.45;
  letter-spacing: 0.12em;
  position: relative;
  z-index: 1;
}

.story-prose {
  position: relative;
  z-index: 1;
  color: #f2f6fc;
  font-size: 1rem;
  line-height: 2.32;
  white-space: pre-wrap;
  max-width: 38em;
  text-wrap: pretty;
  letter-spacing: 0.035em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.18);
  word-break: normal;
  overflow-wrap: anywhere;
  font-feature-settings: "palt";
}

.story-header + .story-prose {
  margin-top: 6px;
}

.story-button {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.story-button:hover {
  box-shadow: 0 10px 24px rgba(125, 207, 255, 0.12);
}

.footer {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0 0;
  font-size: 0.85rem;
}

.footer a {
  color: #d8e6f8;
  opacity: 0.86;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer a:hover {
  opacity: 1;
  color: var(--accent-2);
}

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .summary,
  .story-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 460px;
  }

  .character-grid {
    grid-template-columns: 1fr;
  }

  .story-button {
    width: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 112px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    padding-top: 112px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 0;
    margin-bottom: 4px;
  }

  .hero-visual {
    order: 1;
    min-height: 380px;
    aspect-ratio: 900 / 1180;
    background-position: center 14%;
  }

  .hero-visual:hover {
    transform: none;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 15vw, 4rem);
  }

  .hero-sub {
    line-height: 1.9;
    font-size: 0.96rem;
  }

  .hero-card {
    flex-direction: column;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .section-heading p {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .section {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .character-card {
    min-height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .character-card:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .character-image {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    transform: none;
    background-position: center top;
  }

  .character-card:hover .character-image {
    transform: none;
    filter: saturate(0.9) contrast(1.02);
  }

  .character-image::after {
    background:
      linear-gradient(180deg, rgba(8, 13, 20, 0.05), rgba(8, 13, 20, 0.18) 55%, rgba(8, 13, 20, 0.5)),
      linear-gradient(90deg, rgba(8, 13, 20, 0.08), rgba(8, 13, 20, 0) 45%, rgba(8, 13, 20, 0.2));
  }

  .character-body {
    position: relative;
    inset: auto;
    padding: 20px 18px 22px;
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.72), rgba(10, 18, 28, 0.96));
  }

  .story-card {
    min-height: 320px;
    padding: 26px 24px 24px;
  }

  .story-title {
    letter-spacing: 0.08em;
  }

  .story-prose {
    max-width: none;
    line-height: 2.16;
    font-size: 0.97rem;
    letter-spacing: 0.025em;
  }

  .story-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .story-button {
    width: auto;
  }
}

@media (max-width: 480px) {
  .hero-visual {
    aspect-ratio: 900 / 1120;
    background-position: center 12%;
  }

  .hero-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px 16px;
  }

  .story-card::after {
    inset: 10px;
  }

  .story-card {
    padding: 22px 18px 20px;
  }

  .story-prose {
    line-height: 2.02;
    font-size: 0.95rem;
  }
}

.summary-single {
  grid-template-columns: 1fr;
}

.summary-single .summary-copy {
  max-width: 62em;
}

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

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  background-color: rgba(12, 20, 31, 0.88);
  background-size: cover;
  background-position: center;
  background-clip: padding-box;
}

.work-main {
  grid-column: 1 / -1;
  min-height: 420px;
}

.work-sub {
  min-height: 280px;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.22), rgba(8, 14, 24, 0.90));
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.work-card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.work-label {
  display: inline-block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.work-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
}

.work-sub h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.work-copy {
  margin: 0;
  max-width: 34em;
  line-height: 1.95;
  color: #edf2fa;
}

.work-main .work-copy {
  max-width: 52em;
  font-size: 1.02rem;
  line-height: 2;
}

.work-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* 仮の背景画像 */
.work-pae {
  background-image:
    linear-gradient(180deg, rgba(7,12,19,0.16), rgba(7,12,19,0.76)),
    url("img/cover_pae.png");
}

.work-sanjuuya {
  background-image:
    linear-gradient(180deg, rgba(7,12,19,0.16), rgba(7,12,19,0.78)),
    url("img/cover_pae30.png");
}

.work-sanjuuichiro {
  background-image:
    linear-gradient(180deg, rgba(7,12,19,0.16), rgba(7,12,19,0.78)),
    url("img/cover_pae31.png");
}

.work-goninrokuyou {
  background-image:
    linear-gradient(180deg, rgba(7,12,19,0.16), rgba(7,12,19,0.78)),
    url("img/cover_pae56.png");
}

.work-meichoukaishi {
  background-image:
    linear-gradient(180deg, rgba(7,12,19,0.16), rgba(7,12,19,0.78)),
    url("img/cover_meicho.png");
}

@media (max-width: 980px) {
  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-main,
  .work-sub {
    grid-column: auto;
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .work-card-inner {
    padding: 22px 18px;
  }

  .work-card::after {
    inset: 10px;
  }

  .work-main,
  .work-sub {
    min-height: 260px;
  }

  .work-copy {
    font-size: 0.95rem;
    line-height: 1.85;
  }
}