/*
Theme Name: Takahoshi Kenchiku Theme
Author: Takahoshi Mitsuto
Description: A custom theme for a carpenter's portfolio website.
Version: 1.0
*/

/* ---------------------------------- */
/* Basic Setup & Font Definition
/* ---------------------------------- */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #FDFBF8;
    color: #413C38;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif JP', serif;
}

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

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

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ---------------------------------- */
/* Common Classes
/* ---------------------------------- */
.accent-color { 
    color: #003366; 
}
.bg-accent-color { 
    background-color: #003366; 
}
.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
@media (min-width: 768px) {
    .section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-subtitle {
    font-size: 0.875rem;
    color: #6B7280;
    letter-spacing: 0.1em;
}
.section-title {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #003366;
}
@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}
.section-title-underline {
    width: 5rem;
    height: 4px;
    background-color: #003366;
    margin: 1rem auto 0;
}
.section-description {
    max-width: 42rem; /* max-w-2xl */
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5rem;
    color: #4A5568; /* text-stone-600 */
}
.button {
    display: inline-block;
    background-color: #fff;
    color: #4A5568;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    border: 1px solid #D1D5DB;
    font-weight: 600;
    transition: background-color 0.2s;
}
.button:hover {
    background-color: #F3F4F6;
}
.button-primary {
    background-color: #003366;
    color: #fff;
    border-color: #003366;
    padding: 0.75rem 1.25rem;
}
.button-primary:hover {
    background-color: #002244;
}

/* ---------------------------------- */
/* Header
/* ---------------------------------- */
.site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #E5E7EB;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.site-branding {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}
.main-navigation {
    display: none;
}
@media (min-width: 768px) {
    .main-navigation {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}
.main-navigation a {
    transition: color 0.2s;
}
.main-navigation a:hover {
    color: #003366;
}
.main-navigation .current-menu-item a {
    color: #003366;
    font-weight: 600;
}
.mobile-menu-button {
    display: block;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}
@media (min-width: 768px) {
    .mobile-menu-button {
        display: none;
    }
}
.mobile-menu {
    display: none; /* Toggled by JS */
    padding: 0 1.5rem 1rem;
}
.mobile-menu a {
    display: block;
    padding: 0.5rem 0;
}

/* ---------------------------------- */
/* Footer
/* ---------------------------------- */
.site-footer {
    background-color: #374151;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

/* ---------------------------------- */
/* Hero Section (Front Page)
/* ---------------------------------- */
.hero-section {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    height: calc(100vh - 73px);
}
@media (min-width: 768px) {
    .hero-section {
        flex-direction: row;
    }
}
.hero-image {
    width: 100%;
    height: 50%;
}
@media (min-width: 768px) {
    .hero-image {
        width: 70%;
        height: 100%;
    }
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-text {
    width: 100%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #FDFBF8;
}
@media (min-width: 768px) {
    .hero-text {
        width: 30%;
        height: 100%;
    }
}
.hero-text-inner {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 100%;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    color: #374151;
}
.hero-title {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
}
.hero-subtitle {
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

/* ---------------------------------- */
/* Wave Divider
/* ---------------------------------- */
.wave-top {
    position: relative;
    background-color: #F3F0EC;
}
.wave-top::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    bottom: 100%; 
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23F3F0EC' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,81L1320,81C1200,81,960,81,720,81C480,81,240,81,120,81L0,81Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
}

/* ---------------------------------- */
/* Grid Layouts
/* ---------------------------------- */
.grid-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------------------------------- */
/* Contact Form 7 Styles
/* ---------------------------------- */
.contact-form p {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.contact-form input[type="submit"] {
    display: inline-block;
    background-color: #003366;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.contact-form input[type="submit"]:hover {
    opacity: 0.9;
}



/* ---------------------------------- */
/* Cards (Works & Shop)
/* ---------------------------------- */
.card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 14rem;
    object-fit: cover;
    transition: transform 0.3s;
}
.card:hover .card-image img {
    transform: scale(1.05);
}
.card-content {
    padding: 1.5rem;
}
.card-category {
    font-size: 0.875rem;
    color: #6B7280;
}
.card-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.25rem 0;
}
.card-title a:hover {
    text-decoration: underline;
}
.card-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #003366;
}
.card-link:hover {
    text-decoration: underline;
}
.card-center-content {
    text-align: center;
}
.card-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #003366;
    margin-bottom: 1rem;
}

/* ---------------------------------- */
/* Page: Request Flow
/* ---------------------------------- */
.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 6rem;
}
@media (min-width: 768px) {
    .flow-step {
        flex-direction: row;
        gap: 4rem;
    }
    .flow-step-reverse {
        flex-direction: row-reverse;
    }
}
.flow-step-image {
    width: 100%;
    position: relative;
}
@media (min-width: 768px) {
    .flow-step-image {
        width: 50%;
    }
}
.flow-step-image .image-wrapper {
    background-color: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    position: relative;
    z-index: 10;
}
.flow-step-image img {
    border-radius: 0.375rem;
}
.flow-step-image .bg-shape {
    position: absolute;
    background-color: #FDFBF8;
    border-radius: 9999px;
    z-index: 0;
    opacity: 0.5;
}
.flow-step-text {
    width: 100%;
}
@media (min-width: 768px) {
    .flow-step-text {
        width: 50%;
    }
}
.flow-step-number {
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    color: #003366;
    margin-bottom: 1rem;
    opacity: 0.2;
}
.flow-step-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ---------------------------------- */
/* Page: Work Item (Single)
/* ---------------------------------- */
.work-item-header {
    max-width: 48rem; /* max-w-4xl */
    margin: 0 auto;
}
.work-item-content {
    max-width: 48rem; /* max-w-4xl */
    margin: 0 auto;
}
.work-item-main-image img {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    margin-bottom: 4rem;
}
.work-item-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .work-item-details {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
}
.work-item-rotated-image {
    display: none;
}
@media (min-width: 768px) {
    .work-item-rotated-image {
        display: block;
        position: sticky;
        top: 7rem;
    }
    .work-item-rotated-image img {
        border-radius: 0.5rem;
        box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
        transform: translate(1rem, -4rem) rotate(3deg);
    }
}
.spec-table {
    margin-top: 5rem;
    border-top: 1px solid #E5E7EB;
    padding-top: 3rem;
}
.spec-table-inner {
    background-color: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    overflow: hidden;
}
.spec-table-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    border-bottom: 1px solid #E5E7EB;
}
.spec-table-row:last-child {
    border-bottom: none;
}
.spec-table-header {
    font-weight: 600;
    padding: 1rem;
    background-color: #F9FAFB;
}
.spec-table-data {
    padding: 1rem;
}

/* ---------------------------------- */
/* Page: Shop
/* ---------------------------------- */
.shop-item {
    position: relative;
}
.sold-out-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0.5rem;
}
.sold-out-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border: 4px solid white;
    padding: 0.5rem 1.5rem;
    transform: rotate(-12deg);
}

/* ---------------------------------- */
/* WordPress Core Styles
/* ---------------------------------- */
.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.alignfull {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
