/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本スタイル */
body {
    font-family: "fot-tsukuaoldmin-pr6n", YuMincho, "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    letter-spacing: 0.05em;
    line-height: 2.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ローディング画面 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fafafa;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
    padding: 0 20px;
}

.loading-logo h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 40px 0;
    font-family: Cormorant, serif;
    opacity: 0;
    transform: translateY(20px);
    animation: logoFadeIn 1s ease-out 0.3s forwards;
}

.loading-logo .span {
    color: #8B7355;
}

.loading-progress {
    width: 100%;
    height: 2px;
    background: rgba(139, 115, 85, 0.2);
    border-radius: 1px;
    overflow: hidden;
    margin-bottom: 20px;
    opacity: 0;
    animation: progressFadeIn 0.5s ease-out 0.5s forwards;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8B7355, #a68b5b);
    width: 0%;
    border-radius: 1px;
    animation: progressFill 2.5s ease-out 0.8s forwards;
}

.loading-text {
    font-size: 0.9rem;
    color: #8B7355;
    font-weight: 500;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: textFadeIn 0.5s ease-out 1.0s forwards;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

h1, h2, h3 {
    font-family: "Cormorant", serif;
    font-weight: 700;
}

h1, h2  {
    margin-bottom: 20px;
}


header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 3;
    padding: 20px 40px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
}

header .span {
    color: #8B7355;
}

nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1rem;
}

.nav-link:hover {
    color: #8B7355;
}

.nav-link.active {
    color: #8B7355;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #8B7355;
}

.btn {
    width: 180px;
    margin: 0 auto;
    background: transparent;
    color: #8B7355;
    border: 1px solid #8B7355;
    padding: 12px 24px;
    border-radius: 50vw;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '↗';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn:hover {
    background: #8B7355;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.btn:hover::after {
    transform: rotate(45deg);
}

#footer {
    padding: 2%;
    background-color: #8B7355;
    color: #ffffff;
    font-size: 0.9rem;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex {
    display: flex;
    align-items: center;
    gap: 50px;
}

@media (max-width: 768px) {
    .flex {
        flex-direction: column;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 200px 20px 0;
}

.scroll-fadein {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fadein.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ヒーローセクション */
.about-section {
    padding-bottom: 140px;
}

.about-section .title-image {
    height: 280px;
    overflow: hidden;
    flex: 0 0 55%;
}

@media (max-width: 768px) {

    .about-section {
        padding-bottom: 100px;
    }

    .about-section .title-image {
        margin-left: -20px;
    }
}

/* quietly-beautifully-within-section */
.quietly-beautifully-within-section {
    padding-bottom: 140px;
}

.quietly-beautifully-within-section .title-image {
    height: 200px;
    overflow: hidden;
}

.quietly-beautifully-within-section .title-image img {
    width: 100%;
    margin-top: -250px;
}

.quietly-beautifully-within-section h2 {
 text-align: center;
 margin-top: 60px;
 margin-bottom: 20px;
}

.quietly-beautifully-within-section .tech-stack {
    font-family: Sorts Mill Goudy, serif;
    font-size: 1rem;
    color: #666;
    width: 210px;
    margin: 0 auto 30px;
}

.quietly-beautifully-within-content {
    margin-bottom: 140px;
    justify-content: center;
}

@media (max-width: 768px) {
    .quietly-beautifully-within-section {
        padding-bottom: 100px;
    }

    .quietly-beautifully-within-section h2 {
        margin-top: 20px;
    }
}

/* スクロールセクション */
.scroll-section {
    min-height: 100vh;
    position: relative;
    margin-bottom: 60px;
}

.scroll-container {
    max-width: 1200px;
    margin: 0 auto;
}

.columns {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .quietly-beautifully-within-section .title-image img {
        margin-top: 0;
    }
}

/* 左側カラム（固定） */
.column.primary {
    flex: 0 0 calc(50% - 30px);
    position: sticky;
    top: 50px;
    height: fit-content;
    z-index: 10;
}

/* 画像コンテナ */
.image {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.section-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transform: scale(1.1) translateY(20px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
    top: 0;
    left: 0;
}

.section-image.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    position: relative;
}

.section-image:hover {
    transform: scale(1.05);
}

/* 右側カラム（スクロール可能） */
.column.secondary {
    flex: 0 0 calc(50% - 30px);
    max-width: 600px;
}

.column-content {
    padding: 40px 0;
}

.scroll-content {
    padding: 20px 0;
}

/* ブロックスタイル */
.block {
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.block.visible {
    opacity: 1;
    transform: translateY(0);
}

.block h2 {
    color: #2c3e50;
}

.block h3 {
    margin-bottom: 20px;
}


.block ul {
    margin: 20px 0;
    padding-left: 30px;
}

.block li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

/* スクロールアニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .columns {
        gap: 40px;
    }
    
    .column.primary {
        flex: 0 0 calc(45% - 20px);
    }
    
    .column.secondary {
        flex: 0 0 calc(55% - 20px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 100px 15px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .scroll-section {
        margin: 60px 0;
    }
    
    .columns {
        flex-direction: column;
        gap: 30px;
    }
    
    .column.primary {
        flex: none;
        position: static;
        order: 2;
    }
    
    .column.secondary {
        flex: none;
        max-width: none;
        order: 1;
    }
    
    .column-content {
        padding: 0;
    }

    .scroll-content {
        padding: 0;
    }
    
    .block h2 {
        font-size: 1.5rem;
    }
    
    .block h3 {
        font-size: 1.5rem;
    }
    
    .block p {
        font-size: 1rem;
    }
    
    /* モバイルでは画像を即座に表示 */
    .section-image {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .scroll-section {
        margin: 0 0 40px;
    }
    
    .block {
        margin-bottom: 100px;
    }
    
    .block h2 {
        font-size: 1.2rem;
        margin-bottom: 0px;
        margin-top: 20px;
    }
    
    .block h3 {
        font-size: 1.2rem;
        margin-bottom: 0px;
        margin-top: 20px;
    }

    .quietly-beautifully-within-section._2 {
        padding-bottom: 0px;
    }
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* ローディングアニメーション */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ホバーエフェクト */
.block:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* フォーカス状態 */
.block:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 4px;
    border-radius: 4px;
}
