@charset "UTF-8";

/* ============================================
   共通スタイル（リセット・基本・ナビ・フッター）
   ============================================ */

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray: #9a9a9a;
  --gray-dark: #6f6f6f;
  --gray-light: #e8e8e8;
  --gray-line: #2c2c2c;
  --gray-text: #c9c9c9;
  --font-en: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* ローディング画面の総時間（各ページの登場アニメーションはこれを基準に遅延させる） */
  --loader-duration: 3.4s;
  --neon-cyan: #29d8ff;
  --neon-magenta: #ff2f6d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-jp);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

::selection {
  background: var(--black);
  color: var(--white);
}

a {
  color: inherit;
}

a:hover {
  opacity: .5;
}

/* ---------- 共通アニメーション ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* スクロールで表示される要素（js/common.js が is-visible を付与） */
[data-reveal] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- ローディング画面 ---------- */
/* CRT風のグリッチ演出を表示し、CSSアニメーションのみで自動的に消える */

/* 終盤に信号が乱れたあと、ブラウン管の電源オフのように縦に潰れて消える */
@keyframes loaderHide {
  0%, 87% { opacity: 1; transform: none; visibility: visible; animation-timing-function: steps(1, end); }
  89%     { transform: translateX(5px) skewX(1.5deg); animation-timing-function: steps(1, end); }
  91%     { transform: translateX(-4px) skewX(-1.5deg); animation-timing-function: steps(1, end); }
  93.5%   { transform: none; animation-timing-function: cubic-bezier(.8, 0, .9, 1); }
  96.5%   { transform: scaleY(.006); opacity: 1; animation-timing-function: linear; }
  99.9%   { transform: scaleY(.006); opacity: 0; visibility: visible; }
  100%    { transform: scaleY(.006); opacity: 0; visibility: hidden; }
}

/* 文字が左から走査されるように現れる */
@keyframes loaderReveal {
  from { clip-path: inset(-20% 105% -20% -5%); }
  to   { clip-path: inset(-20% -5% -20% -5%); }
}

/* ネオン管が点灯するようなチカつき（グリッチバーストと同じタイミングで少し暗くなる） */
@keyframes loaderFlicker {
  0%, 1.5% { opacity: 0; }
  2%       { opacity: 1; }
  3.5%     { opacity: .3; }
  5%       { opacity: 1; }
  6.5%     { opacity: .55; }
  8%, 29%  { opacity: 1; }
  30%      { opacity: .55; }
  31.5%, 77% { opacity: 1; }
  78%      { opacity: .6; }
  79.5%, 100% { opacity: 1; }
}

/* 本体の位置ズレグリッチ（2回のバースト） */
@keyframes loaderJitter {
  0%, 28%, 34%, 77%, 82%, 100% { transform: none; }
  29% { transform: translate(-3px, 1px) skewX(-2deg); }
  31% { transform: translate(2px, -1px) skewX(1.5deg); }
  33% { transform: translate(-1px, 0); }
  78% { transform: translate(2px, -1px) skewX(-1.5deg); }
  80% { transform: translate(-2px, 1px); }
}

/* シアン層：常時わずかに左へズレ、グリッチ時に横スライスが走る */
@keyframes loaderSliceA {
  0%, 28%, 34.5%, 77%, 82.5%, 100% { clip-path: inset(0); transform: translate(-1.5px, 0); }
  29% { clip-path: inset(8% 0 62% 0); transform: translate(-7px, 1px); }
  31% { clip-path: inset(44% 0 28% 0); transform: translate(5px, -1px); }
  33% { clip-path: inset(72% 0 4% 0); transform: translate(-4px, 0); }
  78% { clip-path: inset(14% 0 58% 0); transform: translate(-6px, 1px); }
  80% { clip-path: inset(52% 0 22% 0); transform: translate(4px, 0); }
}

/* マゼンタ層：常時わずかに右へズレ、シアン層と逆方向にスライスが走る */
@keyframes loaderSliceB {
  0%, 28%, 34.5%, 77%, 82.5%, 100% { clip-path: inset(0); transform: translate(1.5px, 0); }
  29% { clip-path: inset(56% 0 14% 0); transform: translate(6px, -1px); }
  31% { clip-path: inset(10% 0 68% 0); transform: translate(-5px, 1px); }
  33% { clip-path: inset(36% 0 40% 0); transform: translate(4px, 0); }
  78% { clip-path: inset(62% 0 10% 0); transform: translate(5px, -1px); }
  80% { clip-path: inset(20% 0 56% 0); transform: translate(-4px, 0); }
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #050505;
  padding: 0 4vw;
  overflow: hidden;
  pointer-events: none;
  animation: loaderHide var(--loader-duration) linear forwards;
}

/* CRT風の走査線（画面全体にうっすら重ねる） */
.loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px);
}

.loader__text {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(19px, 4.6vw, 56px);
  /* 行末の句読点の空き（約.5em）＋字間（.14em）で重心が左に見えるため、その半分ぶん右へ寄せる */
  margin-left: .64em;
  letter-spacing: .14em;
  line-height: 1;
  white-space: nowrap;
  color: #f2f6ff;
  filter: drop-shadow(0 0 10px rgba(140, 170, 255, .3));
  animation:
    loaderReveal .5s steps(8, end) .1s backwards,
    loaderFlicker var(--loader-duration) steps(1, end) both,
    loaderJitter var(--loader-duration) steps(1, end) both;
}

/* 行単位でグリッチ層を重ねる（スマホでは行ごとに折り返すため） */
.loader__line {
  position: relative;
  display: inline-block;
}

.loader__line::before,
.loader__line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

.loader__line::before {
  color: var(--neon-cyan);
  animation: loaderSliceA var(--loader-duration) steps(1, end) both;
}

.loader__line::after {
  color: var(--neon-magenta);
  animation: loaderSliceB var(--loader-duration) steps(1, end) both;
}

.loader__progress {
  margin-top: 38px;
  font-family: var(--font-en);
  font-weight: 800;
  font-style: italic;
  font-size: 15px;
  letter-spacing: .3em;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 248, 255, .85);
  text-shadow: 1px 0 var(--neon-magenta), -1px 0 var(--neon-cyan);
  animation: loaderFlicker var(--loader-duration) steps(1, end) both;
}

/* スマホでは2行に折り返して文字を大きく表示する */
@media (max-width: 600px) {
  .loader__text {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.55;
    text-align: center;
  }

  .loader__line {
    display: block;
  }

  .loader__progress {
    margin-top: 26px;
  }
}

/* ---------- グローバルナビ ---------- */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 4vw;
  mix-blend-mode: difference;
  color: #fff;
  animation: riseIn .8s ease calc(var(--loader-duration) - .2s) backwards;
}

.global-nav__logo {
  display: block;
}

.global-nav__logo-img {
  display: block;
  height: 22px;
  width: auto;
  /* ロゴ画像を白に変換し、ナビの difference 合成（背景色に応じた反転）を効かせる */
  filter: brightness(0) invert(1);
}

.global-nav__menu {
  display: flex;
  align-items: center;
  gap: 34px;
}

.global-nav__link {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity .3s;
}

.global-nav__cta {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  background: #fff;
  color: #000;
  border-radius: 999px;
  padding: 12px 24px;
  transition: opacity .3s;
}

/* ---------- セクション見出しラベル ---------- */
.section-label {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 40px;
}

.section-label--dark {
  color: var(--gray-dark);
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--black);
  color: var(--gray-dark);
  padding: 48px 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--gray-line);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
}

.site-footer__logo {
  color: #fff;
  font-weight: 900;
  font-style: italic;
  font-size: 18px;
  letter-spacing: .02em;
}

/* ---------- アクセシビリティ ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  /* アニメーション無効時はローダーが消えなくなるため表示しない */
  .loader {
    display: none;
  }
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .global-nav {
    padding: 16px 5vw;
  }

  .global-nav__menu {
    gap: 16px;
  }

  .global-nav__logo-img {
    height: 17px;
  }

  .global-nav__link,
  .global-nav__cta {
    font-size: 11px;
    letter-spacing: .08em;
  }

  .global-nav__cta {
    padding: 9px 16px;
  }

  .site-footer {
    padding-left: 6vw;
    padding-right: 6vw;
  }
}

@media (max-width: 480px) {
  .global-nav__link {
    display: none;
  }
}
