/* =========================================================
   mopponpon — base.css (v5.0.0 / Blue Gradient World)
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* === Color Tokens === */
  --moppo-blue-50:  #F4F9FE;
  --moppo-blue-100: #E6F1FB;
  --moppo-blue-200: #B5D4F4;
  --moppo-blue-400: #85B7EB;
  --moppo-blue-500: #378ADD;
  --moppo-blue-600: #185FA5;
  --moppo-blue-700: #0C447C;
  --moppo-blue-900: #042C53;

  --moppo-white:    #FFFFFF;
  --moppo-off:      #FBFCFE;
  --moppo-text:     #1A2B4A;
  --moppo-text-sub: #5A6B85;
  --moppo-border:   rgba(181, 212, 244, 0.5);

  --moppo-accent-bg-from: #FAEEDA;
  --moppo-accent-bg-to:   #FFFFFF;
  --moppo-accent-line:    #EF9F27;
  --moppo-accent-text-strong: #633806;
  --moppo-accent-text-weak:   #854F0B;

  --moppo-success: #3B6D11;
  --moppo-danger:  #A32D2D;

  /* Gradients */
  --moppo-grad-primary: linear-gradient(135deg, #378ADD 0%, #185FA5 100%);
  --moppo-grad-bg-light: linear-gradient(135deg, #E6F1FB 0%, #FFFFFF 50%, #F4F9FE 100%);
  --moppo-grad-author: linear-gradient(135deg, #E6F1FB 0%, #B5D4F4 100%);
  --moppo-grad-text: linear-gradient(135deg, #378ADD 0%, #185FA5 100%);
  --moppo-grad-eyecatch: linear-gradient(135deg, #E6F1FB 0%, #B5D4F4 50%, #85B7EB 100%);

  /* === Typography === */
  --moppo-font-jp: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --moppo-font-en: 'Inter', 'Noto Sans JP', sans-serif;
  --moppo-font-serif: 'Noto Serif JP', 'Yu Mincho', serif;

  /* === Spacing (8px base) === */
  --moppo-space-1: 4px;
  --moppo-space-2: 8px;
  --moppo-space-3: 12px;
  --moppo-space-4: 16px;
  --moppo-space-5: 20px;
  --moppo-space-6: 24px;
  --moppo-space-8: 32px;
  --moppo-space-10: 40px;
  --moppo-space-12: 48px;
  --moppo-space-16: 64px;
  --moppo-space-20: 80px;

  /* === Radius === */
  --moppo-radius-sm: 6px;
  --moppo-radius-md: 10px;
  --moppo-radius-lg: 16px;
  --moppo-radius-pill: 999px;

  /* === Layout === */
  --moppo-content-width: 720px;
  --moppo-page-width: 1180px;
  --moppo-sidebar-width: 280px;
  --moppo-gutter: 32px;
  --moppo-section-gap-pc: 64px;
  --moppo-section-gap-sp: 40px;

  /* === Shadow === */
  --moppo-shadow-sm: 0 1px 3px rgba(26, 43, 74, 0.04);
  --moppo-shadow-md: 0 4px 12px rgba(26, 43, 74, 0.06);
  --moppo-shadow-lg: 0 8px 24px rgba(26, 43, 74, 0.08);

  /* === Motion === */
  --moppo-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --moppo-duration: 0.2s;

  /* === Backward-compatible aliases === */
  --bg: var(--moppo-white);
  --bg-alt: var(--moppo-blue-50);
  --bg-soft: var(--moppo-off);
  --surface: var(--moppo-white);
  --text: var(--moppo-text);
  --text-mid: var(--moppo-text-sub);
  --text-soft: var(--moppo-text-sub);
  --text-faint: var(--moppo-blue-200);
  --border: var(--moppo-border);
  --border-light: rgba(181, 212, 244, 0.3);
  --border-strong: var(--moppo-blue-900);
  --accent: var(--moppo-blue-500);
  --accent-deep: var(--moppo-blue-600);
  --accent-soft: var(--moppo-blue-100);
  --accent-line: var(--moppo-blue-200);
  --primary-mid: var(--moppo-blue-500);
  --primary-dark: var(--moppo-blue-900);
  --primary-light: var(--moppo-blue-200);
  --ink: var(--moppo-blue-500);
  --ink-dark: var(--moppo-blue-600);
  --ink-light: var(--moppo-blue-200);
  --ink-soft: var(--moppo-blue-50);
  --gold: var(--moppo-accent-line);
  --green: var(--moppo-success);
  --red: var(--moppo-danger);
  --green-soft: #EAF6F0;
  --red-soft: #FBEDEC;
  --rating: var(--moppo-blue-500);
  --num: var(--moppo-blue-500);
  --num-up: var(--moppo-success);
  --num-down: var(--moppo-danger);

  /* Old spacing aliases */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 48px;
  --s-6: 80px;
  --s-7: 120px;

  /* Old radius aliases */
  --radius: var(--moppo-radius-sm);
  --radius-sm: 4px;
  --radius-lg: var(--moppo-radius-md);

  /* Old shadow aliases */
  --shadow-sm: var(--moppo-shadow-sm);
  --shadow-md: var(--moppo-shadow-md);
  --shadow-lg: var(--moppo-shadow-lg);
  --shadow-glow: none;

  /* Old motion aliases */
  --ease: var(--moppo-ease);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: var(--moppo-duration);

  /* Old font aliases */
  --f-sans: var(--moppo-font-jp);
  --f-mono: var(--moppo-font-en);
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Root === */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--moppo-white);
  overflow-x: hidden;
}

body {
  font-family: var(--moppo-font-jp);
  font-weight: 400;
  color: var(--moppo-text);
  background: var(--moppo-white);
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* === Headings === */
h1, h2, h3, h4 {
  color: var(--moppo-blue-900);
  font-weight: 500;
  font-family: var(--moppo-font-jp);
  letter-spacing: -0.02em;
  line-height: 1.45;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

/* === Paragraph === */
p {
  line-height: 1.9;
  color: var(--moppo-text);
  margin: 0 0 1.6em;
}

p:last-child {
  margin-bottom: 0;
}

/* === Links === */
a {
  color: var(--moppo-blue-500);
  text-decoration: underline;
  text-decoration-color: var(--moppo-blue-200);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--moppo-duration) var(--moppo-ease), text-decoration-color var(--moppo-duration) var(--moppo-ease);
}

a:hover {
  color: var(--moppo-blue-600);
  text-decoration-color: var(--moppo-blue-500);
}

/* === Images === */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Lists === */
ul, ol {
  list-style: none;
}

/* === Form elements === */
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

/* === Container === */
.container {
  max-width: var(--moppo-page-width);
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: var(--moppo-content-width);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 767px) {
  .container,
  .container-narrow {
    padding: 0 20px;
  }
}

/* === Utility === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Selection === */
::selection {
  background: var(--moppo-blue-500);
  color: #fff;
}

/* === Focus styles === */
:focus-visible {
  outline: 2px solid var(--moppo-blue-500);
  outline-offset: 2px;
}

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

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

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }

.site-main, .site-footer {
  position: relative;
  z-index: 1;
}

/* === Code === */
code, kbd, samp {
  font-family: var(--moppo-font-en);
  font-size: 0.9em;
  background: var(--moppo-blue-50);
  padding: 2px 6px;
  border-radius: var(--moppo-radius-sm);
  border: 0.5px solid var(--moppo-border);
}

/* === Responsive type scale === */
@media (max-width: 767px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  h3 { font-size: 17px; }
}
