/* aun works — 案C（仁王門・荘厳） */

:root {
  --bg: #0d0b09;
  --bg-soft: #15120f;
  --ink: #f2ece3;
  --muted: #cbc3b8;
  --dim: #b3aba0;
  --accent: #d99a6c;
  --line: rgba(242, 236, 227, 0.16);
  --line-strong: rgba(242, 236, 227, 0.34);
  --font-serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Hiragino Mincho Pro", serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
  --shell: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.95;
  letter-spacing: 0.03em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

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

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

/* ---------- 写真の下地（トップのヒーロー・こえあわせのヘッダー帯で共用） ---------- */

.backdrop {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
}

.backdrop-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.backdrop-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* ---------- 共通の骨格 ---------- */

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
}

.site-head {
  padding: clamp(1.75rem, 4vw, 2.5rem) var(--gutter) 0;
}

.wordmark {
  display: inline-block;
  padding: 0.375rem 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.rule {
  display: block;
  width: 3.25rem;
  height: 1px;
  background: var(--accent);
}

h1 {
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: 0.04em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.lede {
  margin: 1.5rem 0 0;
  max-width: 30em;
  color: var(--muted);
  font-size: clamp(0.875rem, 2.6vw, 0.9375rem);
  line-height: 1.95;
}

/* ---------- トップ：全画面ヒーロー ---------- */

.hero-scrim {
  background:
    linear-gradient(to bottom, rgba(13, 11, 9, 0.72) 0%, rgba(13, 11, 9, 0.3) 34%, rgba(13, 11, 9, 0.88) 100%),
    linear-gradient(to right, rgba(13, 11, 9, 0.92) 0%, rgba(13, 11, 9, 0.74) 46%, rgba(13, 11, 9, 0.5) 100%);
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 4.5rem) var(--gutter) 0;
}

.hero-body {
  max-width: 44rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 6.2vw, 3.25rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.app-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 27rem;
  margin-top: clamp(2.25rem, 6vw, 3.5rem);
  padding: 1.375rem 1.625rem;
  border: 1px solid var(--line-strong);
  background: rgba(13, 11, 9, 0.58);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.app-card:hover {
  border-color: var(--accent);
  background: rgba(13, 11, 9, 0.74);
  color: var(--ink);
}

.app-card-text {
  flex: 1 1 11rem;
  min-width: 0;
}

.app-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.app-desc {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.78125rem;
  line-height: 1.7;
}

.app-arrow {
  color: var(--accent);
  font-size: 0.9375rem;
  line-height: 1;
}

/* ---------- こえあわせ：ヘッダー帯 ---------- */

.band {
  display: flex;
  flex-direction: column;
  min-height: clamp(15rem, 34vw, 21.25rem);
}

.band .backdrop-img {
  object-position: 50% 18%;
}

.band-scrim {
  background: linear-gradient(to bottom, rgba(13, 11, 9, 0.78) 0%, rgba(13, 11, 9, 0.58) 40%, rgba(13, 11, 9, 0.99) 100%);
}

.band-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.75rem, 5vw, 2.5rem) var(--gutter) clamp(1.75rem, 4vw, 2.25rem);
}

.band h1 {
  margin-top: clamp(1.25rem, 3vw, 1.5rem);
  font-size: clamp(1.75rem, 5.4vw, 2.625rem);
  line-height: 1.5;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

/* ---------- 本文 ---------- */

.content {
  flex: 1;
  padding: clamp(2.5rem, 6vw, 3.5rem) var(--gutter) 0;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 2.75rem) clamp(2.5rem, 5vw, 4.5rem);
  align-items: flex-start;
}

.col-main {
  flex: 999 1 26rem;
  min-width: 0;
}

.col-side {
  flex: 1 1 17rem;
  min-width: 0;
}

.col-main .lede {
  margin-top: 0;
  max-width: 34em;
  font-size: clamp(0.9375rem, 2.6vw, 1rem);
}

.facts {
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding: 0;
  list-style: none;
  max-width: 36em;
}

.facts li {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.75;
}

.facts li:last-child {
  border-bottom: 1px solid var(--line);
}

.note-box {
  padding: 1.5rem 1.625rem;
  border: 1px solid var(--line);
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 2;
}

/* 日本語の孤立文字（ぶら下がり一文字）を避ける。
   文節の区切りに置いた <wbr> だけで改行し、収まらないときのみ任意位置で折る。 */
.lede,
.app-desc,
.note {
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.back {
  display: inline-block;
  margin-top: clamp(2rem, 5vw, 2.5rem);
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.84375rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.back:hover {
  border-bottom-color: var(--accent);
}

/* ---------- 404 ---------- */

.plain-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 4.5rem) var(--gutter) 0;
}

.status-code {
  margin: 0;
  color: var(--accent);
  font-size: 0.71875rem;
  letter-spacing: 0.22em;
  line-height: 1.5;
}

.plain-main h1 {
  margin-top: 1rem;
  font-size: clamp(1.625rem, 5.4vw, 2.5rem);
}

/* ---------- フッター ---------- */

.site-foot {
  margin-top: auto;
  padding: clamp(3.5rem, 8vw, 5rem) var(--gutter) clamp(2rem, 5vw, 2.5rem);
}

.page-home .site-foot {
  background: linear-gradient(to top, rgba(13, 11, 9, 0.9) 0%, rgba(13, 11, 9, 0) 100%);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.125rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.nav {
  display: flex;
  gap: 1.625rem;
  font-size: 0.78125rem;
  letter-spacing: 0.06em;
}

.nav a {
  padding: 0.25rem 0;
  color: var(--dim);
  text-decoration: none;
}

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

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

.meta {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  color: var(--dim);
  font-size: 0.71875rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.meta p {
  margin: 0;
}

.meta a {
  color: var(--dim);
  text-underline-offset: 0.2em;
}

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

/* ---------- モバイル ---------- */

@media (max-width: 34rem) {
  /* 縦画面では右寄りに寄せ、阿形の顔と胴が画面を満たすようにする */
  .backdrop-img {
    object-position: 78% 30%;
  }

  /* 像が見えるよう墨幕を少し薄く。文字の乗る左側は濃いまま残す */
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(13, 11, 9, 0.68) 0%, rgba(13, 11, 9, 0.34) 38%, rgba(13, 11, 9, 0.9) 100%),
      linear-gradient(to right, rgba(13, 11, 9, 0.84) 0%, rgba(13, 11, 9, 0.6) 50%, rgba(13, 11, 9, 0.26) 100%);
  }

  .band .backdrop-img {
    object-position: 50% 40%;
  }

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

  .app-card {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-card {
    transition: none;
  }
}
