/* ============================================
   Variables & Reset
   ============================================ */
:root {
  --bg: #F8F7FF;
  --surface: rgba(255,255,255,0.75);
  --surface2: rgba(255,255,255,0.92);
  --border: rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.13);

  --red:    #FF2D55;
  --blue:   #1464C8;
  --blue2:  #4A90E2;
  --yellow: #FFB800;
  --orange: #FF6B2B;
  --green:  #22AA55;

  --text:       #18181F;
  --text-muted: rgba(24,24,31,0.55);
  --text-faint: rgba(24,24,31,0.28);

  --font-ja: 'Noto Sans JP', sans-serif;
  --font-en: 'Orbitron', monospace;

  --r:   16px;
  --r-sm: 8px;
  --r-lg: 24px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.3s var(--ease);
  --t-slow: 0.7s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }


/* ============================================
   Canvas
   ============================================ */
#bg-canvas {
  display: none;
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  transition: var(--t);
}
.nav.scrolled {
  background: rgba(248,247,255,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 2rem;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 34px; width: auto; transition: var(--t); }
.nav-logo img:hover { transform: scale(1.05); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  width: 100%;
}
.nav-links li:last-child {
  margin-left: auto;
}
.nav-links a {
  font-family: var(--font-ja);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: var(--t);
}
.nav-links a:hover { color: var(--text); }
.nav-booth {
  background: linear-gradient(135deg, var(--red), var(--orange)) !important;
  color: #fff !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 100px;
  box-shadow: 0 0 20px rgba(255,45,85,0.35);
}
.nav-booth:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 0 32px rgba(255,45,85,0.55) !important;
}

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t);
}

/* Mobile nav overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(248,247,255,0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: var(--t);
}
.nav-mobile a:hover { color: var(--text); }
.nav-mobile-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  color: var(--text);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  font-family: var(--font-ja);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--t);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--orange) 50%, var(--yellow) 100%);
  color: #fff;
  box-shadow: 0 4px 30px rgba(255,107,43,0.45);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(255,107,43,0.65);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border2);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: var(--surface2);
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translateY(-2px);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}


/* Animated blobs */
.hero-blobs { display: none; }

/* Anime sky */
.hero-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero-sky svg {
  width: 100%;
  height: 100%;
}

.cloud-left   { animation: cloudFloat 8s ease-in-out infinite; }
.cloud-center { animation: cloudFloat 10s ease-in-out infinite; animation-delay: -3s; }
.cloud-right  { animation: cloudFloat 7s ease-in-out infinite; animation-delay: -1.5s; }
.cloud-small  { animation: cloudFloat 5s ease-in-out infinite; animation-delay: -4s; }

@keyframes cloudFloat {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2.5rem;
  animation: heroIn 1s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
.hero-logo {
  max-width: 500px;
  width: 88vw;
  position: relative;
  z-index: 1;
  transition: transform 0.5s var(--ease);
}
.hero-logo:hover {
  transform: scale(1.03);
}


@keyframes heroIn {
  from { opacity:0; transform: translateY(40px) scale(0.88); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.hero-tagline {
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s ease 0.55s both;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.75s both;
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(22px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  animation: fadeUp 1s ease 1.2s both;
}
.hero-scroll span {
  font-family: var(--font-en);
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  color: var(--text-faint);
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), transparent);
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%   { transform: scaleY(0); transform-origin: top; }
  49%  { transform: scaleY(1); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   Sections
   ============================================ */
.section {
  position: relative;
  z-index: 2;
  padding: 6rem 2rem;
}
.section-alt {
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.03) 10%, rgba(0,0,0,0.03) 90%, rgba(0,0,0,0) 100%);
}
.container {
  max-width: 1100px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-label { display: none; }

.section-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 1rem;
}
.section-dots span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.d-red    { background: var(--red); }
.d-blue   { background: var(--blue); }
.d-yellow { background: var(--yellow); }
.d-orange { background: var(--orange); }
.section-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--text) 0%, rgba(240,240,255,0.65) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.section-desc {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ============================================
   Works
   ============================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.work-card {
  display: block;
  position: relative;
  border-radius: var(--r-lg);
  transition: transform var(--t);
}
.work-card:hover { transform: translateY(-10px); }

/* Gradient border via pseudo */
.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--red), var(--blue), var(--yellow), var(--orange));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t);
}
.work-card:hover::before { opacity: 1; }

.work-card-inner {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.5rem 2rem;
  height: 100%;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}
.work-card:hover .work-card-inner {
  background: var(--surface2);
  border-color: transparent;
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.work-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}
.work-card:nth-child(1) .work-card-inner { border-top: 4px solid var(--red); }
.work-card:nth-child(2) .work-card-inner { border-top: 4px solid var(--blue); }
.work-card:nth-child(3) .work-card-inner { border-top: 4px solid var(--yellow); }

.work-card h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}
.work-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.85;
  margin-bottom: 1.75rem;
}
.work-arrow {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.05em;
  transition: var(--t);
}
.work-card:hover .work-arrow {
  color: var(--yellow);
  letter-spacing: 0.12em;
}

/* ============================================
   Products Marquee
   ============================================ */
.products-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  padding: 0.5rem 0 1rem;
}

.products-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  animation: productsMarquee 60s linear infinite;
}
.products-marquee:hover .products-track { animation-play-state: paused; }

@keyframes productsMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.product-card {
  display: block;
  flex: 0 0 240px;
  width: 240px;
  border-radius: var(--r);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform var(--t), box-shadow var(--t);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.12);
}

.product-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f4f8;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t);
}
.product-card:hover .product-img img {
  transform: scale(1.06);
}

.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 100, 200, 0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t);
}
.product-card:hover .product-overlay { opacity: 1; }

.product-info {
  padding: 0.9rem 1.1rem 1.1rem;
}
.product-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price { display: none; }

/* ============================================
   Concept
   ============================================ */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.concept-card {
  background: #fff;
  border: 2.5px solid var(--accent, var(--red));
  border-radius: 24px;
  padding: 2rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  box-shadow: 4px 4px 0px var(--accent, var(--red));
  transition: transform var(--t), box-shadow var(--t);
}
.concept-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px var(--accent, var(--red));
}

.concept-emoji {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.concept-catch {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.concept-sub {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   License
   ============================================ */
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.license-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  transition: transform var(--t), background var(--t), box-shadow var(--t);
}
.license-item:hover {
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.09);
}
.license-item.allow { border-color: rgba(0,200,100,0.18); }
.license-item.deny  { border-color: rgba(255,45,85,0.18); }
.license-icon { font-size: 1.2rem; flex-shrink: 0; padding-top: 0.1rem; }
.license-item strong { display: block; font-size: 0.875rem; margin-bottom: 0.2rem; }
.license-item p { font-size: 0.78rem; color: var(--text-muted); }

.license-note {
  background: rgba(255,184,0,0.07);
  border: 1px solid rgba(255,184,0,0.22);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.85;
}
.text-center { text-align: center; }

/* ============================================
   Contact
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 2rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px);
  text-align: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform var(--t), background var(--t), border-color var(--t), box-shadow var(--t);
}
.contact-card:hover {
  transform: translateY(-8px);
  background: var(--surface2);
  border-color: var(--border2);
}
.contact-card.booth:hover { box-shadow: 0 0 40px rgba(255,45,85,0.25); }
.contact-card.x:hover     { box-shadow: 0 0 40px rgba(255,255,255,0.1); }
.contact-card.discord:hover { box-shadow: 0 0 40px rgba(88,101,242,0.3); }

.contact-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}
.booth-icon   { background: linear-gradient(135deg, var(--red), var(--orange)); color: #fff; font-family: var(--font-en); font-size: 1.1rem; }
.x-icon       { background: #111; border: 1px solid rgba(255,255,255,0.15); color: #fff; font-family: serif; font-size: 1.6rem; }
.discord-icon { background: #5865F2; color: #fff; }

.contact-label { font-weight: 700; font-size: 1rem; }
.contact-url   { font-size: 0.77rem; color: var(--text-muted); font-family: monospace; word-break: break-all; }

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-logo {
  height: 44px;
  width: auto;
  opacity: 0.65;
  margin: 0 auto 1rem;
  transition: var(--t);
}
.footer-logo:hover { opacity: 0.9; }
.footer-copy  { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.footer-vn3   { font-size: 0.72rem; color: var(--text-faint); margin-bottom: 0.4rem; }
.footer-built { font-size: 0.72rem; color: var(--text-faint); }
.footer-built a { color: var(--blue2); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================
   Reveal Animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Terms page
   ============================================ */
.terms-main {
  position: relative;
  z-index: 2;
  padding: 8rem 2rem 6rem;
}
.terms-container {
  max-width: 860px;
  margin: 0 auto;
}
.terms-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.terms-header h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  margin: 0.5rem 0 0.75rem;
}
.terms-header p { color: var(--text-muted); font-size: 0.85rem; }

.terms-quick {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.terms-quick h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.terms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.terms-table th, .terms-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.terms-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.terms-table td:last-child { font-weight: 700; }
.terms-table .ok  { color: #22c55e; }
.terms-table .ng  { color: var(--red); }
.terms-table .ask { color: var(--yellow); }
.terms-table .partial { color: var(--orange); }

.terms-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.terms-body h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.terms-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.terms-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.6rem;
  color: var(--yellow);
}
.terms-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 0.75rem;
}
.terms-body ol, .terms-body ul {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.terms-body li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 0.4rem;
}
.terms-body .note {
  background: rgba(255,184,0,0.07);
  border-left: 3px solid var(--yellow);
  padding: 0.875rem 1.25rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 1rem 0;
}
.terms-body .note p { margin-bottom: 0; color: var(--text-muted); }
.terms-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  transition: var(--t);
  margin-bottom: 2rem;
}
.terms-back:hover { color: var(--text); transform: translateX(-3px); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .works-grid, .contact-grid, .license-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: center; }
  .section { padding: 4rem 1.25rem; }
  .terms-main { padding: 6rem 1.25rem 4rem; }
  .terms-body { padding: 1.5rem; }
  .terms-table { font-size: 0.77rem; }
}
