/* ==========================================================================
   Japanese Symbols — Main Stylesheet
   Forest green theme, Nunito font, friendly + minimalistic
   ========================================================================== */

:root {
  --color-primary:      #1a1410;
  --color-accent:       #8c2020;
  --color-accent-hover: #6a1818;
  --color-bg:           #faf5ee;
  --color-bg-alt:       #f0e8d8;
  --color-card:         #faf5ee;
  --color-text:         #1a1410;
  --color-text-muted:   #7a6a58;
  --color-border:       #d4bea8;
  --container-width:    1100px;
  --container-padding:  1.25rem;
  --radius:             14px;
  --radius-sm:          8px;
  --shadow-sm:          0 2px 8px rgba(26,20,16,.07);
  --shadow-md:          0 6px 24px rgba(26,20,16,.13);
  --font:               'Nunito', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-y: scroll; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

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

/* ── Site header image ───────────────────────────────────────────────────── */
.site-header {
  display: block;
  line-height: 0;
  background: #f5ede0;
}
.site-header {
  height: 390px;
  overflow: hidden;
}
.site-header img {
  width: 100%;
  height: 390px;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.site-nav {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--color-accent);
}
.site-nav .container {
  display: flex;
  align-items: center;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  gap: 1rem;
}
.nav-brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand span { color: #e8c49a; }
.nav-brand:hover { color: #fff; }
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.2rem;
  margin-left: auto;
}
.nav-links a {
  display: block;
  padding: 0.4rem 0.85rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--color-accent);
  color: #fff;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
  line-height: 1;
}
/* ── Nav dropdown ────────────────────────────────────────────────────────── */
.nav-has-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 0.25rem; }
.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.65rem;
  opacity: 0.7;
  line-height: 1;
}
.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  border-top: 2px solid var(--color-accent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-width: 140px;
  list-style: none;
  z-index: 200;
  box-shadow: var(--shadow-md);
  padding: 0.25rem 0;
}
.nav-has-dropdown:hover .nav-submenu { display: block; }
.nav-submenu li a {
  display: block;
  padding: 0.45rem 1rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0;
  white-space: nowrap;
}
.nav-submenu li a:hover,
.nav-submenu li a.active {
  background: var(--color-accent);
  color: #fff;
}

@media (max-width: 640px) {
  .hamburger { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--color-primary);
    padding: 0.5rem 1rem 1rem;
    gap: 0;
    border-bottom: 3px solid var(--color-accent);
  }
  .nav-links.open { display: flex; }
  .site-nav { position: relative; }
  /* Submenu flat on mobile */
  .nav-submenu {
    display: flex;
    flex-direction: column;
    position: static;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-left: 2px solid var(--color-accent);
    border-radius: 0;
    background: rgba(0,0,0,0.15);
    padding: 0;
    min-width: 0;
    margin-left: 0.75rem;
  }
  .nav-dropdown-toggle::after { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, #1a1410 0%, #0a0806 100%);
  color: #fff;
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-bg-chars {
  position: absolute;
  inset: 0;
  font-size: 2rem;
  color: rgba(255,255,255,0.035);
  font-weight: 700;
  word-break: break-all;
  line-height: 1.4;
  padding: 1rem;
  letter-spacing: 0.3em;
  pointer-events: none;
  user-select: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
  position: relative;
}
.hero-text { max-width: 520px; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.hero h1 em {
  font-style: normal;
  color: #e8c49a;
}
.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 2rem;
  line-height: 1.75;
}
.btn-hero {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 800;
  transition: background 0.15s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn-hero:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* Hero character preview grid */
.hero-preview {
  flex-shrink: 0;
}
.hero-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.hero-preview-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  transition: background 0.15s;
}
.hero-preview-grid span:hover {
  background: rgba(255,255,255,0.15);
}
@media (max-width: 700px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-preview-grid span { width: 40px; height: 40px; font-size: 1.2rem; }
  .hero h1 { font-size: 1.9rem; }
}

/* ── Games Section ───────────────────────────────────────────────────────── */
.games-section {
  padding: 5rem 0;
  background: var(--color-bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--color-text-muted);
  font-size: 1rem;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.game-card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

/* Card header (character preview) */
.game-card-header {
  padding: 1.4rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.game-card--hira .game-card-header {
  background: linear-gradient(135deg, #8c2020 0%, #6a1818 100%);
}
.game-card--kata .game-card-header {
  background: linear-gradient(135deg, #1a1410 0%, #0a0806 100%);
}
.char-preview-row {
  display: flex;
  gap: 6px;
}
.char-preview-row span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08);
}
.char-preview-row--sm span {
  width: 40px;
  height: 40px;
  font-size: 1.15rem;
  opacity: 0.7;
}

/* Card body */
.game-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game-card-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.game-card-body p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
}
.play-btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: background 0.15s, transform 0.1s;
  align-self: flex-start;
}
.game-card--hira .play-btn {
  background: #fde8d0;
  color: #6a1818;
}
.game-card--hira:hover .play-btn {
  background: var(--color-accent);
  color: #fff;
}
.game-card--kata .play-btn {
  background: #e8eeed;
  color: var(--color-primary);
}
.game-card--kata:hover .play-btn {
  background: var(--color-primary);
  color: #fff;
}

/* ── About section ───────────────────────────────────────────────────────── */
.about-section {
  padding: 5rem 0;
  background: var(--color-bg);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}
.about-text h2 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.about-text p {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.about-chars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
.about-chars span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  border-radius: 14px;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: background 0.15s, border-color 0.15s;
}
.about-chars span:hover {
  background: #e0f0e6;
  border-color: var(--color-accent);
}
@media (max-width: 640px) {
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-chars { flex-direction: row; }
}

/* ── Symbols Section ─────────────────────────────────────────────────────── */
.symbols-section {
  padding: 5rem 0;
  background: var(--color-bg-alt);
}
.symbol-group {
  margin-bottom: 2rem;
}
.symbol-group:last-child { margin-bottom: 0; }
.symbol-group-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}
.symbol-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.symbol-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  min-height: 84px;
  padding: 0.75rem 0.4rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  gap: 0.35rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.symbol-btn:hover {
  border-color: var(--color-accent);
  background: #f5ead8;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.symbol-btn-k {
  font-size: 1.75rem;
  color: var(--color-primary);
  line-height: 1;
}
.symbol-btn-en {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* ── Coming Soon ─────────────────────────────────────────────────────────── */
.coming-soon {
  padding: 4.5rem 0;
  text-align: center;
  background: var(--color-bg-alt);
}
.coming-soon h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.6rem;
}
.coming-soon p {
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.95rem;
}
.coming-soon-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.75rem;
}
.coming-chip {
  background: #fff;
  color: var(--color-text-muted);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px dashed var(--color-border);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 0.55rem 0;
  font-size: 0.82rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-weight: 600;
}
.breadcrumb a { color: var(--color-accent); }
.breadcrumb a:hover { color: var(--color-accent-hover); }
.breadcrumb-sep { color: var(--color-text-muted); opacity: 0.5; }
