/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 400;
    font-display: swap;
    src: local('Pretendard Regular'), url('./pretendard/web/static/woff2/Pretendard-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 600;
    font-display: swap;
    src: local('Pretendard SemiBold'), url('./pretendard/web/static/woff2/Pretendard-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 700;
    font-display: swap;
    src: local('Pretendard Bold'), url('./pretendard/web/static/woff2/Pretendard-Bold.woff2') format('woff2');
}

:root {
    --ink: #1b2427;
    --muted: #5b646b;
    --accent: #b88b4a;
    --accent-strong: #2f5f62;
    --bg: #f4f1ec;
    --bg-soft: #eef1ee;
    --panel: #ffffff;
    --line: rgba(27, 36, 39, 0.12);
    --shadow: 0 20px 50px rgba(15, 28, 32, 0.18);
    --shadow-soft: 0 12px 30px rgba(15, 28, 32, 0.08);
    --radius: 22px;
    --radius-sm: 14px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background: radial-gradient(circle at 15% 20%, rgba(184, 139, 74, 0.12), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(47, 95, 98, 0.16), transparent 40%),
        linear-gradient(180deg, #faf7f2 0%, #f4f1ec 55%, #efeeea 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

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

section {
    padding: 110px 0;
    scroll-margin-top: 90px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
}

h1 {
    font-size: clamp(2.8rem, 4.4vw, 4.6rem);
}

h2 {
    font-size: clamp(2.1rem, 3vw, 3rem);
}

h3 {
    font-size: 1.45rem;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.vision-label {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.section-header {
    text-align: center;
    margin-bottom: 42px;
}

.section-header.left {
    text-align: left;
}

.section-header.vision-header {
    margin-bottom: 8px;
}

.section-header h2 {
    margin-bottom: 8px;
}

.highlight {
    color: var(--accent-strong);
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 30px rgba(184, 139, 74, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(184, 139, 74, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 246, 242, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    z-index: 1000;
    transition: all 0.2s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    position: relative;
}

.nav-logo {
    font-size: clamp(1.7rem, 2.4vw, 2.2rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    cursor: pointer;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a {
    color: var(--ink);
    transition: color 0.2s ease;
}

.nav-links .nav-cta,
.nav-links .nav-cta:visited {
    color: #fff;
}

.nav-links a:hover {
    color: var(--accent-strong);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #005eae;
    color: #fff;
    font-weight: 600;
}

.nav-cta-icon {
    width: 22px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-cta-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-cta:visited {
    color: #fff;
}

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
    position: relative;
    padding: 160px 0 120px;
    color: #fff;
    text-align: center;
    background: #111;
    --hero-image: url('./ygchurch_images/church.png');
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero::before {
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(14px);
    transform: scale(1.06);
}

.hero::after {
    background: linear-gradient(120deg, rgba(17, 31, 34, 0.9) 0%, rgba(17, 31, 34, 0.62) 50%, rgba(17, 31, 34, 0.25) 100%);
}

.hero > .container,
.hero-scroll {
    position: relative;
    z-index: 1;
}

.hero-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    animation: heroIntro 0.9s ease-out both;
}

.hero-content h1 {
    color: #fff;
    margin-bottom: 16px;
}

.hero-sub {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.hero-note {
    color: rgba(255, 255, 255, 0.75);
    font-size: calc(1rem + 2pt);
}

.hero-note strong {
    color: #fff;
}

.hero .eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.hero .btn-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.hero .btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.hero .hero-sermon,
.hero .hero-sermon:visited {
    color: #fff;
}

.time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

/* About */
.about {
    background: var(--panel);
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    grid-template-areas:
        "header header"
        "text card"
        "values card";
    row-gap: 16px;
    column-gap: 40px;
    align-items: stretch;
}

.section-header.vision-header {
    grid-area: header;
}

.about-main {
    grid-area: text;
}

.about-text {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    grid-area: values;
}

.value-card {
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 1px solid rgba(47, 95, 98, 0.1);
}

.value-card h3 {
    margin-bottom: 8px;
}

.about-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    grid-area: card;
    align-self: stretch;
}

.denomination-card,
.location-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.denomination-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.denomination-logo img {
    width: 100px;
    margin: 0 auto 14px;
}

/* Gallery */
.gallery {
    background: var(--bg);
}

.gallery-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
    --gallery-slide-count: 15;
}

.gallery-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
    width: calc(var(--gallery-slide-count) * 100%);
    height: 100%;
}

.gallery-slide {
    width: calc(100% / var(--gallery-slide-count));
    flex-shrink: 0;
    height: 100%;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border-radius: 999px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* Worship */
.worship {
    background: var(--panel);
}

.worship-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    grid-auto-rows: minmax(150px, auto);
    align-items: stretch;
}

.worship-grid .worship-card:not(.primary) {
    display: flex;
    align-items: center;
    gap: 16px;
}

.worship-grid .worship-card-content {
    display: grid;
    gap: 4px;
}

.worship-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 14px;
}

.worship-card.primary {
    grid-column: span 2;
    grid-row: span 2;
    padding: 32px;
    align-content: space-between;
    background: linear-gradient(135deg, rgba(47, 95, 98, 0.18), rgba(184, 139, 74, 0.1));
    border-color: rgba(47, 95, 98, 0.2);
}

.worship-card.primary h3 {
    font-size: 2.3rem;
}

.worship-card.primary .muted {
    font-size: 1.2rem;
}

.worship-card.primary .time-row span {
    font-size: 1.2rem;
}

.worship-card.primary .time-row strong {
    font-size: 1.7rem;
}

.worship-header {
    display: flex;
    gap: 16px;
    align-items: center;
}

.worship-times {
    display: grid;
    gap: 10px;
}

.card-icon img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.worship-card h3 {
    margin-bottom: 4px;
}

/* Pastor */
.pastor {
    background: var(--bg);
}

.pastor-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
}

.pastor-info h2 {
    margin-bottom: 16px;
}

.pastor-details p {
    margin-bottom: 8px;
}

.books h4 {
    margin: 18px 0 8px;
    color: var(--accent-strong);
}

.pastor-image img {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
}

/* Floor Guide */
.floor-guide {
    background: var(--panel);
}

.floor-grid {
    display: grid;
    gap: 22px;
    max-width: 980px;
    margin: 0 auto;
}

.floor-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.floor-number {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent-strong);
    min-width: 70px;
    text-align: center;
}

.floor-content h3,
.floor-content h4 {
    margin-bottom: 8px;
}

.floor-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* Contact */
.contact {
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: stretch;
}

.contact-info {
    display: grid;
    gap: 16px;
    align-content: space-between;
    height: 100%;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.info-item .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(47, 95, 98, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-item .text h4 {
    margin-bottom: 6px;
}

.map-container {
    background: #f3f3f1;
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    min-height: 380px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.naver-map {
    width: 100%;
    height: 100%;
}

/* Footer */
.footer {
    background: #182327;
    color: #ffffff;
    padding: 70px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr;
    gap: 30px;
    align-items: start;
}

.footer-logo {
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.footer-tag,
.footer-info p,
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a {
    display: block;
    margin-bottom: 8px;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-credit a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

body.js-enabled .reveal {
    opacity: 0;
    transform: translateY(18px);
}

body.js-enabled .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

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

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .about-grid,
    .pastor-content {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-areas:
            "header"
            "text"
            "values"
            "card";
    }

    .value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worship-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worship-card.primary {
        grid-column: span 2;
        grid-row: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .nav-links {
        position: absolute;
        top: 72px;
        left: 24px;
        right: 24px;
        background: #fff;
        border-radius: var(--radius);
        border: 1px solid var(--line);
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.2s ease;
        box-shadow: var(--shadow-soft);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
    }

    .hero {
        padding: 140px 0 100px;
    }

    .value-grid {
        grid-template-columns: 1fr;
    }

    .worship-grid {
        grid-template-columns: 1fr;
    }

    .worship-card.primary {
        grid-column: span 1;
        grid-row: span 1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        height: auto;
        align-content: start;
    }

    .map-container {
        height: 320px;
        min-height: 320px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: clamp(2.1rem, 8vw, 2.8rem);
    }

    h2 {
        font-size: clamp(1.7rem, 6vw, 2.2rem);
    }

    h3 {
        font-size: 1.2rem;
    }

    .vision-label {
        font-size: 1.4rem;
        letter-spacing: 0.1em;
    }

    .about-text {
        font-size: 1.25rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .hero-note {
        font-size: calc(0.95rem + 2pt);
    }

    .worship-card.primary h3 {
        font-size: 1.9rem;
    }

    .worship-card.primary .muted,
    .worship-card.primary .time-row span {
        font-size: 1rem;
    }

    .worship-card.primary .time-row strong {
        font-size: 1.4rem;
    }

    .value-card p {
        font-size: 0.95rem;
    }

    section {
        padding: 90px 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .gallery-slider {
        aspect-ratio: 4 / 3;
    }

    .floor-item {
        flex-direction: column;
        text-align: center;
    }

    .floor-number {
        min-width: auto;
    }

    .floor-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero {
        padding: 120px 0 90px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
