/* 공개 화면 공통 — 헤더·Contact 섹션·푸터·플로팅 바. 색·간격은 tokens.css 변수만 씁니다. */

/* ══════════ 헤더 ══════════ */
.topbar { background: var(--navy-900); color: rgba(255, 255, 255, .55); font-size: 12px; letter-spacing: .04em; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar-inner em { font-style: normal; font-weight: 600; color: var(--gold-300); }

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(247, 245, 240, .94); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

/* 로고 — 정식 로고 「THE 배움 English」 가로형 PNG(366×120, 2026-09-25). 헤더 72px 안에서 44px.
   [UD-3] 시안의 영문 워드마크(Cormorant)는 상호 변경으로 물러났습니다. */
.brand { display: flex; align-items: center; }
.brand img { display: block; height: 44px; width: auto; }

.gnb { display: flex; gap: 32px; }
.gnb a { font-size: 15px; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.gnb a:hover { border-bottom-color: var(--gold-500); }
.gnb a.is-active { border-bottom-color: var(--gold-500); color: var(--navy-800); }

.header-cta { padding: 11px 22px; font-size: 14px; }
.header-cta:hover { background: var(--gold-500); color: var(--navy-800); }

.hamburger { display: none; background: none; border: none; cursor: pointer; gap: 5px;
    min-width: 44px; min-height: 44px; padding: 14px 12px; align-content: center; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--navy-800);
    transition: transform .25s, opacity .25s, width .25s; transform-origin: center; }
/* 세 번째 선만 짧은 골드 — 시안의 브랜드 포인트 */
.hamburger span:last-child { width: 14px; background: var(--gold-500); }
/* 열리면 X — 선 간격(2px + gap 5px)만큼 모읍니다([UD-3] MobileHeader) */
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { width: 22px; transform: translateY(-7px) rotate(-45deg); }

/* ══════════ 모바일 전체메뉴 (COM-02) — [UD-3] MobileHeader ══════════ */
/* 헤더 바로 아래부터 화면 끝까지 덮는 네이비 패널 + 딤. 960px 이하에서만 씁니다. */
.m-menu-dim { position: fixed; inset: 0; z-index: 99; background: rgba(13, 22, 38, .55); }
.m-menu { position: fixed; top: var(--m-header-h); left: 0; right: 0; bottom: 0; z-index: 99;
    display: flex; flex-direction: column; overflow-y: auto; background: var(--navy-900); color: #fff; }
.m-menu-label { margin: 0; padding: 26px 24px 8px; font-size: 11px; letter-spacing: .3em; color: rgba(255, 255, 255, .4); }
.m-menu-nav { display: flex; flex-direction: column; padding: 0 12px; }
.m-menu-nav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px;
    padding: 17px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: #fff; }
.m-menu-nav a:hover, .m-menu-nav a.is-active { color: var(--gold-300); }
.m-menu-text { display: flex; align-items: baseline; gap: 12px; }
.m-menu-no { min-width: 22px; font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--gold-500); }
.m-menu-arrow { display: grid; font-size: 18px; color: rgba(255, 255, 255, .3); }
.m-menu-foot { display: grid; gap: 10px; margin-top: auto; padding: 20px 24px 24px; }
.m-menu-cta { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius);
    font-size: 15px; font-weight: 700; color: #fff; }
.m-menu-cta:hover { border-color: var(--gold-500); color: var(--gold-300); }
.m-menu-cta.is-primary { height: 52px; border-color: var(--gold-500); background: var(--gold-500); color: var(--navy-800); }
.m-menu-cta.is-primary:hover { background: var(--gold-300); color: var(--navy-800); }
.m-menu-cta span { font-size: 18px; line-height: 1; }
.m-menu-info { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: rgba(255, 255, 255, .45); }
.m-menu-info b { font-weight: 600; color: var(--gold-300); white-space: nowrap; }
/* 메뉴가 열려 있는 동안 뒤 페이지 스크롤을 막습니다(layout.js가 켜고 끕니다). */
body.is-menu-open { overflow: hidden; }

/* ══════════ COM-04 Contact 섹션 (흰 배경) ══════════ */
/* ⚠️ 아래 네이비 푸터와 배경도 역할도 다릅니다. 하나로 합치지 마세요. */
.contact-section { background: var(--surface); border-top: 1px solid var(--line);
    padding: clamp(56px, 8vw, 96px) 0; margin-top: 80px; }
.contact-inner { display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 72px); align-items: center; }
.contact-copy { flex: 1 1 380px; }

.section-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
    font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
    color: var(--gold-500); font-weight: 700; }
.eyebrow-rule { display: block; width: 32px; height: 1px; background: var(--gold-500); }

.contact-title { font-size: clamp(26px, 3.2vw, 38px); color: var(--navy-800); line-height: 1.35; margin: 0; }
.contact-desc { margin: 18px 0 0; color: var(--text-mute); font-size: 15.5px; max-width: 480px; }

.contact-channels { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.channel-btn { display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--navy-800);
    border: 1px solid var(--line); border-radius: 100px; padding: 11px 18px; }
.channel-btn:hover { border-color: var(--gold-500); color: var(--gold-500); }
.channel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }

.quick-form { flex: 1 1 380px; display: grid; gap: 14px; }
.quick-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-mute); }
.quick-agree a { text-decoration: underline; }
.quick-submit { width: 100%; }

.quick-done { flex: 1 1 380px; border: 1px solid rgba(201, 164, 92, .4);
    background: var(--bg); padding: 44px 36px; text-align: center; }
.quick-done-mark { margin: 0 0 12px; font-family: var(--font-display); font-size: 26px;
    font-weight: 600; color: var(--gold-500); }
.quick-done-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--navy-800); }
.quick-done-sub { margin: 0; font-size: 14px; color: var(--text-mute); }

/* ══════════ COM-03 정보 푸터 ══════════ */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .55);
    padding: 64px 0 40px; font-size: 13.5px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 32px; padding-bottom: 36px; }
.footer-brand { margin: 0 0 16px; }
/* 로고 단색판 — 로고 PNG(남색)는 남색 바탕에서 보이지 않아, PNG의 알파만 마스크로 빌려 골드로 칠합니다(편집기 아이콘과 같은 방식). */
.footer-logo { display: block; width: 183px; height: 60px; background: var(--gold-300);
    -webkit-mask: url(/images/logo.png) left center / contain no-repeat;
            mask: url(/images/logo.png) left center / contain no-repeat; }
.footer-line { margin: 4px 0; }
.footer-biz { color: rgba(255, 255, 255, .4); font-size: 12.5px; }
.footer-policy { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; font-size: 13px; }
.footer-policy a { color: rgba(255, 255, 255, .75); }
.footer-policy a:hover { color: var(--gold-300); }
.footer-copy { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
    border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px;
    font-size: 12px; color: rgba(255, 255, 255, .35); }
.footer-oss { color: rgba(255, 255, 255, .55); }
.footer-oss:hover { color: var(--gold-300); }

/* 글자 링크의 누르는 영역을 모양 변화 없이 넓힙니다 — 15~22px 높이라 모바일에서 손가락으로 누르기 어려웠습니다.
   투명한 가상 요소가 링크 주변을 덮을 뿐 레이아웃은 그대로입니다. */
.footer-policy a, .footer-oss, .link-more, .quick-channels a, .popup-link { position: relative; }
.footer-policy a::after, .footer-oss::after, .link-more::after, .quick-channels a::after, .popup-link::after {
    content: ''; position: absolute; inset: -8px -4px; }

/* RES-03 플로팅 바 — 모바일 전용. [UD-3] MobileFooter: 카카오톡(Navy + 골드 점) → 전화(Gold) */
.floating-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--navy-800); box-shadow: 0 -8px 24px rgba(13, 22, 38, .18);
    padding-bottom: env(safe-area-inset-bottom); }
.floating-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 56px; font-size: 14px; font-weight: 700; }
.floating-kakao, .floating-kakao:hover { background: var(--navy-800); color: #fff; }
.floating-tel, .floating-tel:hover { background: var(--gold-500); color: var(--navy-800); }
.floating-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-300); }

/* ══════════ 반응형 ══════════ */
@media (max-width: 960px) {
    /* 모바일 헤더 — 56px 한 줄: 워드마크 · 작은 예약 버튼 · 햄버거([UD-3] MobileHeader).
       탑바는 숨기고 운영시간·전화는 전체메뉴 하단으로 옮깁니다. */
    .topbar, .gnb { display: none; }
    .header-inner { height: var(--m-header-h); gap: 2px; padding: 0 6px 0 18px; }
    .brand img { height: 34px; }
    .header-cta { height: 36px; padding: 0 14px; margin-left: auto; font-size: 12.5px; white-space: nowrap; }
    .hamburger { display: grid; }
    .contact-section { margin-top: 56px; padding: 48px 0 44px; }
    /* 간편문의 — 소개 → 폼 → 상담 채널 순으로 쌓습니다([UD-3] MobileFooter).
       웹은 채널이 소개 칸 안에 있어, 소개 칸을 풀어(display: contents) 순서만 바꿉니다. */
    .contact-inner { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; }
    .contact-copy { display: contents; }
    .contact-desc { margin: 12px 0 24px; font-size: 14.5px; }
    .quick-form, .quick-done { order: 1; flex: none; }
    .quick-form input.field { height: 52px; }   /* [SD-3] 공통 §7 "입력칸 높이 52px" */
    .contact-channels { order: 2; flex-wrap: nowrap; gap: 8px; margin-top: 24px; }
    .channel-btn { flex: 1; min-width: 0; justify-content: center; height: 44px; padding: 0 10px;
        font-size: 13px; white-space: nowrap; }
    .channel-tel-label { display: none; }       /* 좁은 폭에서는 번호만 — 시안도 번호만 씁니다 */
    .footer-grid { flex-direction: column; gap: 24px; }
    .floating-bar { display: flex; }
    .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }   /* 플로팅 바에 가리지 않게 */
}
@media (min-width: 961px) {
    /* 메뉴를 연 채 창을 넓혀도 패널이 남지 않게 합니다(스크롤 잠금은 layout.js가 풉니다). */
    .m-menu, .m-menu-dim { display: none !important; }
}

/* ══════════ 서브 페이지 공통 헤더 — [UD-3] about·curriculum·news·archive·reserve·privacy·terms ══════════ */
/* 네이비 그라디언트 + 아이브로 + 세리프 타이틀([UD-2] 06). 탭은 헤더 밑단에 붙은 폴더형이라
   고른 탭이 본문 배경(Paper)과 이어져 보입니다. 모바일은 가로 스크롤 밑줄 탭입니다. */
.page-hero { position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(160deg, var(--navy-900), var(--navy-800)); }
.page-hero::after { content: ''; position: absolute; right: -140px; top: -180px; width: 460px; height: 460px;
    border: 1px solid rgba(201, 164, 92, .18); border-radius: 50%; pointer-events: none; }
.page-hero-inner { position: relative; z-index: 1; padding-top: clamp(44px, 6vw, 72px); }
.page-hero-inner:not(:has(.page-tabs)) { padding-bottom: clamp(40px, 5vw, 60px); }
.page-hero .page-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px;
    font-size: 12px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-300); }
.page-hero .page-eyebrow::before { content: ''; width: 44px; height: 1px; background: var(--gold-500); }
.page-hero .page-title { margin: 0; font-size: clamp(28px, 3.8vw, 44px); color: #fff; }
.page-hero .page-meta { margin: 14px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .55); }

.page-tabs { display: flex; gap: 4px; margin-top: clamp(28px, 4vw, 40px); overflow-x: auto; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab { flex: none; padding: 14px 22px; border: none; border-radius: 2px 2px 0 0; cursor: pointer; white-space: nowrap;
    font-family: inherit; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .65); }
.page-tab:hover { color: #fff; }
.page-tab.is-on { background: var(--bg); color: var(--navy-800); }

/* 섹션 머리 — 홈과 같은 3종 세트(eyebrow / title / desc)를 서브 페이지에서도 씁니다 */
.section-title { margin: 0; font-size: clamp(26px, 3vw, 36px); color: var(--navy-800); line-height: 1.35; }
.section-desc { margin: 14px 0 0; font-size: 15.5px; color: var(--text-mute); max-width: 640px; }
.link-more { font-size: 14px; font-weight: 700; color: var(--gold-700); }
.link-more:hover { color: var(--gold-500); }

/* Free Diagnosis CTA — 학원소개·교육과정 하단([UD-3] about · curriculum) */
.cta-band { position: relative; overflow: hidden; margin: clamp(64px, 9vw, 104px) 0 0;
    padding: clamp(44px, 6vw, 64px) 28px; text-align: center; color: #fff;
    background: linear-gradient(150deg, var(--navy-900), var(--navy-700)); }
.cta-band::after { content: ''; position: absolute; inset: 12px; border: 1px solid rgba(201, 164, 92, .25); pointer-events: none; }
.cta-eyebrow { margin: 0 0 14px; font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--gold-300); }
.cta-title { margin: 0; font-size: clamp(22px, 2.8vw, 32px); color: #fff; word-break: keep-all; }   /* 좁은 화면에서 「실력/이」처럼 낱말 중간에서 끊기지 않게 */
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

@media (max-width: 960px) {
    .page-tabs { gap: 0; margin-top: 24px; margin-left: -20px; margin-right: -20px; padding: 0 6px;
        border-top: 1px solid rgba(255, 255, 255, .08); }
    .page-tab { height: 48px; padding: 0 14px; border-radius: 0; background: none; color: rgba(255, 255, 255, .6);
        border-bottom: 2px solid transparent; }
    .page-tab.is-on { background: none; color: var(--gold-300); border-bottom-color: var(--gold-500); }
    .cta-actions .btn { flex: 1 1 100%; }
}
