:root {
    --bg-color: #F4EFE6;
    --text-color: #2D2D2D;
    --line-color: #2D2D2D;
    --accent-purple: #6F61A8;
    --accent-green: #25A18E;
    --accent-red: #E66C52;
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --border-width: 3px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--border-width) solid var(--line-color);
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: 0.05em;
    line-height: 1;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    padding-bottom: 0.2rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--accent-red);
}

/* Common Section */
.section-block {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--line-color);
    display: inline-block;
    padding-bottom: 0.2rem;
}

/* About Section */
.about-section {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.about-text {
    flex: 3;
}

.about-text .lead {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-image {
    flex: 2;
    min-width: 250px;
}

.placeholder-img {
    width: 100%;
    aspect-ratio: 1;
    border: var(--border-width) solid var(--line-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-align: center;
    box-shadow: 6px 6px 0px var(--line-color);
    font-size: 1.5rem;
}

.profile-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: var(--border-width) solid var(--line-color);
    border-radius: 20px;
    box-shadow: 6px 6px 0px var(--line-color);
    display: block;
}

.bg-purple {
    background: var(--accent-purple);
}

.bg-green {
    background: var(--accent-green);
}

.bg-red {
    background: var(--accent-red);
}

/* Grid for main/side */
.two-colGrid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
}

/* Apps */
.app-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: #fff;
    border: var(--border-width) solid var(--line-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 4px 4px 0px var(--line-color);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.app-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px var(--line-color);
}

.app-mockups {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.carousel-nav {
    display: none;
    /* デスクトップではボタンを非表示 */
}

.app-mockup {
    flex: 1;
    aspect-ratio: 9/16;
    border: var(--border-width) solid var(--line-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.app-screenshot {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    border: var(--border-width) solid var(--line-color);
    border-radius: 8px;
    background-color: #fff;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.app-desc {
    font-size: 0.95rem;
}

/* Motto */
.motto-item {
    margin-bottom: 2rem;
}

.motto-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

.motto-item p {
    font-size: 0.95rem;
}

/* Contact */
.contact-desc {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.contact-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--bg-color);
    border: var(--border-width) solid var(--line-color);
    border-radius: 50px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 5px 5px 0px var(--line-color);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: center;
    width: 100%;
}

.contact-btn:hover {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0px var(--line-color);
    background: var(--accent-green);
    color: white;
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        text-align: center;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .about-section {
        flex-direction: column-reverse;
    }

    .two-colGrid {
        grid-template-columns: 1fr;
    }

    .app-card {
        flex-direction: column;
    }

    .app-mockups {
        position: relative;
        height: 400px;
        /* スマホ時の画像高さ */
        display: block;
        /* フレックスを解除して絶対配置で重ねる */
        overflow: hidden;
    }

    .app-screenshot {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        pointer-events: none;
        /* 後ろの画像がタッチイベントを吸わないように */
    }

    .app-screenshot.active {
        opacity: 1;
        pointer-events: auto;
        /* アクティブな画像だけタッチを有効に */
    }

    /* カルーセル用のドットボタン */
    .carousel-nav {
        display: flex;
        justify-content: center;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }

    .nav-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: transparent;
        border: 2px solid var(--line-color);
        cursor: pointer;
        padding: 0;
        transition: background-color 0.3s;
    }

    .nav-dot.active {
        background-color: var(--accent-red);
    }
}