:root {
  --ink: #28323a;
  --muted: #6d7d89;
  --paper: #eef5fa;
  --paper-soft: rgba(246, 250, 253, 0.72);
  --line: rgba(70, 104, 128, 0.14);
  --accent: #8ab6d6;
  --accent-deep: #5f93ba;
  --shadow: 0 18px 60px rgba(67, 104, 130, 0.10);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink);
  background: #eaf3f8;
  line-height: 1.8;
  overflow-x: hidden;
}
body.dialog-open { overflow: hidden; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.background-layer {
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(rgba(235, 246, 252, 0.70), rgba(241, 247, 251, 0.90)),
    url("./assets/background.jpg") center / cover no-repeat;
}
.sky-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.84), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(151, 202, 235, .18), transparent 26%),
    radial-gradient(circle at 60% 82%, rgba(255,255,255,.55), transparent 30%);
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: .10;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 .7px, transparent .9px),
    radial-gradient(circle at 70% 60%, #000 0 .5px, transparent .8px);
  background-size: 6px 6px, 8px 8px;
  mix-blend-mode: soft-light;
}
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent-deep);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(22px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(237, 246, 251, .72);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-jp { font-family: "Zen Kurenaido", serif; font-size: 1.15rem; letter-spacing: .08em; }
.brand-en { color: var(--muted); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.nav { display: flex; gap: 24px; font-size: .78rem; color: var(--muted); }
.nav a { transition: opacity 180ms ease; }
.nav a:hover { opacity: .55; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.section { padding: clamp(78px, 11vw, 150px) clamp(4px, 2vw, 28px); }
.hero {
  min-height: 86vh;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: clamp(36px, 7vw, 100px);
}
.eyebrow, .section-index, .card-meta, .detail-meta {
  font-size: .68rem;
  letter-spacing: .18em;
  color: var(--muted);
}
.hero h1 {
  margin: 12px 0 0;
  font-family: "Zen Kurenaido", serif;
  font-size: clamp(4.4rem, 10vw, 8.2rem);
  line-height: .95;
  font-weight: 400;
  letter-spacing: .02em;
}
.subtitle {
  margin: 12px 0 34px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.quote { max-width: 520px; margin: 0 0 34px; font-size: clamp(1rem, 2vw, 1.25rem); }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.soft-button {
  display: inline-flex;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.30);
  backdrop-filter: blur(10px);
  font-size: .8rem;
  transition: transform 180ms ease, background 180ms ease;
}
.soft-button:hover { transform: translateY(-2px); background: rgba(255,255,255,.60); }
.hero-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .7rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #83b694; box-shadow: 0 0 0 5px rgba(131,182,148,.12); }

.avatar-card { width: min(100%, 340px); justify-self: center; transform: rotate(2deg); }
.avatar-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 36px;
  overflow: hidden;
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(255,255,255,.68);
  box-shadow: var(--shadow);
}
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-placeholder, .mascot-placeholder { display: none; }
.missing-image img { display: none; }
.missing-image .image-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  height: 100%;
  color: var(--muted);
}
.image-placeholder span { font-family: "Zen Kurenaido", serif; font-size: 4rem; color: rgba(95,147,186,.55); }
.image-placeholder small { font-size: .68rem; letter-spacing: .12em; }
.avatar-note { text-align: right; color: var(--muted); font-size: .72rem; margin-top: 10px; }

.glass-panel {
  border: 1px solid rgba(255,255,255,.68);
  border-radius: var(--radius);
  background: var(--paper-soft);
  box-shadow: var(--shadow);
  padding-inline: clamp(28px, 5vw, 72px);
  backdrop-filter: blur(16px);
}
.two-column, .section-heading { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(34px, 7vw, 90px); }
h2 {
  font-family: "Zen Kurenaido", serif;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1.1;
  font-weight: 400;
  margin: 10px 0 0;
}
.prose p, .section-description, .contact-copy { color: #5c6b75; }
.small-note { font-size: .75rem; color: var(--muted) !important; }
.section-heading { align-items: end; margin-bottom: 40px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.content-card {
  appearance: none;
  position: relative;
  min-height: 230px;
  width: 100%;
  text-align: left;
  color: inherit;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(247,251,253,.56);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.content-card:hover:not(.is-disabled), .content-card:focus-visible:not(.is-disabled) {
  transform: translateY(-4px);
  background: rgba(255,255,255,.78);
  box-shadow: 0 14px 30px rgba(72,111,138,.08);
  outline: none;
}
.content-card.is-disabled { cursor: default; opacity: .58; }
.content-card h3 { margin: 36px 0 12px; font-size: 1.3rem; font-weight: 500; }
.content-card p { max-width: 88%; color: var(--muted); font-size: .9rem; }
.card-arrow { position: absolute; right: 25px; bottom: 24px; color: var(--accent-deep); }

.contact-section { text-align: center; padding-bottom: 160px; }
.contact-copy { max-width: 620px; margin: 26px auto; }
.link-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.link-row a { padding: 9px 15px; border-bottom: 1px solid var(--line); font-size: .86rem; }
footer { display: flex; justify-content: center; gap: 4px; padding: 30px; color: var(--muted); font-size: .72rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.mascot-companion {
  --mascot-rotation: 0deg;
  appearance: none;
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: 18px;
  z-index: 30;
  width: clamp(74px, 8vw, 106px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: rotate(var(--mascot-rotation));
  transform-origin: center bottom;
  transition: transform 130ms ease;
  filter: drop-shadow(0 8px 14px rgba(60,90,110,.10));
}
.mascot-companion img { display: block; width: 100%; height: auto; }
.mascot-companion.missing-mascot {
  height: 92px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.62);
  display: grid;
  place-items: center;
}
.mascot-companion.missing-mascot img { display: none; }
.mascot-companion.missing-mascot .mascot-placeholder { display: grid; place-items: center; gap: 2px; color: var(--accent-deep); font-size: 1.15rem; }
.mascot-placeholder small { color: var(--muted); font-size: .55rem; }
.mascot-bubble {
  position: absolute;
  right: 70%;
  bottom: 88%;
  width: max-content;
  max-width: 190px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 4px 14px;
  background: rgba(248,252,254,.96);
  color: var(--muted);
  font-size: .7rem;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.mascot-bubble.show { opacity: 1; transform: translateY(0); }

.detail-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(82vh, 820px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  padding: clamp(30px, 6vw, 58px);
  background: rgba(244,250,253,.94);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(49,81,104,.22);
  backdrop-filter: blur(24px);
}
.detail-dialog::backdrop { background: rgba(42,62,75,.28); backdrop-filter: blur(7px); }
.detail-dialog[open] { animation: dialogIn .22s ease both; }
.detail-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}
.detail-dialog h2 { margin: 14px 0 28px; font-size: clamp(2.3rem, 6vw, 4rem); }
.detail-body { color: #53636e; }
.detail-body p { margin: 0 0 1.35em; }
.detail-link {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-deep);
  font-size: .82rem;
}
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .site-header { padding: 14px 18px; }
  .brand-en, .nav a:nth-child(2), .nav a:nth-child(3) { display: none; }
  .nav { gap: 16px; }
  main { width: min(100% - 24px, 1180px); }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 90px; }
  .hero h1 { font-size: clamp(4rem, 22vw, 6.5rem); }
  .avatar-card { width: min(72vw, 280px); justify-self: end; margin-right: 4vw; }
  .two-column, .section-heading, .cards { grid-template-columns: 1fr; }
  .section { padding-block: 82px; }
  .glass-panel { padding-inline: 24px; }
  .section-heading { gap: 10px; }
  .mascot-companion { right: 14px; bottom: 12px; width: 76px; }
  .detail-dialog { border-radius: 22px; }
}

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