/*
Theme Name: Adenvale
Theme URI: https://adenvale.com
Author: Adenvale
Description: A snowy penguin island where every part of the site is a district: Arcade Pier for games, Lighthouse Library for storybooks, Studio Iceberg for videos, the Mayor's Log for weekly updates, and the Penguin Market. Posts appear in the right district automatically based on their category.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adenvale
Tags: block-theme, full-site-editing, kids, portfolio, blog
*/

/* ---------- Basics ---------- */
:where(body) { -webkit-font-smoothing: antialiased; }
:where(a, button, input):focus-visible { outline: 3px solid #FFD166; outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Header ---------- */
.av-header { padding-top: 14px; padding-bottom: 14px; }
.av-header .av-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.av-header .av-logo-badge { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; background: #FFFFFF; align-items: center; justify-content: center; flex-shrink: 0; }
.av-header .wp-block-site-title a { color: #FFFFFF; text-decoration: none; }
.av-header .wp-block-navigation a { color: #FFFFFF; text-decoration: none; }
.av-header .wp-block-navigation-item__content { padding: 10px 16px; border-radius: 999px; }
.av-header .wp-block-navigation-item__content:hover { background: rgba(255,255,255,0.14); }
.av-header .current-menu-item > .wp-block-navigation-item__content,
.av-header .wp-block-navigation-item__content[aria-current="page"] { background: #FFFFFF; color: #13294B; }
.av-header .wp-block-navigation__responsive-container.is-menu-open { background: #13294B; color: #FFFFFF; }

/* ---------- Footer ---------- */
.av-footer { padding-top: 40px; padding-bottom: 40px; margin-top: 0; }
.av-footer p { margin: 0; color: #DCE7EF; }
.av-footer a { color: #FFFFFF; }
.av-footer .wp-block-site-title a { color: #FFFFFF; text-decoration: none; }

/* ---------- Sections and district bands ---------- */
.av-section { padding-top: clamp(48px, 7vw, 80px); padding-bottom: 0; }
.av-section:last-child { padding-bottom: clamp(48px, 7vw, 80px); }
.av-band { padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
.av-band h1 { margin-top: 0.2em; }
.av-band p { max-width: 640px; }
.av-eyebrow { font-weight: 800; font-size: 15px; letter-spacing: 0.02em; margin: 0; }
.av-band-art svg { display: block; max-width: 100%; height: auto; }
.av-band-row { gap: 32px; }
@media (max-width: 780px) { .av-band-art { display: none; } }

/* ---------- Cards ---------- */
.av-card { background: #FFFFFF; border: 3px solid #13294B; border-radius: 24px; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.av-card > * { margin-block-start: 0; }
.av-card .wp-block-post-featured-image { margin: 0; border-bottom: 3px solid #13294B; }
.av-card .wp-block-post-featured-image img { display: block; width: 100%; }
.av-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.av-card-body > * { margin: 0; }
.av-card-body .wp-block-post-title { font-size: 26px; line-height: 1.12; }
.av-card-body .wp-block-post-title a { color: #13294B; text-decoration: none; }
.av-card-body .wp-block-post-title a:hover { text-decoration: underline; }
.av-card-body .wp-block-post-excerpt__excerpt { margin: 0; font-size: 17px; line-height: 1.5; }
.av-card-body .wp-block-post-excerpt__more-text { margin: 8px 0 0; }
.av-card--dashed { border-style: dashed; border-color: #7F93AD; padding: 26px; gap: 8px; }
.av-card--dashed > * { margin: 0; }
.av-card--portal { background: #E3EEF4; border-color: #256F8F; }
.av-card--padded { padding: clamp(24px, 4vw, 40px); gap: 14px; }
.av-card--padded > * { margin: 0; }
.wp-block-post-template.is-layout-grid { gap: 28px; }
.wp-block-post-template > li { display: flex; }
.wp-block-post-template > li > .av-card { width: 100%; }

/* Category pill on cards and posts */
.av-tag { font-size: 13px; font-weight: 800; }
.av-tag a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #FBE3D6; color: #8A3410; text-decoration: none; }
.av-tag .wp-block-post-terms__separator { display: none; }
.av-tag a + a { margin-left: 6px; }

/* Empty states */
.av-empty { background: #FFFFFF; border: 3px dashed #7F93AD; border-radius: 24px; padding: 28px; color: #3B4C66; }

/* ---------- Island map (home) ---------- */
.av-map { position: relative; width: 100%; max-width: 1184px; margin-inline: auto; aspect-ratio: 1184 / 600; }
.av-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.av-pin { position: absolute; left: var(--x); top: var(--y); display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; background: #FFFFFF; border: 3px solid #13294B; border-radius: 16px; color: #13294B; text-decoration: none; box-shadow: 0 6px 0 #13294B; transition: transform 120ms ease, box-shadow 120ms ease; }
a.av-pin:hover { transform: translateY(3px); box-shadow: 0 3px 0 #13294B; color: #13294B; }
.av-pin strong { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 20px; line-height: 1.1; }
.av-pin span { font-size: 14px; font-weight: 700; color: #3B4C66; }
.av-pin--hot { background: #C2521B; color: #FFFFFF; }
.av-pin--hot span, a.av-pin--hot:hover { color: #FFFFFF; }
.av-pin--soon { background: #E3EEF4; border-style: dashed; border-color: #256F8F; box-shadow: none; }
@media (max-width: 860px) {
	.av-map { aspect-ratio: auto; display: flex; flex-wrap: wrap; gap: 12px; }
	.av-map > svg { position: static; width: 100%; height: auto; aspect-ratio: 1184 / 600; flex-basis: 100%; }
	.av-pin { position: static; flex: 1 1 calc(50% - 12px); }
}

/* ---------- Mascot card ---------- */
.av-mascot { background: #13294B; color: #FFFFFF; border-radius: 24px; padding: 36px; text-align: center; height: 100%; }
.av-mascot > * { margin: 0 auto; }
.av-mascot p { color: #DCE7EF; }
.av-mascot .av-penguin { display: block; margin: 0 auto 8px; }

/* ---------- Game embed ---------- */
.av-game-frame { border: 4px solid #13294B; border-radius: 24px; overflow: hidden; background: #BFDCEA; }
.av-game-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.av-score { display: flex; justify-content: space-between; align-items: center; }
.av-score .av-score-value { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 32px; color: #C2521B; }

/* ---------- Market ---------- */
.av-product-art { background: #E3EEF4; min-height: 220px; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 3px solid #13294B; }
.av-product-art svg { max-width: 60%; height: auto; }
.av-badge { position: absolute; top: 16px; right: 16px; padding: 6px 12px; border-radius: 999px; background: #13294B; color: #FFFFFF; font-weight: 800; font-size: 13px; }
.av-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 24px; color: #C2521B; }
.av-grownups { border-radius: 24px; padding: clamp(28px, 4vw, 44px); }
.av-grownups p { color: #DCE7EF; }

/* Outline button style */
.wp-block-button.is-style-outline > .wp-block-button__link { background: #FFFFFF; color: #13294B; border-color: #13294B; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #E3EEF4; color: #13294B; }

/* Single posts */
.av-post-meta { gap: 12px; align-items: center; }
.av-back { font-weight: 800; }

/* Remove the default gap between header, main and footer */
.wp-site-blocks > * + * { margin-block-start: 0; }
.av-post-content { padding-bottom: clamp(48px, 7vw, 80px); }
