/*
Theme Name: Shibasou Theme
Theme URI: https://sibasou.jp
Author: Wasabiya
Author URI: https://sibasou.jp
Description: Custom WordPress theme for sibasou.jp - 伝統の技術を未来へ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shibasou
*/

/* CSS Variables - 和モダンカラーパレット */
:root {
    --bg: #faf7f1;
    /* 生成り */
    --ink: #222222;
    /* 墨色 */
    --mute: #6f6b63;
    /* 灰墨 */
    --accent: #7dac3a;
    /* 若草 */
    --line: #e7e2d8;
    /* 薄生成りの線 */
    --card: #ffffff;
    /* 白 */
    --shadow: 0 10px 30px rgba(0, 0, 0, .06);
    --radius: 16px;
    --lead: 1.85;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Noto Serif JP", ui-serif, Georgia, serif;
    color: var(--ink);
    background: var(--bg);
    line-height: var(--lead);
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    width: 100%;
}

/* Header */
header {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(150%) blur(6px);
    background: linear-gradient(180deg, rgba(250, 247, 241, .9), rgba(250, 247, 241, .65));
    border-bottom: 1px solid var(--line);
    width: 100%;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 12px;
    padding: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    flex-shrink: 0;
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: conic-gradient(from 45deg, var(--accent), #9fc66a 40%, var(--bg) 40%);
    box-shadow: inset 0 0 0 2px #fff, 0 2px 8px rgba(0, 0, 0, .08);
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    background: transparent;
    height: 48px;
    width: 48px;
    max-width: 48px;
    overflow: hidden;
}

.site-logo,
img.site-logo,
header img[class*=logo],
header .logo-link img,
.brand img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    object-fit: contain !important;
    display: block !important;
    background: transparent !important;
    background-color: transparent !important;
    mix-blend-mode: multiply;
    filter: contrast(1.05) brightness(0.98);
}

.brand .site-name {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.main-nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 22px;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: .06em;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 18px;
    justify-content: center;
    position: relative;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    transition: all 0.3s ease;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transform-origin: center;
}

.menu-icon span:nth-child(1) {
    top: 0;
}

.menu-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon span:nth-child(3) {
    bottom: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--ink);
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow);
    transition: .2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.acc {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.shop-btn {
    flex-shrink: 0;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero .wrap {
    padding: 80px 0;
}

.hero .wrap>div:first-child {
    padding-left: 48px;
    padding-right: 48px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 56px);
    line-height: 1.15;
    margin: .2em 0 .6em;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.hero p {
    font-size: 18px;
    color: var(--mute);
    word-break: keep-all;
    overflow-wrap: break-word;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-art {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.hero-art .grain {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(60% 60% at 40% 30%, rgba(125, 172, 58, .18), transparent 60%),
        radial-gradient(40% 40% at 70% 65%, rgba(34, 34, 34, .08), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(250, 247, 241, .9));
    mix-blend-mode: multiply;
}

.hero-art .sole {
    position: absolute;
    inset: 20%;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.1;
}

.hero-art .strap {
    position: absolute;
    inset: 30%;
    border: 2px solid var(--ink);
    border-radius: 50%;
    opacity: 0.15;
}

/* Sections */
section {
    padding: 72px 0;
    border-top: 1px solid var(--line);
    width: 100%;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--mute);
    border: 1px solid var(--line);
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
}

h2 {
    font-size: clamp(22px, 3.2vw, 34px);
    margin: .6em 0 .4em;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.sub {
    color: var(--mute);
    max-width: 70ch;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.card {
    grid-column: span 4;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ph {
    aspect-ratio: 16/10;
    background: repeating-linear-gradient(45deg, #f3efe7, #f3efe7 14px, #eee7db 14px, #eee7db 28px);
}

.card h3 {
    font-size: 18px;
    margin: 16px 16px 8px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.card p {
    color: var(--mute);
    margin: 0 16px 16px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.card a {
    margin: auto 16px 16px;
}

/* Feature row */
.row {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: center;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.panel p,
.panel h3 {
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* Footer */
footer {
    padding: 56px 0 80px;
    color: #59554e;
    width: 100%;
}

.cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.fine {
    font-size: 12px;
    color: #8a857b;
    margin-top: 18px;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* WordPress Core Styles */
.alignleft {
    float: left;
    margin-right: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875em;
    color: var(--mute);
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
}

/* Responsive - Tablet */
@media (max-width: 980px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero .wrap {
        grid-template-columns: 1fr;
        padding: 60px 0;
    }

    .row {
        grid-template-columns: 1fr;
    }

    .card {
        grid-column: span 6;
    }

    section {
        padding: 56px 0;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav {
        gap: 8px;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-top: 1px solid var(--line);
        box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
        z-index: 99;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    }

    .main-nav.active {
        max-height: 600px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: max-height 0.3s ease-in, opacity 0.3s ease-in, transform 0.3s ease-in, visibility 0.3s ease-in;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 16px 0;
        margin: 0;
    }

    .main-nav li {
        border-bottom: 1px solid var(--line);
        list-style: none;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 16px 24px;
        font-size: 15px;
        color: var(--ink);
        text-decoration: none;
    }

    .main-nav a:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

    .main-nav .menu-shop {
        background-color: var(--ink);
        margin-top: 8px;
    }

    .main-nav .menu-shop .shop-link {
        color: #fff !important;
        font-weight: 600;
        background-color: var(--ink);
    }

    .main-nav .menu-shop .shop-link:hover {
        background-color: #333;
    }

    .shop-btn {
        display: none !important;
    }

    .menu-toggle {
        display: flex !important;
    }

    .hero .wrap {
        padding: 48px 0;
        gap: 32px;
    }

    .hero h1 {
        font-size: clamp(24px, 6vw, 32px);
    }

    .hero p {
        font-size: 16px;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-art {
        height: 300px;
    }

    .card {
        grid-column: span 12;
    }

    .cols {
        grid-template-columns: 1fr;
    }

    section {
        padding: 48px 0;
    }

    .grid {
        gap: 16px;
    }

    .row {
        gap: 20px;
    }

    .panel {
        padding: 20px;
    }

    footer {
        padding: 40px 0 56px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nav {
        height: 56px;
    }

    .brand {
        font-size: 14px;
    }

    .logo {
        width: 28px;
        height: 28px;
    }

    .logo-link {
        width: 40px;
        height: 40px;
        max-width: 40px;
    }

    .site-logo,
    img.site-logo,
    header img[class*=logo],
    header .logo-link img,
    .brand img {
        width: 40px !important;
        height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .hero .wrap {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 15px;
    }

    section {
        padding: 40px 0;
    }

    .panel {
        padding: 16px;
    }
}

/* ===== Contact Form 7 ===== */
.wpcf7-form p {
    margin: 0 0 16px;
}

.wpcf7-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    box-sizing: border-box;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.wpcf7-form .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: .2s ease;
}

.wpcf7-form .wpcf7-submit:hover {
    transform: translateY(-1px);
}

/* バリデーション・送信結果メッセージ */
.wpcf7-form .wpcf7-not-valid-tip {
    color: #c0392b;
    font-size: 13px;
}

.wpcf7-form .wpcf7-response-output {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    border: 1px solid #e0b4b4;
    background: #fcf0f0;
}

.wpcf7 form.sent .wpcf7-response-output {
    border: 1px solid #b7d8a8;
    background: #f0f7ec;
}
