/* AnnMax Notes — notebook-style static site. Light + dark, responsive. */

:root {
  --bg: #faf7f2;
  --bg-soft: #f2ece1;
  --surface: #fffdf9;
  --ink: #211d18;
  --ink-2: #57504a;
  --ink-3: #8a8279;
  --line: #e7dfd2;
  --accent: #b45309;
  --accent-strong: #92400e;
  --accent-soft: rgba(180, 83, 9, 0.09);
  --code-bg: #241f19;
  --code-ink: #f4efe4;
  --shadow: 0 1px 2px rgba(33, 29, 24, 0.05), 0 6px 20px rgba(33, 29, 24, 0.06);
  --shadow-lg: 0 12px 40px rgba(33, 29, 24, 0.12);
  --radius: 14px;
  --radius-lg: 18px;
  --wrap: 1080px;
  --narrow: 760px;
  --c-journey: #b45309;
  --c-build: #0f766e;
  --c-platform: #6d28d9;
  --c-history: #475569;
  --c-thinking: #be185d;
  --c-life: #15803d;
  --c-compare: #1d4ed8;
  --c-ai: #a21caf;
}

[data-theme="dark"] {
  --bg: #16130f;
  --bg-soft: #1e1a15;
  --surface: #1d1914;
  --ink: #ece7de;
  --ink-2: #b9b1a5;
  --ink-3: #7f776c;
  --line: #2e2922;
  --accent: #f0a860;
  --accent-strong: #f5bd85;
  --accent-soft: rgba(240, 168, 96, 0.12);
  --code-bg: #100e0b;
  --code-ink: #ece7de;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --c-journey: #f0a860;
  --c-build: #5eead4;
  --c-platform: #c4b5fd;
  --c-history: #94a3b8;
  --c-thinking: #f9a8d4;
  --c-life: #86efac;
  --c-compare: #93c5fd;
  --c-ai: #f0abfc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130f;
    --bg-soft: #1e1a15;
    --surface: #1d1914;
    --ink: #ece7de;
    --ink-2: #b9b1a5;
    --ink-3: #7f776c;
    --line: #2e2922;
    --accent: #f0a860;
    --accent-strong: #f5bd85;
    --accent-soft: rgba(240, 168, 96, 0.12);
    --code-bg: #100e0b;
    --code-ink: #ece7de;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --c-journey: #f0a860;
    --c-build: #5eead4;
    --c-platform: #c4b5fd;
    --c-history: #94a3b8;
    --c-thinking: #f9a8d4;
    --c-life: #86efac;
    --c-compare: #93c5fd;
    --c-ai: #f0abfc;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand {
  font-family: 'Fraunces', 'Songti SC', 'Noto Serif JP', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--accent-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: 62px; display: flex; align-items: center; gap: 28px;
}
.brand { font-size: 1.18rem; color: var(--ink); font-weight: 700; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav-menu { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 20px; }
.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-links a {
  color: var(--ink-2); font-size: 0.93rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); }
.nav-side { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 0.8rem; }
.lang-switch a { color: var(--ink-3); padding: 4px 6px; border-radius: 6px; }
.lang-switch a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.lang-switch a.is-current { color: var(--accent-strong); font-weight: 600; background: var(--accent-soft); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 36px; height: 36px; padding: 8px; background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }

@media (max-width: 880px) {
  .nav { gap: 12px; justify-content: space-between; }
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 8px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; box-shadow: var(--shadow-lg);
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 2px; }
  .nav-links a { display: block; padding: 10px 12px; font-size: 1rem; }
  .nav-side { justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }
  .lang-switch { flex-wrap: wrap; }
}

/* ---------- hero ---------- */
.hero { padding: 88px 0 56px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 600; color: var(--accent); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 21em; margin-bottom: 18px; }
.hero-sub { color: var(--ink-2); font-size: 1.06rem; max-width: 46rem; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 0.94rem;
  border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #1a130a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #1a130a; } }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-soft); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.section-head h2 { font-size: 1.6rem; }
.section-sub { color: var(--ink-3); font-size: 0.95rem; margin-top: 6px; }
.section-link { font-weight: 600; font-size: 0.92rem; white-space: nowrap; }

.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 12px; }
.page-sub { color: var(--ink-2); max-width: 46rem; }

/* ---------- note cards ---------- */
.note-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.note-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.note-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.note-card-link { display: block; padding: 22px 22px 18px; color: inherit; }
.note-card-link:hover { text-decoration: none; }
.note-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-3); margin-bottom: 12px;
}
.note-card-title { font-size: 1.16rem; margin-bottom: 10px; }
.note-card-desc { color: var(--ink-2); font-size: 0.92rem; line-height: 1.65; margin-bottom: 14px; }
.note-card-more { color: var(--accent); font-weight: 600; font-size: 0.88rem; }

.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em;
}
.chip-journey { color: var(--c-journey); background: color-mix(in srgb, var(--c-journey) 13%, transparent); }
.chip-build-log { color: var(--c-build); background: color-mix(in srgb, var(--c-build) 13%, transparent); }
.chip-platform { color: var(--c-platform); background: color-mix(in srgb, var(--c-platform) 13%, transparent); }
.chip-history { color: var(--c-history); background: color-mix(in srgb, var(--c-history) 13%, transparent); }
.chip-thinking { color: var(--c-thinking); background: color-mix(in srgb, var(--c-thinking) 13%, transparent); }
.chip-life { color: var(--c-life); background: color-mix(in srgb, var(--c-life) 13%, transparent); }
.chip-compare { color: var(--c-compare); background: color-mix(in srgb, var(--c-compare) 13%, transparent); }
.chip-ai { color: var(--c-ai); background: color-mix(in srgb, var(--c-ai) 13%, transparent); }
.dot { color: var(--ink-3); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip-filter {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 0.86rem; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.chip-filter:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip-filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .chip-filter.is-active { color: #1a130a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip-filter.is-active { color: #1a130a; } }

/* ---------- products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 14px;
  border-top: 3px solid var(--accent);
}
.product-extensions { border-top-color: var(--c-journey); }
.product-remind { border-top-color: var(--c-build); }
.product-pwa { border-top-color: var(--c-platform); }
.product-card-head { display: flex; align-items: center; gap: 12px; }
.product-card-head h3 { font-size: 1.15rem; }
.product-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--accent-soft); color: var(--accent-strong);
}
.product-card p { color: var(--ink-2); font-size: 0.93rem; line-height: 1.7; }
.product-points { list-style: none; display: grid; gap: 8px; color: var(--ink-2); font-size: 0.9rem; }
.product-points li { padding-left: 22px; position: relative; }
.product-points li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}
.product-card .btn { align-self: flex-start; margin-top: auto; }
.product-contact { font-size: 0.84rem; }
.product-contact a { color: var(--ink-3); }
.product-contact a:hover { color: var(--accent); }
.products-outro { color: var(--ink-2); max-width: 46rem; margin-top: 34px; }
.about-teaser h2 { font-size: 1.5rem; margin-bottom: 14px; }
.about-teaser p { color: var(--ink-2); margin-bottom: 16px; }

/* ---------- article ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-3); margin: 34px 0 26px; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent); }
.crumb-sep { margin: 0 4px; }
.post-header { margin-bottom: 30px; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-3); margin-bottom: 14px; }
.post-header h1 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); margin-bottom: 14px; }
.post-lede { color: var(--ink-2); font-size: 1.05rem; line-height: 1.75; }

.post-body { font-size: 1.02rem; }
.post-body > p { margin-bottom: 20px; line-height: 1.9; color: var(--ink); }
.post-body h2 { font-size: 1.45rem; margin: 44px 0 16px; }
.post-body h3 { font-size: 1.15rem; margin: 30px 0 12px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; color: var(--ink); }
.post-body li { margin-bottom: 9px; line-height: 1.8; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote {
  margin: 26px 0; padding: 16px 22px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 12px 12px 0;
  font-style: italic; color: var(--ink-2);
}
.post-body blockquote p { margin: 0; }
.post-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.88em; background: var(--bg-soft); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px;
}
.post-body pre {
  background: var(--code-bg); color: var(--code-ink); border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; margin: 0 0 22px; line-height: 1.65;
}
.post-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 0.86rem; }
.post-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 0.92rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.post-body th { background: var(--bg-soft); font-weight: 600; }
.post-body a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--accent); }

.post-back { margin: 40px 0 0; }

.product-cta {
  margin: 34px 0 0; padding: 26px 28px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius-lg);
}
.product-cta .eyebrow { margin-bottom: 8px; }
.product-cta-name { font-size: 1.3rem; margin-bottom: 10px; }
.product-cta p { color: var(--ink-2); margin-bottom: 18px; }

.related { margin: 56px 0 20px; border-top: 1px solid var(--line); padding-top: 34px; }
.related h2 { font-size: 1.3rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; background: var(--bg-soft); border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 52px 24px 40px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.footer-col h2 {
  font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { color: var(--ink-2); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-brand .brand { display: inline-block; margin-bottom: 12px; }
.footer-brand p { color: var(--ink-3); font-size: 0.87rem; max-width: 26rem; }
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 40px; }
  .section { padding: 44px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .note-card, .btn { transition: none; }
}
