/* ============================================
   もざいくにゃん — Shared stylesheet
   4 colors × 2 modes (light/dark) = 8 themes
   ============================================ */

/* ---------- BASE NEUTRALS (light mode default) ---------- */
:root {
  --bg: #FFF6F2;
  --bg-alt: #FFEDE3;
  --surface: #FFFFFF;
  --ink: #2B2030;
  --ink-soft: #6B5A6E;
  --ink-mute: #A395A8;
  --line: #F2E0DA;
  --line-strong: #E2C6BD;

  /* color tokens — default = Strawberry */
  --accent: #FF6B9D;
  --accent-deep: #E2407A;
  --accent-soft: #FFD4E2;
  --secondary: #6BCBD6;
  --secondary-soft: #D4F1F4;

  --warn: #F0A04B;
  --danger: #E2407A;
  --ok: #4FB286;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-card: 0 6px 0 rgba(43, 32, 48, 0.06), 0 12px 28px rgba(43, 32, 48, 0.06);
  --shadow-pop: 0 4px 0 rgba(226, 64, 122, 0.18);
  --shadow-pop-deep: 0 6px 0 rgba(226, 64, 122, 0.25);

  --header-bg: rgba(255, 246, 242, 0.92);
  --footer-bg: #2B2030;
  --footer-ink: #F4EEF7;
  --checker-a: #fafafa;
  --checker-b: #ececec;

  --font-display: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Quicksand', system-ui, sans-serif;
  --font-body: 'M PLUS Rounded 1c', 'Hiragino Sans', 'Yu Gothic UI', system-ui, sans-serif;
}

/* ---------- COLOR VARIANTS (light mode accents) ---------- */
[data-color="strawberry"] {
  --bg: #FFF6F2; --bg-alt: #FFEDE3;
  --line: #F2E0DA; --line-strong: #E2C6BD;
  --header-bg: rgba(255, 246, 242, 0.92);
  --accent: #FF6B9D; --accent-deep: #E2407A; --accent-soft: #FFD4E2;
  --secondary: #6BCBD6; --secondary-soft: #D4F1F4;
  --shadow-pop: 0 4px 0 rgba(226, 64, 122, 0.18);
  --shadow-pop-deep: 0 6px 0 rgba(226, 64, 122, 0.25);
}
[data-color="mint"] {
  --bg: #F1FBF5; --bg-alt: #E3F6EA;
  --line: #D6EBDD; --line-strong: #A8D4B7;
  --header-bg: rgba(241, 251, 245, 0.92);
  --accent: #3FB97A; --accent-deep: #1E8E55; --accent-soft: #C9EED9;
  --secondary: #FFB23F; --secondary-soft: #FFE5BB;
  --shadow-pop: 0 4px 0 rgba(30, 142, 85, 0.18);
  --shadow-pop-deep: 0 6px 0 rgba(30, 142, 85, 0.25);
}
[data-color="soda"] {
  --bg: #EEF6FF; --bg-alt: #DDEAFA;
  --line: #D7E3F2; --line-strong: #B0C2DA;
  --header-bg: rgba(238, 246, 255, 0.92);
  --accent: #4D7FFF; --accent-deep: #2A57D6; --accent-soft: #C6D6FF;
  --secondary: #FF7BAC; --secondary-soft: #FFD3E2;
  --shadow-pop: 0 4px 0 rgba(42, 87, 214, 0.18);
  --shadow-pop-deep: 0 6px 0 rgba(42, 87, 214, 0.25);
}
[data-color="lavender"] {
  --bg: #F6F2FB; --bg-alt: #EBE2F5;
  --line: #E2D6EE; --line-strong: #C5B2D9;
  --header-bg: rgba(246, 242, 251, 0.92);
  --accent: #9659E4; --accent-deep: #6A36B2; --accent-soft: #E2D2F5;
  --secondary: #F6B85A; --secondary-soft: #FCE4B8;
  --shadow-pop: 0 4px 0 rgba(106, 54, 178, 0.18);
  --shadow-pop-deep: 0 6px 0 rgba(106, 54, 178, 0.25);
}

/* ---------- DARK MODE — neutral palette ---------- */
[data-mode="dark"] {
  --bg: #15121C;
  --bg-alt: #1F1A29;
  --surface: #251F33;
  --ink: #F4EEF7;
  --ink-soft: #B7ACC2;
  --ink-mute: #8478A0;
  --line: #322A44;
  --line-strong: #4A4060;
  --footer-bg: #0E0B14;
  --footer-ink: #F4EEF7;
  --checker-a: #1B1726;
  --checker-b: #221C2F;
  --shadow-card: 0 6px 0 rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* ---------- DARK + color: brighter accent, dark accent-soft ---------- */
[data-color="strawberry"][data-mode="dark"] {
  --accent: #FF7FB0; --accent-deep: #FFA1C6; --accent-soft: #3B2336;
  --secondary: #7FE0EA; --secondary-soft: #1E3A40;
  --header-bg: rgba(21, 18, 28, 0.86);
  --shadow-pop: 0 4px 0 rgba(255, 127, 176, 0.25);
  --shadow-pop-deep: 0 6px 0 rgba(255, 127, 176, 0.4);
}
[data-color="mint"][data-mode="dark"] {
  --accent: #5FD691; --accent-deep: #82E5AC; --accent-soft: #1F3A2A;
  --secondary: #FFC979; --secondary-soft: #3A2D17;
  --header-bg: rgba(15, 22, 18, 0.86);
  --shadow-pop: 0 4px 0 rgba(95, 214, 145, 0.25);
  --shadow-pop-deep: 0 6px 0 rgba(95, 214, 145, 0.4);
  /* Override surface to a slightly green-tinted dark for cohesion */
  --bg: #101A14;
  --bg-alt: #16241B;
  --surface: #1B2C22;
  --line: #243A2D;
  --line-strong: #355445;
  --footer-bg: #0A1410;
  --checker-a: #131E16;
  --checker-b: #1A271E;
}
[data-color="soda"][data-mode="dark"] {
  --accent: #7BA1FF; --accent-deep: #A4BEFF; --accent-soft: #1F2A4A;
  --secondary: #FF9BBE; --secondary-soft: #3A1F2C;
  --header-bg: rgba(14, 18, 30, 0.86);
  --shadow-pop: 0 4px 0 rgba(123, 161, 255, 0.25);
  --shadow-pop-deep: 0 6px 0 rgba(123, 161, 255, 0.4);
  --bg: #0E1220;
  --bg-alt: #161B2D;
  --surface: #1C2238;
  --line: #2A3149;
  --line-strong: #3D4666;
  --footer-bg: #080B17;
  --checker-a: #121627;
  --checker-b: #181E33;
}
[data-color="lavender"][data-mode="dark"] {
  --accent: #B985FB; --accent-deep: #CCA3FF; --accent-soft: #2F1F45;
  --secondary: #FFCB7F; --secondary-soft: #3A2C16;
  --header-bg: rgba(20, 16, 30, 0.86);
  --shadow-pop: 0 4px 0 rgba(185, 133, 251, 0.25);
  --shadow-pop-deep: 0 6px 0 rgba(185, 133, 251, 0.4);
  --bg: #14101E;
  --bg-alt: #1C1828;
  --surface: #221C33;
  --line: #322846;
  --line-strong: #483B62;
  --footer-bg: #0C0916;
  --checker-a: #181227;
  --checker-b: #1F1830;
}

/* ============================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 700;
}
a:hover { text-decoration: underline; }

/* ----------- Header / Nav ----------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 2px solid var(--line);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
}
.brand__mark img { display: block; width: 34px; height: 34px; object-fit: contain; }
.site-footer__brand img {
  display: block;
  width: 28px;
  height: 28px;
  padding: 4px;
  background: var(--accent-soft);
  border-radius: 50%;
  box-sizing: content-box;
}

.nav-primary {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav-primary a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
}
.nav-primary a:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
  text-decoration: none;
}
.nav-primary a.is-active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-left: auto;
  font-size: 18px;
  cursor: pointer;
}

/* Dark/light quick toggle (header) */
.theme-toggle {
  appearance: none;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.15s, background-color 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-deep); }
.theme-toggle__sun, .theme-toggle__moon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.theme-toggle__moon { opacity: 0; transform: rotate(-90deg); }
[data-mode="dark"] .theme-toggle__sun { opacity: 0; transform: rotate(90deg); }
[data-mode="dark"] .theme-toggle__moon { opacity: 1; transform: rotate(0); }

@media (max-width: 760px) {
  .nav-toggle { display: grid; place-items: center; order: 2; margin-left: auto; }
  .theme-toggle { order: 3; margin-left: 0; }
  .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: 10px;
    margin: 0;
    border-bottom: 2px solid var(--line);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12);
  }
  .nav-primary.is-open { display: flex; }
  .nav-primary a { padding: 12px 16px; }
}

/* ----------- Footer ----------- */
.site-footer {
  margin-top: auto;
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 36px 20px 28px;
}
.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.site-footer h4 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  display: block;
  padding: 4px 0;
  font-weight: 500;
  font-size: 14px;
}
.site-footer a:hover { color: #fff; }
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 8px;
}
.site-footer__copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 28px;
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ----------- Page shell ----------- */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.page--wide {
  max-width: 1180px;
}
.page h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 10px;
  line-height: 1.2;
}
.page h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3.5vw, 28px);
  margin: 36px 0 14px;
  line-height: 1.3;
}
.page h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 22px 0 8px;
}
.page p {
  line-height: 1.85;
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 16px;
}
.page ul, .page ol {
  line-height: 1.9;
  color: var(--ink-soft);
  padding-left: 22px;
}
.page li { margin-bottom: 4px; }

.lede {
  font-size: 17px;
  color: var(--ink-soft);
  background: var(--surface);
  padding: 18px 22px;
  border-radius: var(--r-lg);
  border: 2px solid var(--line);
  margin: 18px 0 32px;
}

.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-card);
}

.note {
  background: var(--secondary-soft);
  border-left: 4px solid var(--secondary);
  padding: 14px 18px;
  border-radius: var(--r-md);
  margin: 14px 0;
  color: var(--ink);
  font-size: 14px;
}

/* ----------- Buttons ----------- */
.btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-pop);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-decoration: none;
}
.btn:hover { background: var(--accent-deep); box-shadow: var(--shadow-pop-deep); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.btn:disabled { background: var(--ink-mute); cursor: not-allowed; box-shadow: none; opacity: 0.7; }

[data-mode="dark"] .btn { color: #15121C; }
[data-mode="dark"] .btn:hover { color: #15121C; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--bg-alt); color: var(--ink); }
[data-mode="dark"] .btn--ghost { color: var(--ink); }
[data-mode="dark"] .btn--ghost:hover { color: var(--ink); }

.btn--secondary {
  background: var(--secondary);
  color: var(--ink);
}
.btn--secondary:hover { background: var(--secondary); filter: brightness(0.95); }

.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--lg { padding: 16px 30px; font-size: 17px; }
.btn--block { width: 100%; }

/* Eyebrow tag */
.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  margin-bottom: 12px;
}
