/* ============================================================
   習陵祭 2026「青春爆裂」 - base.css
   変数 / リセット / フォント / 共通レイアウト
   ============================================================ */

:root {
  /* --- 爆裂カラーパレット --- */
  --c-ink: #0b0608;           /* 墨黒 */
  --c-ink-2: #17090d;
  --c-paper: #f6efe2;         /* 和紙 */
  --c-blaze: #ff2d0e;         /* 爆裂の赤 */
  --c-blaze-2: #ff6a00;       /* 炎の橙 */
  --c-spark: #ffd43a;         /* 火花の黄 */
  --c-sakura: #ff8fb1;        /* 桜 */
  --c-sky: #2f7bff;           /* 青空 */
  --c-sky-deep: #0a2a6b;

  /* --- タイポ --- */
  --font-brush: "Yuji Syuku", "Kaisei Decol", "HGP行書体", "HG行書体",
    "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --font-head: "Kaisei Opti", "Yuji Syuku", "Hiragino Mincho ProN", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Bebas Neue", "Impact", var(--font-head), sans-serif;

  /* --- レイアウト --- */
  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 56px);
  --header-h: 62px;

  /* --- イージング --- */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-blast: cubic-bezier(0.2, 1.6, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.is-scroll-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--c-ink);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }

::selection { background: var(--c-blaze); color: #fff; }

/* スクロールバー（Webkit） */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #120a0c; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--c-blaze), var(--c-blaze-2));
  border-radius: 9px;
}

/* ------------------------------------------------------------
   ユーティリティ
   ------------------------------------------------------------ */
.wrap {
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}
.u-brush { font-family: var(--font-brush); font-weight: 400; }
.u-vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-feature-settings: "vpal" 1;
}
.u-nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* 縦組みでも崩れない禁則・行間 */
.jp-tight {
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ------------------------------------------------------------
   和紙テクスチャ / 墨のノイズ（全ページ共通オーバーレイ）
   ------------------------------------------------------------ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(2, end) infinite;
}
@keyframes grainShift {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-3%, 2%, 0); }
}

/* 画面端のビネット（爆裂感の締め） */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(10, 3, 5, 0.72) 100%);
}

/* ------------------------------------------------------------
   セクション見出し（下層ページ共通）
   ------------------------------------------------------------ */
.sec-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(28px, 5vw, 52px);
}
.sec-head__en {
  font-family: var(--font-num);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.42em;
  color: var(--c-spark);
  text-transform: uppercase;
}
.sec-head__jp {
  font-family: var(--font-brush);
  font-size: clamp(30px, 6.4vw, 62px);
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-shadow: 0 0 34px rgba(255, 45, 14, 0.42);
}
.sec-head__jp em {
  font-style: normal;
  background: linear-gradient(96deg, var(--c-blaze), var(--c-spark) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------
   アクセシビリティ：モーション低減
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
