/* CASTEIN — 2026 Chic Interactive Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0c0c0e;
  --bg-secondary: #111114;
  --bg-card: rgba(22, 22, 26, 0.72);
  --bg-elevated: #1a1a1f;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #e4e4e7;
  --accent-soft: rgba(228, 228, 231, 0.08);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.16);
  --glow: rgba(255, 255, 255, 0.04);
  --radius: 14px;
  --radius-lg: 22px;
  --font-sans: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.text-center { text-align: center; }

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,0.06), transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 20%, rgba(255,255,255,0.03), transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(255,255,255,0.025), transparent 50%);
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(12, 12, 14, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(12, 12, 14, 0.88);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo img { height: 28px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.nav a:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
}
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--text-primary);
  color: #0a0a0a;
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
}
.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--accent-soft);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block; height: 1.5px; width: 100%;
  background: var(--text-primary);
  transition: transform 0.3s var(--ease), opacity 0.3s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(10,10,12,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-nav a {
  font-size: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.mobile-nav a:hover { color: var(--text-primary); }

@media (max-width: 900px) {
  .nav { display: none !important; }
  .header-actions { display: none !important; }
  .hamburger { display: flex; }
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 15%, rgba(255,255,255,0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(255,255,255,0.03), transparent 55%);
  animation: heroPulse 12s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  opacity: 0.5;
}
.hero-content { position: relative; max-width: 680px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(8px);
}
.hero-badge span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-primary);
  box-shadow: 0 0 12px rgba(255,255,255,0.5);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 22px;
  letter-spacing: -0.03em;
}
.hero h1 span {
  background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
  max-width: 34em;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { height: 48px; padding: 0 24px; font-size: 14px; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Sections */
.section { padding: 100px 0; position: relative; }
.section-header { text-align: center; max-width: 560px; margin: 0 auto 56px; }
.section-header h2 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.feature-card h3 { font-size: 16px; margin-bottom: 8px; font-weight: 600; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

/* Pyramid visual */
.pyramid-visual {
  margin: 48px auto 0;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pyramid-row {
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1));
  border: 1px solid var(--border);
  transition: transform 0.5s var(--ease), background 0.5s;
}
.pyramid-row:nth-child(1) { width: 36%; }
.pyramid-row:nth-child(2) { width: 52%; }
.pyramid-row:nth-child(3) { width: 68%; }
.pyramid-row:nth-child(4) { width: 84%; }
.pyramid-row:nth-child(5) { width: 100%; }
.pyramid-visual:hover .pyramid-row {
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.16));
}

/* CTA band */
.cta-band {
  margin: 40px 0;
  padding: 48px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(255,255,255,0.06), transparent 60%),
    var(--bg-card);
  backdrop-filter: blur(12px);
}
.cta-title { font-size: clamp(20px, 3vw, 26px) !important; font-weight: 600; margin-bottom: 10px; }
.cta-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.footer a { color: var(--text-secondary); margin: 0 8px; }
.footer a:hover { color: var(--text-primary); }

/* Auth / misc shared */
.terms { font-size: 13px; line-height: 1.8; color: var(--text-secondary); }
.terms h1 { font-size: 24px; color: var(--text-primary); }
.terms h2 { font-size: 15px; color: var(--text-primary); }

.cat-card img, .mock-image img, img.content-img {
  filter: grayscale(1);
  transition: filter 0.4s;
}
.cat-card:hover img, .mock-image:hover img {
  filter: grayscale(0.3);
}

/* Cursor glow (desktop) */
.cursor-glow {
  position: fixed;
  width: 280px; height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-glow.active { opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}
