@charset "UTF-8";

/**
 * common.css
 * CalmFlowOita 全ページ共通スタイル
 */

/*--------------------------------------------------
  CSS Variables (デザインシステム)
--------------------------------------------------*/
:root {
    /* Colors */
    --primary-color: #C5A059;
    /* Calm Gold */
    --primary-light: #E2D1B0;
    --bg-cream: #FDFBF7;
    /* Background Cream */
    --text-main: #4A433F;
    /* Deep Brown */
    --text-sub: #7D746D;
    /* Muted Brown */
    --accent-color: #8E9B8E;
    /* Muted Sage (Trust) */
    --white: #FFFFFF;

    /* Fonts */
    --font-base: "Noto Sans JP", sans-serif;
    --font-heading: "Outfit", "Noto Serif JP", serif;

    /* Layout */
    --container-width: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-main);
    font-family: var(--font-base);
    line-height: 1.8;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s;
}

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

ul,
ol {
    list-style: none;
}

/*--------------------------------------------------
  Utility Classes
--------------------------------------------------*/
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 4%;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.inline-block {
    display: inline-block;
    word-break: keep-all;
    overflow-wrap: anywhere;
    white-space: nowrap;
}

/* Margin Utilities */
.mt0 { margin-top: 0 !important; }
.mt5 { margin-top: 5px !important; }
.mt10 { margin-top: 10px !important; }
.mt20 { margin-top: 20px !important; }
.mt30 { margin-top: 30px !important; }
.mt40 { margin-top: 40px !important; }
.mt50 { margin-top: 50px !important; }
.mt60 { margin-top: 60px !important; }
.mt80 { margin-top: 80px !important; }
.mt100 { margin-top: 100px !important; }

.mb0 { margin-bottom: 0 !important; }
.mb5 { margin-bottom: 5px !important; }
.mb10 { margin-bottom: 10px !important; }
.mb20 { margin-bottom: 20px !important; }
.mb30 { margin-bottom: 30px !important; }
.mb40 { margin-bottom: 40px !important; }
.mb50 { margin-bottom: 50px !important; }
.mb60 { margin-bottom: 60px !important; }
.mb80 { margin-bottom: 80px !important; }
.mb100 { margin-bottom: 100px !important; }

/* Padding Utilities */
.pt0 { padding-top: 0 !important; }
.pt10 { padding-top: 10px !important; }
.pt20 { padding-top: 20px !important; }
.pt30 { padding-top: 30px !important; }
.pt40 { padding-top: 40px !important; }
.pt50 { padding-top: 50px !important; }

.pb0 { padding-bottom: 0 !important; }
.pb10 { padding-bottom: 10px !important; }
.pb20 { padding-bottom: 20px !important; }
.pb30 { padding-bottom: 30px !important; }
.pb40 { padding-bottom: 40px !important; }
.pb50 { padding-bottom: 50px !important; }

/*--------------------------------------------------
  Animations
--------------------------------------------------*/
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.2, 1, 0.3, 1), transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay Utilities */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/*--------------------------------------------------
  Typography
--------------------------------------------------*/
h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 0.2em;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Mobile Overlay */
#nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1020;
    opacity: 0;
    transition: 0.4s;
}

.nav-open #nav-overlay {
    display: block;
    opacity: 1;
}

/* Mobile Link (Only SM/SP) */
.mobile-only {
    display: none;
}
#nav-toggle {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
}

#nav-toggle span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: 0.3s;
}

#nav-toggle span:nth-child(1) { top: 0; }
#nav-toggle span:nth-child(2) { top: 11px; }
#nav-toggle span:nth-child(3) { bottom: 0; }

/* Open State */
.nav-open #nav-toggle span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}
.nav-open #nav-toggle span:nth-child(2) {
    opacity: 0;
}
.nav-open #nav-toggle span:nth-child(3) {
    bottom: 11px;
    transform: rotate(-45deg);
}

/*--------------------------------------------------
  Components (Common)
--------------------------------------------------*/
.btn-main {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.btn-main:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-sub {
    display: inline-block;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 13px 40px;
    border-radius: 50px;
    font-weight: bold;
    white-space: nowrap;
    transition: 0.3s;
    background: transparent;
}

.btn-sub:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.2);
}

/*--------------------------------------------------
  Header
--------------------------------------------------*/
#header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* メニューが開いているときはヘッダーを最前面に */
.nav-open #header {
    z-index: 1200;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo img {
    height: 40px;
    width: auto;
}

/* ナビゲーション */
#gnav {
    display: block;
    margin-left: auto; /* これで右に寄せる */
}

#gnav .nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
}

#gnav .nav-list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: 0.3s;
}

#gnav .nav-list a span {
    font-size: 0.65rem;
    font-weight: normal;
    color: var(--text-sub);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#gnav .nav-list a:hover {
    color: var(--primary-color);
}

#gnav .nav-list a:hover span {
    color: var(--primary-color);
}

.header-contact {
    margin-left: 40px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-header {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.btn-header:hover {
    background: var(--text-main);
    color: var(--white);
}

.btn-header-sub {
    display: inline-block;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.btn-header-sub:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* モバイルメニューボタン（デフォルト非表示） */
#nav-toggle {
    display: none;
}

/* 768px以下でナビを隠し、ハンバーガーを表示 */
@media screen and (max-width: 768px) {
    #gnav { 
        display: block; 
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1050;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 100px 40px;
    }

    .nav-open #gnav {
        right: 0;
    }

    .header-contact { display: none; }
    #nav-toggle { display: block; }

    /* ハンバーガーメニュー内では横並び */
    #gnav .nav-list {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        width: 100%;
    }

    #gnav .nav-list li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    #gnav .nav-list li:last-child {
        border-bottom: none;
    }

    #gnav .nav-list a {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 10px 0;
        font-size: 1.1rem;
        width: 100%;
    }

    #gnav .nav-list a span {
        font-size: 0.8rem;
        margin-top: 2px;
    }
}

/*--------------------------------------------------
  Footer
--------------------------------------------------*/
#footer {
    background: #f0ede9;
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    padding-bottom: 60px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    font-size: 0.9rem;
}

.copyright {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    font-size: 0.8rem;
    color: var(--text-sub);
    text-align: center;
}

/*--------------------------------------------------
  Subpage Common Header
--------------------------------------------------*/
.page-header {
    background: #F5F1E9;
    padding: 80px 0;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-intro {
    font-size: 1.1rem;
    color: var(--text-sub);
    max-width: 700px;
    margin: 0 auto;
}

/*--------------------------------------------------
  Responsive (GEMINI.md 規定)
--------------------------------------------------*/

/* 【TB】 1024px 以下 */
@media screen and (max-width: 1024px) {
    .section-padding { padding: 60px 0; }
    .section-title { font-size: 2rem; }
    
    #gnav .nav-list { gap: 15px; } /* 項目が減ったので15pxで余裕のはず */
    #gnav .nav-list a { font-size: 0.9rem; letter-spacing: -0.02em; }
    .header-contact { margin-left: 15px; }
    .btn-header { padding: 8px 15px; font-size: 0.85rem; }
}

/* 【SM】 768px 以下 (境界値のズレ対策) */
@media screen and (max-width: 768px) {
    body { font-size: 15px; }
    .section-padding { padding: 50px 0; }
    .section-title { font-size: 1.8rem; word-break: normal; }
    
    .header-inner { flex-wrap: nowrap; justify-content: space-between; }
    
    /* Mobile Link (お問い合わせボタンを大きく表示) */
    .mobile-only { display: block !important; width: 100%; margin-top: 30px; }
    .mobile-only .btn-main { 
        display: flex !important; 
        justify-content: center; 
        align-items: center;
        flex-direction: column;
        width: 100%; 
        text-align: center; 
        padding: 15px; 
    }
    .mobile-only .btn-main span {
        margin-top: 0;
    }

    .footer-inner { flex-direction: column; gap: 40px; }
}

/* 【SP】 479px 以下 */
@media screen and (max-width: 479px) {
    .section-padding {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }
}