/*
 * Mind Club - additions on top of the design's compiled stylesheet (lovable.css).
 * Uses the design tokens (--background, --foreground, --card, --border, --clay, …).
 */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--background); color: var(--foreground); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
[hidden] { display: none !important; }

.mc-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--foreground); color: var(--background); padding: .75rem 1rem; border-radius: .5rem; }
.mc-skip:focus { left: 1rem; top: 1rem; }

/* Logo / theme icon per mode */
.mc-logo-dark, .dark .mc-logo-light { display: none; }
.dark .mc-logo-dark { display: inline-block; }
.mc-icon-moon { display: block; } .mc-icon-sun { display: none; }
.dark .mc-icon-moon { display: none; } .dark .mc-icon-sun { display: block; }

/* Mobile menu panel */
.mc-mobile-menu { position: absolute; top: 4rem; left: 0; right: 0; background: var(--background); border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); box-shadow: 0 20px 40px -20px rgb(0 0 0 / .25); }
.mc-mobile-menu a:last-of-type { border-bottom: 0; }

/* Reveal on scroll (the design animates content in) */
.mc-ready .mc-reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.mc-ready .mc-reveal.is-in { opacity: 1; transform: none; }
.mc-anim .reveal-mask > .inline-block { animation: mc-rise 1s cubic-bezier(.22,1,.36,1) both; }
.mc-anim h1 > span:nth-child(2) .reveal-mask > .inline-block { animation-delay: .08s; }
.mc-anim h1 > span:nth-child(3) .reveal-mask > .inline-block { animation-delay: .16s; }
@keyframes mc-rise { from { transform: translateY(105%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.mc-ready .mc-reveal { opacity: 1; transform: none; transition: none; }
	.reveal-mask > .inline-block { animation: none; }
}

/* Inputs inside generated forms inherit tokens */
main input:not([type=checkbox]):not([type=hidden]), main textarea, main select { color: var(--foreground); }
.mc-form-status { font-weight: 500; }
.text-destructive { color: var(--destructive); }

/* Lightbox */
.mc-lightbox { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 2rem; background: rgb(10 15 25 / .85); backdrop-filter: blur(6px); }
.mc-lightbox.is-open { display: flex; }
.mc-lightbox img { max-width: min(1200px, 100%); max-height: 85vh; border-radius: 1.5rem; object-fit: contain; }
.mc-lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: rgb(255 255 255 / .12); color: #fff; font-size: 1.1rem; }

/* Finder */
.mc-finder-panel { max-height: calc(100vh - 7rem); overflow: auto; }

/* Journal */
.mc-placeholder { background-color: oklch(0.92 0.05 75); }
.dark .mc-placeholder { background-color: oklch(0.32 0.04 250); }
.mc-chip { display: inline-flex; align-items: center; min-height: 2.25rem; padding: .35rem .95rem; border-radius: 999px; border: 1px solid var(--border); font-size: .8125rem; color: var(--muted-foreground); transition: background-color .2s, color .2s, border-color .2s; }
.mc-chip:hover { color: var(--foreground); border-color: var(--foreground); }
.mc-chip.is-active { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
article.group { position: relative; }
.mc-stretched::after { content: ""; position: absolute; inset: 0; border-radius: 1.5rem; }
.mc-stretched:focus-visible { outline: none; }
.mc-stretched:focus-visible::after { outline: 2px solid var(--ring); outline-offset: 2px; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mc-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted-foreground); }
.mc-pagination a.page-numbers:hover { color: var(--foreground); border-color: var(--foreground); }
.mc-pagination .page-numbers.current { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.mc-pagination .page-numbers.dots { border: 0; }
.mc-refs summary { list-style: none; display: flex; justify-content: space-between; align-items: center; }
.mc-refs summary::after { content: "+"; font-family: Inter, sans-serif; font-size: 1.5rem; color: var(--muted-foreground); transition: transform .2s; }
.mc-refs[open] summary::after { transform: rotate(45deg); }
.mc-refs-list p { margin: 0 0 .75rem; overflow-wrap: anywhere; }

/* Article typography */
.mc-prose { font-size: 1.0625rem; line-height: 1.8; color: color-mix(in oklab, var(--foreground) 88%, transparent); overflow-wrap: break-word; }
.mc-prose > * + * { margin-top: 1.25em; }
.mc-prose h2, .mc-prose h3, .mc-prose h4, .mc-prose h5 { font-family: Geologica, ui-sans-serif, system-ui, sans-serif; color: var(--foreground); line-height: 1.2; letter-spacing: -.01em; }
.mc-prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 2.2em; }
.mc-prose h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); margin-top: 1.9em; }
.mc-prose h4, .mc-prose h5 { font-size: 1.15rem; margin-top: 1.6em; }
.mc-prose a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--clay); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.mc-prose a:hover { color: var(--clay); }
.mc-prose strong { color: var(--foreground); font-weight: 600; }
.mc-prose ul, .mc-prose ol { padding-left: 1.4em; }
.mc-prose ul { list-style: disc; } .mc-prose ol { list-style: decimal; }
.mc-prose li + li { margin-top: .45em; }
.mc-prose li::marker { color: var(--clay); }
.mc-prose blockquote, .mc-prose .wp-block-quote { border-left: 3px solid var(--clay); padding: .25em 0 .25em 1.25em; font-family: Geologica, sans-serif; font-size: 1.25rem; line-height: 1.5; color: var(--foreground); }
.mc-prose figure, .mc-prose .wp-block-image { margin-top: 2em; margin-bottom: 2em; }
.mc-prose img { border-radius: 1.25rem; height: auto; max-width: 100%; }
.mc-prose figcaption { margin-top: .6em; font-size: .85rem; color: var(--muted-foreground); text-align: center; }
.mc-prose hr, .mc-prose .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.mc-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.mc-prose th, .mc-prose td { border: 1px solid var(--border); padding: .6em .8em; text-align: left; }
.mc-prose .wp-block-spacer { max-height: 2rem; }
.mc-prose .wp-block-embed iframe, .mc-prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 1.25rem; border: 0; }
.mc-prose .wp-block-embed__wrapper { position: relative; }
.mc-prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.mc-prose .wp-block-column { flex: 1 1 240px; }
.mc-prose .wp-block-media-text { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center; }
@media (max-width: 640px) { .mc-prose .wp-block-media-text { grid-template-columns: 1fr; } }
.mc-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.mc-prose .wp-block-button__link { display: inline-flex; align-items: center; border-radius: 999px; padding: .75rem 1.5rem; background: var(--foreground) !important; color: var(--background) !important; text-decoration: none; font-size: .9rem; font-weight: 500; }
.mc-prose .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.mc-prose .wp-block-social-links { display: flex; justify-content: center; gap: .75rem; list-style: none; padding: 0; }
.mc-prose .wp-block-social-link a { text-decoration: none; }
.mc-prose .wp-block-social-link svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.mc-prose .has-text-align-center { text-align: center; }
.mc-prose .alignwide, .mc-prose .alignfull { margin-left: auto; margin-right: auto; }
.mc-prose .wp-block-rank-math-toc-block { border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.25rem 1.5rem; background: var(--card); }
.mc-prose .wp-block-rank-math-toc-block h2 { margin-top: 0; font-size: 1.15rem; }
.mc-prose .wp-block-file a { text-decoration: none; }

/* Logged-in admin bar sits above the fixed header */
.admin-bar header.fixed { top: 32px; }
.admin-bar .mc-mobile-menu { top: 4rem; }
@media (max-width: 782px) { .admin-bar header.fixed { top: 46px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } }
