/* 포항 풍선봉사단 공통 스타일
 * 모바일 우선. 브레이크포인트: 768px(태블릿), 1024px(PC)
 */

:root {
    --c-red: #ff5a6e;
    --c-red-dark: #e8435a;
    --c-yellow: #ffc93c;
    --c-blue: #3da5f4;
    --c-blue-dark: #1f8ad8;
    --c-green: #3cc48a;
    --c-purple: #9b6bff;

    --c-text: #1f2937;
    --c-text-soft: #4b5563;
    --c-muted: #8a94a6;
    --c-line: #e8edf5;
    --c-bg: #ffffff;
    --c-bg-soft: #fff8f1;
    --c-bg-sky: #f2f8ff;

    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 8px 24px rgba(31, 41, 55, .06);
    --shadow-lg: 0 16px 40px rgba(31, 41, 55, .10);

    --header-h: 68px;
    --container: 1180px;
    --gutter: 16px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--c-text);
    background: var(--c-bg);
    word-break: keep-all;
    overflow-wrap: break-word;
}

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

a {
    color: inherit;
}

h1, h2, h3, h4 {
    line-height: 1.35;
    margin: 0 0 .5em;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1em;
}

:focus-visible {
    outline: 3px solid var(--c-blue);
    outline-offset: 2px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--c-text);
    color: #fff;
    border-radius: 8px;
}

.skip-link:focus {
    left: 8px;
}

/* ---------- 버튼 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--c-red);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 90, 110, .32);
}

.btn-primary:hover {
    background: var(--c-red-dark);
}

.btn-secondary {
    background: var(--c-blue);
    color: #fff;
    box-shadow: 0 8px 20px rgba(61, 165, 244, .30);
}

.btn-secondary:hover {
    background: var(--c-blue-dark);
}

.btn-outline {
    background: #fff;
    color: var(--c-text);
    border: 2px solid var(--c-line);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--c-line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}

.brand-logo {
    flex: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.brand-text strong {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-text small {
    font-size: 12px;
    color: var(--c-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--c-bg-soft);
    cursor: pointer;
    flex: none;
}

.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--c-text);
    transition: transform .2s ease, opacity .2s ease;
}

.menu-toggle-bar {
    position: relative;
}

.menu-toggle-bar::before,
.menu-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-toggle-bar::before { top: -7px; }
.menu-toggle-bar::after { top: 7px; }

.menu-toggle[aria-expanded="true"] .menu-toggle-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 메뉴: 헤더 아래로 펼침 */
.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
}

.site-nav.is-open {
    display: block;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 8px var(--gutter) 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--c-line);
}

.nav-link.is-active {
    color: var(--c-red);
}

.nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 12px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
}

.nav-cta-primary { background: var(--c-red); }
.nav-cta-secondary { background: var(--c-blue); }

/* ---------- 모바일 하단 고정 CTA ---------- */

.mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--c-line);
    box-shadow: 0 -6px 20px rgba(31, 41, 55, .06);
}

.mobile-cta .btn {
    min-height: 50px;
    padding: 0 10px;
    font-size: 16px;
    box-shadow: none;
}

body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 80px;
    padding: 40px 0 24px;
    background: #f7f8fb;
    color: var(--c-text-soft);
    font-size: 15px;
}

.footer-inner {
    display: grid;
    gap: 24px;
}

.footer-brand strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    color: var(--c-text);
}

.footer-brand p,
.footer-info p {
    margin: 0 0 4px;
}

.footer-info a {
    text-decoration: none;
    font-weight: 600;
}

.footer-sns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.footer-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--c-line);
    font-size: 13px;
    color: var(--c-muted);
}

/* 하단 오른쪽 끝 관리자 로그인 (눈에 덜 띄게) */
.footer-admin {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -12px;
    border-radius: 50%;
    color: #b6bdc9;
    transition: color .15s ease, transform .3s ease;
}

.footer-admin:hover,
.footer-admin:focus-visible {
    color: var(--c-text-soft);
    transform: rotate(60deg);
}

/* ---------- 공통 섹션 ---------- */

.section {
    padding: 56px 0;
}

.section-soft {
    background: var(--c-bg-soft);
}

.section-head {
    margin-bottom: 28px;
}

.section-head h2 {
    font-size: 26px;
    font-weight: 800;
}

.section-head p {
    color: var(--c-text-soft);
    margin: 0;
}

.card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 64px;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 201, 60, .35) 0, transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(61, 165, 244, .25) 0, transparent 32%),
        radial-gradient(circle at 80% 90%, rgba(255, 90, 110, .20) 0, transparent 36%),
        var(--c-bg-soft);
}

.hero-inner {
    display: grid;
    gap: 32px;
    align-items: center;
}

.hero h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.hero h1 em {
    font-style: normal;
    color: var(--c-red);
}

.hero-lead {
    font-size: 18px;
    color: var(--c-text-soft);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------- 날씨 카드 (기존 카드 구성 유지, 외곽만 새 디자인) ---------- */

.weather-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.weather-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--c-text);
    margin: 0 0 4px;
}

.weather-time {
    color: var(--c-muted);
    font-size: 14px;
    margin: 0 0 18px;
}

.weather-stale {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fff4d6;
    color: #a86b00;
    font-size: 12px;
    font-weight: 700;
}

.weather-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.weather-icon {
    font-size: 46px;
    line-height: 1;
}

.weather-main strong {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    letter-spacing: -2px;
}

.weather-main strong span {
    font-size: 24px;
    font-weight: 700;
}

.weather-summary {
    margin: 0 0 14px;
    font-weight: 700;
    color: var(--c-text-soft);
}

.weather-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 15px;
    color: #475569;
}

.weather-info > span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.weather-info b {
    color: #0f172a;
    font-weight: 700;
}

.weather-empty {
    margin: 12px 0 0;
    color: var(--c-muted);
}

/* ---------- 태블릿 ---------- */

@media (min-width: 768px) {
    :root {
        --gutter: 24px;
    }

    .hero {
        padding: 80px 0 88px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-actions {
        flex-direction: row;
    }

    .footer-inner {
        grid-template-columns: 1.2fr 1fr auto;
        align-items: start;
    }

    .section {
        padding: 72px 0;
    }

    .section-head h2 {
        font-size: 30px;
    }
}

/* ---------- PC ---------- */

@media (min-width: 1024px) {
    :root {
        --header-h: 80px;
    }

    .menu-toggle,
    .mobile-cta {
        display: none;
    }

    body {
        padding-bottom: 0;
    }

    .site-nav {
        display: block;
        position: static;
        box-shadow: none;
        border: 0;
        max-height: none;
        overflow: visible;
        background: transparent;
    }

    .site-nav ul {
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 0;
    }

    .nav-link {
        min-height: 44px;
        padding: 0 12px;
        font-size: 16px;
        border: 0;
        border-radius: 10px;
    }

    .nav-link:hover {
        background: var(--c-bg-soft);
    }

    .nav-cta {
        min-height: 44px;
        margin: 0 0 0 6px;
        padding: 0 18px;
        font-size: 16px;
    }

    .hero-inner {
        grid-template-columns: 1.4fr 1fr;
        gap: 56px;
    }

    .hero h1 {
        font-size: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .menu-toggle-bar,
    .menu-toggle-bar::before,
    .menu-toggle-bar::after {
        transition: none;
    }
}
