/* base.css
 * Global styles, navigation, typography.
 * Keep under 500 lines.
 */

:root {
  --color-bg: #fafaf8;
  --color-text: #2c2c2c;
  --color-primary: #3d5a80;
  --color-secondary: #98c1d9;
  --color-accent: #e76f51;
  --color-panel-bg: rgba(255, 255, 255, 0.95);
  --font-main: 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  height: 100%;
  width: 100%;
}

/* Navigation */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.top-nav .brand {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.top-nav .nav-links {
  display: flex;
  gap: 20px;
}

.top-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.top-nav a:hover,
.top-nav a.active {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* Page containers */
.page-container {
  padding-top: 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero / landing */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.hero p {
  max-width: 560px;
  margin-bottom: 32px;
  color: #555;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
  cursor: pointer;
}

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

.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Comic page grid */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.comic-item {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.comic-item:hover {
  transform: translateY(-2px);
}

.comic-item img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.comic-item .caption {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #444;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: #888;
  border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 640px) {
  .top-nav .brand { font-size: 0.95rem; }
  .top-nav .nav-links { gap: 10px; }
  .top-nav a { font-size: 0.8rem; padding: 3px 6px; }
  .hero h1 { font-size: 1.5rem; }
}
