/* 기본 스타일 초기화 및 변수 선언 - 따뜻한 톤으로 변경 */
:root {
    /* 배경 및 구조 */
    --bg-color: #FDFBF7;        /* 따뜻한 아이보리 배경 */
    --card-bg: #FFFFFF;         /* 깨끗한 화이트 카드 */
    --navbar-bg: rgba(253, 251, 247, 0.9); /* 내비게이션 바 (반투명) */
    --border-color: #E8E5DF;    /* 부드러운 베이지 테두리 */

    /* 텍스트 */
    --text-main: #2C2A29;       /* 짙은 차콜브라운 (완전 검정보다 부드러움) */
    --text-muted: #8A8580;      /* 웜 그레이 */

    /* 포인트 컬러 (강조) */
    --accent-primary: #C5A880;  /* 차분하고 고급스러운 베이지/카멜 */
    --accent-hover: #B0946E;    /* 호버 시 살짝 어두워지는 베이지 */
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    word-break: keep-all;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 상단 내비게이션 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 10%;
    position: sticky;
    top: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.navbar .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar nav a {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar nav a:hover, .navbar nav a.active {
    color: var(--text-main);
}

/* 히어로 섹션 */
.hero {
    position: relative; /* 노이즈 배경의 기준점이 됨 */
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center; /* 중앙 정렬로 변경하여 갤러리 느낌 강조 */
    text-align: center;
    padding: 0 10%;
    overflow: hidden;
}

/* 필름 그레인(노이즈) 텍스처 추가 */
.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* SVG 노이즈 필터 삽입 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.2; /* 노이즈 강도 대폭 상향 (확실히 티가 나도록 조절) */
    mix-blend-mode: multiply; /* 거친 필름 질감이 배경색에 강하게 묻어나도록 블렌드 모드 추가 */
    pointer-events: none; /* 마우스 클릭에 방해되지 않도록 설정 */
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1; /* 텍스트가 노이즈 위에 선명하게 보이도록 설정 */
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 5.5rem; /* 글자가 줄어든 만큼 폰트를 큼직하게 키워 임팩트 부여 */
    font-weight: 800; /* 조금 더 볼드하고 힘있게 */
    margin: 0; /* 단일 텍스트이므로 하단 여백 제거 */
    letter-spacing: -2px; /* 자간을 좁혀 세련된 하이엔드 무드 연출 */
}

/* 깜빡이는 타이핑 커서 */
.cursor {
    display: inline-block;
    color: var(--accent-primary); /* 포인트 컬러로 커서 통일 */
    font-weight: 300; /* 타이틀 폰트와 대비되게 얇게 설정하여 세련됨 강조 */
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.text-accent {
    color: var(--accent-primary);
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 포트폴리오 섹션 */
.portfolio-section {
    padding: 60px 10%;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 600;
    text-align: center;
}

/* 포트폴리오 필터 버튼 */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* 비디오 카드 디자인 (깔끔한 화이트 카드 & 소프트 섀도우) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.video-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); /* 아주 부드러운 그림자 */
    animation: fadeInUp 0.8s ease backwards;
    cursor: pointer;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
}

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

.video-card:hover .video-wrapper img.thumbnail {
    transform: scale(1.03);
}

/* 영상 정보 텍스트 */
.video-info {
    padding: 20px 10px 10px;
    text-align: center;
}

.video-info .category {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 8px;
}

.video-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

/* 모달 팝업 스타일 (모달은 영상에 집중하도록 어둡게 유지) */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
}

.modal.show { visibility: visible; opacity: 1; }

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
}

.modal-video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; border: none;
}

.close-modal {
    position: absolute;
    top: -40px; right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover { color: var(--accent-primary); }

/* CONTACT 섹션 스타일 */
.contact-section {
    padding: 80px 10%;
    text-align: center;
    background-color: #fff; /* 컨택트 영역만 화이트로 분리감 부여 */
    border-top: 1px solid var(--border-color);
}

.contact-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 35px;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--text-main);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    transition: background 0.3s ease;
}

.contact-btn:hover {
    background: var(--accent-primary);
}

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

.contact-btn.alt:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: transparent;
}

/* 푸터 */
footer {
    text-align: center;
    padding: 40px 0;
    background-color: #fff;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.family-site {
    margin-top: 15px;
}

.family-site select {
    display: inline-block;
    min-width: 220px; /* 안정적으로 보일 수 있도록 최소 너비 확보 */
    appearance: none; /* 브라우저 기본 화살표 제거 */
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px 36px 10px 16px; /* 우측 화살표 공간 확보 */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-bg);
    /* 커스텀 화살표 (SVG) 삽입 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8580' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    color: var(--text-muted);
    font-family: 'Montserrat', 'Pretendard Variable', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.family-site select:hover, .family-site select:focus {
    border-color: var(--accent-primary);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* 호버 시 화살표 색상을 포인트 컬러로 변경 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A880' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .navbar { padding: 20px 5%; }
    .hero { height: auto; padding: 100px 5% 60px; }
    .hero-content h1 { font-size: 3.2rem; letter-spacing: -1px; }
    .portfolio-section { padding: 40px 5%; }
    .contact-section { padding: 60px 5%; }
}