@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --ease-shonen: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --duration-flash: 100ms;
  --duration-action: 250ms;
  --duration-entrance: 500ms;
  
  --shonen-red: #FF2F33;
  --shonen-gold: #F2C844;
  --shonen-black: #0A0A0C;
  --shonen-steel: #2A2A2E;
  --shonen-gray: #9CA3AF;
}

/* ========================================
   SECTION: Base Styles
   Description : Global settings and resets
   ======================================== */
body {
  background-color: var(--shonen-black);
  color: #FFFFFF;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

/* ========================================
   SECTION: Animations
   Description : Keyframes and utility classes
   ======================================== */
@keyframes fadeUpRight {
  from {
    opacity: 0;
    transform: translate(-20px, 20px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.animate-fade-up {
  animation: fadeUpRight var(--duration-entrance) var(--ease-shonen) both;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .hover\:-translate-y-2:hover,
  .hover\:scale-105:hover,
  .transition-all,
  .transition-transform {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    transform: none !important;
  }
}

/* ========================================
   SECTION: Components
   Description : Reusable components like cards
   ======================================== */
.shonen-card {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.shadow-glow-red {
  box-shadow: 0 10px 20px -5px rgba(255, 47, 51, 0.4);
}

.shadow-glow-gold {
  box-shadow: 0 10px 20px -5px rgba(242, 200, 68, 0.4);
}

.shadow-glow-gold:hover {
  box-shadow: 0 15px 30px -5px rgba(242, 200, 68, 0.6);
}

/* ========================================
   SECTION: Grain / Noise Texture
   Description : Subtle manga-paper grain over the whole site
   ======================================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ========================================
   SECTION: Page Hero Banner
   Description : Styles for secondary page hero banners
   ======================================== */
.page-hero-banner {
  min-height: 380px;
}

@media (min-width: 1280px) {
  .page-hero-banner {
    min-height: 460px;
  }
}

/* Left accent bar for hero banners */
.page-hero-banner::before {
  display: none; /* Overridden by the inline blur div */
}

/* Manga speed-line accent behind hero text */
.hero-accent-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hero-accent-line::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--shonen-red);
  flex-shrink: 0;
}

/* ========================================
   SECTION: Section Dividers
   Description : Decorative separators between sections
   ======================================== */
.shonen-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 3rem;
  max-width: 200px;
}

.shonen-divider::before,
.shonen-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(242,200,68,0.4), transparent);
}

.shonen-divider span {
  width: 8px;
  height: 8px;
  background: var(--shonen-gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ========================================
   SECTION: FAQ Accordion
   Description : Expand/collapse FAQ items
   ======================================== */
.faq-item .faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}

.faq-item.faq-open .faq-body {
  max-height: 300px;
}

.faq-item .faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.faq-open .faq-icon {
  transform: rotate(45deg);
}

.faq-item .faq-chevron svg {
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* Form inputs — improved visibility */
.shonen-input {
  background: #0D0D14;
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  padding: 14px 16px;
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.shonen-input:focus {
  border-color: var(--shonen-red);
  box-shadow: 0 0 0 3px rgba(255,47,51,0.12);
}

.shonen-input::placeholder {
  color: rgba(156,163,175,0.5);
}

/* ========================================
   SECTION: Decorative elements
   ======================================== */
/* Diagonal corner cut accent on cards */
.accent-bar-left {
  position: relative;
}

.accent-bar-left::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--shonen-red), transparent);
}

/* Scan-line shimmer on hero backgrounds */
@keyframes scanSlide {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100vh); }
}

.page-hero-banner .scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.04), transparent);
  animation: scanSlide 6s linear infinite;
  pointer-events: none;
  z-index: 4;
}

/* ========================================
   SECTION: Unified Shonen CTA
   One button shape: skewed parallelogram with
   double-layer outline, shonen-red default.
   Text lives in .shonen-cta__label which
   counter-skews so it stays readable.
   ======================================== */
@keyframes shonenCtaPulse {
  0%, 100% { box-shadow: 0 10px 24px -6px rgba(255,47,51,.45), 0 0 0 0 rgba(255,47,51,.22); }
  55%      { box-shadow: 0 10px 24px -6px rgba(255,47,51,.45), 0 0 0 16px rgba(255,47,51,0); }
}

.shonen-cta {
  /* Themable via CSS variables — inline JS can override any of these per element. */
  --cta-bg: var(--shonen-red);
  --cta-fg: #fff;
  --cta-hover-bg: #fff;
  --cta-hover-fg: var(--shonen-red);
  --cta-outline: rgba(255, 47, 51, 0.4);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background-color: var(--cta-bg);
  color: var(--cta-fg);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transform: skewX(-12deg);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
  animation: shonenCtaPulse 2.8s ease-in-out infinite;
  position: relative;
  cursor: pointer;
  border: 0;
  line-height: 1;
}
.shonen-cta::before {
  /* Double-layer outline — subtle offset border behind the button.
     Off by default; color-variant classes / inline styles opt in. */
  content: '';
  position: absolute;
  inset: -4px -6px;
  border: 1px solid var(--cta-outline);
  pointer-events: none;
  z-index: -1;
}
.shonen-cta__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transform: skewX(12deg);
}
.shonen-cta:hover {
  background-color: var(--cta-hover-bg);
  color: var(--cta-hover-fg);
}
.shonen-cta:active { transform: skewX(-12deg) translateY(1px); }

/* Size variants */
.shonen-cta--sm { padding: 0.55rem 1.25rem; font-size: 1rem; }
.shonen-cta--lg { padding: 1.15rem 3rem;    font-size: 1.85rem; }
.shonen-cta--block { display: flex; width: 100%; }

/* Color variants */
.shonen-cta--gold {
  --cta-bg: var(--shonen-gold);
  --cta-fg: var(--shonen-black);
  --cta-hover-bg: #fff;
  --cta-hover-fg: var(--shonen-black);
  --cta-outline: rgba(242, 200, 68, 0.4);
  animation: none;
  box-shadow: 0 10px 24px -6px rgba(242, 200, 68, 0.35);
}

.shonen-cta--outline {
  --cta-bg: transparent;
  --cta-fg: var(--shonen-gold);
  --cta-hover-bg: var(--shonen-gold);
  --cta-hover-fg: var(--shonen-black);
  border: 2px solid var(--shonen-gold);
  animation: none;
  box-shadow: none;
}
.shonen-cta--outline::before { display: none; }

.shonen-cta--ghost {
  background-color: transparent;
  color: var(--shonen-gray);
  animation: none;
  box-shadow: none;
}
.shonen-cta--ghost::before { display: none; }
.shonen-cta--ghost:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .shonen-cta { animation: none; }
}
