/* =========================================================
   Revir 流域文化祭「あまざりさい」LP
   ========================================================= */

/* --- フォント ------------------------------------------------
   本番では Web ライセンスを取得した Untitled Sans（Klim）と
   A P-OTF 墨東N+ ProN（モリサワ）を読み込みます。
   墨東は Morisawa Fonts Webフォントの埋め込みコードを index.html の <head> に貼り付け、
   下の --font の "P-Bokutoh" を Morisawa 側で指定されるフォント名に置き換えます。
   Untitled Sans は下の @font-face を有効にします。
   それまでは Google Fonts の Inter / Zen Kaku Gothic New で代用。
------------------------------------------------------------- */
/*
@font-face { font-family: "Untitled Sans"; src: url("../assets/fonts/untitled-sans-web-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Untitled Sans"; src: url("../assets/fonts/untitled-sans-web-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
*/

:root {
  /* ブランドカラー：ロゴ */
  --logo-green: #23C884;
  --logo-yellow: #F2DE70;
  --logo-purple: #B89DE1;
  --ink-black: #000000;
  /* ブランドカラー：フライヤー */
  --teal: #00B0BB;        /* 見出し・大きい文字 */
  --teal-line: #71C6D0;   /* 線・パターン */
  --teal-pale: #8EDFEB;   /* 壁紙 */
  --purple: #B09AC8;
  --green: #54B983;
  --gold: #D7A947;
  /* 本文用（読みやすさのため teal を濃くした色） */
  --ink: #0B5960;
  --ink-soft: #3E7F86;
  --bg: #FFFFFF;

  --font: "Untitled Sans", "Inter", "P-Bokutoh", "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-en: "Untitled Sans", "Inter", system-ui, sans-serif;
  --max: 1180px;
  --pad: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  isolation: isolate;
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 300; line-height: 1.9; letter-spacing: .04em;
  -webkit-font-smoothing: antialiased; font-feature-settings: "palt";
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.c-purple { --c: var(--purple); } .c-green { --c: var(--green); }
.c-gold { --c: var(--gold); } .c-teal { --c: var(--teal); }

/* --- 元画像の形・色を保ったまま、背景全体をゆっくり動かす --- */
#bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; mix-blend-mode: multiply; opacity: 0; transition: opacity 3s ease; }
.is-background-ready #bg { opacity: 1; }
#bg::before {
  content: ""; position: absolute; inset: -24px;
  background: url("../assets/img/headings/Wallpaper_Blue_16x9.png") center / cover no-repeat;
  animation: wallpaper-drift 96s ease-in-out infinite;
  animation-play-state: paused;
  will-change: transform;
}
.is-background-ready #bg::before { animation-play-state: running; }

/* --- ヘッダー --- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 64px;
  display: flex; align-items: center; gap: 24px; padding: 0 var(--pad);
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px dashed transparent; transition: border-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--teal-line); }
.header__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal); }
.header__brand img { height: 30px; width: auto; }
.header__brand span { font-size: 13px; line-height: 1.3; }
.header__nav { margin-left: auto; display: flex; gap: 22px; font-family: var(--font-en); font-size: 13px; }
.header__nav a { text-decoration: none; color: var(--teal); position: relative; }
.header__nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .3s; }
.header__nav a:hover::after { right: 0; }
.header__menu { display: none; margin-left: auto; background: none; border: 1px solid var(--teal); color: var(--teal); font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 99px; }

/* --- ヒーロー --- */
.hero {
  position: relative; min-height: max(100svh, 720px); padding: 92px var(--pad) 56px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; gap: 24px 32px;
  color: var(--teal); max-width: 1440px; margin: 0 auto;
}
.hero__title { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 18px; }
/* 見出しはフライヤー（PDF）から書き出した SVG 画像 */
.hero__title { --u: clamp(.68px, .072vw, 1.15px); } /* 見出し画像の拡大率（フライヤーと同じ文字サイズ比を保つ） */
.hero__h1 { margin: 0; line-height: 0; }
.hero__h1 img { width: calc(var(--u) * 349); height: auto; }
.hero__vert { display: flex; gap: 22px; align-items: flex-start; }
.hero__kana { margin: 0; line-height: 0; flex: 0 0 calc(var(--u) * 62); }
.hero__kana img { height: calc(var(--u) * 407); width: calc(var(--u) * 62); max-width: none; }
/* 2つの見出し画像を背景パターン（z-index: -1）の後ろに配置 */
.hero__h1, .hero__kana { position: relative; z-index: -2; }
.hero__lead { flex: none; writing-mode: vertical-rl; font-size: 14px; line-height: 2; margin: 0; white-space: pre-line; letter-spacing: .12em; }


.pillars { grid-column: 2; grid-row: 1; list-style: none; margin: 8vh 0 0; padding: 0; font-family: var(--font-en); font-size: clamp(22px, 2.3vw, 32px); line-height: 1.45; font-weight: 400; }
.pillars li { color: var(--c); opacity: 0; transform: translateX(12px); transition: opacity .8s, transform .8s; }
.is-ready .pillars li { opacity: 1; transform: none; }

.hero__info { grid-column: 1; grid-row: 2; align-self: end; }
.hero__date { font-family: var(--font-en); font-weight: 300; font-size: clamp(50px, 6vw, 88px); line-height: 1; margin: 0; letter-spacing: 0; display: flex; align-items: center; gap: .12em; white-space: nowrap; }
.hero__date .dow { font-family: var(--font); font-size: .34em; width: 1.5em; height: 1.5em; display: inline-grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; }
.hero__time { font-family: var(--font-en); font-size: clamp(26px, 2.8vw, 40px); line-height: 1.2; margin: 6px 0 14px; }
.hero__meta { margin: 0; font-size: 17px; line-height: 1.75; }
.hero__meta small { font-size: 11px; margin-left: .5em; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; width: 1px; height: 46px; background: linear-gradient(var(--teal) 50%, transparent 50%); background-size: 1px 8px; animation: cue 1.6s linear infinite; }
@keyframes cue { to { background-position: 0 16px; } }

/* --- セクション共通 --- */
.section { position: relative; padding: clamp(72px, 10vw, 140px) var(--pad); }
.sheet { background: rgba(255,255,255,.94); max-width: var(--max); margin: 0 auto; padding: clamp(36px, 5vw, 72px); border-top: 1px dashed var(--teal-line); border-bottom: 1px dashed var(--teal-line); }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin: 0 0 clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.sec-head__en { font-family: var(--font-en); font-weight: 300; font-size: clamp(34px, 4.8vw, 60px); line-height: 1; color: var(--c, var(--teal)); margin: 0; }
.tag { display: inline-block; font-size: 13px; line-height: 1.5; padding: 1px 10px; border: 1px solid var(--c, var(--teal)); color: var(--c, var(--teal)); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__catch { color: var(--teal); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.7; margin: 0; font-weight: 300; position: sticky; top: 110px; }
.about__catch em { font-style: normal; background: linear-gradient(transparent 62%, rgba(242,222,112,.6) 62%); }
.about__body p { margin: 0 0 1.4em; font-size: 15.5px; }

/* Program */
.program { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-left: 1px dashed var(--teal-line); }
.prog { padding: 8px clamp(18px, 2.4vw, 32px) 24px; border-right: 1px dashed var(--teal-line); }
.prog__en { font-family: var(--font-en); font-size: 13px; color: var(--c); letter-spacing: .08em; margin: 14px 0 12px; }
.prog ul { list-style: none; padding: 0; margin: 0; }
.prog li { position: relative; padding-left: 1.4em; margin-bottom: .9em; font-size: 14.5px; line-height: 1.75; }
.prog li::before { content: ""; position: absolute; left: 0; top: .52em; width: .72em; height: .72em; border: 1.5px solid var(--c); border-radius: 50%; }
.prog__note { font-family: var(--font-en); color: var(--c); font-size: 14px; margin: 4px 0 0; }
.prog.is-numbered li { padding-left: 1.6em; }
.prog.is-numbered li::before { display: none; }
.prog__num { position: absolute; left: 0; top: 0; color: var(--c); }
.prog__extra { font-size: 13px; color: var(--ink-soft); margin: 14px 0 0; }

/* Timetable */
.tt { list-style: none; margin: 0; padding: 0; position: relative; }
.tt::before { content: ""; position: absolute; left: 92px; top: 10px; bottom: 10px; border-left: 1px dashed var(--teal-line); }
.tt li { display: grid; grid-template-columns: 92px 1fr; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(113,198,208,.25); }
.tt__time { font-family: var(--font-en); font-size: 26px; color: var(--c); font-weight: 300; }
.tt__title { position: relative; padding-left: 28px; font-size: 16px; }
.tt__title::before { content: ""; position: absolute; left: -6px; top: .55em; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px #fff; }

/* People */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -16px 0 32px; }
.filters button { font: inherit; font-size: 13px; padding: 4px 16px; border-radius: 99px; border: 1px solid var(--teal-line); background: #fff; color: var(--ink-soft); cursor: pointer; transition: .2s; }
.filters button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.person { transition: opacity .35s, transform .35s; }
.person[hidden] { display: none; }
.person__photo { position: relative; aspect-ratio: 1; overflow: hidden; background: #F6FCFD; border: 1px solid rgba(113,198,208,.5); }
.person__photo img, .person__photo canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.person__photo .badge { position: absolute; left: 8px; top: 8px; font-size: 11px; background: #fff; color: var(--c); border: 1px solid var(--c); padding: 0 8px; }
.person__name { margin: 12px 0 0; font-size: 18px; font-weight: 400; color: var(--ink); line-height: 1.4; }
.person__org { margin: 2px 0 0; font-size: 12.5px; color: var(--c); }
.person__links { display: flex; gap: 10px; margin-top: 6px; font-family: var(--font-en); font-size: 12px; }
.people-note { margin: 28px 0 0; font-size: 13px; color: var(--ink-soft); }

/* Revir */
.revir { display: grid; grid-template-columns: .9fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.revir__logo { width: 100%; max-width: 420px; }
.revir__body p { font-size: 15px; margin: 0 0 1.2em; }
.revir__founders { font-size: 13px; color: var(--ink-soft); border-top: 1px dashed var(--teal-line); padding-top: 1em; }

/* Access */
.access { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 72px); }
.access dl { margin: 0; display: grid; grid-template-columns: 6.5em 1fr; gap: 10px 16px; font-size: 15px; }
.access dt { color: var(--teal); }
.access dd { margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 12px 26px; border: 1px solid var(--teal); color: var(--teal); text-decoration: none; border-radius: 99px; font-size: 14px; transition: .25s; }
.btn:hover { background: var(--teal); color: #fff; }
.origami { border: 1px dashed var(--teal-line); padding: 24px 26px; position: relative; }
.origami h3 { margin: 0 0 12px; font-weight: 400; font-size: 15px; color: var(--teal); }
.origami ol { margin: 0; padding-left: 1.6em; font-size: 13.5px; line-height: 1.9; }
.origami svg { position: absolute; right: 18px; top: -26px; width: 70px; background: #fff; }

/* Footer */
.footer { padding: clamp(56px, 8vw, 96px) var(--pad) 40px; color: var(--teal); }
.footer__inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: end; }
.footer dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 13px; }
.footer dd { margin: 0; color: var(--ink); }
.footer__copy { font-family: var(--font-en); font-size: 11px; margin-top: 40px; text-align: center; color: var(--ink-soft); }

/* スクロール表示 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* --- レスポンシブ --- */
@media (max-width: 960px) {
  .hero { grid-template-rows: auto auto; }
  .hero__title { grid-column: 1; grid-row: 1; }
  .pillars { grid-column: 2; grid-row: 1; margin-top: 0; align-self: end; font-size: 18px; }
  .hero__info { grid-column: 1 / 3; grid-row: 2; }
  .program { grid-template-columns: 1fr; border-left: 0; }
  .prog { border-right: 0; border-bottom: 1px dashed var(--teal-line); padding-left: 0; padding-right: 0; }
  .about, .revir, .access { grid-template-columns: 1fr; }
  .about__catch { position: static; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* ブラウザのバー開閉による背景サイズの変化を防ぐ */
  #bg { height: 100lvh; }
  .header__nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px dashed var(--teal-line); }
  .header__nav.is-open { display: flex; }
  .header__nav a { padding: 14px var(--pad); border-top: 1px dashed rgba(113,198,208,.4); }
  .header__menu { display: block; }
  .hero { padding-top: 84px; }
  .scroll-cue { display: none; }
  .hero__title { --u: .18vw; grid-column: 1 / -1; min-width: 0; }
  .hero__lead { font-size: 12px; }
  .pillars { grid-column: 1 / 3; grid-row: 3; display: flex; flex-wrap: wrap; gap: 0 18px; align-self: start; }
  .tt::before { left: 70px; } .tt li { grid-template-columns: 70px 1fr; } .tt__time { font-size: 20px; }
  .people { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .person__name { font-size: 15px; }
  .sheet { padding: 32px 20px; }
  .section { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #bg { transition: none; }
  #bg::before { animation: none; will-change: auto; }
  .reveal, .pillars li { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-cue { animation: none; }
}
