/* ==========================================================================
   HACHIDORI.DEV - DESIGN SYSTEM & DESIGN STYLE SHEET
   ========================================================================== */

/* Design System Tokens */
:root {
  --bg-dark: hsl(222, 47%, 6%);
  --bg-darker: hsl(222, 47%, 3%);
  --bg-card: rgba(15, 23, 42, 0.45);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-active: rgba(255, 255, 255, 0.15);
  
  --primary: hsl(180, 100%, 46%); /* Neon Cyan */
  --primary-glow: hsla(180, 100%, 46%, 0.25);
  --secondary: hsl(295, 100%, 65%); /* Orchid Pink */
  --secondary-glow: hsla(295, 100%, 65%, 0.25);
  --accent-blue: hsl(210, 100%, 50%);
  
  --text-light: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 68%);
  --text-dim: hsl(215, 12%, 45%);
  
  --font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-family-display: 'Outfit', var(--font-family-sans);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-neon: 0 0 30px var(--primary-glow);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
}

body {
  font-family: var(--font-family-sans);
  color: var(--text-light);
  background-color: var(--bg-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-light);
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: 1.35rem;
  transition: var(--transition-smooth);
}

.logo-link:hover {
  opacity: 0.9;
}

.nav-logo {
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-light);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition-smooth);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-display);
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-spring);
  border: none;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-xl {
  padding: 1.15rem 2.75rem;
  font-size: 1.15rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--bg-darker);
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px var(--primary-glow), 0 0 35px var(--secondary-glow);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: var(--border-glass-active);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--primary);
  background-color: rgba(180, 255, 255, 0.04);
  transform: translateY(-3px);
}

/* Indicators */
.pulse-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  margin-right: 0.5rem;
  display: inline-block;
  box-shadow: 0 0 10px var(--primary);
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(180, 255, 255, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(180, 255, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(180, 255, 255, 0);
  }
}

/* Background Gradients Orbs */
.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-glow);
  top: 5%;
  right: 10%;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: var(--secondary-glow);
  top: 15%;
  left: -5%;
}

.glow-3 {
  width: 500px;
  height: 500px;
  background: rgba(180, 100, 255, 0.12);
  bottom: 10%;
  right: -5%;
}

/* Sections Global */
section {
  padding: 8rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem auto;
}

.section-title {
  font-family: var(--font-family-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 20%, var(--secondary) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero-section {
  padding-top: 12rem;
  padding-bottom: 8rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.mascot-badge {
  display: inline-flex;
  padding: 0.4rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-family-display);
  font-size: 4.25rem;
  font-weight: 850;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
}

.hero-media {
  display: flex;
  justify-content: center;
  position: relative;
}

.media-frame {
  position: relative;
  border-radius: 24px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-premium);
  animation: float-hero 6s ease-in-out infinite;
}

.hero-banner {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 16px;
  filter: saturate(1.05);
}

.frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

@keyframes float-hero {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* The Metaphor Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.metaphor-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition-spring);
  position: relative;
  display: flex;
  flex-direction: column;
}

.metaphor-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--border-glass), transparent 50%, var(--border-glass));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.metaphor-card:hover {
  transform: translateY(-8px) scale(1.02);
  background-color: rgba(30, 41, 59, 0.35);
  box-shadow: var(--shadow-premium);
}

.metaphor-card:hover::before {
  background: linear-gradient(135deg, var(--primary), transparent 40%, var(--secondary));
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.card-stat {
  font-family: var(--font-family-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

/* Scroll Animation Hooks (Native) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .metaphor-card {
    animation: reveal-card linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }
  
  @keyframes reveal-card {
    from {
      opacity: 0;
      transform: translateY(60px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

/* Manifesto Section */
.manifesto-section {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.manifesto-container {
  display: flex;
  justify-content: center;
}

.manifesto-card {
  background: linear-gradient(135deg, rgba(20, 24, 45, 0.8), rgba(10, 12, 28, 0.9));
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 4rem;
  max-width: 900px;
  position: relative;
  box-shadow: var(--shadow-premium);
}

.manifesto-title {
  font-family: var(--font-family-display);
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2.5rem;
}

.manifesto-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.manifesto-text p {
  line-height: 1.7;
}

/* Interactive Voting Box */
.voting-box {
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass-active);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
}

.vote-prompt {
  font-family: var(--font-family-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.vote-help {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.voting-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.vote-result {
  text-align: left;
}

.vote-total {
  display: block;
  font-family: var(--font-family-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1;
}

.vote-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vote-success-msg {
  display: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  animation: fade-in-up 0.5s ease forwards;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Quick Start Developer Guide */
.quickstart-section {
  background-color: var(--bg-dark);
}

.quickstart-box {
  background-color: hsl(222, 47%, 4%);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-premium);
}

.snippet-header {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.snippet-title {
  margin-left: 0.75rem;
  font-family: var(--font-family-display);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.snippet-body {
  padding: 1.75rem 2rem;
  overflow-x: auto;
}

.snippet-body pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
}

.code-line {
  display: block;
}

.cmd-prompt {
  color: var(--primary);
  user-select: none;
  font-weight: bold;
}

.cmd-text {
  color: var(--text-light);
}

.cmd-comment {
  color: var(--text-dim);
  font-style: italic;
}

.snippet-actions {
  background-color: rgba(255, 255, 255, 0.01);
  padding: 1rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.copy-feedback {
  display: none;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* Footer styling */
.main-footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-glass);
  padding: 4rem 0;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo-text {
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.footer-logo-text span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 600px;
}

.footer-copyright {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Responsiveness Media Queries */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .hero-title {
    font-size: 3.25rem;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 0.25rem 0;
  }
  
  .nav-links {
    display: none; /* Hide standard links on small screens */
  }
  
  .manifesto-card {
    padding: 2rem;
  }
  
  .voting-box {
    padding: 1.5rem;
  }
  
  .voting-actions {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .vote-result {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .media-frame {
    animation: none;
  }
  
  .metaphor-card {
    animation: none;
    transform: none !important;
  }
  
  .btn {
    transform: none !important;
    transition: none;
  }
}
