/* リセット */
*{margin:0;padding:0;box-sizing:border-box;}
body{
    font-family:'Montserrat',sans-serif;
    color:#222;
    background:#fff;
    overflow-x:hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>') 12 12, auto;
}
img{max-width:100%;display:block;}

/* 共通 */
.container{width:90%;max-width:1000px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;}
h2{font-size:2.25rem;margin-bottom:2rem;text-align:center;width:100%;}
.hidden{opacity:0;transform:translateY(50px);transition:all .8s ease;}
.show{opacity:1;transform:translateY(0);}
.lead{text-align:center;width:100%;max-width:800px;margin:0 auto 2rem;}

/* セクション共通の余白 */
section {
    padding: 4rem 0;
}

/* ヒーロー */
#hero{position:relative;height:90vh;width:100%;background-size:cover;background-position:center;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;transition:background-image 1s ease-in-out;margin-bottom: 100px;}
.hero-overlay{position:absolute;inset:0;background:rgba(255,255,255,.7);z-index:1;}
.logo{position:relative;z-index:2;font-size:4rem;letter-spacing:.2rem;}
.catch{position:relative;z-index:2;font-size:1.2rem;margin-top:1rem;}
.scroll-indicator{position:absolute;bottom:2rem;z-index:2;font-size:.9rem;animation:bounce 2s infinite;}
@keyframes bounce{0%,100%{transform:translateY(0);}50%{transform:translateY(-10px);}}

/* About */
#about .profile{width:250px;border-radius:50%;margin:1rem;object-fit:cover;}
#about .about-text{flex:1 1 400px;padding:1rem;}
#about ul{margin-top:1rem;list-style:none;font-size:.95rem;}

/* Awards */
.award-list{display:flex;flex-wrap:wrap;gap:1.5rem;justify-content:center;align-items:flex-start;}
.award-card{position:relative;overflow:hidden;flex:0 1 360px;max-width:360px;border-radius:12px;box-shadow:0 4px 14px rgba(0,0,0,.1);}
.award-image{position:relative;overflow:hidden;}
.award-description {
    position: static;
    background: #f8f8f8;
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 10px 14px;
    opacity: 1;
    transition: none;
    text-align: left;
    margin-top: 8px;
    border-radius: 8px;
    font-size: 0.98em;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.award-description p {
    font-size: 0.98em;
    line-height: 1.6;
    color: #333;
    margin: 0;
}
.award-info{padding:1rem;text-align:center;}
.award-title{font-size:0.9rem;margin:0.5rem 0;color:#666;}
.award-link{
    display:inline-block;
    padding:0.5rem 1.5rem;
    margin-top:0.8rem;
    border:1px solid #666;
    border-radius:20px;
    color:#666;
    text-decoration:none;
    font-size:0.85rem;
    position:relative;
    overflow:hidden;
    transition:color 0.3s;
    z-index:1;
}
.award-link::before{
    content:'';
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:#666;
    transition:transform 0.3s;
    z-index:-1;
}
.award-link:hover{
    color:#fff;
}
.award-link:hover::before{
    transform:translateX(100%);
}

.company-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    margin-top: 0rem;
    border: 1px solid #fff;
    border-radius: 20px;
    color: #fff;
    background: transparent;
    text-decoration: none;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, color 0.3s;
    z-index: 1;
}
.company-link::before{
    content:'';
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:#ffffff;
    transition:transform 0.3s;
    z-index:-1;
}
.company-link:hover {
    background: #fff;
    color: #222;
}
.company-link:hover::before{
    transform:translateX(100%);
}

/* Before After */
.ba-wrapper {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
}

.ba-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1/1;
}

.ba-container img.after,
.ba-container img.before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-container img.before {
    z-index: 2;
    /* clip-pathはJSで動的に変更 */
    pointer-events: none;
}

.ba-container img.after {
    z-index: 1;
}

.slider-hint {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
}

#edit-slider,
.edit-slider {
    width: 100%;
    margin-top: 0.5rem;
    -webkit-appearance: none;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    position: relative;
}

#edit-slider::-webkit-slider-thumb,
.edit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 48px;
    height: 32px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('data:image/svg+xml;utf8,<svg width="44" height="28" viewBox="0 0 44 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 6 L7 14 L11 22" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><rect x="17" y="8" width="1.5" height="12" fill="%23888" rx="0.75"/><rect x="20.75" y="8" width="1.5" height="12" fill="%23888" rx="0.75"/><rect x="24.5" y="8" width="1.5" height="12" fill="%23888" rx="0.75"/><path d="M33 6 L37 14 L33 22" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%;
}

#edit-slider::-webkit-slider-thumb:hover,
.edit-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

#edit-slider::-moz-range-thumb,
.edit-slider::-moz-range-thumb {
    width: 48px;
    height: 32px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('data:image/svg+xml;utf8,<svg width="44" height="28" viewBox="0 0 44 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 6 L7 14 L11 22" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><rect x="17" y="8" width="1.5" height="12" fill="%23888" rx="0.75"/><rect x="20.75" y="8" width="1.5" height="12" fill="%23888" rx="0.75"/><rect x="24.5" y="8" width="1.5" height="12" fill="%23888" rx="0.75"/><path d="M33 6 L37 14 L33 22" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%;
}

#edit-slider::-moz-range-thumb:hover,
.edit-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Projects */
.project-list{display:flex;flex-wrap:wrap;gap:1.5rem;justify-content:center;}
.project-card{position:relative;flex:1 1 300px;max-width:360px;border-radius:12px;overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.1);}
.project-info {
    position: absolute;
    left: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 70%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 1rem 1.2rem 1rem 1.2rem;
    font-size: .95rem;
    text-align: left;
    border-bottom-left-radius: 12px;
    width: auto;
    max-width: 80%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
}
.project-info h3 {
    margin: 0 0 0.2em 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}
.project-info p {
    margin: 0 0 0.5em 0;
    color: #fff;
    font-size: 0.95rem;
}
.project-info .award-link {
    margin-top: 0.2em;
}

/* Contact */
#contact{text-align:center;}
.price{font-size:1.1rem;margin-bottom:1rem;}
.cta-button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7em;
    padding: .8rem 2rem;
    border-radius: 30px;
    background: #000;
    color: #fff;
    text-decoration: none;
    transition: background .3s;
    margin-top: 2.5rem;
}
.cta-button:hover{background:#444;}

/* Footer */
footer{text-align:center;padding:2rem 0;font-size:.8rem;background:#f4f4f4;margin-top:3rem;}

/* Responsive */
@media (max-width:768px){
  .logo{font-size:2.5rem;}
  .award-card,.project-card{flex:1 1 100%;}
  #about{flex-direction:column;}
}

.center-card {
    align-self: center;
}

.external-note {
    display: block;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 0.3rem;
}

/* シャッターエフェクト */
.shutter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s linear;
}

.shutter.active {
    opacity: 1;
}

.shutter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.2s linear;
}

.shutter.active::before {
    clip-path: circle(150% at 50% 50%);
}

/* スクリーンショットプレビュー */
.screenshot-preview {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.screenshot-preview.active {
    opacity: 1;
    transform: translateY(0);
}

.screenshot-frame {
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.ba-flex {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}
.ba-flex > div {
    flex: 1 1 350px;
    min-width: 320px;
    max-width: 600px;
}
@media (max-width: 900px) {
    .ba-flex {
        flex-direction: column;
        gap: 2.5rem;
        align-items: center;
    }
    .ba-flex > div {
        max-width: 500px;
        width: 100%;
    }
    .ba-wrapper,
    .ba-container {
        width: 90vw;
        max-width: 500px;
        margin: 0 auto;
    }
}

.ba-label {
    position: absolute;
    top: 12px;
    left: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.2em 0.8em;
    border-radius: 12px;
    font-size: 1rem;
    z-index: 10;
    pointer-events: none;
}
.ba-label.after-label {
    left: auto;
    right: 20px;
}

.project-link-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 1.1rem 1.2rem;
    z-index: 2;
}

.note {
    max-width: 90vw;
    margin: 0 auto 0.5rem auto;
    text-align: center;
    display: block;
}
