/* ==========================================================
   Base design system — brand colors are injected from config.php
   via CSS custom properties (--primary, --accent, ...).
   ========================================================== */
:root {
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-muted: #78716c;
  --line: #e7e5e4;
  --bg: #fffdfa;
  --card: #ffffff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(28, 25, 23, .18);
  --shadow-lg: 0 30px 60px -20px rgba(28, 25, 23, .25);
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --container: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 999; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px; font-weight: 600;
  border: 2px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -10px var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--bg-soft); color: var(--primary-dark); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 250, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(0,0,0,.25); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; flex-shrink: 0; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-text em { font-style: normal; color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav ul { display: flex; gap: 1.25rem; }
.main-nav a:not(.btn) { color: var(--ink-soft); font-weight: 500; position: relative; padding: .25rem 0; }
.main-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--primary); transition: width .3s var(--ease); }
.main-nav a:not(.btn):hover { color: var(--ink); }
.main-nav a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; color: var(--ink); border-radius: 8px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: inline; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 520px; height: 520px; background: var(--bg-soft); top: -180px; right: -120px; }
.blob-2 { width: 380px; height: 380px; background: var(--accent); opacity: .18; bottom: -200px; left: -120px; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: var(--bg-soft); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--primary); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 2.25rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.75rem; color: var(--ink); line-height: 1; }
.hero-stats span { font-size: .85rem; color: var(--ink-muted); margin-top: .25rem; }

.hero-card { position: relative; background: var(--card); border-radius: 28px; padding: 1.5rem; box-shadow: var(--shadow-lg); border: 1px solid var(--line); transform: rotate(-2deg); transition: transform .6s var(--ease); }
.hero-card:hover { transform: rotate(0deg) scale(1.01); }
.hero-illustration { aspect-ratio: 1 / .9; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(145deg, var(--bg-soft), #fff 70%); overflow: hidden; }
.hero-illustration svg { width: 78%; height: auto; }
.hero-badge { position: absolute; left: -1rem; bottom: 1.5rem; display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: 14px; padding: .65rem .9rem; box-shadow: var(--shadow); border: 1px solid var(--line); color: var(--primary); }
.hero-badge div { display: flex; flex-direction: column; line-height: 1.2; }
.hero-badge strong { color: var(--ink); font-size: .9rem; }
.hero-badge span { color: var(--ink-muted); font-size: .75rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head p { color: var(--ink-soft); }
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.variety-swatch { height: 150px; display: grid; place-items: center; background: linear-gradient(135deg, var(--swatch), color-mix(in srgb, var(--swatch) 60%, #fff)); }
.variety-emoji { font-size: 4rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,.2)); }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.tag-list li { font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: var(--bg-soft); color: var(--primary-dark); }

.benefit { background: #fff; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); }
.benefit-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-soft); color: var(--primary); margin-bottom: 1rem; }
.benefit p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.post-thumb { position: relative; height: 170px; display: grid; place-items: center; background: linear-gradient(135deg, var(--thumb), color-mix(in srgb, var(--thumb) 55%, #fff)); }
.post-emoji { font-size: 3.6rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,.2)); transition: transform .4s var(--ease); }
.post-emoji.big { font-size: 4.5rem; display: block; margin-bottom: .5rem; }
.card:hover .post-emoji { transform: scale(1.12) rotate(-6deg); }
.post-cat { position: absolute; top: .9rem; left: .9rem; background: rgba(255,255,255,.92); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--ink-muted); margin-bottom: .6rem; }
.post-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--primary); }
.link-more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; margin-top: .5rem; }
.link-more svg { transition: transform .3s; }
.link-more:hover svg { transform: translateX(4px); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 800px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .75rem; overflow: hidden; }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { flex-shrink: 0; color: var(--primary); transition: transform .3s; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item[open] summary { color: var(--primary-dark); }
.faq-answer { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); }
.faq-answer p { margin: 0; }

/* ---------- CTA ---------- */
.cta-section { padding-top: 0; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 2rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 28px; padding: clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden; }
.cta-box::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.12); right: -100px; top: -140px; }
.cta-box h2 { color: #fff; }
.cta-box p { margin: 0; opacity: .9; max-width: 50ch; }
.cta-box .btn { position: relative; z-index: 1; }

/* ---------- Article page ---------- */
.breadcrumb ol { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--ink-muted); margin-bottom: 1.5rem; justify-content: center; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.article-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--thumb) 25%, #fff), var(--bg)); }
.article-hero .lead { margin-inline: auto; }
.article-hero .post-meta { justify-content: center; }
.article-body { padding: 2.5rem 0 3rem; font-size: 1.08rem; }
.article-body h2 { font-size: 1.6rem; margin-top: 2rem; }
.article-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.2rem; }
.article-body li { margin-bottom: .35rem; }
.article-share { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; }
.article-share a { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; }
.article-share a:hover { border-color: var(--primary); }
.page-404 h1 { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d6d3d1; padding: 3.5rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr 1fr; gap: 2.5rem; }
.footer-brand .brand { color: #fff; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; color: #a8a29e; max-width: 36ch; }
.footer-col h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col li { margin-bottom: .55rem; font-size: .92rem; }
.footer-col a { color: #d6d3d1; display: inline-flex; align-items: center; gap: .4rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: #a8a29e; }
.footer-bottom p { margin: 0; }

.back-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px) rotate(-90deg); transition: opacity .3s, transform .3s; z-index: 40; }
.back-top.show { opacity: 1; transform: translateY(0) rotate(-90deg); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { max-width: 420px; margin-inline: auto; width: 100%; }
  .hero-badge { left: .5rem; }
  .cta-box { flex-direction: column; align-items: flex-start; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
    flex-direction: column; align-items: stretch; gap: .5rem;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 1rem; box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .3s var(--ease);
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: .75rem .5rem; border-radius: 8px; }
  .main-nav ul a::after { display: none; }
  .btn-nav { justify-content: center; margin-top: .5rem; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .hero-stats strong { font-size: 1.4rem; }
  .article-body { font-size: 1rem; }
}
