/* Shared styles for /blog/ (index + every post). Tokens mirror the landing page. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(../assets/fonts/fredoka.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/nunito-regular.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(../assets/fonts/nunito-bold.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(../assets/fonts/nunito-extrabold.woff2) format('woff2'); }
@font-face { font-family: 'Round Fallback'; src: local('Arial Rounded MT Bold'), local('Arial'); size-adjust: 96%; ascent-override: 95%; descent-override: 24%; line-gap-override: 0%; }

:root {
  --ink: #1A1040; --text: #4A4568; --violet: #6C63FF; --violet-dk: #5A50F0;
  --lav: #E9E8FF; --sun: #FBD662; --cream: #FFF6D6; --peach: #FCDED8; --mint: #E3F8EB; --sky: #DDF1FF;
  --display: 'Fredoka', 'Round Fallback', system-ui, sans-serif;
  --body: 'Nunito', 'Round Fallback', system-ui, sans-serif;
  --maxw: 1180px; --prose: 700px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: #fff; }
body { background: #fff; color: var(--text); font-family: var(--body); font-size: 18px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main { overflow-x: clip; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
.lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; max-width: 40em; }

/* nav */
.nav-bar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); box-shadow: 0 1px 0 rgba(26,16,64,0.08); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--ink); white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links .link { font-weight: 700; font-size: 16px; }
.nav-links .link:hover, .nav-links .link[aria-current] { color: var(--violet); }
.nav-cta { font-family: var(--display); font-weight: 600; font-size: 18px; padding: 9px 18px; border-radius: 14px; background: var(--violet); color: #fff; white-space: nowrap; }
@media (max-width: 760px) { .nav-links .link { display: none; } }

/* store badges (same as landing) */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 9px 24px 9px 18px; border-radius: 16px; background: var(--ink); color: #fff; transition: transform .15s ease, background .15s ease; }
.store:hover { transform: translateY(-2px); }
.store.primary { background: var(--violet); }
.store.primary:hover { background: var(--violet-dk); }
.store svg, .store img { flex: none; }
.store span { display: grid; line-height: 1.05; text-align: left; }
.store small { font-size: 12px; font-weight: 700; opacity: .85; }
.store b { font-family: var(--display); font-weight: 600; font-size: 22px; }
@media (max-width: 760px) { .stores { flex-direction: column; } .store { width: 100%; justify-content: center; } }

/* ---------- blog index ---------- */
.blog-head { background: linear-gradient(180deg, var(--cream), #fff); }
.blog-head .wrap { padding-top: clamp(56px, 9vh, 104px); padding-bottom: 48px; }
.blog-head h1 { font-size: clamp(56px, 8vw, 112px); margin-bottom: 18px; }

.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 72px 56px; padding-bottom: 104px; }
.post { display: grid; gap: 18px; align-content: start; }
.post-img { position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.post-img::before { content: ""; position: absolute; inset: 4% 8%; z-index: -1; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; background: var(--tint, var(--lav)); transition: transform .4s ease; }
.post:nth-child(4n+2) .post-img { --tint: var(--peach); }
.post:nth-child(4n+3) .post-img { --tint: var(--mint); }
.post:nth-child(4n+4) .post-img { --tint: var(--sky); }
.post-img img { width: 72%; transition: transform .4s ease; }
.post:hover .post-img img { transform: rotate(-2deg) scale(1.03); }
.post-meta { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.post h2 { font-size: clamp(28px, 2.8vw, 36px); margin-bottom: 10px; }
.post h2 a:hover { color: var(--violet); }
/* first post runs full width, image left */
.post:first-child { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
.post:first-child h2 { font-size: clamp(38px, 4.4vw, 60px); }
@media (max-width: 860px) {
  .posts { grid-template-columns: 1fr; gap: 56px; }
  .post:first-child { grid-template-columns: 1fr; gap: 18px; }
}

/* empty state — hidden as soon as the list has a post */
.empty { padding: 8px 0 112px; }
.empty h2 { font-size: clamp(34px, 4vw, 50px); margin-bottom: 14px; }
.empty .lead { margin-bottom: 28px; }
.posts:not(:has(.post)) { display: none; }
.posts:has(.post) ~ .empty { display: none; }

/* ---------- post page ---------- */
.article-head { background: linear-gradient(180deg, var(--cream), #fff); }
.article-head .wrap { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; padding-top: clamp(48px, 8vh, 88px); padding-bottom: 24px; }
.crumbs { font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.crumbs a { color: var(--violet); }
.article-head h1 { font-size: clamp(42px, 5.4vw, 76px); margin-bottom: 18px; }
.article-art { position: relative; isolation: isolate; display: grid; place-items: center; }
.article-art::before { content: ""; position: absolute; inset: 2% 4%; z-index: -1; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; background: var(--tint, var(--lav)); }
.article-art img { width: 84%; }
@media (max-width: 860px) { .article-head .wrap { grid-template-columns: 1fr; gap: 12px; } .article-art { max-width: 300px; } }

.prose { max-width: var(--prose); margin: 0 auto; padding: 32px 24px 72px; font-size: 19px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(32px, 3.4vw, 42px); margin-top: 1.7em; }
.prose h3 { font-weight: 600; font-size: 25px; margin-top: 1.4em; }
.prose a { color: var(--violet); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--violet); font-weight: 800; }
.prose blockquote { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.2; color: var(--ink); padding: 4px 0 4px 20px; border-left: 5px solid var(--sun); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th { text-align: left; font-family: var(--display); font-weight: 600; color: var(--ink); }
.prose th, .prose td { padding: 12px 12px 12px 0; border-bottom: 2px solid var(--lav); vertical-align: top; }
.prose .table-scroll { overflow-x: auto; }

.article-cta { background: linear-gradient(180deg, #fff, var(--cream)); padding: 56px 0 104px; }
.article-cta .inner { max-width: var(--prose); margin: 0 auto; padding: 0 24px; }
.article-cta h2 { font-size: clamp(40px, 5vw, 60px); margin-bottom: 14px; }
.article-cta .lead { margin-bottom: 26px; }

.more { padding: 64px 0 24px; }
.more h2 { font-size: 36px; margin-bottom: 28px; }
.more ul { list-style: none; display: grid; gap: 14px; }
.more a { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--ink); }
.more a:hover { color: var(--violet); }

footer { background: var(--cream); padding: 40px 0; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 6px 26px; flex-wrap: wrap; }
.foot-links a { font-weight: 700; font-size: 15px; padding: 6px 0; }
.foot-links a:hover { color: var(--violet); }
.copy-note { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .post-img img { transition: none; } }
