/* ===== FONTS ===== */
@font-face {
  font-family: 'Stampede';
  src: url('assets/fonts/Stampede.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: '215000E';
  src: url('assets/fonts/215000E.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'ZarameGothic';
  src: url('assets/fonts/zarame-gothic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body {
  background: #000;
}

/* スプラッシュ中: 画面全体（アドレスバー裏含む）を黄色に */
body.splash-active {
  background: #f9be00;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  width: 100%;
}

/* ===== SPLASH SCREEN ===== */
.splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f9be00;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash__kid {
  width: 20vw;
  max-width: 120px;
  animation: spin-kid 3.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.splash__blackout {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  opacity: 0;
  z-index: 10000;
  transition: opacity 0.6s ease;
}

.splash__blackout--active {
  opacity: 1;
}

@keyframes spin-kid {
  0% {
    transform: rotate(0deg) scale(0.3);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: rotate(120deg) scale(0.8);
  }
  60% {
    transform: rotate(1080deg) scale(0.8);
    opacity: 1;
  }
  72% {
    transform: rotate(1080deg) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: rotate(1080deg) scale(50);
    opacity: 1;
  }
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #000;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 10px 10px rgba(0, 0, 0, 0.8);
}

.header__logo {
  font-family: 'Stampede', sans-serif;
  color: #f9be00;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: 0px;
}

.header__nav {
  display: flex;
  gap: 15px;
  list-style: none;
}

.header__nav a {
  font-family: '215000E', sans-serif;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0px;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.header__nav a:hover {
  opacity: 1;
}

/* ===== CONTENT OFFSET FOR FIXED HEADER ===== */
.main {
  padding-top: 48px;
}

/* ===== BG LAYERS ===== */
.bg-layer {
  position: relative;
  width: 100%;
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
}

#bg2 {
  /* margin-top: -175px; */
  margin-top: -30vw;
  position: relative;
  z-index: 2;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  position: absolute;
  left: 0;
  width: 100%;
  scroll-margin-top: 120px;
}

/* ===== SECTION POSITIONS (上下はここで調整) ===== */
#about {
  top: 30.5%;
}

#thought {
  top: 51.8%;
}

#sec-fragments {
  top: 8.5%;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: 'Stampede', sans-serif;
  z-index: 5;
  pointer-events: none;
  display: inline-block;
}

/* bg1上 */
.section-title--about {
  margin-left: 3%;
  font-size: 19vw;
  color: #f9be00;
  transform: rotate(-20deg);
  z-index: 1;
}

.section-title--thought {
  margin-right: 0%;
  font-size: 19vw;
  color: #fff;
  transform: rotate(-20deg);
}

#thought {
  text-align: right;
}

/* bg2上 */
.section-title--fragments {
  margin-left: 2%;
  font-size: 16vw;
  color: #f9be00;
  transform: rotate(-20deg);
}

/* ===== FRAGMENTS STICKERS (bg2上) ===== */
.fragments-sticker {
  position: absolute;
  pointer-events: none;
}

.fragments-sticker--loupe {
  width: 40%;
  right: -5%;
  top: -160%;
  transform: rotate(-60deg);
  animation: pulse 6s ease-in-out infinite;
}

/* ===== SECTION TEXT (about / thought 本文) ===== */
.section-text {
  position: absolute;
  left: 0;
  width: 100%;
  padding: 0 6%;
  z-index: 10;
}

.section-text__ja {
  font-family: 'ZarameGothic', sans-serif;
  font-size: 3vw;
  line-height: 1.9;
  margin-bottom: 20px;
}

.section-text__en {
  font-family: 'ZarameGothic', sans-serif;
  font-size: 2.8vw;
  line-height: 1.2;
}

/* About Text */
#about-text {
  top: 35%;
  transform: skewY(-26deg);
}

#about-text .section-text__ja,
#about-text .section-text__en {
  color: #f9be00;
}

/* Thought Text */
#thought-text {
  top: 61%;
}

#thought-text .section-text__ja,
#thought-text .section-text__en {
  color: #fff;
}

/* ===== ABOUT STICKERS (bg1上) ===== */
.about-sticker {
  position: absolute;
  pointer-events: none;
}

.about-sticker--man {
  width: 85%;
  left: -8%;
  top: -370%;
  animation: sway 5s ease-in-out infinite;
}

.about-sticker--arrow {
  width: 20%;
  right: 18%;
  top: -250%;
  animation: arrow-triangle 8s ease-in-out infinite;
}

.about-sticker--question {
  width: 13%;
  right: 42.5%;
  top: -48%;
  transform: rotate(-28deg);
  z-index: 1;
}

.about-sticker--megaphone {
  width: 43%;
  right: 0%;
  top: -185%;
  z-index: 1;
  animation: rattle 0.8s steps(2, jump-none) infinite;
}

/* ===== THOUGHT STICKERS (bg1上) ===== */
.thought-sticker {
  position: absolute;
  pointer-events: none;
}

.thought-sticker--brain {
  width: 50%;
  left: -5%;
  top: 32%;
  transform: rotate(-10deg);
  animation: float 4s ease-in-out infinite;
}

/* ===== ANIMATIONS ===== */

/* カタカタ (megaphone) - アナログな振動 */
@keyframes rattle {
  0%    { transform: rotate(-12deg) translate(0, 0); }
  8%    { transform: rotate(-10deg) translate(1.5px, -1px); }
  16%   { transform: rotate(-13.5deg) translate(-1px, 0.5px); }
  24%   { transform: rotate(-11deg) translate(0.5px, -1.5px); }
  32%   { transform: rotate(-14deg) translate(-1.5px, 1px); }
  40%   { transform: rotate(-10.5deg) translate(1px, 0); }
  48%   { transform: rotate(-13deg) translate(-0.5px, -1px); }
  56%   { transform: rotate(-11.5deg) translate(1.5px, 0.5px); }
  64%   { transform: rotate(-14.5deg) translate(-1px, -0.5px); }
  72%   { transform: rotate(-10deg) translate(0, 1px); }
  80%   { transform: rotate(-13deg) translate(1px, -1.5px); }
  88%   { transform: rotate(-11deg) translate(-1.5px, 0); }
  100%  { transform: rotate(-12.5deg) translate(0.5px, -0.5px); }
}

/* ふわふわ (brain) */
@keyframes float {
  0%, 100% { transform: rotate(-10deg) translateY(0); }
  50%      { transform: rotate(-10deg) translateY(-12px); }
}

/* ふわふわ・シンプル (frag stickers) */
@keyframes float-simple {
  0%, 100% { transform: translateY(15); }
  50%      { transform: translateY(-15px); }
}

/* 左右にゆらゆら (man) */
@keyframes sway {
  0%, 100% { transform: translateX(-20px); }
  50%      { transform: translateX(50px); }
}

/* 三角にぐるぐる (arrow) */
@keyframes arrow-triangle {
  0%      { transform: translate(0, 0) rotate(0deg); }
  40%      { transform: translate(14vw, -28vw) rotate(2deg); }
  50%      { transform: translate(14vw, -28vw) rotate(2deg); }
  52%      { transform: translate(-3px, 6px) rotate(-3deg); }
  54%    { transform: translate(0, 0) rotate(0deg); }
  100%    { transform: translate(0, 0) rotate(0deg); }
}

/* 膨らんだり縮んだり (loupe) */
@keyframes pulse {
  0%, 100% { transform: rotate(-60deg) scale(1); }
  80%      { transform: rotate(-60deg) scale(1.2); }
}

/* ===== FRAGMENT ITEMS (bg2上の4カテゴリ) ===== */
.frag-item {
  position: absolute;
  display: block;
  left: 0;
  width: 100%;
  z-index: 5;
  text-decoration: none;
}

.frag-item.inactive {
  pointer-events: none;
}

.frag-item__sticker,
.frag-item__text {
  position: absolute;
}

/* --- Cross (デフォルト非表示 / .inactive で表示) --- */
.frag-item__cross {
  position: absolute;
  display: none;
  z-index: 10;
}

.frag-item.inactive .frag-item__cross {
  display: block;
}

/* cross位置: textと同じ位置に重ねる（個別調整可） */
.frag-music__cross {
  width: 45%;
  right: 5%;
  top: -5%;
}

.frag-writing__cross {
  width: 45%;
  left: 2%;
  top: -20%;
}

.frag-visuals__cross {
  width: 45%;
  right: 3%;
  top: -20%;
}

.frag-projects__cross {
  width: 45%;
  left: 5%;
  top: -25%;
}

/* --- Music (上下: top / 左右: left,right) --- */
#frag-music {
  top: 18%;
  height: 18%;
}

.frag-music__sticker {
  width: 45%;
  left: 3%;
  top: 0;
  animation: float-simple 3.5s ease-in-out infinite;
}

.frag-music__text {
  width: 50%;
  right: 3%;
  top: 30%;
}

/* --- Writing (上下: top / 左右: left,right) --- */
#frag-writing {
  top: 38%;
  height: 15%;
}

.frag-writing__text {
  width: 50%;
  left: 3%;
  top: 12%;
}

.frag-writing__sticker {
  width: 52%;
  right: 1%;
  top: -20%;
  animation: float-simple 6s ease-in-out infinite;
}

/* --- Visuals (上下: top / 左右: left,right) --- */
#frag-visuals {
  top: 55%;
  height: 18%;
}

.frag-visuals__sticker {
  width: 52%;
  left: 1%;
  top: -35%;
  animation: float-simple 4.5s ease-in-out infinite;
}

.frag-visuals__text {
  width: 50%;
  right: 5%;
  top: 10%;
}

/* --- Projects (上下: top / 左右: left,right) --- */
#frag-projects {
  top: 75%;
  height: 18%;
}

.frag-projects__text {
  width: 54%;
  left: 3%;
  top: 8%;
  z-index: 2;
}

.frag-projects__sticker {
  width: 65%;
  right: 0%;
  top: -28%;
  z-index: 1;
  animation: float-simple 3s ease-in-out infinite;
}

/* ===== FOOTER ===== */
.footer {
  background: #000;
  padding-top: 10vw;    /* 上の余白 */
  padding-bottom: 20vw; /* 下の余白 */
  text-align: center;
  position: relative;
  z-index: 3;
}

.footer__img {
  width: 60%;
  display: block;
  margin: 0 auto;
}
