/* 基本設定 */
:root {
  --color-background: #0b132b;
  --color-background-subtle: #16213e;
  --color-accent: #b89a5a;
  --color-text: #f2eee5;
  --color-muted: #aaa7a0;
  --font-heading: "Zen Antique", serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;
  --page-width: 1120px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.035em;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
  font-size: 0;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
}

h2 {
  margin-bottom: 24px;
  color: var(--color-accent);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.4;
  letter-spacing: 0.09em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.3125rem, 3vw, 1.625rem);
  line-height: 1.5;
  letter-spacing: 0.055em;
}

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

.section {
  padding-block: 72px;
}

.body-copy p {
  margin-bottom: 4px;
}

/* メインビジュアル */
.hero {
  position: relative;
  display: grid;
  min-height: clamp(520px, 80vh, 760px);
  overflow: hidden;
  background: var(--color-background-subtle);
  isolation: isolate;
}

.hero__image,
.hero__shade,
.hero__content {
  grid-area: 1 / 1;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  object-position: center;
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(7 12 29 / 78%) 0%, rgb(7 12 29 / 28%) 72%),
    linear-gradient(0deg, var(--color-background) 0%, transparent 35%);
}

.hero__content {
  align-self: center;
  padding-block: 88px;
  text-shadow: 0 2px 18px rgb(0 0 0 / 60%);
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--color-accent);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  line-height: 1.25;
  letter-spacing: 0.16em;
}

.hero p {
  margin-bottom: 6px;
}

.hero__invitation {
  color: var(--color-muted);
}

/* 共通の画像枠 */
.image-frame {
  overflow: hidden;
  border: 1px solid rgb(184 154 90 / 34%);
  background: var(--color-background-subtle);
  box-shadow: 0 16px 36px rgb(0 0 0 / 22%);
}

.image-frame--wide {
  aspect-ratio: 16 / 9;
}

.image-frame--landscape {
  aspect-ratio: 4 / 3;
}

.image-frame--square {
  aspect-ratio: 1;
}

/* 上映・書斎 */
.feature {
  display: grid;
  gap: 28px;
  align-items: center;
}

.feature__content > p {
  margin-bottom: 0;
}

.story-preview {
  margin-top: 28px;
  padding: 20px 0 18px 20px;
  border-left: 1px solid var(--color-accent);
}

.story-preview p {
  margin-bottom: 0;
  color: var(--color-muted);
}

.story-preview__label {
  margin-bottom: 4px !important;
  color: var(--color-accent) !important;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
}

.story-preview h3 {
  margin-bottom: 2px;
}

/* ボタン */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.quiet-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  background: var(--color-background);
  box-shadow: 0 5px 16px rgb(0 0 0 / 20%);
  color: var(--color-text);
  font-size: 0.9375rem;
  letter-spacing: 0.055em;
}

.quiet-button--subtle {
  border-color: rgb(184 154 90 / 56%);
}

.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.quiet-button span {
  padding-left: 10px;
  border-left: 1px solid rgb(184 154 90 / 48%);
  color: var(--color-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.preparing-message {
  margin-top: 18px;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* 星の蒐集室 */
.collection__introduction {
  display: grid;
  gap: 28px;
  align-items: center;
}

.collection-grid {
  display: grid;
  gap: 18px;
  margin-top: 44px;
}

.collection-placeholder {
  display: grid;
  min-height: 188px;
  place-content: center;
  padding: 24px;
  border: 1px solid rgb(184 154 90 / 38%);
  background: rgb(22 33 62 / 55%);
  text-align: center;
}

.collection-placeholder > span {
  margin-bottom: 12px;
  color: var(--color-accent);
  font-size: 1.25rem;
}

.collection-placeholder p {
  margin-bottom: 3px;
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
}

.collection-placeholder small {
  color: var(--color-muted);
  letter-spacing: 0.12em;
}

.collection__button {
  margin-top: 28px;
  text-align: center;
}

/* 星隠れについて */
.about {
  padding-bottom: 96px;
  text-align: center;
}

.about p {
  margin-bottom: 28px;
}

/* フッター */
.footer {
  padding-block: 40px 32px;
  border-top: 1px solid rgb(170 167 160 / 14%);
  color: var(--color-muted);
  font-size: 0.8125rem;
  text-align: center;
}

.footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.footer p {
  margin: 26px 0 0;
}

/* PC表示 */
@media (min-width: 768px) {
  .page-width {
    width: min(100% - 80px, var(--page-width));
  }

  .section {
    padding-block: 108px;
  }

  .feature {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    gap: clamp(40px, 6vw, 64px);
  }

  .feature--reverse {
    grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  }

  .feature--reverse .feature__image {
    grid-column: 2;
  }

  .feature--reverse .feature__content {
    grid-column: 1;
    grid-row: 1;
  }

  .button-group {
    align-items: flex-start;
  }

  .quiet-button {
    min-width: 230px;
  }

  .collection__introduction {
    grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 0.7fr);
    gap: clamp(48px, 7vw, 80px);
  }

  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
  }

  .about {
    padding-block: 112px 120px;
  }

  .footer nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px 30px;
    justify-content: center;
  }
}

/* マウス操作時の控えめな変化 */
@media (hover: hover) {
  .quiet-button:not(:disabled) {
    transition: border-color 180ms ease, background-color 180ms ease;
  }

  .quiet-button:not(:disabled):hover {
    border-color: #c8aa68;
    background: var(--color-background-subtle);
  }
}

/* 動きを減らす設定への配慮 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
