/*
Theme Name: Blanky
Theme URI: https://blanky.369theme.com/
Author: miroku
Author URI: https://profiles.wordpress.org/369work/
Description: Blanky is a minimal, clean block theme for WordPress. It provides a simple blank canvas with sensible CSS resets, a flexible theme.json, and essential templates — ready to customize as your own.
Version: 2.0
Requires at least: 6.6
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
Tags: block-patterns, custom-logo, editor-style, full-site-editing, style-variations, translation-ready, blog, one-column, e-commerce
Text Domain: blanky
Domain Path: /languages

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;
    /* color / background-color は theme.json styles.color で定義 */
}

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;
}

/* ============================================================
   WordPress Block Theme Foundation
   ============================================================ */

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

/*
 * .wp-site-blocks 直下 (header/main/footer) の margin だけゼロにする。
 * .is-layout-constrained / .is-layout-flow の子はリセットしない —
 */
:where(.wp-site-blocks) > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Navigation */
.wp-block-navigation-item a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   Accessibility: Focus styles
   ============================================================ */

:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible,
input[type="button"]:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

input:not([type="submit"]):not([type="reset"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 0;
    border-radius: 2px;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* ============================================================
   Language-based font switching
   ============================================================ */

:lang(ja),
:lang(ja) body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* Navigation responsive open/close icons */
.wp-block-navigation__responsive-container-close svg,
.wp-block-navigation__responsive-container-open svg {
    width: 2rem;
    height: 2rem;
}

/* ============================================================
   Header

   chrome カスタムプロパティ (theme.json settings.custom.chrome)
   を使用し、スタイルバリエーションで配色を切り替え可能にする。
   ============================================================ */

.blanky-header {
    border-bottom: 1px solid #3d4a4a;
    border-bottom: 1px solid var(--wp--custom--chrome--border);
    background-color: #2c3333;
    background-color: var(--wp--custom--chrome--background);
    color: #d4d0c8;
    color: var(--wp--custom--chrome--text);
    text-align: center;
}

.blanky-header.wp-block-group {
    padding-top: 2rem;
    padding-top: var(--wp--preset--spacing--60);
    padding-bottom: 2rem;
    padding-bottom: var(--wp--preset--spacing--60);
    gap: 1.5rem;
    gap: var(--wp--preset--spacing--40);
}

/* ヘッダー内サイトタイトル */
.blanky-header .wp-block-site-title,
.blanky-header .wp-block-site-title a {
    color: #7ab0a0;
    color: var(--wp--custom--chrome--accent);
    text-decoration: none;
}

/* ヘッダー内タグライン */
.blanky-header .wp-block-site-tagline {
    color: #6b7a7a;
    color: var(--wp--custom--chrome--muted);
}

/* ヘッダー内ナビゲーション */
.blanky-header .wp-block-navigation,
.blanky-header .wp-block-navigation a {
    color: #d4d0c8;
    color: var(--wp--custom--chrome--text);
}

/* Site icon */
.blanky-site-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7ab0a0;
    color: var(--wp--custom--chrome--accent);
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.blanky-site-icon svg {
    width: 100%;
    height: 100%;
}

/* ============================================================
   Footer
   ============================================================ */

.blanky-footer.wp-block-group {
    border-top: 1px solid #3d4a4a;
    border-top: 1px solid var(--wp--custom--chrome--border);
    background-color: #2c3333;
    background-color: var(--wp--custom--chrome--background);
    color: #d4d0c8;
    color: var(--wp--custom--chrome--text);
    padding-top: 4rem;
    padding-top: var(--wp--preset--spacing--70);
    padding-bottom: 4rem;
    padding-bottom: var(--wp--preset--spacing--70);
}

/* コピーライト + サイトタイトル テキスト */
.blanky-footer-copyright,
.blanky-footer-copyright .wp-block-site-title,
.blanky-footer-copyright .wp-block-site-title a,
.blanky-footer-copyright p {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #6b7a7a;
    color: var(--wp--custom--chrome--muted);
    text-decoration: none;
}

/* ソーシャルリンク */
.blanky-social-links.wp-block-social-links .wp-block-social-link a {
    color: #6b7a7a;
    color: var(--wp--custom--chrome--muted);
    transition: color 0.2s ease;
}

.blanky-social-links.wp-block-social-links .wp-block-social-link a:hover {
    color: #7ab0a0;
    color: var(--wp--custom--chrome--accent);
}

/* is-style-logos-only のアイコン色を currentColor で統一 */
.blanky-social-links.wp-block-social-links.is-style-logos-only .wp-block-social-link-anchor svg {
    fill: currentColor;
}

/* ============================================================
   main
   ============================================================ */
.blanky-main.wp-block-group {
    flex: 1;
    padding: clamp(2rem, 5vw, 5rem) 1.5rem;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   Featured image: fallback placeholder (no thumbnail set)
   ============================================================ */

.blanky-no-thumbnail {
    aspect-ratio: 16 / 9;
    background-color: #f2efea;
    background-color: var(--wp--preset--color--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    overflow: hidden;
}

.blanky-no-thumbnail .blanky-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    opacity: 0.3;
    color: #3a6060;
    color: var(--wp--preset--color--primary);
}

.blanky-no-thumbnail .blanky-thumbnail-placeholder svg {
    width: 100%;
    height: 100%;
}

/* Submit button */
.blanky-comment-form .comment-form .form-submit .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ffffff;
    background-color: #3a6060;
    background-color: var(--wp--preset--color--primary);
    border: 1px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.blanky-comment-form .comment-form .form-submit .submit:hover {
    background-color: #2d4d4d;
    background-color: var(--wp--preset--color--secondary);
}

/* Cookie consent checkbox */
.blanky-comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blanky-comment-form .comment-form-cookies-consent label {
    display: inline;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-size: 0.875rem;
    color: #6b7280;
    color: var(--wp--preset--color--muted);
    margin-bottom: 0;
}