/* =============================================
   ComicPulse — Main Stylesheet
   Design: Bold comic news aesthetic, flat style
   Language: Japanese
   ============================================= */

/* ---- CSS VARIABLES / DESIGN TOKENS ---- */
:root {
  /* Colors */
  --color-primary: #E63946;       /* Comic red */
  --color-primary-dark: #C1121F;
  --color-accent: #FFD700;        /* Gold / yellow */
  --color-dark: #1A1A2E;          /* Deep navy-black */
  --color-dark-2: #16213E;
  --color-mid: #0F3460;
  --color-surface: #F5F5F0;       /* Off-white paper */
  --color-surface-2: #EAEAE5;
  --color-white: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-muted: #555566;
  --color-text-light: #EAEAEA;
  --color-border: #DDDDD8;
  --color-tag-marvel: #E63946;
  --color-tag-dc: #0F3460;
  --color-tag-indie: #2D6A4F;

  /* Typography */
  --font-heading: 'Georgia', 'Noto Serif JP', serif;
  --font-body: -apple-system, 'Hiragino Kaku Gothic Pro', 'Yu Gothic', 'Meiryo', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Container */
  --container-max: 1160px;
  --container-pad: 1.25rem;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--color-primary-dark);
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* ---- CONTAINER ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---- SECTION PADDING ---- */
.section-pad {
  padding: var(--space-xl) 0;
}

.center-block {
  text-align: center;
}

.center-block .section-header {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.center-block .section-header h2 {
  flex-shrink: 0;
}

.center-block .section-header .section-line {
  flex: 0 1 100px;
}

.section-dark {
  background: var(--color-dark);
  color: var(--color-text-light);
}

.section-dark .section-header h2,
.section-dark h2,
.section-dark h3 {
  color: var(--color-white);
}

.section-dark p {
  color: var(--color-text-light);
  opacity: 0.85;
}

.section-accent {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ---- SECTION HEADER ---- */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
}

.section-line--light {
  background: rgba(255,255,255,0.2);
}

.section-sub {
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---- PLACEHOLDER IMAGES ---- */
.placeholder-img {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  object-fit: cover;
  width: 100%;
}

/* Fallback styles for div placeholders */
.placeholder-img[role="img"] {
  background: var(--color-surface-2);
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  object-fit: unset;
}

.placeholder-hero {
  width: 100%;
  height: 380px;
}

.placeholder-news-main {
  width: 100%;
  height: 220px;
}

.placeholder-news-sm {
  width: 100%;
  height: 150px;
}

.placeholder-featured {
  width: 100%;
  height: 360px;
}

.placeholder-cover {
  width: 100%;
  height: 200px;
}

.placeholder-product {
  width: 100%;
  height: 220px;
}

.placeholder-spotlight {
  width: 100%;
  height: 180px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

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

.btn-full {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---- TAGS / BADGES ---- */
.news-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.tag-marvel { background: var(--color-tag-marvel); }
.tag-dc     { background: var(--color-tag-dc); }
.tag-indie  { background: var(--color-tag-indie); }

/* ---- HEADER ---- */
.site-header {
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: var(--space-md);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo-svg {
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-nav a {
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* ---- HERO SECTION ---- */
.hero-section {
  background: var(--color-dark-2);
  padding: var(--space-xl) 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.hero-text {
  flex: 1;
  max-width: 520px;
}

.hero-tag {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: 1.2rem;
}

.hero-text p {
  color: var(--color-text-light);
  opacity: 0.85;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-image-wrap {
  flex: 1;
}

/* ---- TICKER ---- */
.ticker-section {
  background: var(--color-primary);
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  align-items: stretch;
}

.ticker-label {
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.2rem;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ticker-text {
  color: var(--color-white);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- NEWS SECTION ---- */
.news-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.news-card--featured {
  grid-row: span 2;
}

.news-card--featured .placeholder-img {
  height: 260px;
}

.news-card-body {
  padding: 1.2rem;
}

.news-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--color-text);
}

.news-card--featured .news-card-body h3 {
  font-size: 1.25rem;
}

.news-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.news-date {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ---- FEATURED STORY ---- */
.featured-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.featured-image-wrap {
  flex: 1;
}

.featured-content {
  flex: 1;
}

.featured-content h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.featured-content p {
  margin-bottom: 1rem;
}

.featured-content .btn-outline {
  margin-top: 0.5rem;
}

/* ---- RELEASES SECTION ---- */
.releases-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .releases-grid { grid-template-columns: repeat(3, 1fr); }
  .releases-grid .release-item:last-child:nth-child(3n+2) { grid-column: span 1; justify-self: center; }
}

@media (max-width: 640px) {
  .releases-grid { grid-template-columns: repeat(2, 1fr); }
}

.release-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.release-info {
  padding: 0.9rem;
}

.release-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0.4rem 0 0.3rem;
  color: var(--color-text);
  line-height: 1.4;
}

.release-pub {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--color-white);
}

.release-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ---- STATS SECTION ---- */
.stats-heading {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-item {
  padding: var(--space-md);
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  margin-top: 0.4rem;
}

/* ---- PRODUCTS SECTION ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .products-grid { grid-template-columns: 1fr; }
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.product-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-white);
  margin-bottom: 0.7rem;
  align-self: flex-start;
}

.product-badge--new  { background: var(--color-tag-dc); }
.product-badge--sale { background: var(--color-tag-indie); }

.product-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.price-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* ---- SPOTLIGHT SECTION ---- */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .spotlight-grid { grid-template-columns: 1fr; }
}

.spotlight-card {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.spotlight-body {
  padding: 1.2rem;
}

.spotlight-body h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.spotlight-body p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}

/* ---- NEWSLETTER SECTION ---- */
.newsletter-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.newsletter-text {
  flex: 1;
}

.newsletter-text h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--color-text);
}

.newsletter-text p {
  color: var(--color-text-muted);
}

.newsletter-form {
  flex: 1;
}

.newsletter-fields {
  display: flex;
  gap: 0;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  background: var(--color-white);
  color: var(--color-text);
}

.newsletter-input:focus {
  border-color: var(--color-primary);
}

.newsletter-fields .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: none;
}

.newsletter-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.6rem;
}

.newsletter-success {
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(46, 160, 67, 0.12);
  border: 1px solid rgba(46, 160, 67, 0.35);
  border-radius: 6px;
  color: #2ea043;
  font-size: 0.88rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .newsletter-inner { flex-direction: column; }
}

/* ---- CONTACT SECTION ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.4rem;
}

.contact-value {
  font-size: 1rem;
  color: var(--color-white);
  font-weight: 500;
  text-decoration: none;
}

.contact-value:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.contact-address {
  line-height: 1.5;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--color-dark-2);
  color: var(--color-text-light);
  padding-top: var(--space-xl);
}

.footer-inner {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  padding-bottom: var(--space-xl);
}

.footer-brand {
  flex: 1.2;
}

.brand-name--footer {
  font-size: 1.2rem;
}

.footer-tagline {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}

.footer-links {
  flex: 2;
  display: flex;
  gap: var(--space-xl);
}

.footer-col {
  flex: 1;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero-inner        { flex-direction: column; }
  .featured-inner    { flex-direction: column; }
  .footer-inner      { flex-direction: column; }
  .footer-links      { flex-wrap: wrap; gap: var(--space-lg); }
}

@media (max-width: 680px) {
  .header-nav { display: none; }
  .section-header h2 { font-size: 1.4rem; }
  .hero-text h1 { font-size: 1.9rem; }
}
