/* ============================================
   PERSONA 5 STYLE — MiNiでんでん
   ============================================ */

:root {
  --red: #e60000;
  --red-dark: #aa0000;
  --yellow: #ffd700;
  --white: #ffffff;
  --black: #000000;
  --dark: #080808;
  --dark-2: #0e0e0e;
  --gray: #1a1a1a;
  --muted: #888888;
  --line: rgba(255, 255, 255, 0.1);
  --font-display: "Bebas Neue", "Impact", sans-serif;
  --font-en: "Oswald", sans-serif;
  --font-jp: "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background: var(--dark);
  font-family: var(--font-jp);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Speed-line overlay */
.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.028;
  background-image: repeating-linear-gradient(
    -62deg,
    transparent 0px,
    transparent 4px,
    rgba(255, 255, 255, 1) 4px,
    rgba(255, 255, 255, 1) 5px
  );
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 76px);
  height: 62px;
  background: rgba(0, 0, 0, 0.96);
  border-bottom: 3px solid var(--red);
  backdrop-filter: blur(6px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--white);
}

.brand > span:last-child > span {
  margin-left: 4px;
  color: var(--red);
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 900;
}

.brand-mark {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--red);
  clip-path: polygon(12% 0%, 88% 0%, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0% 88%, 0% 12%);
}

.brand-mark i {
  display: block;
  width: 3px;
  border-radius: 0;
  background: var(--white);
}

.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 11px; }

nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav a {
  position: relative;
  padding: 4px 0;
  transition: color 120ms ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 150ms ease;
}

nav a:hover {
  color: var(--red);
}

nav a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 18px !important;
  background: var(--red);
  color: var(--white) !important;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 120ms ease;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  color: var(--yellow) !important;
  background: var(--red-dark);
}

.nav-cta span {
  margin-left: 6px;
  color: var(--yellow);
}

.nav-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-page-link {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid rgba(230, 0, 0, 0.45);
  color: var(--red);
  background: rgba(230, 0, 0, 0.06);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  transition: background 150ms, color 150ms;
  white-space: nowrap;
}

.nav-page-link:hover {
  background: rgba(230, 0, 0, 0.2);
  color: var(--white);
}

.nav-page-link--award {
  border-color: rgba(255, 215, 0, 0.45);
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.05);
}

.nav-page-link--award:hover {
  background: rgba(255, 215, 0, 0.18);
  color: var(--white);
}

.nav-page-link--map {
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.05);
}

.nav-page-link--map:hover {
  background: rgba(255, 215, 0, 0.18);
  color: var(--white);
}

.nav-page-link--ar {
  border-color: rgba(0, 204, 255, 0.4);
  color: #00ccff;
  background: rgba(0, 204, 255, 0.05);
}

.nav-page-link--ar:hover {
  background: rgba(0, 204, 255, 0.18);
  color: var(--white);
}

.nav-page-link--members {
  border-color: rgba(0, 204, 102, 0.45);
  color: #00cc66;
  background: rgba(0, 204, 102, 0.05);
}

.nav-page-link--members:hover {
  background: rgba(0, 204, 102, 0.18);
  color: var(--white);
}

.nav-page-link--diary {
  border-color: rgba(255, 215, 0, 0.45);
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.05);
}

.nav-page-link--diary:hover {
  background: rgba(255, 215, 0, 0.18);
  color: var(--white);
}

.live-clock {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 5px 12px;
  background: rgba(230, 0, 0, 0.08);
  min-width: 9ch;
  text-align: center;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  align-items: center;
  overflow: hidden;
  padding: 140px clamp(24px, 7vw, 108px) 80px;
  background: var(--black);
}

/* Speed lines */
.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: repeating-linear-gradient(
    -20deg,
    transparent 0px,
    transparent 38px,
    rgba(230, 0, 0, 0.04) 38px,
    rgba(230, 0, 0, 0.04) 39px
  );
  z-index: 0;
}

/* Red diagonal sash */
.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    -14deg,
    transparent 40%,
    rgba(230, 0, 0, 0.1) 40%,
    rgba(230, 0, 0, 0.1) 56%,
    transparent 56%
  );
  content: "";
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 3;
  padding-bottom: 4vh;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--white);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: var(--red);
  padding: 6px 18px 6px 12px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.eyebrow span {
  display: none;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(54px, 6.2vw, 96px);
  font-weight: 900;
  font-family: var(--font-jp);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-style: italic;
}

h1 em,
.team h2 em {
  color: var(--red);
  font-style: italic;
}

.hero-lead {
  max-width: 560px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.95;
  border-left: 4px solid var(--red);
  padding-left: 16px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  height: 54px;
  min-width: 190px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%);
  transition: background 120ms ease, transform 120ms ease;
  border: none;
}

.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-3px) scale(1.02);
}

.primary-button span {
  color: var(--yellow);
  font-size: 20px;
  font-weight: 900;
}

.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 60vw;
  height: 100%;
  z-index: 2;
}

.visual-frame {
  position: absolute;
  inset: 0;
}

.visual-frame::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--black) 0%, rgba(0,0,0,0.88) 28%, transparent 58%),
    linear-gradient(0deg, var(--black) 0%, transparent 30%);
  content: "";
}

.visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.75;
  filter: contrast(1.1) saturate(0.8);
}

/* Signal cards — P5 HUD */
.signal-card,
.analysis-tag {
  position: absolute;
  z-index: 4;
  border: 2px solid var(--red);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}

.signal-card {
  display: grid;
  width: 148px;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  padding: 12px 14px;
}

.signal-card span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.signal-card strong {
  font-size: 11px;
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
}

.signal-card i {
  display: block;
  width: 100%;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg width='90' height='8' viewBox='0 0 90 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 4h18l3-3 4 6 4-6 4 6 4-3h53' fill='none' stroke='%23e60000' stroke-width='1.5'/%3E%3C/svg%3E") center/cover;
}

.signal-card-a { top: 27%; right: 7%; }
.signal-card-b { top: 44%; left: 41%; }

.analysis-tag {
  right: 11%;
  bottom: 18%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: var(--white);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
}

.pulse {
  width: 7px;
  height: 7px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red), 0 0 18px rgba(230, 0, 0, 0.4);
  animation: pulse 1.4s infinite;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: clamp(24px, 4vw, 70px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transform: rotate(90deg);
  transform-origin: left center;
}

.scroll-cue i {
  display: block;
  width: 55px;
  height: 2px;
  background: var(--red);
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  padding: 130px clamp(24px, 7vw, 108px);
}

.section-heading h2,
.system-intro h2,
.team h2 {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 900;
  font-style: italic;
}

/* ===== CONCEPT ===== */
.concept {
  background: var(--dark);
  border-top: 4px solid var(--red);
}

.concept .section-heading {
  position: relative;
}

.concept .section-heading::before {
  content: "CONCEPT";
  position: absolute;
  top: -30px;
  left: -10px;
  font-family: var(--font-display);
  font-size: 130px;
  letter-spacing: -0.04em;
  color: rgba(230, 0, 0, 0.055);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.concept-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 10vw;
  align-items: end;
  margin-top: 75px;
  padding-left: 26%;
}

.concept-lead {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 2.15;
}

.concept-note {
  position: relative;
  padding: 26px 30px;
  border-left: 4px solid var(--red);
  background: rgba(230, 0, 0, 0.06);
}

.concept-note span {
  color: var(--red);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.concept-note p {
  margin: 10px 0 0;
  font-weight: 700;
  line-height: 1.8;
}

/* ===== EXPERIENCE ===== */
.experience {
  background: var(--black);
  border-top: 4px solid var(--red);
}

.centered {
  text-align: center;
}

.centered .eyebrow {
  margin: 0 auto 24px;
  clip-path: polygon(12px 0%, calc(100% - 12px) 0%, 100% 100%, 0% 100%);
}

.flow-grid {
  display: grid;
  max-width: 1380px;
  margin: 80px auto 0;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid rgba(255, 255, 255, 0.12);
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.flow-card {
  position: relative;
  min-height: 310px;
  padding: 34px;
  overflow: hidden;
  border-right: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--black);
  transition: background 180ms ease, transform 180ms ease;
}

.flow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 180ms ease;
}

.flow-card:hover::before {
  background: var(--red);
}

.flow-card:hover {
  z-index: 2;
  background: rgba(20, 0, 0, 0.8);
  transform: translateY(-4px);
}

.flow-card.accent {
  background: rgba(230, 0, 0, 0.07);
}

.flow-card.accent::before {
  background: var(--red);
}

.step-number {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 58px;
  line-height: 1;
  opacity: 0.3;
  margin-bottom: -6px;
}

.flow-icon {
  display: flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  margin: 16px 0 22px;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 700;
  clip-path: polygon(12% 0%, 88% 0%, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0% 88%, 0% 12%);
  background: rgba(230, 0, 0, 0.08);
}

.accent .flow-icon {
  border-color: var(--red);
  color: var(--white);
  background: var(--red);
}

.flow-card h3 {
  margin-bottom: 13px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.flow-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.9;
}

/* ===== SYSTEM ===== */
.system {
  overflow: hidden;
  background: var(--dark-2);
  border-top: 4px solid var(--red);
}

.system-intro {
  display: grid;
  grid-template-columns: 0.6fr 1.1fr 0.7fr;
  gap: 5vw;
  align-items: end;
}

.system-intro .eyebrow {
  align-self: start;
}

.system-intro > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 2;
  border-left: 3px solid rgba(230, 0, 0, 0.5);
  padding-left: 14px;
}

.system-diagram {
  display: flex;
  max-width: 1400px;
  align-items: center;
  justify-content: center;
  margin: 100px auto 70px;
}

.system-node {
  position: relative;
  display: flex;
  min-width: 210px;
  min-height: 155px;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: var(--black);
}

.system-node::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 22px;
  height: 22px;
  border-top: 3px solid var(--red);
  border-left: 3px solid var(--red);
}

.system-node::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-bottom: 3px solid var(--red);
  border-right: 3px solid var(--red);
}

.persona-node {
  border-color: var(--red);
  background: rgba(230, 0, 0, 0.07);
}

.persona-node::before,
.persona-node::after {
  border-color: var(--yellow);
}

.node-index {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.node-icon {
  color: var(--red);
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.persona-node .node-icon {
  color: var(--yellow);
}

.system-node small {
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-en);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.system-node h3 {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.connector {
  position: relative;
  width: 60px;
  flex: 0 0 60px;
  text-align: center;
}

.connector i {
  display: block;
  height: 2px;
  background: var(--red);
}

.connector i::after {
  position: absolute;
  top: -4px;
  right: 0;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  content: "";
  transform: rotate(45deg);
}

.connector span {
  position: absolute;
  top: 12px;
  left: 0;
  width: 100%;
  color: rgba(230, 0, 0, 0.65);
  font-family: var(--font-en);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.metrics {
  display: flex;
  max-width: 900px;
  justify-content: space-between;
  margin: 0 auto;
  padding-top: 45px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.metrics div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.metrics strong {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.metrics span {
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ===== TEAM ===== */
.team {
  background: var(--black);
  border-top: 4px solid var(--red);
}

.team-card {
  display: grid;
  max-width: 1220px;
  margin: 0 auto;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10vw;
  padding: 60px 70px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(20, 0, 0, 0.7), var(--black));
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: 'TEAM';
  position: absolute;
  bottom: -30px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 175px;
  color: rgba(230, 0, 0, 0.045);
  user-select: none;
  pointer-events: none;
  line-height: 1;
  letter-spacing: -0.04em;
}

.team-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
}

.team h2 {
  font-family: var(--font-display);
  font-size: clamp(60px, 7.5vw, 110px);
  line-height: 0.9;
  letter-spacing: 0.04em;
  font-style: italic;
  color: var(--white);
}

.team h2 em {
  display: block;
  font-family: var(--font-jp);
  font-size: 0.42em;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 0.08em;
  font-style: normal;
  margin-top: 10px;
}

.team-copy {
  align-self: end;
}

.team-copy p:first-child {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
}

.team-copy p:nth-child(2) {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 2;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tags span {
  padding: 6px 14px;
  border: 1px solid rgba(230, 0, 0, 0.45);
  color: var(--red);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(230, 0, 0, 0.06);
  clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
}

.member-heading {
  display: flex;
  max-width: 1220px;
  align-items: center;
  justify-content: space-between;
  margin: 85px auto 26px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.member-heading p {
  margin: 0;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.22em;
}

.member-heading span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}

.member-grid {
  display: grid;
  max-width: 1220px;
  margin: 0 auto;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.member-card {
  position: relative;
  display: flex;
  min-height: 445px;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--black);
  transition: background 180ms ease, transform 180ms ease;
}

.member-card::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  content: "";
  transition: background 180ms ease;
}

.member-card::after {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  background: rgba(230, 0, 0, 0.12);
  content: "";
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  transition: background 180ms ease;
}

.member-card:hover {
  z-index: 2;
  background: rgba(18, 0, 0, 0.95);
  transform: translateY(-5px);
}

.member-card:hover::before {
  background: var(--red);
}

.member-card:hover::after {
  background: var(--red);
}

.member-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.member-avatar {
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 2px solid rgba(230, 0, 0, 0.65);
  background: #0a0000;
  clip-path: polygon(12% 0%, 88% 0%, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0% 88%, 0% 12%);
}

.member-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05);
}

.member-card:nth-child(even) .member-avatar {
  border-color: rgba(255, 215, 0, 0.55);
}

.member-number {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  opacity: 0.28;
}

.member-role {
  margin-bottom: 5px;
  color: var(--red);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.member-card h3 {
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-style: italic;
}

.member-title {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
}

.member-bio {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.95;
}

.member-skill {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(230, 0, 0, 0.6);
  font-family: var(--font-en);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ===== ACTIVITY LOG ===== */
.activity {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(230, 0, 0, 0.12), transparent 45%),
    #050505;
}

.activity::before {
  position: absolute;
  top: -18vw;
  right: -10vw;
  width: 48vw;
  height: 48vw;
  border: 1px solid rgba(230, 0, 0, 0.14);
  content: "";
  transform: rotate(28deg);
}

.activity-heading {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 1220px;
  margin: 0 auto 64px;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  align-items: end;
}

.activity-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 118px);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: 0.01em;
}

.activity-heading h2 em {
  display: inline-block;
  margin-top: 17px;
  color: var(--red);
  font-style: normal;
  text-shadow: 5px 5px 0 rgba(255, 255, 255, 0.08);
  transform: skew(-7deg);
}

.activity-intro {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(230, 0, 0, 0.45);
}

.activity-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.activity-intro span {
  color: var(--red);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.activity-viewer {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 1220px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 230px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #020202;
  box-shadow: 18px 18px 0 rgba(150, 0, 12, 0.28);
  outline: none;
}

.activity-viewer:focus-visible {
  border-color: var(--red);
}

.activity-frame {
  position: relative;
  display: grid;
  min-height: 680px;
  place-items: center;
  padding: clamp(18px, 3vw, 42px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(230, 0, 0, 0.13), transparent 42%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 9px);
}

.activity-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
  transition: opacity 180ms ease, transform 250ms ease;
}

.activity-image-button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.activity-image-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 8px;
}

.activity-frame img.is-changing {
  opacity: 0;
  transform: scale(0.985);
}

.activity-stamp {
  position: absolute;
  top: 25px;
  left: -37px;
  z-index: 2;
  padding: 7px 50px;
  color: #050505;
  background: var(--red);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  transform: rotate(-42deg);
}

.activity-console {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(180, 0, 15, 0.28), transparent 35%),
    #080808;
}

.activity-meta {
  display: flex;
  flex-direction: column;
}

.activity-kicker,
.activity-count,
.activity-hint {
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.activity-kicker {
  color: var(--red);
}

.activity-meta strong {
  margin: 12px 0;
  font-size: 40px;
  letter-spacing: -0.06em;
}

.activity-count {
  color: rgba(255, 255, 255, 0.4);
}

.activity-count b {
  color: var(--ink);
  font-size: 18px;
}

.activity-controls {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.activity-arrow,
.activity-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
  background: transparent;
  font-family: var(--font-en);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.activity-arrow {
  width: 42px;
  height: 42px;
  font-size: 17px;
}

.activity-arrow:hover,
.activity-tabs button:hover,
.activity-tabs button.is-active {
  border-color: var(--red);
  color: #fff;
  background: rgba(230, 0, 0, 0.2);
}

.activity-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.activity-tabs button {
  width: 100%;
  height: 32px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.activity-hint {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.28);
  line-height: 1.7;
}

.activity-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  overflow: auto;
  padding: clamp(16px, 4vw, 42px);
}

.activity-lightbox.is-open {
  display: grid;
  place-items: center;
}

.activity-lightbox__backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

.activity-lightbox__figure {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(100%, 1160px);
  margin: auto;
  padding: 0;
}

.activity-lightbox__figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0 auto;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.72);
}

.activity-lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(8, 8, 8, 0.86);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.activity-lightbox__close:hover,
.activity-lightbox__close:focus-visible {
  border-color: var(--red);
  background: rgba(230, 0, 0, 0.28);
}

.activity-lightbox__figure figcaption {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}

body.activity-lightbox-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .activity-heading {
    grid-template-columns: 1fr;
    gap: 38px;
    margin-bottom: 42px;
  }

  .activity-heading h2 {
    font-size: clamp(58px, 20vw, 88px);
  }

  .activity-viewer {
    grid-template-columns: 1fr;
    box-shadow: 9px 9px 0 rgba(150, 0, 12, 0.28);
  }

  .activity-frame {
    min-height: 0;
    padding: 18px;
  }

  .activity-frame img {
    max-height: 72vh;
  }

  .activity-console {
    gap: 26px;
    padding: 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .activity-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .activity-kicker {
    grid-column: 1 / -1;
  }

  .activity-meta strong {
    margin-bottom: 0;
  }

  .activity-controls {
    grid-template-columns: 38px 1fr 38px;
  }

  .activity-arrow {
    width: 38px;
    height: 38px;
  }

  .activity-tabs {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .activity-hint {
    display: none;
  }
}

/* ===== PAGES NAV ===== */
.pages-nav {
  background: var(--black);
  border-top: 4px solid var(--red);
}

.pages-nav-heading {
  margin-bottom: 56px;
}

.pages-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.pages-nav-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 40px;
  background: var(--dark);
  border: 2px solid rgba(255,255,255,0.1);
  text-decoration: none;
  color: var(--white);
  overflow: hidden;
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.pages-nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.pages-nav-card:hover {
  background: rgba(18, 0, 0, 0.9);
  border-color: rgba(230, 0, 0, 0.4);
  transform: translateY(-4px);
}

.pages-nav-card:hover::before {
  transform: scaleX(1);
}

.pages-nav-num {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  color: var(--red);
  opacity: 0.2;
  margin-bottom: -8px;
}

.pages-nav-icon {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin: 14px 0 22px;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: var(--font-en);
  font-size: 20px;
  clip-path: polygon(12% 0%,88% 0%,100% 12%,100% 88%,88% 100%,12% 100%,0% 88%,0% 12%);
  background: rgba(230,0,0,0.08);
  flex-shrink: 0;
}

.pages-nav-body {
  flex: 1;
}

.pages-nav-label {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.pages-nav-card h3 {
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.pages-nav-card p {
  font-size: 13px;
  line-height: 1.95;
  color: rgba(255,255,255,0.55);
  margin: 0;
}

.pages-nav-arrow {
  position: absolute;
  bottom: 28px;
  right: 32px;
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  opacity: 0.5;
  transition: opacity 200ms ease, transform 200ms ease;
}

.pages-nav-card:hover .pages-nav-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.pages-nav-card--members .pages-nav-num {
  color: #00cc66;
}

.pages-nav-card--members .pages-nav-icon {
  border-color: #00cc66;
  color: #00cc66;
  background: rgba(0, 204, 102, 0.07);
}

.pages-nav-card--members .pages-nav-label {
  color: #00cc66;
}

.pages-nav-card--members .pages-nav-arrow {
  color: #00cc66;
}

.pages-nav-card--members::before {
  background: #00cc66;
}

.pages-nav-card--members:hover {
  border-color: rgba(0, 204, 102, 0.35);
  background: rgba(0, 18, 8, 0.9);
}

.pages-nav-card--protopedia .pages-nav-num {
  color: #ff7a00;
}

.pages-nav-card--protopedia .pages-nav-icon {
  border-color: #ff7a00;
  color: #ff7a00;
  background: rgba(255, 122, 0, 0.08);
}

.pages-nav-card--protopedia .pages-nav-label {
  color: #ff7a00;
}

.pages-nav-card--protopedia .pages-nav-arrow {
  color: #ff7a00;
}

.pages-nav-card--protopedia::before {
  background: #ff7a00;
}

.pages-nav-card--protopedia:hover {
  border-color: rgba(255, 122, 0, 0.35);
  background: rgba(18, 6, 0, 0.9);
}

.pages-nav-card--youtube .pages-nav-num {
  color: #ff2d2d;
}

.pages-nav-card--youtube .pages-nav-icon {
  border-color: #ff2d2d;
  color: #ff2d2d;
  background: rgba(255, 45, 45, 0.08);
}

.pages-nav-card--youtube .pages-nav-label {
  color: #ff2d2d;
}

.pages-nav-card--youtube .pages-nav-arrow {
  color: #ff2d2d;
}

.pages-nav-card--youtube::before {
  background: #ff2d2d;
}

.pages-nav-card--youtube:hover {
  border-color: rgba(255, 45, 45, 0.35);
  background: rgba(24, 4, 4, 0.9);
}

.pages-nav-card--yasai .pages-nav-num {
  color: #ff4f7a;
}

.pages-nav-card--yasai .pages-nav-icon {
  border-color: #ff4f7a;
  color: #ff4f7a;
  background: rgba(255, 79, 122, 0.08);
}

.pages-nav-card--yasai .pages-nav-label {
  color: #ff4f7a;
}

.pages-nav-card--yasai .pages-nav-arrow {
  color: #ff4f7a;
}

.pages-nav-card--yasai::before {
  background: #ff4f7a;
}

.pages-nav-card--yasai:hover {
  border-color: rgba(255, 79, 122, 0.35);
  background: rgba(24, 4, 10, 0.9);
}

.pages-nav-card--diary::before {
  background: var(--yellow);
}

.pages-nav-card--diary:hover {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(28, 23, 2, 0.9);
}

@media (max-width: 1200px) {
  .pages-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pages-nav-grid {
    grid-template-columns: 1fr;
  }

  .pages-nav-card {
    padding: 32px 28px;
  }
}

/* ===== FOOTER ===== */
footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 40px clamp(24px, 5vw, 76px);
  border-top: 3px solid var(--red);
  background: var(--black);
}

footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

footer small {
  color: rgba(255, 255, 255, 0.22);
  font-family: var(--font-en);
  font-size: 9px;
}

.footer-right {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.footer-map-link {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-map-link:hover {
  color: var(--red);
}

/* ===== MUSIC PLAYER ===== */
.music-player {
  position: fixed;
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(18px, 3vw, 36px);
  z-index: 200;
  display: grid;
  width: min(440px, calc(100vw - 36px));
  grid-template-columns: 48px minmax(0, 1fr) auto 68px;
  align-items: center;
  gap: 13px;
  padding: 12px 15px 12px 12px;
  border: 2px solid var(--red);
  border-left: 6px solid var(--red);
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(12px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.music-toggle,
.music-volume-toggle {
  border: 0;
  color: var(--red);
  background: transparent;
  cursor: pointer;
}

.music-toggle {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--red);
  background: rgba(230, 0, 0, 0.1);
  clip-path: polygon(12% 0%, 88% 0%, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0% 88%, 0% 12%);
  transition: background 120ms ease;
}

.music-toggle:hover {
  background: rgba(230, 0, 0, 0.28);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.music-player.is-playing .play-icon {
  width: 10px;
  height: 12px;
  margin-left: 0;
  border: 0;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.music-info {
  min-width: 0;
}

.music-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
}

.music-label,
.music-time,
.music-volume-toggle {
  font-family: var(--font-en);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.music-label {
  color: var(--red);
}

.music-time {
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 0.06em;
}

.music-info strong {
  display: block;
  overflow: hidden;
  margin-bottom: 7px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--white);
}

.music-progress,
.music-volume {
  height: 3px;
  margin: 0;
  accent-color: var(--red);
  cursor: pointer;
}

.music-progress {
  display: block;
  width: 100%;
}

.music-volume-toggle {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.38);
}

.music-volume-toggle.is-muted {
  color: rgba(255, 255, 255, 0.18);
  text-decoration: line-through;
}

.music-volume {
  width: 68px;
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    width: 72vw;
    opacity: 0.5;
  }

  .hero-copy {
    max-width: 620px;
  }

  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-intro {
    grid-template-columns: 1fr 1fr;
  }

  .system-intro .eyebrow {
    grid-column: 1 / -1;
  }

  .system-diagram {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    gap: 18px 0;
  }

  .system-node {
    min-width: 0;
  }

  .connector {
    width: 40px;
    flex-basis: 40px;
  }

  .member-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 20px;
  }

  nav a:not(.nav-cta) {
    display: none;
  }

  .nav-pages {
    display: none;
  }

  .hero {
    min-height: 820px;
    padding: 125px 22px 70px;
    align-items: end;
  }

  .hero-visual {
    top: 30px;
    width: 100%;
    height: 62%;
    opacity: 0.45;
  }

  .visual-frame::after {
    background: linear-gradient(0deg, var(--black) 4%, transparent 55%);
  }

  .hero-copy {
    padding-bottom: 0;
  }

  h1 {
    font-size: clamp(48px, 14vw, 70px);
  }

  .hero-lead {
    font-size: 13px;
  }

  .signal-card {
    display: none;
  }

  .analysis-tag {
    right: 20px;
    bottom: 41%;
  }

  .scroll-cue {
    display: none;
  }

  .section {
    padding: 90px 22px;
  }

  .section-heading h2,
  .system-intro h2 {
    font-size: 36px;
  }

  .concept-grid {
    grid-template-columns: 1fr;
    gap: 35px;
    margin-top: 45px;
    padding-left: 0;
  }

  .flow-grid {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .flow-card {
    min-height: 260px;
  }

  .system-intro {
    grid-template-columns: 1fr;
  }

  .system-intro .eyebrow {
    grid-column: auto;
  }

  .system-diagram {
    display: flex;
    flex-direction: column;
    margin-top: 60px;
  }

  .system-node {
    width: 100%;
  }

  .connector {
    width: 2px;
    height: 44px;
    flex-basis: 44px;
    align-self: center;
    margin: 0 auto;
  }

  .connector i {
    width: 2px;
    height: 44px;
    background: var(--red);
  }

  .connector i::after {
    top: auto;
    right: -4px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .connector span {
    top: 15px;
    left: 12px;
    width: auto;
  }

  .metrics {
    gap: 25px;
    flex-wrap: wrap;
  }

  .metrics div {
    display: block;
  }

  .metrics strong,
  .metrics span {
    display: block;
  }

  .metrics strong {
    font-size: 42px;
  }

  .team-card {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 36px 24px;
  }

  .member-heading {
    align-items: flex-start;
    margin-top: 60px;
  }

  .member-heading span {
    display: none;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .member-card {
    min-height: 380px;
  }

  footer {
    grid-template-columns: 1fr auto;
  }

  footer p {
    display: none;
  }

  .music-player {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 13px 10px 10px;
  }

  .music-toggle {
    width: 44px;
    height: 44px;
  }

  .music-volume {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pulse {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
