/* =====================================================================
   wanwangaogao — Portfolio Site Stylesheet
   Design direction: Playful × Neon (warm cream + magenta/teal accents)
   ===================================================================== */

/* --------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------- */
:root {
  /* Color palette */
  --bg: #fff8e7;
  --bg-soft: #fdefc7;
  --bg-elevated: #ffffff;
  --ink: #1b1410;
  --ink-soft: #3a2e26;
  --ink-muted: #6e5b50;
  --ink-faint: #a89281;
  --line: #1b1410;
  --line-soft: #d9c9b3;

  --accent-1: #ff3d7f;      /* magenta */
  --accent-1-soft: #ffd5e3;
  --accent-2: #00c2a8;      /* turquoise */
  --accent-2-soft: #c4f1e9;
  --accent-3: #ffd23f;      /* yellow */
  --accent-3-soft: #fff1b8;
  --accent-4: #7c3aed;      /* violet (sparing use) */

  --shadow-card: 6px 6px 0 var(--line);
  --shadow-card-hover: 10px 10px 0 var(--line);
  --shadow-soft: 0 12px 30px rgba(27, 20, 16, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --border-thick: 2.5px solid var(--line);
  --border-thin: 1.5px solid var(--line);

  /* Typography */
  --font-display: "Space Grotesk", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Manrope", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 760px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 180ms;
  --duration-med: 320ms;
  --duration-slow: 520ms;
}

/* --------------------------------------------------------------------
   2. Reset / Base
   -------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(15px, 1vw + 13px, 17px);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top left, rgba(255, 61, 127, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(0, 194, 168, 0.06) 0%, transparent 60%),
    url("../img/noise.svg");
  background-attachment: fixed;
  background-size: cover, cover, 220px 220px;
  background-blend-mode: normal, normal, multiply;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-out),
              text-decoration-color var(--duration-fast) var(--ease-out);
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--accent-3);
  color: var(--ink);
}

/* --------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--space-4);
}

h1 {
  font-weight: 800;
  font-size: clamp(2.3rem, 5vw + 1rem, 4.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.7rem, 2.5vw + 1rem, 2.6rem);
}

h3 {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem);
}

h4 { font-size: 1.15rem; }
p  { margin: 0 0 var(--space-4); }

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

strong { font-weight: 700; color: var(--ink); }
em { font-style: italic; }

small,
.text-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
}

hr {
  border: none;
  height: 0;
  border-top: var(--border-thin);
  margin: var(--space-7) 0;
}

blockquote {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--accent-1);
  background: var(--accent-1-soft);
  border-radius: var(--radius-sm);
  font-style: italic;
}

ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.5em;
}

li + li { margin-top: var(--space-2); }

/* --------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  position: relative;
}

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

main {
  display: block;
  min-height: 60vh;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-1);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

.eyebrow::before {
  content: "◉";
  color: var(--accent-2);
  font-size: 1.1em;
}

/* --------------------------------------------------------------------
   5. Site Header
   -------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 231, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: var(--border-thin);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand__paw {
  display: inline-block;
  width: 26px;
  height: 26px;
  background: var(--accent-1);
  color: var(--bg);
  border: var(--border-thin);
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 13px;
  font-weight: 800;
  transform: rotate(-6deg);
  transition: transform var(--duration-fast) var(--ease-out);
}

.brand:hover .brand__paw { transform: rotate(8deg) scale(1.08); }

.nav-main {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
}

.nav-main a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.nav-main a:hover,
.nav-main a:focus-visible,
.nav-main a[aria-current="page"] {
  background: var(--accent-3);
  color: var(--ink);
}

.nav-main a[aria-current="page"] {
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3);
    background: var(--bg);
    border-bottom: var(--border-thin);
  }
  .nav-main[data-open="true"] { display: flex; }
  .nav-main a {
    padding: 0.7rem 0.6rem;
    border-radius: var(--radius-sm);
  }
}

/* --------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: clamp(2.8rem, 7vw + 0.5rem, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-5);
}

.hero__title span {
  display: inline-block;
}

.hero__title .word-1 { color: var(--ink); }
.hero__title .word-2 {
  color: var(--accent-1);
  transform: rotate(-2deg);
}
.hero__title .word-3 {
  color: var(--accent-2);
  display: block;
}

.hero__lead {
  max-width: 38ch;
  font-size: clamp(1.05rem, 0.6vw + 1rem, 1.25rem);
  color: var(--ink-soft);
  margin-bottom: var(--space-6);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-5);
}

.hero__sticker {
  position: absolute;
  right: clamp(-1rem, 2vw, 3rem);
  top: clamp(1rem, 3vw, 3rem);
  background: var(--accent-3);
  color: var(--ink);
  border: var(--border-thick);
  border-radius: 50%;
  width: clamp(120px, 18vw, 180px);
  height: clamp(120px, 18vw, 180px);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.85rem, 1vw + 0.5rem, 1.15rem);
  line-height: 1.1;
  transform: rotate(8deg);
  box-shadow: var(--shadow-card);
  z-index: 0;
}

.hero__sticker::after {
  content: "★";
  position: absolute;
  top: -12px;
  right: -8px;
  color: var(--accent-1);
  font-size: 1.4rem;
  text-shadow: 0 0 0 var(--line);
}

@media (max-width: 600px) {
  .hero__sticker {
    position: static;
    margin: var(--space-5) 0 0;
    transform: rotate(4deg);
  }
}

/* --------------------------------------------------------------------
   7. Buttons & Pills
   -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-pill);
  border: var(--border-thick);
  background: var(--bg-elevated);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  box-shadow: 4px 4px 0 var(--line);
}

.btn:hover,
.btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
  color: var(--ink);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--line);
}

.btn--primary {
  background: var(--accent-1);
  color: var(--bg);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-1);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
  box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--bg-elevated);
  box-shadow: 4px 4px 0 var(--line);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 4px 4px 0 var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  background: var(--bg-elevated);
  border: var(--border-thin);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.pill--accent { background: var(--accent-2-soft); }
.pill--magenta { background: var(--accent-1-soft); }
.pill--yellow { background: var(--accent-3-soft); }

/* --------------------------------------------------------------------
   8. Section Heading
   -------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.section-head__title {
  margin: 0;
  font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
}

.section-head__title span {
  color: var(--accent-1);
}

.section-head__more {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  padding-bottom: 2px;
}

.section-head__more:hover {
  color: var(--accent-1);
  border-color: var(--accent-1);
}

/* --------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-grid--works {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2vw, 1.6rem);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-med) var(--ease-out),
              box-shadow var(--duration-med) var(--ease-out);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--accent-3-soft) 100%);
  opacity: 0;
  transition: opacity var(--duration-med) var(--ease-out);
  pointer-events: none;
  z-index: -1;
}

.card:hover,
.card:focus-visible {
  transform: translate(-4px, -4px) rotate(-0.4deg);
  box-shadow: var(--shadow-card-hover);
  color: var(--ink);
}

.card:hover::after,
.card:focus-visible::after { opacity: 1; }

.card__no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

.card__lead {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.card__arrow {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-2);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform var(--duration-fast) var(--ease-out);
}

.card:hover .card__arrow {
  transform: rotate(-25deg) scale(1.12);
  background: var(--accent-1);
}

/* Works featured card variant */
.card--featured {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--accent-2-soft) 0%, var(--bg-elevated) 60%);
}

@media (max-width: 720px) {
  .card--featured { grid-column: span 1; }
}

/* --------------------------------------------------------------------
   10. Blog list
   -------------------------------------------------------------------- */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.post-list__item {
  margin: 0;
  border-bottom: var(--border-thin);
  padding-bottom: var(--space-5);
}

.post-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-list__link {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  gap: var(--space-4) var(--space-5);
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out);
}

.post-list__link:hover,
.post-list__link:focus-visible {
  background: var(--bg-soft);
}

.post-list__date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.post-list__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.4;
}

.post-list__arrow {
  font-family: var(--font-mono);
  color: var(--accent-1);
  font-weight: 700;
}

@media (max-width: 640px) {
  .post-list__link {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  .post-list__arrow { display: none; }
}

/* --------------------------------------------------------------------
   11. Article (Blog post)
   -------------------------------------------------------------------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.article__header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: var(--border-thin);
}

.article__title {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.8rem);
  margin-bottom: var(--space-3);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article__body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article__body h2 {
  margin-top: var(--space-7);
  font-size: 1.6rem;
  position: relative;
  padding-left: var(--space-4);
}

.article__body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 6px;
  background: var(--accent-1);
  border-radius: 3px;
}

.article__body h3 { margin-top: var(--space-6); }

.article__body p,
.article__body ul,
.article__body ol { margin-bottom: var(--space-4); }

.article__body pre {
  background: var(--ink);
  color: var(--bg-soft);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  border: var(--border-thin);
  margin-bottom: var(--space-5);
}

.article__body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.article__footer {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: var(--border-thin);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------
   12. Forms
   -------------------------------------------------------------------- */
.form {
  display: grid;
  gap: var(--space-4);
}

.form__field {
  display: grid;
  gap: var(--space-2);
}

.form__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form__label .req {
  color: var(--accent-1);
  font-size: 0.8em;
  letter-spacing: 0;
}

.form__hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--bg-elevated);
  border: var(--border-thin);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form__textarea { min-height: 180px; resize: vertical; }

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent-1);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-1-soft);
}

.form__honeypot {
  position: absolute;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

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

/* --------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-9);
  padding: var(--space-7) 0 var(--space-6);
  border-top: var(--border-thin);
  background:
    linear-gradient(180deg, rgba(255, 61, 127, 0.04), transparent 30%),
    var(--bg);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1.6fr 1fr 1fr;
  margin-bottom: var(--space-6);
}

@media (max-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-footer__brand .brand__paw { width: 30px; height: 30px; line-height: 26px; }

.site-footer__col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

.site-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__col a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-footer__col a:hover { color: var(--accent-1); }

.site-footer__bottom {
  border-top: var(--border-thin);
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.site-footer__bottom a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer__bottom a:hover { color: var(--accent-1); }

/* --------------------------------------------------------------------
   14. Legal / static pages
   -------------------------------------------------------------------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  font-size: 1rem;
  line-height: 1.8;
}

.legal h1 {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem);
  margin-bottom: var(--space-3);
}

.legal__meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: var(--space-6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal h2 {
  margin-top: var(--space-7);
  font-size: 1.4rem;
  padding-bottom: var(--space-2);
  border-bottom: var(--border-thin);
}

.legal h3 { margin-top: var(--space-5); font-size: 1.1rem; }

.legal ul, .legal ol { margin-bottom: var(--space-4); }

/* --------------------------------------------------------------------
   15. 404
   -------------------------------------------------------------------- */
.not-found {
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.not-found__code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 1;
  color: var(--accent-1);
  margin: 0;
  letter-spacing: -0.04em;
  transform: rotate(-3deg);
  display: inline-block;
}

.not-found__title { margin-top: var(--space-4); }

.not-found__lead { max-width: 32ch; margin: 0 auto var(--space-6); }

.not-found__cta { display: inline-flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }

/* --------------------------------------------------------------------
   16. Stats / About list
   -------------------------------------------------------------------- */
.stack {
  display: grid;
  gap: var(--space-3);
}

.stack--row {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}

.kv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.kv-list li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding-bottom: var(--space-3);
  border-bottom: var(--border-thin);
}

.kv-list li:last-child { border-bottom: none; padding-bottom: 0; }

.kv-list dt,
.kv-list .k {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.kv-list dd,
.kv-list .v {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
}

@media (max-width: 560px) {
  .kv-list li { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* --------------------------------------------------------------------
   17. CTA Block
   -------------------------------------------------------------------- */
.cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
  border: var(--border-thick);
  box-shadow: var(--shadow-card);
}

.cta::after {
  content: "🐾";
  position: absolute;
  right: -10px;
  bottom: -30px;
  font-size: 10rem;
  opacity: 0.15;
  transform: rotate(-15deg);
}

.cta h2 {
  color: var(--bg);
  font-size: clamp(1.8rem, 3vw + 1rem, 2.6rem);
  margin-bottom: var(--space-4);
}

.cta p { color: var(--bg-soft); margin-bottom: var(--space-5); max-width: 52ch; }

.cta .btn {
  background: var(--accent-3);
  color: var(--ink);
  border-color: var(--bg);
  box-shadow: 4px 4px 0 var(--accent-1);
}

.cta .btn:hover {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--accent-1);
}

/* --------------------------------------------------------------------
   18. Motion (initial reveal)
   --------------------------------------------------------------------
   JS が動いて IntersectionObserver の準備が完了したタイミングで
   `.reveal-armed` が要素に付与され、初めて opacity:0 になります。
   これにより、JS 無効・拡張機能ブロック・app.js 読み込み失敗時には
   コンテンツがそのまま読めるフォールバックになります。
*/
[data-reveal].reveal-armed {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pop-in {
  0%   { opacity: 0; transform: translateY(20px) scale(0.98); }
  100% { opacity: 1; transform: none; }
}

.hero__title .word-1 { animation: pop-in 0.6s var(--ease-out) both 0.05s; }
.hero__title .word-2 { animation: pop-in 0.6s var(--ease-out) both 0.18s; }
.hero__title .word-3 { animation: pop-in 0.6s var(--ease-out) both 0.32s; }
.hero__lead          { animation: pop-in 0.6s var(--ease-out) both 0.46s; }
.hero__meta          { animation: pop-in 0.6s var(--ease-out) both 0.58s; }

/* --------------------------------------------------------------------
   19. Reduced motion
   -------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal].reveal-armed { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------
   20. Utilities
   -------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent-3);
  border: var(--border-thick);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus { top: 1rem; }

.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 56ch; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-6 { margin-top: var(--space-6); }
.mb-6 { margin-bottom: var(--space-6); }
