/* =========================================================
   のんだどん  スタイル
   色はここ（:root）でまとめて変更できます
   ========================================================= */
:root {
  --paper:   #FBFBF9;  /* 背景 */
  --mist:    #EEF0EE;  /* 薄い面 */
  --line:    #D9DCD9;  /* 罫線 */
  --ink:     #24272B;  /* 文字（墨） */
  --ink-2:   #5B6066;  /* 補足文字 */
  --plum:    #7A1F4E;  /* 主色（アプリと同じ紫芋色） */
  --plum-ink:#FFFFFF;  /* 主色の上の文字 */
  --amber:   #A8620F;  /* 差し色（琥珀） */
  --shelf:   #4A3F35;  /* 棚板 */
  --header-bg: rgba(251,251,249,.9);

  --f-serif: "Zen Old Mincho", "Noto Serif JP", "Noto Serif CJK JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --f-sans:  "Zen Kaku Gothic New", "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;

  --wrap: 1200px;
  --narrow: 720px;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #17191B;
    --mist:    #212427;
    --line:    #34383C;
    --ink:     #E9EAE7;
    --ink-2:   #A4A9AE;
    --plum:    #D7759F;
    --plum-ink:#1A0B12;
    --amber:   #E0A050;
    --shelf:   #8A7A69;
    --header-bg: rgba(23,25,27,.88);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:#17191B; --mist:#212427; --line:#34383C; --ink:#E9EAE7; --ink-2:#A4A9AE;
  --plum:#D7759F; --plum-ink:#1A0B12; --amber:#E0A050; --shelf:#8A7A69;
  --header-bg: rgba(23,25,27,.88); color-scheme: dark;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "palt" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: .2em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.sp { display: none; }
@media (max-width: 640px) { .sp { display: inline; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* ---------- 見出し ---------- */
.h-sec {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem);
  line-height: 1.5;
  letter-spacing: .04em;
  margin: 0 0 .9em;
}
.h-sub {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0 0 .6em;
}
h1, h2, h3, h4, dt, .sec-lead, .aim-list strong, .news-title { word-break: auto-phrase; }
.scroll-hint { display: none; }
@media (max-width: 860px) { .scroll-hint { display: block; font-size: .85rem; color: var(--ink-2); margin: -1.2em 0 1em; } }
.sec-lead { color: var(--ink-2); max-width: 40em; margin-bottom: 2.2em; }

section { padding: clamp(64px, 9vw, 112px) 0; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.4;
  border: 2px solid var(--plum);
  transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--plum); color: var(--plum-ink); }
.btn-primary:hover { background: transparent; color: var(--plum); }
.btn-ghost { background: transparent; color: var(--plum); }
.btn-ghost:hover { background: var(--plum); color: var(--plum-ink); }
.btn-wide { display: block; text-align: center; max-width: 360px; margin: 1.6em auto .6em; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21;
  background: var(--header-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--f-serif); font-weight: 900; font-size: 1.35rem;
  color: var(--ink); text-decoration: none; letter-spacing: .06em;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: .5em .8em; border-radius: 999px;
}
.site-nav a:hover { background: var(--mist); }
.site-nav .nav-contact { background: var(--plum); color: var(--plum-ink); margin-left: 6px; }
.site-nav .nav-contact:hover { background: var(--plum); opacity: .88; }
.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; margin: 0 -10px 0 auto; padding: 0;
  color: var(--ink); background: transparent; border: 0; cursor: pointer;
}
/* ハンバーガー（3本線）。開いているときは × になる */
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute; left: 50%; width: 24px; height: 2px; margin-left: -12px;
  background: currentColor; border-radius: 2px;
  transition: transform .25s ease, background-color .25s ease;
}
.nav-toggle__bars { top: 50%; margin-top: -1px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle__bars::before { transform: translateY(-7px); }
.nav-toggle__bars::after { transform: translateY(7px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { transition: none; }
}
@media (max-width: 860px) {
  .brand { display: none; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .9em .8em; border-radius: 8px; font-size: 1rem; }
  .site-nav .nav-contact { margin: 8px 0 0; text-align: center; border-radius: 999px; }
}

/* ---------- のんだどんとは（トップ＋わたしたちについて） ---------- */
.intro { background: var(--mist); }
.intro-catch {
  font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  line-height: 1.6; color: var(--plum); margin-bottom: .8em;
  word-break: auto-phrase;
}
.intro-lead { font-size: 1.08rem; word-break: auto-phrase; }
.intro-us { margin-top: 2.4em; padding-top: 2em; border-top: 1px solid var(--line); }
.intro-us p { color: var(--ink-2); word-break: auto-phrase; }
.insta {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 2em;
  color: var(--ink); font-weight: 700; text-decoration: none;
}
.insta img { width: 44px; height: 44px; }
.insta:hover span { text-decoration: underline; }
.insta + .intro-actions { margin-top: 1.2em; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

/* ---------- なぜ ---------- */
.pain-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin: 0; }
.pain-list > div { padding: 1.4em 0; border-top: 1px solid var(--line); }
.pain-list dt { font-family: var(--f-serif); font-weight: 700; font-size: 1.15rem; margin-bottom: .3em; }
.pain-list dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .pain-list { grid-template-columns: 1fr; } }

/* ---------- アプリ（棚） ---------- */
.app { background: var(--mist); }
.shelf-scroll { overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 24px; }
.shelf {
  list-style: none; margin: 0 auto; padding: 0 24px;
  max-width: var(--wrap);
  display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 28px;
  position: relative;
}
.shelf-item { scroll-snap-align: center; }
.shelf-item figure { margin: 0; }
.shelf-item img {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top;
  border-radius: 18px; border: 1px solid var(--line); background: var(--paper);
}
/* 棚板：各スクリーンショットの下の板がつながって一枚の棚に見える */
.shelf-item figure::after {
  content: ""; display: block; height: 10px; margin: 0 -15px;
  background: var(--shelf); border-radius: 2px;
  box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--shelf) 55%, transparent);
}
.shelf-item figure { display: flex; flex-direction: column; }
.shelf-item figure img { order: -1; }
.shelf-item figcaption { order: 1; padding-top: 22px; }
.shelf-item figcaption > * { display: block; }
.step-no {
  font-family: var(--f-serif); font-weight: 900; font-size: 1.6rem; line-height: 1;
  color: var(--amber); margin-bottom: .35em;
}
.shelf-item strong { font-family: var(--f-serif); font-size: 1.15rem; margin-bottom: .3em; }
.shelf-item figcaption span:last-child { font-size: .92rem; color: var(--ink-2); line-height: 1.8; }
@media (max-width: 860px) {
  .shelf { grid-template-columns: repeat(4, 64vw); max-width: none; width: max-content; gap: 24px; }
}

.feature-pair {
  display: grid; grid-template-columns: 1fr 1fr 220px; gap: 40px; align-items: start;
  margin-top: clamp(48px, 7vw, 80px);
}
.feature { padding-top: 1.2em; border-top: 2px solid var(--ink); }
.feature p { color: var(--ink-2); font-size: .97rem; }
.feature-shot { margin: 0; }
.feature-shot img { border-radius: 18px; border: 1px solid var(--line); aspect-ratio: 9/16; object-fit: cover; object-position: top; }
.tag {
  display: inline-block; vertical-align: .2em; margin-left: .6em;
  font-family: var(--f-sans); font-size: .72rem; font-weight: 700;
  color: var(--amber); border: 1.5px solid currentColor; border-radius: 999px; padding: .05em .7em;
}
@media (max-width: 860px) {
  .feature-pair { grid-template-columns: 1fr; gap: 32px; }
  .feature-shot { max-width: 240px; }
}

/* ---------- 蔵元・飲食店のみなさまへ ---------- */
.partners strong { color: var(--plum); }
.aim { margin: 0 0 clamp(48px, 6vw, 72px); }
.aim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1em; max-width: 46em; }
.aim-list li { padding-left: 1.4em; position: relative; }
.aim-list li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: .55em; height: .55em;
  border-radius: 50%; background: var(--amber);
}
.aim-list strong { color: var(--ink); display: block; }
.ask-title { margin-bottom: 1em; }
.ask-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.ask { padding: 1.4em 0 .6em; border-top: 1px solid var(--line); }
.ask h4 { font-family: var(--f-serif); font-size: 1.12rem; margin: 0 0 .4em; }
.ask h4 .soon { margin-left: .6em; font-family: var(--f-sans); font-size: .78rem; font-weight: 700; color: var(--amber); white-space: nowrap; }
.ask p { color: var(--ink-2); font-size: .97rem; }
.ask-note { margin: 1.6em 0 1.8em; text-align: center; color: var(--ink-2); }
@media (max-width: 640px) { .ask-grid { grid-template-columns: 1fr; } }

/* ---------- 活動 ---------- */
.project { background: var(--mist); }
.project-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.project-text strong { color: var(--plum); }
.ext-link a { font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: .7em; bottom: .7em; width: 2px; background: var(--line);
}
.timeline li { position: relative; padding-bottom: 1.6em; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -28px; top: .45em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink-2);
}
.timeline .is-now::before { background: var(--plum); border-color: var(--plum); }
.tl-date { display: block; font-family: var(--f-serif); font-weight: 700; }
.tl-text { display: block; color: var(--ink-2); font-size: .95rem; }
.tl-text em {
  font-style: normal; font-size: .72rem; font-weight: 700; margin-left: .6em;
  color: var(--plum-ink); background: var(--plum); padding: .1em .6em; border-radius: 999px;
}
@media (max-width: 860px) { .project-body { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- お知らせ ---------- */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 1.1em 0; border-bottom: 1px solid var(--line); }
.news-list time { color: var(--ink-2); font-size: .92rem; font-variant-numeric: tabular-nums; }
.news-list .news-title { font-weight: 700; display: block; }
.news-list .news-body { display: block; color: var(--ink-2); font-size: .94rem; margin-top: .2em; }
.news-list .news-empty { display: block; color: var(--ink-2); }
@media (max-width: 560px) { .news-list li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- メンバー ---------- */
.members { background: var(--mist); }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.member-list li { display: flex; align-items: center; gap: 14px; }
.m-mark {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-serif); font-weight: 700; font-size: 1.3rem;
  border: 1.5px solid var(--ink); color: var(--ink);
}
.m-name { font-size: 1.08rem; font-weight: 700; display: block; }
.m-role { display: block; font-size: .85rem; color: var(--ink-2); font-weight: 400; }
@media (max-width: 760px) { .member-list { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 協賛 ---------- */
.sponsor-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 24px; }
.sponsor-logo {
  height: 140px; padding: 20px 24px; margin-bottom: 1em;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: #FFFFFF; /* ロゴの色を保つため、ダークモードでも白い台にする */
}
.sponsor-logo.is-dark { background: rgb(144, 50, 109); border-color: rgb(144, 50, 109); } /* 白いロゴ用 */
.sponsor-logo img { width: auto; max-width: 100%; max-height: 100px; } /* 台の高さ140px − 上下の余白 */
.sponsor-name { font-size: 1.08rem; font-weight: 700; margin: 0; }
.sponsor-role { font-size: .9rem; color: var(--ink-2); margin: .2em 0 0; }

/* ---------- お問い合わせ ---------- */
.contact { text-align: left; background: var(--mist); }
.mail-plain { text-align: center; color: var(--ink-2); font-size: .92rem; user-select: all; }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 48px 0 40px; font-size: .88rem; }
.site-footer p { margin: 0 0 .5em; }
.f-brand { font-family: var(--f-serif); font-weight: 900; font-size: 1.3rem; }
.f-note { opacity: .8; max-width: 46em; margin-top: 1.2em !important; }
.f-copy { opacity: .6; margin-top: 1.2em !important; }

/* ---------- オープニング（css/ship-scene.css の部品） ---------- */
/* 共通の section の余白が付くと、船の進み具合の計算がずれるので打ち消す */
.ship-scene { padding: 0; }

/* 縦書きの中の英字（IT）を縦中横にする */
.ship-scene .tcy { text-combine-upright: all; }

/* 最後に出る「のんだどん」。表示・非表示は js/ship-scene.js が opacity で切り替える */
.ship-scene__brand {
  position: absolute; margin: 0; opacity: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 400; line-height: 1; /* 書体は css/ship-scene.css の Yuji Syuku */
  color: #7A1F4E; /* 舞台はダークモードでも明るい紙色なので、主色を固定で使う */
}
/* 横長の画面：グラスの左の余白に縦書きで大きく
   （全体像ではグラスの左端が画面中央から約 37vh 左に来る） */
@media (min-aspect-ratio: 5/4) {
  .ship-scene__brand {
    top: 64px; bottom: 0; left: 0; width: calc(50vw - 37vh);
    writing-mode: vertical-rl; letter-spacing: .16em;
    font-size: min(11vh, calc((50vw - 37vh) * .5));
  }
}
/* 縦長・正方形に近い画面：グラスの上に横書きで */
@media not (min-aspect-ratio: 5/4) {
  .ship-scene__brand {
    left: 0; right: 0; top: calc(64px + 3vh);
    letter-spacing: .1em; font-size: min(12vw, 3.4rem);
  }
}
