:root {
  --header-height: 6.875rem;
  --ink: #0b2948;
  --ink-soft: #3e586b;
  --paper: #fffaf0;
  --paper-deep: #f3e7d1;
  --line: rgba(11, 41, 72, .18);
  --line-soft: rgba(119, 91, 47, .2);
  --gold: #b78339;
  --mint: #8bd5cf;
  --mint-soft: #e3f4f1;
  --navy: #092541;
  --shadow: 0 1.35rem 3.8rem rgba(34, 42, 48, .12);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; background: var(--paper); }

@media (min-width: 721px) {
  html:has(body.characters-page) { scroll-snap-type: y proximity; }
  .characters-page .site-header { position: fixed; left: 0; width: 100%; }
  .characters-page .page-section { scroll-snap-align: start; scroll-snap-stop: normal; }
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(224, 191, 134, .16), transparent 23rem),
    linear-gradient(135deg, #fffdf8 0%, #fff9ef 48%, #f3e7d2 100%);
  font-family: "Noto Sans JP", "Yu Gothic", "Yu Gothic UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image: radial-gradient(rgba(151, 116, 70, .24) .55px, transparent .55px);
  background-size: 7px 7px;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.skip-link { position: fixed; top: 0; left: 1rem; z-index: 100; padding: .65rem 1rem; color: var(--paper); background: var(--navy); transform: translateY(-120%); }
.skip-link:focus { transform: translateY(0); }
.content-shell { width: min(1120px, calc(100% - 3rem)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  padding: 1rem clamp(1.5rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(11, 41, 72, .18);
  background: rgba(255, 252, 246, .82);
  backdrop-filter: blur(.65rem);
}

.brand { width: min(16rem, 38vw); }
.brand img { display: block; width: 100%; height: auto; }
.site-nav { display: flex; gap: clamp(.7rem, 1.35vw, 1.35rem); font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: clamp(.82rem, 1.18vw, 1.05rem); font-weight: 700; }
.site-nav a { min-height: 2.6rem; display: inline-flex; align-items: center; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current] { border-color: var(--gold); }
.characters-page .site-nav { align-items: center; }
.characters-page .site-nav-group { display: inline-flex; align-items: center; gap: inherit; }
.characters-page .site-nav-group--categories { padding-left: clamp(.7rem, 1.35vw, 1.35rem); border-left: 1px solid rgba(11, 41, 72, .24); }
.characters-page .site-nav-group--categories a { color: rgba(11, 41, 72, .72); font-size: .86em; }
.characters-page .site-nav-group--categories a[aria-current] { color: var(--navy); }

.page-section { position: relative; min-height: 100svh; display: grid; align-items: center; padding: clamp(3rem, 5vw, 5rem) 0; }
.eyebrow { margin: 0 0 1rem; color: #8a632d; font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: .82rem; font-weight: 700; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Noto Serif JP", "Yu Mincho", serif; line-height: 1.35; }
h1 { margin-bottom: 1.3rem; font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: clamp(4rem, 8vw, 7.5rem); letter-spacing: .02em; }
h2 { margin-bottom: 1.2rem; font-size: clamp(2rem, 3.5vw, 3.35rem); }

.button { min-height: 3.25rem; padding: .78rem 1.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .8rem; border: 1px solid transparent; font-weight: 900; line-height: 1.4; transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, border-color 180ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-.16rem); }
.button-primary { color: #fff; background: var(--navy); box-shadow: 0 .65rem 1.35rem rgba(9, 37, 65, .15); }
.button-primary:hover, .button-primary:focus-visible { background: #13436f; }
.text-action { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 0; color: var(--ink); border-bottom: 1px solid var(--gold); font-weight: 900; line-height: 1.5; }
.text-action:hover, .text-action:focus-visible { color: #8a632d; }

.characters-hero { overflow: hidden; background: linear-gradient(118deg, #fffdf8 0%, #fffaf1 47%, #e4f4f1 100%); }
.characters-hero::before, .characters-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.characters-hero::before { width: min(55vw, 42rem); aspect-ratio: 1; right: -14rem; bottom: -21rem; border: 1px solid rgba(64, 138, 139, .3); box-shadow: 0 0 0 2.6rem rgba(139, 213, 207, .15), 0 0 0 6.8rem rgba(139, 213, 207, .08); }
.characters-hero::after { width: 12rem; height: 12rem; top: 16%; right: 10%; border: 1px solid rgba(183, 131, 57, .25); }
.hero-layout { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(23rem, .75fr); gap: clamp(2rem, 8vw, 8rem); align-items: center; }
.hero-copy { max-width: 38rem; padding: 1rem 0; }
.hero-lead { max-width: 35rem; margin-bottom: 2rem; color: var(--ink-soft); font-size: clamp(1rem, 1.35vw, 1.1rem); }

.hero-index { position: relative; width: min(100%, 27rem); min-height: min(46vw, 26rem); justify-self: end; }
.index-paper { position: absolute; width: 75%; aspect-ratio: .82; left: 13%; border: 1px solid rgba(11, 41, 72, .15); box-shadow: var(--shadow); }
.index-paper--back { top: 8%; transform: rotate(-11deg); background: #e2f3ef; }
.index-paper--middle { top: 12%; transform: rotate(7deg); background: #f5e4c8; }
.index-paper--front { top: 14%; padding: clamp(1.5rem, 5vw, 3rem); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: #fffdf8; }
.index-paper--front::before { content: ""; position: absolute; inset: 1rem; border: 1px solid rgba(183, 131, 57, .23); }
.index-paper--front span, .index-paper--front small, .index-paper--front i { position: relative; z-index: 1; }
.index-paper--front span { font-family: "Cormorant Garamond", serif; font-size: clamp(4.5rem, 8vw, 7.5rem); font-weight: 600; line-height: .8; color: #2b706e; }
.index-paper--front i { width: min(100%, 8rem); height: 1px; margin: 1.2rem 0; background: #2b706e; }
.index-paper--front small { color: var(--ink-soft); font-family: "Cormorant Garamond", serif; font-size: .75rem; font-weight: 700; letter-spacing: .2em; }
.index-marker { position: absolute; z-index: 3; width: 4.2rem; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 .6rem 1.2rem rgba(9, 37, 65, .13); }
.index-marker--mint { right: 0; bottom: 12%; background: var(--mint); }
.index-marker--gold { top: 2%; left: 2%; width: 2.6rem; border: .5rem solid #fffdf8; background: var(--gold); }

.character-list { padding-block: clamp(2.5rem, 4vw, 2.75rem); background: linear-gradient(145deg, #fffaf0 0%, #f7ead3 100%); }
.section-heading { max-width: 43rem; margin-bottom: clamp(2rem, 3vw, 2.75rem); }
.section-heading .eyebrow { margin-bottom: .6rem; }
.section-heading h2 { margin-bottom: .55rem; }
.section-heading > p:last-child { margin-bottom: 0; color: var(--ink-soft); }
.character-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); gap: clamp(1.4rem, 4vw, 3.5rem); align-items: stretch; }
.character-card { min-height: 20rem; display: grid; grid-template-columns: minmax(13rem, .8fr) minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(11, 41, 72, .14); background: rgba(255, 253, 248, .88); box-shadow: 0 .85rem 2.4rem rgba(50, 41, 21, .09); }
.character-card-image { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(145deg, #e9f7f4, #c6e7e1); }
.character-card-image img { width: min(100%, 13.5rem); max-height: 13rem; object-fit: contain; filter: drop-shadow(0 .8rem .7rem rgba(9, 37, 65, .14)); }
.character-card-copy { padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; align-items: flex-start; }
.status { margin-bottom: .8rem; padding: .2rem .55rem; color: #18665f; border: 1px solid rgba(24, 102, 95, .27); background: rgba(139, 213, 207, .18); font-size: .72rem; font-weight: 900; line-height: 1.5; }
.card-name-en { margin-bottom: .15rem; color: #47726f; font-family: "Cormorant Garamond", serif; font-weight: 700; letter-spacing: .05em; }
.character-card h3 { margin-bottom: .85rem; font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
.character-card-copy > p:not(.status):not(.card-name-en) { margin-bottom: 1.15rem; color: var(--ink-soft); font-size: .92rem; }
.card-actions { display: grid; gap: .7rem; margin-top: auto; }
.card-link { display: inline-flex; align-items: center; gap: .65rem; width: max-content; max-width: 100%; padding-bottom: .25rem; border-bottom: 1px solid var(--gold); font-weight: 900; }
.card-link:hover, .card-link:focus-visible { color: #8a632d; }
.card-link--subtle { color: var(--ink-soft); border-color: var(--line-soft); font-size: .86rem; }
.preparing-note { min-height: 20rem; padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 1px solid rgba(119, 91, 47, .22); background: rgba(255, 250, 240, .46); }
.preparing-note h3 { max-width: 19rem; margin-bottom: 1rem; font-size: clamp(1.35rem, 2.1vw, 1.75rem); }
.preparing-note > p:not(.eyebrow) { margin-bottom: 1.35rem; color: var(--ink-soft); font-size: .94rem; }

.updates-section { position: relative; overflow: hidden; color: var(--paper); background: #092541; }
.updates-section::before { content: ""; position: absolute; inset: 0; opacity: .65; background: radial-gradient(circle at 12% 30%, rgba(139, 213, 207, .18), transparent 22rem), radial-gradient(circle at 83% 65%, rgba(183, 131, 57, .24), transparent 20rem); }
.updates-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, .9fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.updates-section .eyebrow { color: #e4bd74; }
.updates-section h2 { max-width: 34rem; margin-bottom: 1rem; font-size: clamp(1.75rem, 3vw, 2.8rem); }
.updates-section p:not(.eyebrow) { max-width: 34rem; margin-bottom: 0; color: rgba(255, 253, 248, .8); }
.updates-actions { display: grid; grid-template-columns: 4.5rem 4.5rem minmax(15rem, 1fr); gap: .85rem; align-items: center; }
.social-action, .mail-action { min-height: 4.5rem; border: 1px solid rgba(255, 253, 248, .6); transition: transform 180ms ease, color 180ms ease, background-color 180ms ease; }
.social-action { position: relative; display: grid; place-items: center; border-radius: 50%; }
.social-action img { width: 2rem; height: 2rem; filter: brightness(0) invert(1); transition: filter 180ms ease; }
.social-action::after { content: attr(data-label); position: absolute; top: calc(100% + .6rem); left: 50%; padding: .25rem .5rem; color: var(--ink); background: var(--paper); font-size: .72rem; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, -.2rem); transition: opacity 160ms ease, transform 160ms ease; }
.social-action:hover::after, .social-action:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.social-action:hover, .social-action:focus-visible, .mail-action:hover, .mail-action:focus-visible { color: var(--ink); background: var(--paper); transform: translateY(-.16rem); }
.social-action:hover img, .social-action:focus-visible img { filter: none; }
.mail-action { min-width: 0; padding: .75rem .9rem; display: flex; align-items: center; gap: .75rem; }
.mail-action img { flex: 0 0 1.9rem; width: 1.9rem; height: 1.9rem; filter: brightness(0) invert(1); transition: filter 180ms ease; }
.mail-action:hover img, .mail-action:focus-visible img { filter: none; }
.mail-action span { min-width: 0; display: grid; line-height: 1.35; overflow-wrap: anywhere; font-size: .88rem; font-weight: 700; }
.mail-action small { opacity: .75; font-size: .72rem; font-weight: 500; }
.mail-action b { margin-left: auto; font-size: 1.1rem; }

.site-footer { padding: 1.1rem 0; color: rgba(255, 253, 248, .72); background: #061a2e; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand { font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: 1.22rem; font-weight: 700; letter-spacing: .04em; }
.footer-inner p { margin: 0; font-family: "Cormorant Garamond", "Noto Serif JP", serif; font-size: .8rem; letter-spacing: .08em; }

.has-motion [data-reveal] { opacity: 0; transform: translateY(1rem); transition: opacity 520ms ease, transform 620ms cubic-bezier(.2, .7, .2, 1); }
.has-motion [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.has-motion .hero-index[data-reveal] { transform: translateY(1rem) rotate(-1deg); }
.has-motion .hero-index[data-reveal].is-visible { transform: translateY(0) rotate(0); }

@media (max-width: 900px) {
  .characters-page .site-header { height: auto; min-height: var(--header-height); flex-wrap: wrap; gap: .4rem; }
  .characters-page .site-nav { width: 100%; justify-content: space-between; gap: .45rem; padding-top: 0; font-family: "Noto Serif JP", "Yu Mincho", serif; font-size: .78rem; letter-spacing: 0; }
  .characters-page .site-nav-group { gap: .45rem; }
  .characters-page .site-nav-group--categories { padding-left: 0; border-left: 0; }
  .hero-layout, .updates-layout { grid-template-columns: 1fr; }
  .hero-copy { max-width: 42rem; }
  .hero-index { justify-self: center; width: min(100%, 25rem); }
  .updates-actions { justify-self: start; }
}

@media (min-width: 721px) and (max-width: 900px) {
  .characters-page .site-header { min-height: 5.75rem; height: 5.75rem; padding: .75rem 1.25rem; flex-wrap: nowrap; gap: .75rem; }
  .characters-page .brand { flex: 0 0 auto; width: 11rem; }
  .characters-page .site-nav { width: auto; flex: 1; justify-content: flex-end; gap: .55rem; font-size: .72rem; }
  .characters-page .site-nav-group { gap: .55rem; }
  .characters-page .site-nav-group--categories { padding-left: .55rem; border-left: 1px solid rgba(11, 41, 72, .24); }
  .characters-page .site-nav a { min-height: 2.25rem; }
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(17rem, .75fr); gap: clamp(1.25rem, 3vw, 1.75rem); }
  .hero-index { justify-self: end; width: min(100%, 21rem); min-height: min(42vw, 21rem); }
}

@media (max-width: 720px) {
  html:has(body.characters-page) { scroll-snap-type: none; }
  .content-shell { width: min(100% - 2.25rem, 1120px); }
  .site-header { min-height: auto; flex-wrap: wrap; gap: .35rem; padding: .7rem 1.1rem .8rem; }
  .site-header { height: auto; }
  .brand { width: min(11.5rem, 54vw); }
  .site-nav { width: 100%; justify-content: space-between; gap: .35rem; font-family: "Noto Serif JP", "Yu Mincho", serif; font-size: .72rem; letter-spacing: 0; }
  .site-nav a { min-height: 2.2rem; }
  .page-section { min-height: auto; padding: 5rem 0; }
  .characters-hero { padding-top: 3.3rem; }
  .character-list { padding-block: 5rem; }
  .hero-layout { gap: 2.75rem; }
  .hero-index { min-height: 22rem; }
  .character-grid { grid-template-columns: 1fr; }
  .character-card { min-height: 0; grid-template-columns: minmax(9.5rem, .75fr) minmax(0, 1fr); }
  .character-card-image { padding: 1rem; }
  .preparing-note { min-height: 15rem; }
  .updates-actions { grid-template-columns: 4.25rem 4.25rem minmax(0, 1fr); width: 100%; }
  .social-action, .mail-action { min-height: 4.25rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  h1 { font-size: clamp(3.3rem, 17vw, 4.45rem); }
  h2 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .hero-index { min-height: 19rem; width: min(100%, 20rem); }
  .index-paper--front { padding: 1.65rem; }
  .character-card { grid-template-columns: 1fr; }
  .character-card-image { min-height: 13rem; }
  .character-card-image img { width: 10.5rem; max-height: 11rem; }
  .character-card-copy { padding: 1.65rem; }
  .updates-actions { grid-template-columns: repeat(2, 4.25rem); }
  .mail-action { grid-column: 1 / -1; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
