/*
Theme Name: OUCC Journey
Theme URI: https://oucc.jp/
Author: OUCC OB Web Team
Author URI: https://oucc.jp/
Description: A modern, travel-inspired theme for Osaka University Cycling Club OB site.
Version: 0.3.7
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: oucc-journey
*/

/* ===== Design Tokens ===== */
:root {
  /* Main palette */
  --bg: #f4f1ec;
  --bg-deep: #e8e3da;
  --bg-section: #faf8f5;
  --ink: #1a2027;
  --ink-muted: #5a6872;
  --ink-light: #8a949d;
  --line: #d4cfc6;

  /* Brand */
  --brand: #1a7a6d;
  --brand-deep: #145f55;
  --brand-light: rgba(26, 122, 109, 0.10);
  --brand-glow: rgba(26, 122, 109, 0.18);
  --accent: #e07830;
  --accent-light: rgba(224, 120, 48, 0.12);

  /* Dark surfaces (header/footer) */
  --dark-bg: #1a2332;
  --dark-bg-deep: #141c28;
  --dark-ink: #e2e6ea;
  --dark-ink-muted: #8a9aaa;
  --dark-line: rgba(255, 255, 255, 0.10);

  /* Cards */
  --card: #ffffff;
  --card-hover: #fefefe;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 0 12px 36px rgba(26, 122, 109, 0.12);

  /* Geometry */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --content-width: 1280px;

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(15px, 0.3vw + 14px, 17px);
  line-height: 1.8;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

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

/* ===== Layout ===== */
.wrap {
  width: min(100% - 2.5rem, var(--content-width));
  margin-inline: auto;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 35, 50, 0.92);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--dark-line);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.15);
}

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26, 122, 109, 0.3);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-brand {
  font-size: clamp(1.05rem, 0.8rem + 0.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.3;
}

.site-brand:hover {
  color: rgba(255, 255, 255, 0.85);
}

.site-tagline {
  margin: 0;
  color: var(--dark-ink-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Navigation */
.site-nav .menu,
.site-nav .nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.2rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--dark-ink);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all var(--duration) var(--ease);
}

.site-nav a:hover,
.site-nav .current-menu-item>a {
  background: rgba(26, 122, 109, 0.18);
  border-color: rgba(26, 122, 109, 0.25);
  color: #6ee7c0;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background var(--duration) var(--ease);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

.menu-toggle span+span {
  margin-top: 5px;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 5px);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -5px);
}

/* ===== Main ===== */
.site-main {
  min-height: 60vh;
}

/* ===== Hero ===== */
.hero {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero-card {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  background: var(--dark-bg);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--hero-image) center top / cover no-repeat;
  z-index: 0;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(20, 28, 40, 0.1) 0%,
      rgba(20, 28, 40, 0.2) 40%,
      rgba(20, 28, 40, 0.4) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--content-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding: 3rem 0 3.5rem;
}

.hero-content {
  max-width: 680px;
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 1rem + 4vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
  font-weight: 800;
}

.hero p {
  margin: 0;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.15rem);
  line-height: 1.75;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 4px 16px rgba(26, 122, 109, 0.3);
}

.button-primary:hover {
  background: var(--brand-deep);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 122, 109, 0.35);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  transition: all var(--duration) var(--ease);
  backdrop-filter: blur(4px);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-2px);
}

.hero-note {
  align-self: end;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  max-width: 280px;
  font-size: 0.82rem;
  line-height: 1.6;
}

.hero-note strong {
  color: #ffffff;
  font-weight: 600;
}

/* ===== Wave Divider ===== */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  fill: var(--bg-section);
  margin-bottom: -1px;
}

.wave-divider--flip {
  transform: rotate(180deg);
  margin-bottom: 0;
  margin-top: -1px;
}

.wave-divider--to-bg {
  fill: var(--bg);
}

/* ===== Sections ===== */
.section {
  padding: 2rem 0 3.5rem;
}

.section+.section {
  padding-top: 0;
}

.section--alt {
  background: var(--bg-section);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.4rem, 0.9rem + 1.2vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

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

.section-title-accent {
  display: inline-block;
  width: 4px;
  height: 1.4em;
  background: var(--brand);
  border-radius: 4px;
  vertical-align: text-bottom;
  margin-right: 0.5rem;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.route-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: all var(--duration) var(--ease);
  position: relative;
}

.route-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.route-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(26, 122, 109, 0.2);
}

.route-card:hover::before {
  opacity: 1;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 1.25rem 1.25rem 0;
  flex-shrink: 0;
}

.card-icon--download {
  background: linear-gradient(135deg, rgba(26, 122, 109, 0.12), rgba(26, 122, 109, 0.06));
  color: var(--brand);
}

.card-icon--library {
  background: linear-gradient(135deg, rgba(224, 120, 48, 0.12), rgba(224, 120, 48, 0.06));
  color: var(--accent);
}

.card-icon--news {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.12), rgba(66, 133, 244, 0.06));
  color: #4285f4;
}

.card-icon--archive {
  background: linear-gradient(135deg, rgba(142, 102, 172, 0.12), rgba(142, 102, 172, 0.06));
  color: #8e66ac;
}

.card-icon--members {
  background: linear-gradient(135deg, rgba(198, 150, 42, 0.12), rgba(198, 150, 42, 0.06));
  color: #c6962a;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.route-card h3 {
  margin: 0;
  padding: 0.8rem 1.25rem 0.3rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.route-card p {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.card-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brand);
  border-top: 1px solid var(--line);
  background: transparent;
  transition: all var(--duration) var(--ease);
}

.card-link:hover {
  background: var(--brand-light);
  color: var(--brand-deep);
}

.card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration) var(--ease);
}

.card-link:hover svg {
  transform: translateX(3px);
}

/* ===== Timeline (News) ===== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--line));
  border-radius: 2px;
}

.timeline li {
  position: relative;
  padding: 0 0 1.4rem 2.8rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--brand);
  z-index: 1;
}

.timeline li:first-child::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-light);
}

.timeline-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.timeline li a {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

/* ===== Post List (fallback) ===== */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.post-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--duration) var(--ease);
}

.post-list li:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(26, 122, 109, 0.2);
}

.post-list li a {
  font-size: 0.95rem;
  font-weight: 600;
}

.post-meta {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

/* ===== Content Card ===== */
.content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 3rem);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  overflow-x: auto;
}

.entry-header h1,
.entry-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 1rem + 1.8vw, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.entry-content {
  font-size: 0.95rem;
  line-height: 1.85;
}

.entry-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.entry-content ul,
.entry-content ol {
  margin-top: 0;
  padding-left: 1.3rem;
}

.entry-content li {
  margin-bottom: 0.4rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-content th,
.entry-content td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.entry-content th {
  background: var(--bg-section);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--brand);
  background: var(--brand-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

/* Two-column content layout */
.content-columns {
  columns: 2;
  column-gap: 2.5rem;
}

.content-columns h3 {
  column-span: none;
  break-after: avoid;
}

.content-columns ul {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.column-break {
  break-before: column;
}

/* ===== News post links ===== */
.news-link {
  margin-top: .75em;
}

.news-link a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
}

.news-link a:hover {
  color: var(--brand-deep);
}

.news-registration {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: 1em;
  padding: .75em 1em;
  background: var(--light-bg);
  border-radius: 6px;
}

.notice {
  font-size: .9rem;
  color: var(--ink-muted);
  font-style: italic;
}

.entry-content pre,
.entry-content .wp-block-preformatted {
  background: var(--light-bg);
  padding: 1em 1.2em;
  border-radius: 6px;
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.6;
  white-space: pre;
  font-family: "Noto Sans Mono", "Source Han Code JP", monospace;
  max-width: 100%;
  box-sizing: border-box;
}

.entry-content .meta {
  font-size: .85rem;
  color: var(--ink-muted);
}

/* ===== Wadachi Specific Adjustments ===== */
/* Make Wadachi child and parent pages slightly narrower and use smaller text for better readability */
body.parent-pageid-84 .wrap,
body.page-id-84 .wrap {
  max-width: 900px;
}

body.parent-pageid-84 .entry-content,
body.parent-pageid-84 .entry-content p,
body.parent-pageid-84 .entry-content li,
body.page-id-84 .entry-content,
body.page-id-84 .entry-content p,
body.page-id-84 .entry-content li {
  font-size: 0.9rem;
}

body.parent-pageid-84 .entry-content pre,
body.parent-pageid-84 .entry-content .wp-block-preformatted,
body.parent-pageid-84 .entry-content .wp-block-table,
body.page-id-84 .entry-content pre,
body.page-id-84 .entry-content .wp-block-preformatted,
body.page-id-84 .entry-content .wp-block-table {
  font-size: 0.8rem;
}

/* Library two-column grid */
.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
}

.entry-content blockquote p {
  margin: 0;
}

/* ===== Breadcrumbs ===== */
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0;
  margin: 0 0 1.2rem;
  font-size: 0.82rem;
  color: var(--ink-light);
}

.breadcrumb li+li::before {
  content: "›";
  margin-right: 0.35rem;
  color: var(--ink-light);
}

.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* ===== External Link Section (Kanto Branch) ===== */
.kanto-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.kanto-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.kanto-info p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.kanto-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kanto-link-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  width: 100%;
}

.kanto-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 122, 109, 0.2);
}

.kanto-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand);
  flex-shrink: 0;
}

.kanto-link-icon svg {
  width: 22px;
  height: 22px;
}

.kanto-link-text {
  display: flex;
  flex-direction: column;
}

.kanto-link-text span:first-child {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.kanto-link-text span:last-child {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--dark-bg-deep);
  color: var(--dark-ink);
  padding: 0;
  margin-top: 0;
  border-top: none;
}

.footer-main {
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-ink-muted);
}

.footer-col p {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--dark-ink);
}

.footer-col a {
  color: var(--dark-ink);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.footer-col a:hover {
  color: #6ee7c0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links a::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--dark-line);
  padding: 1.2rem 0;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--dark-ink-muted);
  text-align: center;
}

/* ===== Pagination ===== */
.pagination {
  margin-top: 2rem;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  transition: all var(--duration) var(--ease);
}

.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.pagination .current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ===== Scroll Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.reveal-delay-3 {
  transition-delay: 0.24s;
}

.reveal-delay-4 {
  transition-delay: 0.32s;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-note {
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .site-nav .menu,
  .site-nav .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 35, 50, 0.98);
    backdrop-filter: blur(16px);
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--dark-line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .site-nav .menu.is-open,
  .site-nav .nav-list.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  .hero-card {
    min-height: 400px;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 1rem + 3vw, 2.5rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .content-columns {
    columns: 1;
  }

  .column-break {
    break-before: auto;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .desktop-only {
    display: none;
  }

  .section {
    padding: 2rem 0 2.5rem;
  }

  .kanto-section {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-main {
    padding: 2rem 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 1.5rem, var(--content-width));
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .brand-icon svg {
    width: 20px;
    height: 20px;
  }

  .hero-card {
    min-height: 340px;
  }

  .hero-inner {
    padding: 2rem 0 2.5rem;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
    justify-content: center;
  }

  .content-card {
    padding: 1.2rem;
    border-radius: var(--radius);
  }
}