/*
Theme Name:        Abira
Theme URI:         https://abira.369theme.com
Description:       A minimal block starter theme. Abira gives you a clean foundation — white, black, and one accent color — so you can build without clearing away what someone else put there first.
Version:           1.0.1
Author:            miroku
Author URI:        https://profiles.wordpress.org/369work/
Tags:              blog, one-column, block-patterns, full-site-editing, accessibility-ready, block-styles, editor-style, style-variations, custom-colors, featured-images, translation-ready
Text Domain:       abira
Domain Path:       /languages
Requires at least: 6.5
Tested up to:      7.0
Requires PHP:      7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

This theme, like WordPress, is licensed under the GPL.
*/


/* ============================================================
   CSS Reset
   Modern, minimal reset as a foundation.
============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100svh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

button {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}


/* ============================================================
   Layout: Sticky Footer
============================================================ */

/*
 * コンテンツ幅は theme.json の settings.layout で変更してください。
 *
 * 推奨値の目安:
 *   contentSize — 通常コンテンツの最大幅
 *     現在: 800px  |  タブレット向け: 680px  |  ワイドモニター向け: 1000px
 *   wideSize — ワイド整列ブロックの最大幅
 *     現在: 1200px  |  大画面向け: 1440px
 *
 * 大画面で幅をさらに広げたい場合は、style.css にメディアクエリを追加して
 * --wp--style--global--content-size を上書きする方法もあります。
 */

.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

.site-main {
    flex: 1;
}

.site-header,
.site-main,
.site-footer {
    padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m);
}

@media (max-width: 781px) {
    .site-header .wp-block-navigation__responsive-container.is-menu-open {
        padding: var(--wp--preset--spacing--m);
    }

    .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
        padding-inline: var(--wp--preset--spacing--s);
    }
}

.site-header .wp-block-navigation .wp-block-navigation-item__content {
    white-space: nowrap;
}


/* ============================================================
   Post list
============================================================ */

.main-content {
    padding-top: var(--wp--preset--spacing--xl);
    padding-bottom: var(--wp--preset--spacing--xl);
}

.post-item {
    border-bottom: 1px solid var(--wp--preset--color--subtle);
    padding-bottom: var(--wp--preset--spacing--l);
    margin-bottom: var(--wp--preset--spacing--l);
}

.post-meta {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--muted);
}


/* ============================================================
   Category badge
============================================================ */

.wp-block-post-terms a {
    display: inline-block;
    background-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--base);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    text-decoration: none;
}

.wp-block-post-terms a:hover {
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
}


/* ============================================================
   Card (archive)
============================================================ */

.post-card {
    border: 1px solid var(--wp--preset--color--subtle);
    border-radius: 6px;
    overflow: hidden;
}

.post-card .wp-block-post-featured-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card .wp-block-post-featured-image a {
    display: block;
    height: 100%;
}

.post-card .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.post-card__body {
    padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m) var(--wp--preset--spacing--m);
}

/* アイキャッチなし時のプレースホルダーをシンプルなグレーに */
.post-card .wp-block-post-featured-image:not(:has(img)) {
    background-color: var(--wp--preset--color--subtle);
    background-image: none;
}

.post-card .wp-block-post-featured-image:not(:has(img)) a,
.post-card .wp-block-post-featured-image:not(:has(img)) svg {
    display: none;
}


/* ============================================================
   Reduced motion
   「動きを減らす」設定のユーザーには、アニメーションと
   スムーズスクロールを無効化する。
============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}