/* =========================================
   Ryu's Gallery - Core Styles (Black & White)
========================================= */

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-dim: #666666;
    --accent: #999999;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    /* background-image removed for a cleaner white look */
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: 0.05em;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 60px;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
}

/* =========================================
   Header
========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    background-color: rgba(255, 255, 255, 0.85); /* Readability for black text */
    backdrop-filter: blur(10px);
    transition: background-color var(--transition-fast), padding var(--transition-fast);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.logo span {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.desktop-nav a {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    font-family: var(--font-sans);
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

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

.social-icons a {
    margin-left: 20px;
    font-size: 1.2rem;
    color: var(--text-dim);
}

.social-icons a:hover {
    color: #000;
}

/* =========================================
   Hero Section
========================================= */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease;
    transform: scale(1.05); /* Start slightly zoomed in */
}

/* Hero Images */
.slide-1 {
    background-image: url('images/トップスライド01.webp');
}
.slide-2 {
    background-image: url('images/トップスライド02.webp');
}
.slide-3 {
    background-image: url('images/トップスライド03.webp');
}
.slide-4 {
    background-image: url('images/トップスライド04.webp');
}

.slide.active {
    opacity: 0.7;
    animation: kenburns 10s ease-out forwards;
}

@keyframes kenburns {
    0% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

.scroll-indicator span {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.7) 50%, transparent 50%);
    background-size: 100% 200%;
    animation: drop 2s infinite linear;
}

@keyframes drop {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

.hero-overlay-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hero-overlay-logo img {
    height: 250px;
    width: auto;
    max-width: 80vw;
    opacity: 0;
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.5)); /* Adds visibility if image is dark */
    animation: fadeInLogo 3s ease forwards 0.5s;
}

@keyframes fadeInLogo {
    to { opacity: 1; }
}

/* =========================================
   About Section
========================================= */
.about {
    padding: 150px 0;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.circle-mask {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.circle-mask img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter var(--transition-slow);
}

.circle-mask:hover img {
    filter: grayscale(0%);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.btn-link {
    display: inline-block;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 5px;
}

/* =========================================
   Portfolio Section
========================================= */
.portfolio-highlight {
    padding: 100px 0;
    background-color: #f5f5f7;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.grid-item {
    display: block;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.overlay h3 {
    color: #ffffff;
    font-size: 1.8rem;
    letter-spacing: 0.2em;
    transform: translateY(20px);
    transition: transform var(--transition-fast);
}

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

.grid-item:hover .overlay {
    opacity: 1;
}

.grid-item:hover .overlay h3 {
    transform: translateY(0);
}

/* =========================================
   Instagram Section
========================================= */
.instagram-feed {
    padding: 120px 0;
}

.insta-grid-placeholder {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 60px;
}

.dummy-tile {
    aspect-ratio: 1;
    background-color: #eee;
    border: 1px solid #ddd;
}

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

.btn-solid {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid #000;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.btn-solid:hover {
    background-color: #000;
    color: #fff;
}

/* =========================================
   Footer
========================================= */
footer {
    padding: 80px 0 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-links a:hover {
    color: #000;
}

.copyright {
    text-align: center;
    color: var(--accent);
    font-size: 0.8rem;
}

/* =========================================
   Animations (Intersection Observer)
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

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

/* =========================================
   Profile Page Specific Styles
========================================= */
.page-header {
    padding: 150px 0 80px;
    text-align: center;
    background-color: var(--bg-color);
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.profile-layout {
    display: flex;
    gap: 60px;
    padding-bottom: 100px;
    align-items: flex-start;
}

.profile-main-image {
    flex: 1;
    position: sticky;
    top: 100px;
}

.profile-main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.profile-content {
    flex: 2;
}

.profile-section {
    margin-bottom: 60px;
}

.profile-section h3 {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 25px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
    font-weight: 500;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.ja-subtitle {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
}

.profile-section p {
    color: var(--text-dim);
    line-height: 2;
    margin-bottom: 20px;
}

.awards-list {
    list-style: none;
}

.awards-list li {
    display: flex;
    justify-content: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dim);
}

.awards-list li .year {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    width: 80px;
    flex-shrink: 0;
    color: var(--text-color);
}

.awards-list li .award-desc {
    flex: 1;
}

.awards-list li .award-highlight {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 5px;
}

/* =========================================
   Call To Action (CTA) & Contact Form
========================================= */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background-color: #f5f5f7;
}

.cta-section h2 {
    font-size: 2.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

.cta-section p {
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 1rem;
    line-height: 1.8;
}

.contact-layout {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.contact-info {
    text-align: center;
    color: var(--text-dim);
    line-height: 1.8;
}

.contact-form {
    background: #fff;
    padding: 60px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    border-radius: 4px;
}

.form-group {
    margin-bottom: 35px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-color);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--text-color);
}

.form-control::placeholder {
    color: #bbb;
    font-size: 0.9rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background: transparent url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 5px center;
    cursor: pointer;
}

.btn-submit {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 18px 50px;
    font-family: var(--font-sans);
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: block;
    width: 100%;
    margin-top: 20px;
}

.btn-submit:hover {
    background-color: var(--text-dim);
}

/* =========================================
   Price Page Styles
========================================= */
.price-layout {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.price-intro {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 80px;
    line-height: 1.8;
}

.price-category {
    margin-bottom: 60px;
}

.price-category h3 {
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 15px;
    font-weight: 500;
}

.price-item {
    margin-bottom: 40px;
    padding: 0 10px;
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    border-bottom: 1px dashed #dcdcdc;
    padding-bottom: 5px;
}

.price-header h4 {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    background-color: var(--bg-color);
    padding-right: 15px;
    position: relative;
    top: 6px;
}

.price-amount {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    background-color: var(--bg-color);
    padding-left: 15px;
    position: relative;
    top: 6px;
    color: var(--text-color);
}

.price-amount small {
    font-size: 0.8rem;
    font-family: var(--font-sans);
    color: var(--text-dim);
}

.price-item p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.8;
}

.price-notes {
    margin-top: 80px;
    background: #fcfcfc;
    padding: 40px;
    border: 1px solid #f0f0f0;
}

.price-notes h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-color);
    letter-spacing: 0.05em;
}

.price-notes p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.8;
}

.price-notes p:last-child {
    margin-bottom: 0;
}

/* =========================================
   Portfolio Page Styles
========================================= */
.portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 100px;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-sans);
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    color: var(--text-dim);
    cursor: pointer;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-fast);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #000;
    transition: var(--transition-fast);
}

.filter-btn.active {
    color: var(--text-color);
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
}

.filter-btn:hover {
    color: var(--text-color);
}

/* CSS Column-count based Masonry */
.portfolio-grid {
    column-count: 3;
    column-gap: 20px;
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item img {
    width: 100%;
    display: block;
    height: auto;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
    transform: scale(1.03);
}

.portfolio-item.hide {
    display: none;
}

/* =========================================
   Responsive Design (Mobile & OS)
========================================= */
@media screen and (max-width: 900px) {
    /* Header & Navigation Stacked (Swipeable on Mobile) */
    .header-container { flex-direction: column; gap: 15px; width: 100%; padding: 0; }
    .logo { margin-top: 5px; }
    .desktop-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 5px; }
    .desktop-nav::-webkit-scrollbar { display: none; }
    .desktop-nav ul { gap: 25px; flex-wrap: nowrap; justify-content: flex-start; padding: 0 20px; width: max-content; margin: 0 auto; }
    .social-icons { display: none; } /* Hide social in header on mobile to save space */
    
    /* Hero */
    .hero-overlay-logo img { height: 180px; }
    
    /* Profile Page Layout */
    .profile-layout { flex-direction: column; gap: 40px; }
    .profile-main-image { position: relative; top: 0; width: 100%; max-width: 400px; margin: 0 auto; }
    
    /* About */
    .about-container { flex-direction: column; gap: 40px; text-align: center; }
    .about-image { justify-content: center; }
    
    /* Portfolio Grid - Always show titles on mobile */
    .grid { grid-template-columns: 1fr; gap: 20px; }
    .overlay { opacity: 1; background: rgba(0,0,0,0.3); } /* 常時表示 */
    .overlay h3 { transform: translateY(0); text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
    
    /* Instagram Grid */
    .insta-grid-placeholder { grid-template-columns: repeat(2, 1fr); }
    
    /* Contact & CTA */
    .cta-section { padding: 70px 20px; }
    .contact-form { padding: 40px 20px; }

    /* Price */
    .price-header { flex-direction: column; align-items: flex-start; border-bottom: none; }
    .price-header h4 { padding-right: 0; top: 0; margin-bottom: 5px; }
    .price-amount { padding-left: 0; top: 0; border-bottom: 1px dashed #dcdcdc; width: 100%; display: block; padding-bottom: 10px; margin-bottom: 10px; }
    .price-notes { padding: 25px 20px; }

    /* Portfolio */
    .portfolio-grid { column-count: 2; }

    .section-title { font-size: 2rem; }
}

@media screen and (max-width: 500px) {
    .container { padding: 0 20px; }
    .header-container { padding: 0 20px; }
    .desktop-nav a { font-size: 0.75rem; }
    
    .circle-mask { width: 250px; height: 250px; }
    
    .hero-overlay-logo img { height: 120px; }
    
    .portfolio-grid { column-count: 1; }
    .portfolio-container { padding: 0 20px 80px; }
    
    .footer-container { flex-direction: column; gap: 20px; align-items: center; text-align: center; }
}
