/*
Theme Name: Plain
Theme URI: https://ainextstudio.it
Author: AI Next Studio
Author URI: https://ainextstudio.it
Description: A very light, SEO-ready WordPress theme. No jQuery, no web fonts, no page builder. Change the whole look with one palette. Pair it with the Plain Tools plugin to install our plugins, connect your AI key and let AI assistants work on your site.
Version: 0.1.0
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plain
Tags: blog, one-column, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* The colors come from the palette chosen in Appearance > Customize > Plain (see inc/palettes.php). */
:root {
	--p-bg: #ffffff;
	--p-fg: #1a1a2e;
	--p-muted: #64647a;
	--p-surface: #f5f5fa;
	--p-border: #e6e6ef;
	--p-accent: #5b4bff;
	--p-accent-fg: #ffffff;
	--p-width: 720px;
	--p-wide: 1080px;
	--p-radius: 12px;
	--p-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--p-bg); color: var(--p-fg); font-family: var(--p-font); font-size: 18px; line-height: 1.7; }
img, video, svg, iframe { max-width: 100%; height: auto; }
a { color: var(--p-accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--p-accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.25rem; }
p, ul, ol, blockquote, pre, figure, table { margin: 0 0 1.2em; }
blockquote { border-left: 4px solid var(--p-accent); padding: .2em 0 .2em 1.1em; color: var(--p-muted); }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--p-surface); border-radius: 6px; }
code { padding: .15em .4em; }
pre { padding: 1em; overflow: auto; }
pre code { padding: 0; background: none; }
hr { border: 0; border-top: 1px solid var(--p-border); margin: 2em 0; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--p-border); padding: .6em .8em; text-align: left; }

.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; margin: 0; padding: .6em 1em; background: var(--p-accent); color: var(--p-accent-fg); z-index: 100; left: 8px; top: 8px; }

.wrap { width: min(100% - 2rem, var(--p-width)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2rem, var(--p-wide)); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--p-border); }
.site-header .wrap-wide { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.site-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.site-title a { color: inherit; text-decoration: none; }
.site-desc { font-size: .85rem; color: var(--p-muted); margin: 0; line-height: 1.3; }
.custom-logo { max-height: 44px; width: auto; display: block; }
.main-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { color: var(--p-fg); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--p-accent); }
.nav-toggle { display: none; }
.nav-toggle summary { list-style: none; cursor: pointer; font-weight: 700; padding: .4rem .8rem; border: 1px solid var(--p-border); border-radius: 8px; }
.nav-toggle summary::-webkit-details-marker { display: none; }
@media (max-width: 720px) {
	.main-nav { display: none; }
	.nav-toggle { display: block; position: relative; }
	.nav-toggle .main-nav { display: block; position: absolute; right: 0; top: 110%; background: var(--p-bg); border: 1px solid var(--p-border); border-radius: var(--p-radius); padding: 1rem 1.4rem; z-index: 50; min-width: 200px; }
	.nav-toggle .main-nav ul { flex-direction: column; gap: .8rem; }
}

/* Content */
.site-main { padding: 2.5rem 0 3rem; }
.breadcrumbs { font-size: .85rem; color: var(--p-muted); margin-bottom: 1.2rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--p-border); }
.breadcrumbs a { color: var(--p-muted); }
.entry-meta { color: var(--p-muted); font-size: .9rem; margin: -.2rem 0 1.4rem; }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { border-radius: var(--p-radius); display: block; width: 100%; }
.entry-content > * { max-width: 100%; }
.entry-content .alignwide { width: min(100vw - 2rem, var(--p-wide)); margin-inline: calc(50% - min(50vw - 1rem, var(--p-wide) / 2)); max-width: none; }
.entry-content .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.alignleft { float: left; margin: .3em 1.2em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.2em; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--p-muted); }
.page-links, .post-nav { margin: 2rem 0; }

/* Lists of posts */
.post-list { display: grid; gap: 2rem; }
.post-card { padding-bottom: 2rem; border-bottom: 1px solid var(--p-border); }
.post-card:last-child { border-bottom: 0; }
.post-card h2 { margin: 0 0 .3em; font-size: 1.5rem; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--p-accent); }
.post-card .entry-thumb { margin-bottom: 1rem; }
.read-more { font-weight: 700; text-decoration: none; }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.pagination .page-numbers { padding: .4rem .9rem; border: 1px solid var(--p-border); border-radius: 8px; text-decoration: none; color: var(--p-fg); }
.pagination .page-numbers.current { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-fg); }

/* Forms and buttons */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea, select {
	width: 100%; font: inherit; color: var(--p-fg); background: var(--p-bg); border: 1px solid var(--p-border); border-radius: 8px; padding: .6em .8em;
}
button, input[type="submit"], .wp-block-button__link { font: inherit; font-weight: 700; cursor: pointer; background: var(--p-accent); color: var(--p-accent-fg); border: 0; border-radius: 8px; padding: .65em 1.2em; text-decoration: none; }
button:hover, input[type="submit"]:hover { filter: brightness(1.08); }
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }

/* Comments */
.comments-area { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.4rem; }
.comment-body { background: var(--p-surface); border-radius: var(--p-radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.comment-meta { font-size: .85rem; color: var(--p-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--p-border); background: var(--p-surface); color: var(--p-muted); font-size: .9rem; padding: 2rem 0; }
.site-footer a { color: inherit; }
.site-footer .wrap-wide { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer h2 { font-size: 1rem; margin: 0 0 .5em; color: var(--p-fg); }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1em; }
.site-footer .widget { margin-bottom: 1rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
