@charset "UTF-8";

:root {
    /* Main: Burnt Peach */
    --main-color: #D9805F;
    /* Accent: Antique Gold */
    --accent-color: #B59A6D;
    /* Sub: Blue Slate */
    --sub-color: #566C76;
    /* Base: Morning Eggshell */
    --bg-color: #F0EAD6;
    /* Text: Midnight Charcoal */
    --text-color: #2C343B;
    
    /* Font Settings */
    --font-serif: 'Shippori Mincho', 'Yu Mincho', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    
    /* Bottom Nav Setting */
    --bottom-nav-height: 64px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.8;
    letter-spacing: 0.05em;
    font-feature-settings: "palt";
    padding-bottom: var(--bottom-nav-height);
    /* スクロールバー常時表示でガタつき防止 */
    overflow-y: scroll;
}

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

/* Utilities */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.bg-accent { background-color: #fff; }
.bg-dark { background-color: var(--text-color); color: #fff; }

.vertical-text {
    writing-mode: vertical-rl;
    font-family: var(--font-serif);
    position: relative; z-index: 2;
}
.center-text { text-align: center; }

.mark-copper {
    background: linear-gradient(transparent 60%, rgba(217, 128, 95, 0.3) 60%);
    font-weight: bold; padding-bottom: 2px;
}
.mark-green {
    background: linear-gradient(transparent 60%, rgba(86, 108, 118, 0.25) 60%);
    font-weight: bold; padding-bottom: 2px;
}

/* =========================================
   2. Header (Unified Global Style)
   ========================================= */
.header {
    position: fixed; top: 0; width: 100%; 
    height: 60px; 
    display: flex; justify-content: center; align-items: center;
    z-index: 100; color: var(--text-color);
    transition: background-color 0.3s, box-shadow 0.3s;
    background-color: transparent; 
}
.header.scrolled {
    background-color: rgba(240, 234, 214, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header nav, .hamburger-menu { display: none !important; }

/* ロゴ設定 (全ページ共通: divタグ想定) */
.header .logo { 
    margin: 0; padding: 0; 
    line-height: 1; /* 親要素の高さ影響を排除 */
    font-size: 1rem; /* 親のフォントサイズをリセット */
}
.header .logo a { 
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem; /* PC・スマホ共通サイズ */
    font-weight: 700;
    letter-spacing: 0.03em;
    
    line-height: 1;
    display: inline-block;
    padding-top: 3px; /* 微調整 */
    
    text-decoration: none;
    color: var(--text-color);
}

/* =========================================
   3. Bottom Navigation (Fixed)
   ========================================= */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    height: var(--bottom-nav-height);
    background-color: rgba(240, 234, 214, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex; align-items: center;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; color: var(--sub-color);
    font-size: 0.6rem; font-family: 'Roboto Mono', sans-serif;
    width: 20%; flex: 0 0 20%; height: 100%;
    transition: color 0.3s; position: relative; padding-top: 5px;
}

.nav-item svg {
    width: 22px; height: 22px; fill: currentColor;
    margin-bottom: 3px; display: block;
}

.nav-item.active { color: var(--main-color); }
.nav-item.active::after {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; background-color: var(--main-color);
    border-radius: 0 0 4px 4px;
}

/* =========================================
   4. Hero Section (Home)
   ========================================= */
.hero-section {
    height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    /* ★修正: 背景を白(#fff)からエッグシェル(var(--bg-color))に変更 */
    background-color: var(--bg-color); 
}

/* 背景アニメーション */
.hero-bg-bottom {
    position: absolute; bottom: 0; left: 0; width: 0; 
    height: calc(100% * 116 / 380); 
    background: linear-gradient(90deg, 
        var(--sub-color) 0%, var(--sub-color) 80%, 
        var(--text-color) 80%, var(--text-color) 82.5%, 
        var(--accent-color) 82.5%, var(--accent-color) 100%
    );
    animation: slideRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    z-index: 1;
}
.hero-horizon-line {
    position: absolute;
    top: calc(100% * 253 / 380 - 2px); left: 0; width: 100%;
    height: calc(100% * 11 / 380 + 4px); 
    background-color: var(--text-color);
    transform: scaleX(0); transform-origin: center;
    animation: expandLine 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.5s;
    z-index: 0;
}
.hero-bg-top {
    position: absolute; top: 0; left: 0; width: 100%;
    height: calc(100% * 253 / 380); 
    background-color: var(--main-color);
    opacity: 0; 
    animation: fadePink 2.0s ease-out forwards 1.0s;
    z-index: 1;
}

.hero-content { 
    position: relative; 
    display: flex; 
    justify-content: center;
    align-items: center;
    z-index: 3; 
    width: 100%; 
}

/* h1 (メインコピー) */
.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 6rem);
    margin: 0 auto; 
    line-height: 1.4; letter-spacing: 0.1em;
    writing-mode: vertical-rl; font-family: var(--font-serif);
    /* ★修正: 文字色を白(#fff)からエッグシェル(var(--bg-color))に変更 */
    color: var(--bg-color);
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-feature-settings: "palt" 0;
}

.subtitle {
    position: absolute; 
    bottom: 12%; 
    left: 40px;
    font-family: var(--font-serif); 
    font-size: 2rem;
    line-height: 1.6; 
    color: var(--bg-color); 
    z-index: 3;
    max-width: 80%; 
}

@keyframes slideRight { 0% { width: 0; } 100% { width: 100%; } }
@keyframes expandLine { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes fadePink { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeUpText { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }

/* =========================================
   5. Product Page Styles (Unified Layout)
   ========================================= */
.product-hero {
    position: relative; background-color: var(--bg-color); width: 100%;
    height: auto; min-height: auto;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding-top: 100px; padding-bottom: 60px; padding-left: 20px; padding-right: 20px;
    overflow: hidden;
}
.product-title-block {
    width: 100%; max-width: 800px; margin: 0 auto 40px;
    position: relative; z-index: 10;
}
.product-label {
    display: block; font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem; color: var(--main-color); letter-spacing: 0.1em; margin-bottom: 15px;
}
.product-name {
    font-family: var(--font-serif); font-size: 2.8rem;
    line-height: 1.3; margin: 0 0 20px; color: var(--text-color);
}
.product-catch { font-size: 1.0rem; line-height: 2.0; color: var(--text-color); }
.hero-image-container {
    position: relative; width: 100%; max-width: 600px;
    height: auto; margin: 0 auto; z-index: 0;
}
.hero-image-container img {
    width: 100%; height: auto; object-fit: contain;
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Components */
.intro-text p {
    font-size: 1.0rem; line-height: 2.2; text-align: left;
    max-width: 600px; margin: 0 auto;
}

/* Service & Features */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card {
    background: #fff; padding: 40px 30px; border: 1px solid #ddd;
    border-top: 3px solid var(--sub-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--main-color); }
.card-header { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.service-jp {
    font-family: var(--font-serif); font-weight: bold; font-size: 1.25rem;
    line-height: 1.4; margin-bottom: 5px; color: var(--text-color);
}
.service-en { font-family: 'Roboto Mono', monospace; font-size: 0.8rem; color: var(--main-color); letter-spacing: 0.05em; }
.service-desc { font-size: 0.95rem; line-height: 1.8; color: #555; flex-grow: 1; }
a.service-card { display: flex; flex-direction: column; cursor: pointer; }
a.service-card:hover .service-jp { color: var(--main-color); transition: color 0.3s; }

/* Works List */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.work-img { width: 100%; height: 300px; background: #ddd; margin-bottom: 20px; overflow: hidden; }
.work-link-wrapper:hover .work-img { opacity: 0.9; transform: scale(1.01); transition: all 0.3s ease; }
.view-more {
    display: inline-block; margin-top: 10px; font-size: 0.9rem;
    font-family: var(--font-serif); border-bottom: 1px solid var(--text-color);
}

/* Features Stacked (For Product Pages) */
.features-grid { display: flex; flex-direction: column; gap: 30px; max-width: 600px; margin: 0 auto; }
.feature-card {
    background: #fff; padding: 30px; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); text-align: center;
}
.icon-circle {
    width: 60px; height: 60px; background: var(--bg-dark); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 1.5rem; color: var(--accent-color);
}
.feature-card h4 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 5px; }
.feature-sub {
    font-family: 'Roboto Mono'; color: var(--sub-color); font-size: 0.8rem; margin-bottom: 20px; letter-spacing: 0.05em;
}
.feature-card p:last-child { font-size: 0.95rem; line-height: 1.8; color: #555; text-align: left; }

/* Tech Specs */
.tech-section { background-color: #222; color: #fff; }
.feature-row, .feature-row.reverse { 
    display: flex; flex-direction: column; gap: 30px; margin-bottom: 80px; 
    max-width: 600px; margin-left: auto; margin-right: auto;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-img {
    width: 100%; min-height: 250px; background: #333;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; border-radius: 12px; padding: 40px; border: 1px solid #444;
}
.feature-desc { flex: 1; }
.feature-num {
    display: block; font-family: 'Roboto Mono'; color: var(--accent-color);
    font-size: 0.9rem; margin-bottom: 10px; font-weight: bold;
}
.feature-title {
    font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 20px;
    line-height: 1.4; border-bottom: 1px solid #555; padding-bottom: 15px; color: #fff;
}
.tech-section .feature-text { font-size: 0.95rem; line-height: 2.0; color: #ccc; }
.tech-section .feature-text strong { color: #fff; }

/* Journey */
.journey-grid { display: flex; flex-direction: column; gap: 30px; max-width: 600px; margin: 40px auto 0; }
.journey-card {
    background: #fff; border-radius: 12px; padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); position: relative;
    border-top: 4px solid var(--accent-color); overflow: hidden;
}
.journey-header {
    text-align: center; margin-bottom: 20px; border-bottom: 1px dashed #ddd; padding-bottom: 15px; position: relative; z-index: 2;
}
.step-badge {
    display: inline-block; background: var(--accent-color); color: #fff;
    font-family: 'Roboto Mono'; font-size: 0.8rem; padding: 4px 10px; border-radius: 20px; margin-bottom: 10px;
}
.journey-header h4 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: bold; }
.journey-body { position: relative; z-index: 2; }
.journey-body ol { padding-left: 20px; margin-bottom: 20px; }
.journey-body li { margin-bottom: 10px; font-size: 0.9rem; line-height: 1.6; }
.journey-icon {
    position: absolute; bottom: -10px; right: 0px; font-size: 5rem; color: #f8f8f8; z-index: 0; pointer-events: none;
}
.alert-box {
    background: #fff4e5; border-left: 4px solid #ff9800; padding: 15px; font-size: 0.85rem; color: #663c00;
    display: flex; align-items: center; gap: 10px; border-radius: 4px;
}

/* Plans */
.plan-container { display: flex; flex-direction: column; gap: 30px; max-width: 600px; margin: 0 auto 60px; }
.plan-card {
    background: #fff; border: 1px solid #ddd; padding: 30px; border-radius: 12px;
}
.plan-card.recommended { border: 2px solid var(--main-color); position: relative; }
.plan-card.recommended::before {
    content: 'RECOMMENDED'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--main-color); color: #fff; font-size: 0.7rem; padding: 4px 10px; border-radius: 10px; font-weight: bold; letter-spacing: 0.1em;
}
.plan-card h4 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 10px; text-align: center; }
.plan-desc { color: #666; font-size: 0.9rem; margin-bottom: 20px; text-align: center; }
.plan-list li { margin-bottom: 10px; border-bottom: 1px dashed #eee; padding-bottom: 10px; font-size: 0.95rem; }

/* Table */
.table-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 60px; }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.comparison-table th, .comparison-table td { padding: 12px; border-bottom: 1px solid #ccc; text-align: left; font-size: 0.9rem; }
.comparison-table th { background: var(--bg-dark); color: #fff; width: 30%; }
.comparison-table td:last-child {
    background: #fff; font-weight: bold; border-left: 2px solid var(--accent-color); color: var(--text-color);
}

.btn-primary {
    display: inline-block; margin-top: 30px; padding: 15px 40px;
    border: 1px solid var(--text-color); color: var(--text-color); text-decoration: none;
    transition: all 0.3s; background: transparent;
}
.btn-primary:hover { background: var(--text-color); color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.company-info { display: grid; grid-template-columns: 150px 1fr; gap: 20px; border-top: 1px solid #ccc; padding-top: 40px; }
.company-info dt { font-weight: bold; font-family: var(--font-serif); }

.fade-in-up {
    opacity: 0; transform: translateY(30px);
    transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.delay-200 { transition-delay: 0.2s; }

.pc-only { display: none; }
.ib { display: inline-block; }
.sp-br { display: none; }

/* =========================================
   Footer (Responsive Spacing)
   ========================================= */
.footer {
    width: 100%; 
    text-align: center;
    font-size: 0.8rem; 
    color: #666;
    
    /* ★PC・iPad用: ゆったりとした余白 (上60px, 下40px) */
    padding-top: 60px;
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
}
.footer a { margin-left: 20px; display: inline-block; }

/* Back to Top Btn */
.scroll-top-btn {
    position: fixed; bottom: 80px; right: 20px; 
    width: 50px; height: 50px;
    display: flex; justify-content: center; align-items: center;
    text-decoration: none; z-index: 90;
    opacity: 0; pointer-events: none; transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s;
    font-family: var(--font-serif); font-size: 1.2rem;
    color: var(--main-color);
}
.scroll-top-btn.visible {
    opacity: 1; pointer-events: auto; transform: translateY(0);
    transition: opacity 2.5s cubic-bezier(0.19, 1, 0.22, 1), transform 2.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.scroll-top-btn::before {
    content: ''; position: absolute;
    left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg);
    width: 50px; height: 50px; border-radius: 50%;
    border: 1.5px solid var(--main-color); background: transparent;
    mask: conic-gradient(#000 var(--circle-progress), transparent 0%);
    -webkit-mask: conic-gradient(#000 var(--circle-progress), transparent 0%);
    opacity: 0;
    transition: opacity 0.1s linear, --circle-progress 0.4s linear;
    pointer-events: none;
}
.scroll-top-btn:hover { color: var(--main-color); }
.scroll-top-btn:hover::before { opacity: 1; --circle-progress: 100%; }


/* =========================================
   Mobile Only Adjustments (Max 768px)
   ========================================= */
@media (max-width: 768px) {
    .section-padding { padding: 40px 0; }
    .fade-in-up { margin-bottom: 40px !important; }
    
    .grid-2, .works-grid, .service-grid, .skill-item { grid-template-columns: 1fr; gap: 30px; }
    .skill-item { gap: 10px; }
    .company-info { grid-template-columns: 85px 1fr; gap: 15px; }
    .company-info dt { font-size: 0.9rem; align-self: center; }
    
    .scroll-top-btn { display: none !important; }
    .sp-br { display: block; }
    
    .subtitle {
        font-size: 1.1rem;
        bottom: 12%; 
        left: 20px;
    }

    /* ★スマホ用修正: フッターの余白を極限まで詰める */
    .footer {
        padding-top: 10px;    /* 上の余白を10pxに */
        /* 100pxだと広すぎたので、30pxに短縮 */
        /* これでナビバーのすぐ上にコピーライトが来ます */
        padding-bottom: 20px;
    }

    /* ★スマホ用修正: Aboutセクション下の「見えない画像ボックス」を消して隙間をなくす */
    #about .image-block {
        display: none;
    }
    
    /* ★スマホ用修正: セクション自体の下余白もゼロに */
    #about.section-padding {
        padding-bottom: 0 !important;
    }
}