/* /artikel public pages (AYAH-16). Plain CSS on the ABID design-system tokens (docs/design-system/tokens.css),
   light only; the React pages get the same tokens through Tailwind in AYAH-8. */
@font-face { font-family: 'Fredoka Variable'; font-style: normal; font-display: swap; font-weight: 300 700; src: url('/fonts/fredoka-latin-wght.woff2') format('woff2-variations'); }
@font-face { font-family: 'SN Pro Variable'; font-style: normal; font-display: swap; font-weight: 200 900; src: url('/fonts/sn-pro-latin-wght.woff2') format('woff2-variations'); }

:root {
    --background: #fdf6e9; --foreground: #2a1f3d; --card: #ffffff; --heading: #3b1a57;
    --primary: #3b1a57; --primary-hover: #46216c; --secondary: #f0e6fa; --muted: #f6e8cf; --muted-foreground: #6b5d73;
    --accent: #fff1c2; --highlight: #fcaf01; --cta: #c64300; --cta-hover: #a93b04; --cta-text: #a93b04;
    --border: #ecdcc0; --ring: #8a57be; --plum-950: #231033; --plum-100: #f0e6fa; --plum-300: #c9a6e6; --sunny-100: #fff1c2;
    --leaf-100: #d7efe3; --leaf-700: #2e5e51;
    --font-display: 'Fredoka Variable', 'Fredoka', ui-rounded, ui-sans-serif, system-ui, sans-serif;
    --font-sans: 'SN Pro Variable', 'SN Pro', ui-sans-serif, system-ui, sans-serif;
    --radius: 14px;
    --shadow-soft: 0 1px 2px rgb(59 26 87 / 0.06), 0 4px 14px -4px rgb(59 26 87 / 0.1);
    --shadow-lift: 0 2px 4px rgb(59 26 87 / 0.06), 0 14px 32px -10px rgb(59 26 87 / 0.28);
    --shadow-cta: 0 6px 18px -6px rgb(198 67 0 / 0.55);
    --shadow-book: 0 1px 0 rgb(72 44 43 / 0.08), 0 18px 40px -14px rgb(72 44 43 / 0.45);
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 400 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); text-wrap: balance; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nav */
.nav { background: var(--background); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav .logo img { height: 40px; width: auto; }
.nav .links { display: none; gap: 22px; margin-left: auto; }
.nav .links a { color: var(--foreground); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav .links a:hover, .nav .links a[aria-current] { color: var(--primary); text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 3px; }
.nav .btn { margin-left: auto; }
@media (min-width: 768px) { .nav .links { display: flex; } .nav .btn { margin-left: 0; } .nav .logo img { height: 44px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font: 600 16px/1 var(--font-display); text-decoration: none; transition: transform 0.12s var(--ease), background 0.2s var(--ease); }
.btn:active { transform: scale(0.97); }
.btn-cta { background: var(--cta); color: #fff; box-shadow: var(--shadow-cta); }
.btn-cta:hover { background: var(--cta-hover); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-outline { border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--secondary); }

/* Page head */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: 36px; line-height: 1.1; }
.hero p { margin: 10px 0 0; color: var(--muted-foreground); font-size: 18px; max-width: 640px; }
@media (min-width: 768px) { .hero { padding: 72px 0 32px; } .hero h1 { font-size: 48px; } }
.eyebrow { font: 800 13px/1 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--cta-text); margin-bottom: 12px; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--heading); text-decoration: none; font-weight: 700; font-size: 14px; }
.chip:hover, .chip[aria-current] { background: var(--secondary); border-color: var(--plum-300); }
.tag { display: inline-block; font: 800 12px/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--cta-text); text-decoration: none; }

/* Cards */
.section { padding: 32px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 26px; }
.section-head a { font-weight: 700; font-size: 15px; white-space: nowrap; }
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-soft); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card img { aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; background: var(--muted); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 19px; line-height: 1.25; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ''; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--muted-foreground); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; font-size: 13px; color: var(--muted-foreground); font-weight: 600; }
.card.featured { grid-column: 1 / -1; }
@media (min-width: 960px) { .card.featured { flex-direction: row; } .card.featured img { width: 58%; aspect-ratio: auto; min-height: 320px; } .card.featured .body { padding: 32px; justify-content: center; } .card.featured h3 { font-size: 30px; } }
.empty { border: 2px dashed var(--border); border-radius: 20px; padding: 40px 24px; text-align: center; }
.empty h2 { font-size: 22px; margin-bottom: 6px; }
.empty p { margin: 0 0 18px; color: var(--muted-foreground); }

/* Article */
.crumbs { font-size: 14px; color: var(--muted-foreground); padding-top: 24px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted-foreground); }
.article { max-width: 720px; margin: 0 auto; padding: 0 20px 24px; }
.article header { padding: 20px 0 8px; }
.article h1 { font-size: 30px; line-height: 1.12; margin: 10px 0 14px; }
@media (min-width: 768px) { .article h1 { font-size: 40px; } }
.byline { font-size: 14px; color: var(--muted-foreground); font-weight: 600; }
.article .cover { border-radius: var(--radius); box-shadow: var(--shadow-book); margin: 24px 0 8px; width: 100%; }
.prose { font-size: 18px; line-height: 1.7; }
.prose .lead { font-size: 20px; line-height: 1.6; color: var(--heading); font-weight: 500; }
.prose h2 { font-size: 26px; line-height: 1.2; margin: 40px 0 12px; scroll-margin-top: 84px; }
.prose h3 { font-size: 21px; line-height: 1.3; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--cta-text); }
.prose blockquote { border-left: 4px solid var(--highlight); background: var(--accent); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--muted); font-weight: 700; }
.prose figure { margin: 28px 0; }
.prose figure img { border-radius: var(--radius); box-shadow: var(--shadow-book); width: 100%; }
.prose figcaption { font-size: 14px; color: var(--muted-foreground); margin-top: 10px; text-align: center; }
.prose code { background: var(--muted); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.story.prose p { font-size: 20px; font-weight: 500; }

.faq { margin-top: 40px; }
.faq h2 { font-size: 26px; margin-bottom: 14px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font: 600 18px/1.35 var(--font-display); color: var(--heading); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--cta-text); font-size: 22px; line-height: 1; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 18px 18px; font-size: 17px; }
.sources { margin-top: 36px; font-size: 15px; }
.sources h2 { font-size: 20px; margin-bottom: 8px; }
.sources ol { padding-left: 1.3em; margin: 0; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }

.cta-card { margin: 40px 0 8px; background: var(--primary); color: #fff; border-radius: 28px; padding: 28px; display: grid; gap: 16px; position: relative; overflow: hidden; }
.cta-card::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgb(253 206 92 / 0.45), transparent 70%); }
.cta-card h2 { color: #fff; font-size: 26px; line-height: 1.2; position: relative; }
.cta-card p { margin: 0; color: #e1ccf3; font-size: 17px; position: relative; }
.cta-card .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; position: relative; }
.cta-card .actions a.plain { color: #fff; font-weight: 700; }
@media (min-width: 768px) { .cta-card { padding: 36px 40px; } }

/* Footer */
.footer { background: var(--plum-950); color: #dcd6e8; margin-top: 64px; padding: 48px 0 32px; font-size: 15px; }
.footer .cols { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer img { height: 40px; width: auto; margin-bottom: 12px; }
.footer h2 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { color: #dcd6e8; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .legal { border-top: 1px solid #3a2e55; margin-top: 32px; padding-top: 18px; font-size: 13px; color: #b9b0cc; }

.pager { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

/* Motion: reveal once, small and quick (design system section 9) */
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: reveal 0.5s var(--ease) both; }
.grid > .card { animation: reveal 0.5s var(--ease) both; }
.grid > .card:nth-child(2) { animation-delay: 0.06s; } .grid > .card:nth-child(3) { animation-delay: 0.12s; }
.grid > .card:nth-child(4) { animation-delay: 0.18s; } .grid > .card:nth-child(5) { animation-delay: 0.24s; }
.grid > .card:nth-child(n+6) { animation-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; } }
