<?php
/*
Theme Name: Botanic & Canvas
Description: オリジナルポートフォリオテーマ（illi design参考、水彩・ボタニカル）
Version: 1.0.2
Author: Antigravity
Text Domain: botanic-canvas
*/
?>
@charset "UTF-8";

/* =========================================================================
   Variables
   ========================================================================= */
:root {
    --color-base: #F8F5F0; /* ウォームオーツ */
    --color-text: #2C302E; /* ディープフォレスト */
    --color-accent-main: #9CB4A6; /* セージグリーン */
    --color-accent-sub: #D49A89; /* テラコッタ */
    
    --font-en: 'Cormorant Garamond', serif;
    --font-ja: 'Zen Kaku Gothic Antique', sans-serif;
    
    --transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: var(--font-ja);
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-base);
    cursor: none; /* カスタムカーソル用に非表示 */
    overflow-x: hidden;
}

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

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

/* =========================================================================
   Background Canvas Effects
   ========================================================================= */
.canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    opacity: 0.8;
    background: url('images/bg_canvas.svg') center center / cover no-repeat;
}

.canvas-bg::after {
    display: none;
}

.bg-parallax {
    background-image: url('images/bg_canvas.svg');
    background-size: cover;
    background-position: center 0;
    background-repeat: no-repeat;
    background-attachment: local;
}

/* =========================================================================
   Custom Cursor
   ========================================================================= */
.custom-cursor,
.custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    border-radius: 50% 0 50% 50%; /* 葉っぱのような形 */
}

.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent-sub);
    transition: transform 0.1s;
}

.custom-cursor-follower {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-accent-main);
    transition: left 0.15s cubic-bezier(0.25, 1, 0.5, 1), top 0.15s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s, height 0.3s;
    background-color: rgba(156, 180, 166, 0.1);
}

.custom-cursor.is-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: var(--color-accent-main);
}

.custom-cursor-follower.is-hover {
    width: 48px;
    height: 48px;
    border-color: var(--color-accent-sub);
    background-color: rgba(212, 154, 137, 0.1);
}

/* =========================================================================
   Layout & Components
   ========================================================================= */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.section {
    position: relative;
}

.is-padding {
    padding: 120px 0;
}

.has-bg {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

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

.section-title {
    font-family: var(--font-en);
    font-size: 4rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 60px;
    color: var(--color-accent-main);
    position: relative;
    display: inline-block;
}

.section-title span {
    display: block;
    font-family: var(--font-ja);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-text);
    margin-top: 10px;
    letter-spacing: 0.1em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: -20px;
    width: 30px;
    height: 2px;
    background-color: var(--color-accent-sub);
    transform: rotate(-15deg);
    opacity: 0.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    font-size: 1.6rem;
    letter-spacing: 0.1em;
    border-radius: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--color-accent-main);
    z-index: -1;
    transition: var(--transition);
}

.btn-primary:hover {
    color: #fff;
    border-color: var(--color-accent-main);
}

.btn-primary:hover::before {
    width: 100%;
}

.leaf-arrow {
    margin-left: 10px;
    transition: transform 0.3s;
}

.btn-primary:hover .leaf-arrow {
    transform: translateX(5px) rotate(15deg);
}

/* =========================================================================
   Header
   ========================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: var(--transition);
}

.header.is-scrolled {
    padding: 15px 5%;
    background-color: rgba(248, 245, 240, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.logo {
    font-family: var(--font-en);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--color-accent-main);
}

.global-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.global-nav a {
    font-family: var(--font-en);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    position: relative;
}

.global-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent-sub);
    transition: var(--transition);
}

.global-nav a:hover::after {
    width: 100%;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.handwritten-title {
    width: 100%;
    max-width: 600px;
    height: 120px;
    margin-bottom: 20px;
}

.text-path {
    font-family: var(--font-en);
    font-size: 5rem;
    font-weight: 400;
    fill: transparent;
    stroke: var(--color-text);
    stroke-width: 1px;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawText 4s ease-in-out forwards;
}

@keyframes drawText {
    0% { stroke-dashoffset: 1000; fill: transparent; }
    80% { fill: transparent; }
    100% { stroke-dashoffset: 0; fill: var(--color-text); }
}

.hero-illustration {
    max-width: 400px;
    margin: 0 auto 30px;
    mix-blend-mode: multiply;
    transition: transform 0.1s ease-out; /* パララックス用スムージング */
}

.hero-subtext {
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    color: var(--color-text);
    opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-indicator span {
    font-family: var(--font-en);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background-color: rgba(44, 48, 46, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-line::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-text);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* =========================================================================
   About
   ========================================================================= */
.layout-2col {
    display: flex;
    align-items: center;
    gap: 8%;
}

.layout-2col .col {
    flex: 1;
}

.plant-frame {
    position: relative;
    padding-top: 120%; /* アスペクト比 */
    border-radius: 100px 30px 100px 30px;
    overflow: hidden;
    box-shadow: 10px 15px 30px rgba(0,0,0,0.05);
}

.plant-frame img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plant-frame::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid var(--color-accent-sub);
    border-radius: 100px 30px 100px 30px;
    z-index: -1;
    opacity: 0.5;
}

.about-text {
    line-height: 2.2;
}

/* =========================================================================
   Works
   ========================================================================= */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.work-item {
    display: block;
    group: hover;
}

.work-thumbnail {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    margin-bottom: 20px;
}

.work-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-item:hover .work-thumbnail img {
    transform: scale(1.05);
}

/* スケッチ風ホバーエフェクト用 */
.sketch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-base);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    mix-blend-mode: color; /* 画像をモノクロ・スケッチ風に見せる効果 */
}

.work-item:hover .sketch-effect {
    opacity: 0.3;
    animation: sketchFlicker 2s infinite;
}

@keyframes sketchFlicker {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
}

.work-info h3 {
    font-family: var(--font-en);
    font-size: 2.2rem;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.work-item:hover .work-info h3 {
    color: var(--color-accent-main);
}

.work-info p {
    font-size: 1.3rem;
    color: #777;
    letter-spacing: 0.05em;
}

/* =========================================================================
   Services
   ========================================================================= */
.services-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-box {
    background-color: #fff;
    padding: 50px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(156, 180, 166, 0.1);
}

.service-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    border-color: rgba(156, 180, 166, 0.3);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--color-accent-sub);
}

.service-box h3 {
    font-family: var(--font-en);
    font-size: 2.4rem;
    margin-bottom: 15px;
}

.service-box p {
    font-size: 1.4rem;
    line-height: 1.8;
}

/* =========================================================================
   Contact
   ========================================================================= */
.contact-lead {
    font-size: 1.8rem;
    margin-bottom: 40px;
    line-height: 2;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    text-align: center;
    padding: 40px 0;
    font-family: var(--font-en);
    color: #888;
    background-color: var(--color-text);
}

/* =========================================================================
   Animations
   ========================================================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================================================
   Media Queries
   ========================================================================= */
@media (max-width: 768px) {
    .layout-2col {
        flex-direction: column;
        gap: 40px;
    }
    
    .services-wrapper {
        grid-template-columns: 1fr;
    }
    
    .text-path {
        font-size: 3rem;
    }
    
    body {
        cursor: auto; /* SPでは標準カーソル */
    }
    .custom-cursor, .custom-cursor-follower {
        display: none;
    }
    a {
        cursor: pointer;
    }
}
