/* ============================================
   가야금 졸업 연주회 초대장 - 스타일시트
   ============================================ */

:root {
    --color-bg: #fffefe;
    --color-bg-alt: #fffaf8;
    --color-bg-soft: #fffdfb;
    --color-card: rgba(255, 255, 255, 0.84);
    --color-card-strong: rgba(255, 255, 255, 0.94);
    --color-peach: #f7d8cf;
    --color-apricot: #f8e4c9;
    --color-blush: #f5dbe7;
    --color-lilac: #e7e2fb;
    --color-mint: #def3ea;
    --color-sage: #8fb5a1;
    --color-rosewood: #9a6f7c;
    --color-plum: #5f516c;
    --color-text: #574b5c;
    --color-text-muted: #86798a;
    --color-border: rgba(154, 111, 124, 0.14);
    --color-shadow: rgba(176, 144, 162, 0.16);

    --font-serif: 'Noto Serif KR', 'Batang', serif;
    --font-display: 'Cormorant Garamond', 'Noto Serif KR', serif;

    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 0.28s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 1vw + 10px, 16px);
}

body {
    font-family: var(--font-serif);
    color: var(--color-text);
    line-height: clamp(1.6, 2vw, 1.85);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(circle at top left, rgba(245, 219, 231, 0.34), transparent 30%),
        radial-gradient(circle at 82% 10%, rgba(222, 243, 234, 0.28), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(231, 226, 251, 0.24), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fffdfa 48%, #fffaf8 100%);
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
    opacity: 0.55;
    z-index: 0;
}

body::before {
    width: 320px;
    height: 320px;
    top: -90px;
    right: -110px;
    background: radial-gradient(circle, rgba(247, 216, 207, 0.58), transparent 70%);
}

body::after {
    width: 280px;
    height: 280px;
    bottom: 10%;
    left: -80px;
    background: radial-gradient(circle, rgba(222, 243, 234, 0.56), transparent 72%);
}

#particleCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    position: relative;
    z-index: 1;
    padding: clamp(72px, 11vh, 110px) 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.45rem);
    font-weight: 500;
    color: var(--color-rosewood);
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: 0.12em;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 58px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-blush), var(--color-apricot), var(--color-lilac));
    margin: 16px auto 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

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

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 22%, rgba(247, 216, 207, 0.34), transparent 24%),
        radial-gradient(circle at 78% 18%, rgba(231, 226, 251, 0.4), transparent 20%),
        radial-gradient(circle at 50% 72%, rgba(222, 243, 234, 0.34), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 247, 0.82));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 45%),
        url("data:image/svg+xml,%3Csvg width='96' height='96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(154,111,124,0.08)' stroke-width='1'%3E%3Cpath d='M48 12C28 12 12 28 12 48s16 36 36 36 36-16 36-36S68 12 48 12Z'/%3E%3Cpath d='M24 48h48M48 24v48'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 680px;
    padding: clamp(36px, 5vw, 56px);
    border: 1px solid rgba(245, 219, 231, 0.42);
    border-radius: 36px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76));
    box-shadow: 0 24px 80px rgba(176, 144, 162, 0.11);
    backdrop-filter: blur(16px);
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--color-rosewood);
    margin-bottom: 18px;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 18px 0 22px;
}

.divider-line {
    display: block;
    width: 72px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(154, 111, 124, 0.85), transparent);
}

.divider-icon {
    font-size: 1.15rem;
    opacity: 0.75;
}

.hero-title {
    font-size: clamp(2.1rem, 8vw, 4rem);
    font-weight: 500;
    color: var(--color-plum);
    letter-spacing: 0.08em;
    margin: 10px 0 18px;
    line-height: 1.25;
    word-break: keep-all; /* 글자가 끊어져 줄바꿈 되지 않도록 방지 */
    overflow-wrap: break-word;
}

.hero-invitation {
    font-size: 1rem;
    color: var(--color-text-muted);
    letter-spacing: 0.18em;
}

.scroll-indicator {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.7;
    animation: fadeInUp 1.5s ease 1s both;
}

.scroll-indicator span {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 8px;
}

.scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 2px solid rgba(154, 111, 124, 0.72);
    border-bottom: 2px solid rgba(154, 111, 124, 0.72);
    transform: rotate(45deg);
    margin: 0 auto;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
    50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 0.7; transform: translateX(-50%) translateY(0); }
}

.greeting,
.program,
.closing {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.38));
}

.info,
.gallery {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.56));
}

.greeting-content,
.program-list,
.closing-content,
.gallery-grid,
.gallery-empty {
    position: relative;
}

.greeting .container,
.info .container,
.program .container,
.gallery .container,
.closing .container {
    padding-top: 34px;
    padding-bottom: 34px;
    border: 1px solid rgba(245, 219, 231, 0.42);
    border-radius: 34px;
    background: linear-gradient(180deg, var(--color-card-strong), var(--color-card));
    box-shadow: 0 18px 60px rgba(176, 144, 162, 0.09);
    backdrop-filter: blur(14px);
}

.greeting-content {
    text-align: center;
}

.greeting-content p {
    font-size: 1.04rem;
    font-weight: 600; /* 잘 보이도록 볼드체로 변경 */
    line-height: 2.15;
    color: #222222; /* 텍스트를 검정에 가깝게 진하게 변경 */
    margin-bottom: 28px;
    letter-spacing: 0.01em;
    word-break: keep-all; /* 모바일에서 텍스트 자동 조절(Autoscaling) 향상 */
}

.greeting-content p:last-child {
    margin-bottom: 0;
}

/* 초대의 글 가로 스크롤 갤러리 */
.greeting-gallery-wrapper {
    margin-top: 48px;
    width: 100%;
}

.greeting-gallery {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(154, 111, 124, 0.4) transparent;
    -webkit-overflow-scrolling: touch;
}

.greeting-gallery::-webkit-scrollbar {
    height: 6px;
}

.greeting-gallery::-webkit-scrollbar-thumb {
    background-color: rgba(154, 111, 124, 0.4);
    border-radius: 10px;
}

.greeting-gallery img {
    flex: 0 0 auto;
    width: 220px;
    height: 300px;
    object-fit: cover;
    border-radius: 18px;
    scroll-snap-align: center;
    box-shadow: 0 8px 20px rgba(176, 144, 162, 0.12);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.info .section-title,
.info-card h3,
.info-card p,
.info-sub {
    color: #000000 !important;
}

.info-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 251, 253, 0.9));
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 30px 22px;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    box-shadow: 0 12px 30px rgba(176, 144, 162, 0.09);
}

.info-card:nth-child(1) {
    background: linear-gradient(180deg, rgba(255, 248, 243, 0.96), rgba(255, 255, 255, 0.88));
}

.info-card:nth-child(2) {
    background: linear-gradient(180deg, rgba(255, 252, 242, 0.96), rgba(255, 255, 255, 0.88));
}

.info-card:nth-child(3) {
    background: linear-gradient(180deg, rgba(247, 249, 255, 0.96), rgba(255, 255, 255, 0.88));
}

.info-card:nth-child(4) {
    background: linear-gradient(180deg, rgba(244, 252, 248, 0.96), rgba(255, 255, 255, 0.88));
}

.info-card:hover {
    transform: translateY(-6px);
    border-color: rgba(154, 111, 124, 0.28);
    box-shadow: 0 16px 38px rgba(176, 144, 162, 0.16);
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-rosewood);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.98rem;
    color: var(--color-text);
    line-height: 1.65;
}

.info-sub {
    font-size: 0.92rem !important;
    color: var(--color-text-muted) !important;
    margin-top: 4px;
}

.program-list {
    max-width: 560px;
    margin: 0 auto;
}

.program-item {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(154, 111, 124, 0.12);
    transition: transform var(--transition-fast), padding-left var(--transition-fast);
}

.program-item:last-child {
    border-bottom: none;
}

.program-item:hover {
    padding-left: 10px;
    transform: translateX(2px);
}

.program-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-rosewood);
    opacity: 0.72;
    min-width: 34px;
    line-height: 1.35;
}

.program-piece {
    font-size: 1.06rem;
    font-weight: 500;
    color: var(--color-plum);
    margin-bottom: 4px;
    line-height: 1.55;
}

.program-composer {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--color-text-muted);
    letter-spacing: 0.03em;
}

.gallery-description {
    text-align: center;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    margin-top: -28px;
    margin-bottom: 34px;
    letter-spacing: 0.12em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 245, 248, 0.92));
    box-shadow: 0 12px 28px rgba(176, 144, 162, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, filter 0.55s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    z-index: 1;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(154, 111, 124, 0.18) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.gallery-item:hover img {
    transform: scale(1.07);
    filter: saturate(1.08) brightness(1.03);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-empty {
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    padding: 54px 0 20px;
    letter-spacing: 0.05em;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(103, 84, 101, 0.32);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 70px rgba(84, 65, 81, 0.28);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition-fast);
    color: var(--color-plum);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
}

.lightbox-close {
    top: 20px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.8rem;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.04);
}

.lightbox-close:hover {
    transform: scale(1.04);
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--color-plum);
    letter-spacing: 0.14em;
}

.closing {
    padding: 110px 0 120px;
}

.closing-content {
    text-align: center;
}

.closing-icon {
    font-size: 2rem;
    margin-bottom: 28px;
    opacity: 0.7;
}

.closing-text {
    font-size: 1.08rem;
    line-height: 2.1;
    color: var(--color-text);
    margin-bottom: 24px;
}

.closing-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-rosewood);
    letter-spacing: 0.14em;
}

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 28px 0 34px;
    border-top: 1px solid rgba(154, 111, 124, 0.1);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
}

.footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.14em;
}

@media (max-width: 600px) {
    .section {
        padding: clamp(52px, 8vh, 70px) 0;
    }

    .container {
        padding: 0 18px;
    }

    .greeting-gallery img {
        width: 160px;
        height: 220px;
    }

    .greeting .container,
    .info .container,
    .program .container,
    .gallery .container,
    .closing .container,
    .hero-content {
        border-radius: 26px;
    }

    .section-title {
        font-size: clamp(1.45rem, 6vw, 1.8rem);
        margin-bottom: 30px;
    }

    .hero-subtitle {
        font-size: 0.84rem;
        letter-spacing: 0.22em;
    }

    .hero-invitation {
        letter-spacing: 0.1em;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-card {
        padding: 22px 16px;
        border-radius: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-item,
    .gallery-item::before,
    .lightbox-content img {
        border-radius: 16px;
    }

    .program-item {
        gap: 12px;
        padding: 18px 0;
    }

    .program-piece,
    .greeting-content p,
    .closing-text {
        font-size: 0.96rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

@media (max-width: 380px) {
    .hero-content {
        padding: 28px 20px;
    }

    .divider-line {
        width: 46px;
    }
}
