/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
button { background: none; border: none; cursor: pointer; }

/* ── Design tokens ── */
:root {
  --bg-base:    #08080f;
  --bg-p1:      #060510;
  --bg-p2:      #04060e;
  --bg-team:    #050509;

  --gold:       rgba(201, 169, 110, 0.9);
  --gold-ear:   rgba(201, 141, 60, 0.6);
  --gold-glow:  rgba(190, 130, 45, 0.1);
  --blue:       rgba(123, 157, 224, 0.9);
  --blue-dim:   rgba(123, 157, 224, 0.6);
  --blue-ear:   rgba(75, 115, 210, 0.6);
  --blue-glow:  rgba(55, 85, 195, 0.11);

  --font-stack: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

body {
  background: var(--bg-base);
  color: #fff;
  font-family: var(--font-stack);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── Scroll container ── */
.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.section {
  height: 100vh;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section backgrounds */
.hero    { background: var(--bg-base); }
.project1 { background: var(--bg-p1); }
.project2 { background: var(--bg-p2); }
.team    { background: var(--bg-team); }

/* ── Nav dots ── */
.nav-dots {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s;
  padding: 8px;
  margin: -8px;
}

.dot.active {
  background: #fff;
  border-color: #fff;
}

/* ── Logo ── */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Row that holds the characters — align to bottom so jump works */
.logo-wordmark {
  display: inline-flex;
  align-items: flex-end;
}

.logo-chars { letter-spacing: 10px; font-weight: 200; }

/* Jumping character wrapper */
.logo-jump {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px; /* the jump */
}

/* Cat ears — width:1em centers over the character regardless of letter-spacing */
.logo-ears {
  width: 1em;
  display: flex;
  justify-content: center;
  gap: 0.22em;
  margin-bottom: 0.1em;
}

.logo-ear {
  width: 0;
  height: 0;
  border-left: 0.17em solid transparent;
  border-right: 0.17em solid transparent;
  border-bottom: 0.3em solid rgba(255, 255, 255, 0.52);
}

.logo-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.logo-sub {
  font-size: 8px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.22);
  text-transform: uppercase;
}

/* Sub "CAT" jumps too, with slightly wider ears */
.logo-sub-row {
  display: inline-flex;
  align-items: flex-end;
}

.logo-sub-jump {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3px;
}

.logo-sub-ears {
  width: 1em;
  display: flex;
  justify-content: center;
  gap: 0.22em;
  margin-bottom: 0.1em;
}

.logo-sub-ear {
  width: 0;
  height: 0;
  border-left: 0.25em solid transparent;
  border-right: 0.25em solid transparent;
  border-bottom: 0.35em solid rgba(255, 255, 255, 0.35);
}

/* Size variants */
.logo--hero .logo-chars { font-size: 32px; }
.logo--hero .logo-jump  { margin-bottom: 10px; }
.logo--hero .logo-sub   { font-size: 9px; letter-spacing: 5px; }

.logo--footer .logo-chars { font-size: 16px; letter-spacing: 6px; }
.logo--footer .logo-jump  { margin-bottom: 5px; }
.logo--footer .logo-sub   { font-size: 7px; letter-spacing: 3px; }
.logo--footer .logo-sub-jump { margin-bottom: 2px; }

/* ── Hero ── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(110, 70, 170, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero {
  flex-direction: column;
  text-align: center;
  gap: 0;
}

/* Jumping char — general pattern used in all section titles */
.cj {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.cj .ears {
  width: 1em;
  display: flex;
  justify-content: center;
  gap: 0.22em;
  margin-bottom: 0.1em;
}
.cj .ear {
  width: 0; height: 0;
  border-left: 0.17em solid transparent;
  border-right: 0.17em solid transparent;
  border-bottom: 0.3em solid rgba(255, 255, 255, 0.52);
}

/* Hero tagline */
.hero-tagline {
  display: inline-flex;
  align-items: flex-end;
  margin-top: 52px;
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 100;
  letter-spacing: 5px;
  line-height: 1.3;
}
.cj--hero { margin-bottom: 10px; }

/* Decorative rule */
.hero-rule {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  margin: 32px auto;
}

/* Sub-tagline */
.hero-sub {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18));
}
.hero-scroll-text {
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
}

/* ── Project sections shared layout ── */
.project-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 72px;
  align-items: center;
  max-width: 900px;
  width: 88%;
  margin: 0 auto;
}

.project1 .project-inner { grid-template-columns: 5fr 6fr; }
.project2 .project-inner { grid-template-columns: 6fr 5fr; }

/* Art placeholder */
.project-art {
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.project-art--p1 {
  aspect-ratio: 9 / 16;
  max-height: 360px;
  background: linear-gradient(155deg, rgba(201,141,60,0.12) 0%, rgba(110,55,155,0.15) 55%, rgba(15,8,30,0.5) 100%);
  border: 1px solid rgba(201, 141, 60, 0.12);
  box-shadow: 0 0 80px rgba(170,110,35,0.07), inset 0 0 40px rgba(0,0,0,0.3);
}

.art-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.art-placeholder-icon { font-size: 28px; opacity: 0.1; }
.art-placeholder-text {
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.1);
  text-transform: uppercase;
}

/* Project 1 atmosphere */
.project1::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(190,130,45,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 25%, rgba(110,55,165,0.12) 0%, transparent 45%);
  pointer-events: none;
}
.project1::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(201,141,60,0.15) 50%, transparent 95%);
}

/* Project title row */
.title-row {
  display: inline-flex;
  align-items: flex-end;
}

.project-name-chars {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 200;
  letter-spacing: 5px;
}

/* Project 1 title color */
.project1 .project-name-chars { color: var(--gold); }
.project1 .cj--p1 { margin-bottom: 10px; }
.ear--p1 { border-bottom-color: var(--gold-ear); }

/* Eyebrow */
.project-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
}
.project-eyebrow--p1 { color: var(--gold); }
.eyebrow-line {
  height: 1px;
  width: 28px;
}
.eyebrow-line--p1 { background: rgba(201, 169, 110, 0.35); }

/* Subtitle */
.project-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  letter-spacing: 2px;
  margin-bottom: 28px;
  margin-top: 14px;
}

/* Tags */
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 30px; }
.tag {
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 4px 11px;
  border-radius: 1px;
  text-transform: uppercase;
  font-weight: 300;
}
.tag--p1 { border: 1px solid rgba(201,141,60,0.2); color: rgba(201,169,110,0.6); }

/* Body text */
.project-body {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  line-height: 1.9;
  font-weight: 300;
  max-width: 360px;
}
.project-body--second { margin-top: 1em; }

/* ── Project 2 ── */
.project-art--p2 {
  aspect-ratio: 4 / 3;
  max-height: 280px;
  background: linear-gradient(155deg, rgba(55,85,195,0.12) 0%, rgba(35,115,85,0.1) 55%, rgba(5,12,28,0.5) 100%);
  border: 1px solid rgba(75, 115, 210, 0.12);
  box-shadow: 0 0 80px rgba(55,100,200,0.07), inset 0 0 40px rgba(0,0,0,0.3);
}

.project2::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, var(--blue-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 65%, rgba(35,115,85,0.08) 0%, transparent 45%);
  pointer-events: none;
}
.project2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(75,115,210,0.15) 50%, transparent 95%);
}

.project-eyebrow--p2 { color: var(--blue); }
.eyebrow-line--p2 { background: rgba(123, 157, 224, 0.35); }
.project2 .project-name-chars { color: var(--blue); }
.cj--p2 { margin-bottom: 10px; }
.ear--p2 { border-bottom-color: var(--blue-dim); }
.tag--p2 { border: 1px solid rgba(75,115,210,0.2); color: var(--blue-dim); }

/* ===================== TEAM SECTION ===================== */

.team {
  background: var(--bg-team);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.team::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(255,255,255,0.025) 0%, transparent 70%);
  pointer-events: none;
}

.team-inner {
  max-width: 760px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

.team-eyebrow {
  font-size: 9px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.18);
  text-transform: uppercase;
  margin-bottom: 36px;
}

.cj--team {
  margin-bottom: 10px;
}

.team-heading {
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 200;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 36px;
  line-height: 1.55;
}

.team-body {
  font-size: 14px;
  color: rgba(255,255,255,0.32);
  line-height: 2;
  font-weight: 300;
  margin-bottom: 44px;
  letter-spacing: 0.3px;
}

.team-body p + p {
  margin-top: 0.8em;
}

/* Keyword rows */
.kw-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 44px;
}

.kw-row {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.kw-row-label {
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.15);
  text-transform: uppercase;
  padding: 0 16px;
  border-right: 1px solid rgba(255,255,255,0.07);
  white-space: nowrap;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.015);
  align-self: stretch;
}

.kw-items {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.kw-item {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 200;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.kw-item:last-child {
  border-right: none;
}

.kw-x {
  font-size: 9px;
  color: rgba(255,255,255,0.12);
  padding: 0 2px;
  flex: 0;
}

/* AI badge */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 2px;
  padding: 10px 22px;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2px;
}

.ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(100,210,150,0.6);
  box-shadow: 0 0 8px rgba(100,210,150,0.3);
  animation: pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ===================== FOOTER ===================== */

.site-footer {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}

.footer-copy {
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.18);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 767px) {

  /* Nav dots: tuck in closer on mobile */
  .nav-dots {
    right: 14px;
  }

  /* Hero: reduce spacing */
  .hero-tagline {
    letter-spacing: 2px;
  }

  /* Project sections: single column, art on top */
  .project-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 24px;
  }

  /* Project 1: art is first child (already on top in DOM) — no reorder needed */
  /* Project 2: text is first child in DOM, art is second.
     On mobile we want art on top, so push text below art via order. */
  .project2 .project-text {
    order: 2;
  }
  .project2 .project-art {
    order: 1;
  }

  /* Reduce art max-height on mobile */
  .project-art--p1 {
    max-height: 260px;
  }
  .project-art--p2 {
    max-height: 200px;
  }

  /* Team section: reduce padding */
  .team-inner {
    padding: 0 20px;
  }

  /* Footer: stack vertically on very small screens */
  .site-footer {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 0 24px;
    bottom: 20px;
  }

  /* Keyword rows: allow label to be narrower */
  .kw-row-label {
    min-width: 60px;
    font-size: 7px;
    padding: 0 10px;
  }

  /* Reduce letter-spacing on section headings for narrow screens */
  .hero-tagline {
    letter-spacing: 2px;
  }
}
