/*
Theme Name: Mod of War
Theme URI: https://modofwar.com
Author: Modofwar
Description: Block theme for Mod of War: vehicle dossiers that pair the real machine with the scale model, plus events, people and the Turkish Air Force archive.
Version: 0.1.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modofwar
*/

/* Focus and motion */
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--wp--preset--color--zinc); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Site header */
.mow-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.mow-header .wp-block-navigation a { text-decoration: none; }
.mow-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mow-wordmark a { text-decoration: none; letter-spacing: 0.02em; }

/* Hero */
.mow-hero.wp-block-cover { min-height: min(78vh, 720px); align-items: flex-end; }
.mow-hero .wp-block-cover__inner-container { max-width: var(--wp--style--global--wide-size); margin-inline: auto; }
.mow-hero .wp-block-post-title a { color: inherit; text-decoration: none; }
.mow-hero .mow-hero-panel { background: rgba(30, 36, 39, 0.82); padding: clamp(1.25rem, 3vw, 2.25rem); max-width: 46rem; }

/* Term chips */
.mow-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mow-chips a, .wp-block-post-terms.mow-chips a { display: inline-block; padding: 0.2rem 0.6rem; border: 1px solid currentColor; border-radius: 2px; text-decoration: none; font-size: 0.875rem; }
.wp-block-post-terms.mow-chips .wp-block-post-terms__separator { display: none; }

/* Dossier cards */
.mow-card { border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--white); height: 100%; }
.mow-card .wp-block-post-featured-image { margin: 0; }
.mow-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.mow-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.mow-card .wp-block-post-title a:hover { text-decoration: underline; }

/* Real vs model */
.mow-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--ink); }
.mow-pair figure { margin: 0; background: var(--wp--preset--color--night); position: relative; }
.mow-pair img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mow-pair figcaption { position: absolute; left: 0; bottom: 0; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); padding: 0.35rem 0.75rem; font-size: 0.875rem; }
.mow-pair .mow-pair-empty { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; color: var(--wp--preset--color--paper); font-size: 0.95rem; }
@media (max-width: 640px) { .mow-pair { grid-template-columns: 1fr; } }

/* Build sheet: modelled on a kit instruction paint chart */
.mow-sheet { border-top: 3px solid var(--wp--preset--color--ink); margin: 0; }
.mow-sheet div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.mow-sheet dt { color: var(--wp--preset--color--steel); }
.mow-sheet dd { margin: 0; font-weight: 500; }

/* Model note */
.mow-note { border: 2px solid var(--wp--preset--color--zinc); padding: 1rem 1.25rem; background: var(--wp--preset--color--white); }
.mow-note strong { display: block; margin-bottom: 0.25rem; }

/* Turkish Air Force archive band */
.mow-archive { position: relative; overflow: hidden; }
/* 1920-1972 Turkish national marking: red square outlined in white, inner/outer about 5:7 */
.mow-square { width: 7rem; height: 7rem; background: var(--wp--preset--color--white); outline: 1px solid var(--wp--preset--color--line); display: grid; place-items: center; flex: none; }
.mow-square::before { content: ""; width: 71.4%; height: 71.4%; background: var(--wp--preset--color--roundel); }
.mow-archive .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--wp--preset--color--roundel); }

/* Long-form reading */
.mow-reading { font-family: var(--wp--preset--font-family--serif); }
.mow-reading p, .mow-reading li { max-width: 68ch; }

/* Hero fallback when a dossier has no featured image yet */
.mow-hero.wp-block-cover { background-color: var(--wp--preset--color--night); color: var(--wp--preset--color--white); }
.mow-hero .wp-block-post-excerpt__more-link { color: var(--wp--preset--color--white); font-family: var(--wp--preset--font-family--sans); font-weight: 500; }

/* Real and model photos fill their cells evenly */
.mow-pair figure { height: 100%; }
.mow-pair img { height: 100%; }

/* On this day */
.mow-otd { flex: 1 1 28rem; min-width: 0; }
.mow-otd img { max-height: 22rem; width: auto; max-width: 100%; height: auto; display: block; margin: 0.75rem 0 0; }
.mow-otd, .mow-otd * { text-align: left !important; }
