/* =========================================================
   WIZM — core styles
   밝은 톤 / 코발트 블루 시그니처 / Pretendard + Space Grotesk
    design tokens는 :root 에서 한 번에 관리
   ========================================================= */

:root {
    /* color */
    --ink:        #0B0E14;   /* 본문 텍스트 (거의 검정) */
    --ink-soft:   #4A5160;   /* 보조 텍스트 */
    --line:       #E6E8EE;   /* 경계선 */
    --paper:      #FFFFFF;   /* 기본 배경 */
    --paper-2:    #F5F6FA;   /* 섹션 교차 배경 */
    --blue:       #2547FF;   /* 시그니처 코발트 */
    --blue-dark:  #1733C9;
    --blue-soft:  #EAEDFF;   /* 블루 연한 배경 */
    --lime:       #D6FF3D;   /* 포인트 라임 */

    /* type */
    --display: 'Space Grotesk', 'Pretendard', sans-serif;
    --body:    'Pretendard', -apple-system, system-ui, sans-serif;

    /* layout */
    --maxw: 1200px;
    --gap:  clamp(16px, 3vw, 32px);
    --radius: 18px;

    /* motion */
    --ease: cubic-bezier(.22,.61,.36,1);
}

/* ── reset ──────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    font-size: 16px;
    letter-spacing: -.01em;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── utility ────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--display);
    font-size: .8rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--blue);
}
.eyebrow::before {
    content: ""; width: 22px; height: 2px; background: var(--blue);
}
.section { padding: clamp(64px, 9vw, 130px) 0; }
.section--alt { background: var(--paper-2); }

h1,h2,h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
.h-sec { font-size: clamp(1.9rem, 4.5vw, 3.2rem); }
.lead { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--ink-soft); max-width: 60ch; }

/* ── buttons ────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--display); font-weight: 600; font-size: .98rem;
    padding: 15px 26px; border-radius: 999px;
    transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
    cursor: pointer; border: 1.5px solid transparent; white-space: nowrap;
}
.btn i { font-size: 1.05em; transition: transform .25s var(--ease); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,71,255,.28); }
.btn--primary:hover i { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--lg { padding: 18px 32px; font-size: 1.05rem; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.82);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s, background .3s;
}
body.is-shrink .site-header {
    border-color: var(--line);
    box-shadow: 0 4px 24px rgba(11,14,20,.05);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 76px; transition: height .3s var(--ease);
}
body.is-shrink .header-inner { height: 64px; }

.logo { display: flex; align-items: baseline; gap: 2px; font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; }
.logo b { color: var(--blue); }
.logo .dot { color: var(--lime); -webkit-text-stroke: .5px var(--ink); }

.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-main a {
    font-family: var(--display); font-weight: 500; font-size: .96rem;
    padding: 10px 16px; border-radius: 999px; color: var(--ink-soft);
    transition: color .2s, background .2s;
}
.nav-main a:hover { color: var(--ink); }
.nav-main a.is-active { color: var(--blue); background: var(--blue-soft); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.tel-link { font-family: var(--display); font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; gap: 7px; }
.tel-link i { color: var(--blue); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; align-items: center; justify-content: center; font-size: 1.3rem; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__dim { position: absolute; inset: 0; background: rgba(11,14,20,.4); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer__dim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(82vw, 340px); background: #fff; padding: 28px 24px; transform: translateX(100%); transition: transform .35s var(--ease); display: flex; flex-direction: column; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__close { align-self: flex-end; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.4rem; cursor: pointer; }
.drawer__nav { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; }
.drawer__nav a { font-family: var(--display); font-weight: 600; font-size: 1.3rem; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.drawer__nav a.is-active { color: var(--blue); }
.drawer__foot { margin-top: auto; font-size: .9rem; color: var(--ink-soft); }
.drawer__foot a { font-weight: 600; color: var(--ink); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 80px); overflow: hidden; }
.hero__grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 75%); opacity: .6; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero__tag { margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 5rem); }
.hero h1 .mark { color: var(--blue); position: relative; white-space: nowrap; }
.hero h1 .mark::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .08em; height: .26em; background: var(--lime); z-index: -1; border-radius: 3px; }
.hero__lead { margin: 26px 0 34px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 52ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* stat counters */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(48px, 7vw, 88px); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: #fff; }
.stat { padding: clamp(24px, 3vw, 38px); border-right: 1.5px solid var(--ink); }
.stat:last-child { border-right: none; }
.stat__num { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -.03em; }
.stat__num .suffix { color: var(--blue); }
.stat__label { margin-top: 8px; font-size: .98rem; color: var(--ink-soft); font-weight: 500; }

/* =========================================================
   LOGO MARQUEE (clients)
   ========================================================= */
.marquee { padding: 38px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.marquee__label { text-align: center; font-size: .85rem; color: var(--ink-soft); margin-bottom: 22px; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: scroll-x 30s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: #B6BCC9; white-space: nowrap; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* =========================================================
   SERVICE CARDS
   ========================================================= */
.sec-head { max-width: var(--maxw); margin: 0 auto clamp(40px,5vw,64px); }
.sec-head .h-sec { margin: 14px 0 16px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-card { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 32px 28px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; overflow: hidden; }
.svc-card:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 18px 40px rgba(37,71,255,.12); }
.svc-card__no { font-family: var(--display); font-size: .85rem; font-weight: 600; color: var(--blue); }
.svc-card__ico { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--blue); margin: 16px 0 20px; transition: background .3s, color .3s; }
.svc-card:hover .svc-card__ico { background: var(--blue); color: #fff; }
.svc-card h3 { font-size: 1.32rem; margin-bottom: 10px; }
.svc-card p { color: var(--ink-soft); font-size: .98rem; }
.svc-card__tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.svc-card__tags span { font-size: .8rem; color: var(--ink-soft); background: var(--paper-2); padding: 5px 11px; border-radius: 999px; }

/* =========================================================
   WORKFLOW
   ========================================================= */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.flow__step { padding: 28px 24px; border-radius: var(--radius); background: #fff; border: 1.5px solid var(--line); opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.flow__step.visible { opacity: 1; transform: none; }
.flow__step::before { counter-increment: step; content: "0" counter(step); font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--blue); display: block; margin-bottom: 14px; }
.flow__step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.flow__step p { font-size: .92rem; color: var(--ink-soft); }

/* =========================================================
   PORTFOLIO PREVIEW
   ========================================================= */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pf-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; border: 1.5px solid var(--line); cursor: pointer; background: var(--paper-2); }
.pf-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pf-card:hover img { transform: scale(1.06); }
.pf-card__meta { position: absolute; inset: auto 0 0 0; padding: 18px; background: linear-gradient(to top, rgba(11,14,20,.82), transparent); color: #fff; transform: translateY(8px); opacity: 0; transition: opacity .3s, transform .3s; }
.pf-card:hover .pf-card__meta { opacity: 1; transform: none; }
.pf-card__meta b { font-family: var(--display); font-size: 1.05rem; display: block; }
.pf-card__meta span { font-size: .85rem; opacity: .85; }
.pf-card__cat { position: absolute; top: 14px; left: 14px; font-size: .78rem; font-weight: 600; background: var(--lime); color: var(--ink); padding: 4px 11px; border-radius: 999px; font-family: var(--display); }

/* filter bar */
.pf-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.pf-filter button { font-family: var(--display); font-weight: 500; font-size: .92rem; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); cursor: pointer; transition: all .2s; }
.pf-filter button:hover { border-color: var(--ink); color: var(--ink); }
.pf-filter button.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band { background: var(--ink); color: #fff; border-radius: clamp(20px, 3vw, 32px); padding: clamp(44px, 6vw, 80px) clamp(28px, 5vw, 64px); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; background: var(--blue); border-radius: 50%; filter: blur(40px); opacity: .5; }
.cta-band .inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); color: #fff; }
.cta-band p { color: rgba(255,255,255,.7); margin-top: 12px; }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.cta-band .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 80px) 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.footer-brand .logo { font-size: 1.7rem; margin-bottom: 16px; }
.footer-brand p { color: var(--ink-soft); font-size: .95rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--display); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: .96rem; color: var(--ink); transition: color .2s; }
.footer-col a:hover { color: var(--blue); }
.footer-contact li { font-size: .96rem; color: var(--ink-soft); margin-bottom: 10px; display: flex; gap: 10px; }
.footer-contact i { color: var(--blue); width: 18px; }
.footer-bot { padding-top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .87rem; color: var(--ink-soft); }

/* =========================================================
   FLOATING CONTACT
   ========================================================= */
.float-contact { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.float-contact a { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; box-shadow: 0 8px 24px rgba(11,14,20,.18); transition: transform .25s var(--ease); }
.float-contact a:hover { transform: scale(1.08); }
.float-contact .f-tel { background: var(--blue); }
.float-contact .f-kakao { background: #FAE100; color: #3C1E1E; }
.float-contact .f-top { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.fade-up-init { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fade-up-init.visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
    .card-grid, .pf-grid { grid-template-columns: repeat(2, 1fr); }
    .flow { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .nav-main, .header-cta .tel-link, .header-cta .btn { display: none; }
    .nav-toggle { display: flex; }
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1.5px solid var(--ink); }
    .stat:last-child { border-bottom: none; }
    .card-grid, .pf-grid, .flow { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .cta-band .inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .fade-up-init, .flow__step { opacity: 1 !important; transform: none !important; }
}

/* keyboard focus */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* =========================================================
   CONTACT FORM  (contact.php에서 사용 — 기존 토큰만 사용)
   ========================================================= */
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px; align-items: start; }

/* 연락처 정보 */
.contact-info { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.contact-info h3 { font-family: var(--display); font-size: 1.2rem; margin-bottom: 22px; }
.contact-info__list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 26px; }
.contact-info__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-info__list i { color: var(--blue); font-size: 1.15rem; width: 22px; flex: none; margin-top: 2px; }
.contact-info__list span { display: flex; flex-direction: column; line-height: 1.5; }
.contact-info__list b { font-family: var(--display); font-size: .82rem; letter-spacing: .04em; color: var(--ink-soft); font-weight: 600; }
.contact-info__list a:hover { color: var(--blue); }

/* 폼 */
.contact-form { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 20px; }
.form-field label, .form-label { display: block; font-family: var(--display); font-weight: 600; font-size: .9rem; margin-bottom: 9px; color: var(--ink); }
.form-req { color: var(--blue); }
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field textarea {
    width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
    background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px;
    padding: 14px 16px; transition: border-color .2s, box-shadow .2s; letter-spacing: -.01em;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #A6ACBA; }
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.form-field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

/* 체크박스 */
.form-checks { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.form-check { display: inline-flex; align-items: center; gap: 8px; font-size: .94rem; color: var(--ink-soft); cursor: pointer; }
.form-checks .form-check { border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 15px; transition: border-color .2s, color .2s, background .2s; }
.form-checks .form-check:hover { border-color: var(--ink); color: var(--ink); }
.form-check input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; flex: none; }
.form-check--agree { margin: 4px 0 24px; align-items: flex-start; line-height: 1.55; }
.form-check--agree input { margin-top: 3px; }

/* 액션 */
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-actions .btn { white-space: nowrap; }
.form-hint { font-size: .88rem; color: var(--ink-soft); }

/* 결과 알림 (성공/실패) */
.form-alert { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-radius: 12px; margin-bottom: 24px; font-size: .96rem; font-weight: 500; border: 1.5px solid var(--line); }
.form-alert[hidden] { display: none !important; }
.form-alert i { font-size: 1.2rem; flex: none; }
.form-alert--ok  { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.form-alert--err { background: #FFF0F0; border-color: #E66; color: #B53030; }

/* 허니팟 — 시각/보조기기/탭 순서에서 제외 */
.form-hp {
    display: none !important;
}

@media (max-width: 980px) {
    .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .form-actions .btn { width: 100%; justify-content: center; }
}

/* =========================================================
   STORY (공개 게시판) — 기존 토큰만 사용
   ========================================================= */
.story-hero { max-width: var(--maxw); margin: 0 auto clamp(28px, 4vw, 44px); }
.story-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 3.2rem); line-height: 1.08; letter-spacing: -.02em; margin: 14px 0 16px; }

.story-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.pf-chip { font-family: var(--display); font-weight: 500; font-size: .92rem; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); transition: border-color .2s, color .2s, background .2s; }
.pf-chip:hover { border-color: var(--ink); color: var(--ink); }
.pf-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.story-empty { color: var(--ink-soft); grid-column: 1 / -1; padding: 40px 0; text-align: center; }
.story-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.story-card:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 18px 40px rgba(37,71,255,.12); }
.story-thumb { position: relative; aspect-ratio: 16/9; background: var(--paper-2) center/cover no-repeat; background-image: linear-gradient(135deg, var(--blue-soft), var(--paper-2)); }
.story-tag { position: absolute; top: 12px; left: 12px; font-family: var(--display); font-weight: 600; font-size: .76rem; background: var(--lime); color: var(--ink); padding: 4px 11px; border-radius: 999px; }
.story-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.story-body h3 { font-family: var(--display); font-weight: 700; font-size: 1.18rem; letter-spacing: -.02em; }
.story-body p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.story-body time { font-family: var(--display); font-size: .82rem; color: var(--ink-soft); }

.story-article { max-width: 760px; margin: 0 auto; }
.story-article-head { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 32px; }
.story-back { display: inline-block; font-family: var(--display); font-size: .9rem; color: var(--blue); margin-bottom: 18px; }
.story-article-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.12; letter-spacing: -.02em; }
.story-meta { margin-top: 14px; font-family: var(--display); font-size: .88rem; color: var(--ink-soft); }
.story-content { font-size: 1.06rem; line-height: 1.85; color: var(--ink); }
.story-content > * + * { margin-top: 1.1em; }
.story-content h2 { font-family: var(--display); font-size: 1.6rem; margin-top: 1.8em; letter-spacing: -.02em; }
.story-content h3 { font-family: var(--display); font-size: 1.28rem; margin-top: 1.5em; letter-spacing: -.02em; }
.story-content a { color: var(--blue); text-decoration: underline; }
.story-content img { border-radius: var(--radius); margin: 1.4em 0; border: 1.5px solid var(--line); }
.story-content code { background: var(--paper-2); padding: 2px 7px; border-radius: 6px; font-size: .9em; }
.story-content pre { background: var(--ink); color: #fff; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; }
.story-content pre code { background: none; padding: 0; color: inherit; }
.story-content blockquote { border-left: 3px solid var(--blue); padding-left: 18px; color: var(--ink-soft); }
.story-content ul, .story-content ol { padding-left: 1.3em; }
.story-content li + li { margin-top: .4em; }

@media (max-width: 980px) { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .story-grid { grid-template-columns: 1fr; } }

/* =========================================================
   ADMIN — 기존 토큰만 사용
   ========================================================= */
.admin-body { background: #F3F5F9; min-height: 100vh; }
.admin-top { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); box-shadow: 0 10px 30px rgba(11,14,20,.04); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.admin-top__inner { width: 100%; max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px clamp(16px, 4vw, 40px); }
.admin-logo { flex: none; font-family: var(--display); font-weight: 700; font-size: 1.16rem; letter-spacing: 0; color: var(--ink); }
.admin-logo span { color: var(--lime); -webkit-text-stroke: .45px var(--ink); }
.admin-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; flex-wrap: wrap; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 38px; font-family: var(--display); font-weight: 600; font-size: .9rem; padding: 8px 13px; border-radius: 10px; color: var(--ink-soft); transition: color .2s, background .2s, border-color .2s; border: 1px solid transparent; white-space: nowrap; }
.admin-nav a:hover { color: var(--ink); background: var(--paper-2); }
.admin-nav a.is-active { color: var(--blue-dark); background: var(--blue-soft); border-color: rgba(37,71,255,.18); }
.admin-nav a b { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; background: var(--blue); color: #fff; font-size: .74rem; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.admin-nav .admin-logout { color: #B53030; }
.admin-main { max-width: 1180px; margin: 0 auto; padding: clamp(22px, 4vw, 42px) clamp(16px, 4vw, 40px); }

.admin-h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.45rem, 2vw, 1.85rem); letter-spacing: 0; margin-bottom: 24px; }
.admin-headrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-headrow .admin-h1 { margin-bottom: 0; }

/* 버튼 */
.admin-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; font-family: var(--display); font-weight: 700; font-size: .94rem; padding: 10px 18px; border-radius: 10px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; transition: transform .25s var(--ease), background .25s, box-shadow .25s; }
.admin-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,71,255,.24); }
.admin-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.admin-btn.ghost:hover { border-color: var(--ink); background: #fff; box-shadow: none; }
.admin-link-danger { background: none; border: none; color: #C0392B; font-family: var(--display); font-weight: 700; font-size: .9rem; cursor: pointer; padding: 0; }
.admin-link-danger:hover { color: #922B21; text-decoration: underline; }

/* 로그인 */
.admin-login { max-width: 360px; margin: clamp(60px, 12vh, 140px) auto; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 40px 32px; text-align: center; }
.admin-login h1 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin-bottom: 24px; }
.admin-login form { display: flex; flex-direction: column; gap: 12px; }
.admin-input { font-family: var(--body); font-size: 1rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.admin-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.admin-login .admin-btn { justify-content: center; margin-top: 4px; }
.admin-err { background: #FFF0F0; border: 1.5px solid #E66; color: #B53030; border-radius: 12px; padding: 11px 14px; font-size: .92rem; margin-bottom: 16px; }

/* 대시보드 카드 */
.admin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.admin-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 26px 24px; font-size: .95rem; color: var(--ink-soft); font-weight: 500; }
.admin-card span { display: block; font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--ink); margin-bottom: 8px; letter-spacing: -.03em; }
.admin-quick { display: flex; gap: 12px; flex-wrap: wrap; }

/* 테이블 */
.admin-table { width: 100%; border-spacing: 0; border-collapse: separate; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 14px 36px rgba(11,14,20,.04); }
.admin-table th, .admin-table td { text-align: left; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: .94rem; vertical-align: middle; }
.admin-table thead th { font-family: var(--display); font-size: .78rem; letter-spacing: .04em; color: var(--ink-soft); background: #F8F9FC; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #FAFBFF; }
.admin-table a { color: var(--blue); font-weight: 700; }
.admin-table tr.is-unread { background: #F4F6FF; }
.admin-table tr.is-unread td b { color: var(--blue); }
.admin-msg-cell { max-width: 380px; color: var(--ink-soft); font-size: .9rem; line-height: 1.55; }
.admin-row-title { color: var(--ink); font-weight: 700; }
.admin-actions { white-space: nowrap; }
.admin-actions form { margin-left: 10px; }
.admin-empty { text-align: center; color: var(--ink-soft); padding: 34px 18px !important; }
.admin-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; font-family: var(--display); font-weight: 700; font-size: .78rem; padding: 3px 11px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink-soft); background: #fff; white-space: nowrap; }
.admin-badge.published { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.admin-badge.draft { background: #F8F9FC; border-color: #D9DDE7; color: #687083; }

/* 폼 */
.admin-form { display: flex; flex-direction: column; gap: 18px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: clamp(22px, 3vw, 36px); max-width: 860px; box-shadow: 0 14px 36px rgba(11,14,20,.04); }
.admin-form label { display: flex; flex-direction: column; gap: 8px; font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--ink); }
.admin-form input[type=text], .admin-form input[type=number], .admin-form input:not([type]), .admin-form select, .admin-form textarea { font-family: var(--body); font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.admin-form textarea { resize: vertical; line-height: 1.6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; }
.admin-form label.admin-inline { flex-direction: row; align-items: center; gap: 10px; }
.admin-form label.admin-inline input { width: 18px; height: 18px; accent-color: var(--blue); }
.admin-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: var(--ink-soft); }
.admin-form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.story-edit-box { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--paper-2); display: flex; flex-direction: column; gap: 14px; }
.story-edit-box__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.story-edit-box__head b { display: block; font-family: var(--display); font-size: 1rem; color: var(--ink); }
.story-edit-box__head small { display: block; margin-top: 4px; color: var(--ink-soft); line-height: 1.45; }
.story-edit-box__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.story-thumb-preview { max-width: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.story-thumb-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.story-edit-msg { font-size: .86rem; color: var(--ink-soft); word-break: break-all; }
.story-asset-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.story-asset { display: flex; flex-direction: column; gap: 7px; text-align: left; padding: 8px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink-soft); transition: border-color .2s, box-shadow .2s, transform .2s; }
.story-asset:hover { border-color: var(--ink); transform: translateY(-1px); }
.story-asset.is-selected { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); color: var(--ink); }
.story-asset img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: var(--paper-2); }
.story-asset span { font-size: .78rem; line-height: 1.35; word-break: break-all; }
.story-asset-empty { grid-column: 1 / -1; color: var(--ink-soft); font-size: .9rem; margin: 0; }

@media (max-width: 640px) {
    .admin-cards { grid-template-columns: 1fr; }
    .admin-top__inner { align-items: flex-start; flex-direction: column; gap: 10px; padding-left: 14px; padding-right: 14px; }
    .admin-nav { width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .admin-nav a { min-height: 36px; padding: 7px 11px; font-size: .86rem; }
    .admin-headrow { align-items: stretch; }
    .admin-headrow .admin-btn { width: 100%; }
    .admin-table { display: block; border: none; background: transparent; box-shadow: none; overflow: visible; }
    .admin-table thead { display: none; }
    .admin-table tbody { display: grid; gap: 12px; }
    .admin-table tr { display: grid; gap: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 26px rgba(11,14,20,.04); }
    .admin-table th,
    .admin-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); word-break: break-word; }
    .admin-table td::before { content: attr(data-label); color: var(--ink-soft); font-family: var(--display); font-size: .78rem; font-weight: 700; line-height: 1.6; }
    .admin-table tr:last-child td { border-bottom: 1px solid var(--line); }
    .admin-table tr td:last-child { border-bottom: none; }
    .admin-table tbody tr:hover { background: #fff; }
    .admin-msg-cell { max-width: none; }
    .admin-actions { display: flex !important; align-items: center; justify-content: space-between; white-space: normal; }
    .admin-actions::before { flex: none; }
    .admin-actions form { margin-left: 12px; }
    .admin-empty { display: block !important; text-align: center; }
    .admin-empty::before { display: none; }
    .admin-form-actions .admin-btn { flex: 1 1 160px; }
}

/* =========================================================
   HERO 배경영상 (index.php) — 기존 .hero / .hero__grid-bg 미수정.
   레이어: video(z0) → veil(z0) → grid-bg(z0, DOM상 뒤 → 위) → .wrap(z1)
   ========================================================= */
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero__video-veil { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(10,14,25,.45), rgba(10,14,25,.65)); }
@media (prefers-reduced-motion: reduce) { .hero__video { display: none; } }

/* 어드민 포트폴리오 목록 미니 썸네일 */
.admin-thumb { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); vertical-align: middle; }
.admin-thumb--chip { display: inline-block; border: none; }

/* =========================================================
   HERO 다크 톤 — 어두운 영상 배경 위 텍스트/통계 가독성 (.hero 한정, base 미수정)
   ========================================================= */
.hero h1 { color: #fff; }
.hero h1 .mark { color: var(--lime); }
.hero h1 .mark::after { background: var(--blue); }                 /* 라임 글자 + 블루 밑줄 분리 */
.hero .eyebrow { color: rgba(255,255,255,.9); }
.hero .eyebrow::before { background: var(--lime); }
.hero__lead { color: rgba(255,255,255,.82); word-break: keep-all; }
.hero__lead .lead-br { display: inline; }
@media (max-width: 600px) { .hero__lead .lead-br { display: none; } }  /* 좁은 화면은 자연 줄바꿈 */
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.stats { background: rgba(11,14,20,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: rgba(214,255,61,.45); }

/* =========================================================
   풀스크린 오버레이 메뉴 (PageNaru 스타일) — 전 화면 공통.
   햄버거를 PC에서도 노출, 가로 메뉴 숨김. base 규칙 미수정 — 끝 override.
   HTML/JS 무수정(.is-open 토글 · 딤 pointer-events · ESC 그대로).
   ========================================================= */

/* 헤더: 전화링크만 숨김, 햄버거 전 화면 노출(PC는 가로메뉴와 공존). 상담문의 CTA 유지 */
.header-cta .tel-link { display: none; }
.header-cta .btn { display: inline-flex; padding: 10px 18px; font-size: .9rem; }   /* [2] 표시 유지 + 헤더 버튼 축소 */
.nav-toggle { display: flex; }
/* 아주 좁은 화면: 상담문의 버튼이 햄버거와 안 비좁게 살짝 축소 */
@media (max-width: 480px) {
  .header-cta { gap: 10px; }
  .header-cta .btn { padding: 11px 16px; font-size: .9rem; }
}

/* 딤 = 깊은 다크 배경 */
.drawer__dim { background: radial-gradient(120% 120% at 70% 30%, rgba(40,20,30,.96), rgba(8,8,12,.99)); }

/* 패널 = 풀스크린 페이드. 빈 곳 클릭은 딤으로 통과(닫기 유지) */
.drawer__panel {
  inset: 0; width: 100%; max-width: none; height: 100%;
  background: transparent; box-shadow: none; border: none;
  transform: none; opacity: 0;
  transition: opacity .35s var(--ease);
  padding: clamp(72px, 12vh, 110px) clamp(24px, 7vw, 80px) 40px;
  justify-content: flex-start; overflow-y: auto;
  pointer-events: none;
}
.drawer__panel > * { pointer-events: auto; }
.drawer.is-open .drawer__panel { opacity: 1; }

/* 닫기 버튼 — 우상단 흰색 */
.drawer__close {
  position: absolute; top: 20px; right: 20px;
  width: 48px; height: 48px;
  background: transparent; border: none; color: #fff; font-size: 1.9rem;
  transition: color .2s, transform .2s;
}
.drawer__close:hover { color: var(--lime); transform: rotate(90deg); }

/* 큰 메뉴 */
.drawer__nav { margin: clamp(20px, 6vh, 56px) 0 0; gap: 0; }
.drawer__nav a {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.18;
  color: rgba(255,255,255,.92); border: none; padding: 10px 0;
  opacity: 0; transform: translateX(-22px);
  transition: color .2s, transform .2s, opacity .45s var(--ease);
}
.drawer__nav a.is-active { color: var(--lime); }
.drawer.is-open .drawer__nav a { opacity: 1; transform: none; }
.drawer.is-open .drawer__nav a:nth-child(1) { transition-delay: .06s; }
.drawer.is-open .drawer__nav a:nth-child(2) { transition-delay: .11s; }
.drawer.is-open .drawer__nav a:nth-child(3) { transition-delay: .16s; }
.drawer.is-open .drawer__nav a:nth-child(4) { transition-delay: .21s; }
.drawer.is-open .drawer__nav a:nth-child(5) { transition-delay: .26s; }
.drawer.is-open .drawer__nav a:nth-child(6) { transition-delay: .31s; }
.drawer.is-open .drawer__nav a:hover { color: var(--lime); transform: translateX(8px); transition-delay: 0s; }

/* 회사정보 (모바일=하단 / PC=우측) */
.drawer__foot { margin-top: auto; color: rgba(255,255,255,.72); font-size: .95rem; }
.drawer__info { display: flex; flex-direction: column; gap: 10px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.15); }
.drawer__info p { display: flex; gap: 12px; margin: 0; line-height: 1.5; }
.drawer__info span { flex: none; min-width: 64px; font-family: var(--display); font-size: .8rem; letter-spacing: .04em; color: rgba(255,255,255,.5); text-transform: uppercase; }
.drawer__info a { color: rgba(255,255,255,.92); }
.drawer__info a:hover { color: var(--lime); }
.drawer__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.drawer__actions .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.drawer__actions .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* 데스크탑(>=768px): 좌측 큰 메뉴 + 우측 회사정보 2단, 화면 중앙 정렬 */
@media (min-width: 768px) {
  .drawer__panel {
    flex-direction: row; align-items: center; justify-content: center;
    gap: clamp(48px, 8vw, 130px);
    padding: 80px clamp(40px, 8vw, 120px);
  }
  .drawer__nav { margin: 0; }
  .drawer__foot {
    margin-top: 0; max-width: 340px;
    padding-left: clamp(40px, 5vw, 64px);
    border-left: 1px solid rgba(255,255,255,.15);
  }
  .drawer__info { border-top: none; padding-top: 0; }
}

/* =========================================================
   디자인 수정 보강 — base 미수정, 끝 override
   ========================================================= */
.logo { font-size: 1.85rem; }                 /* [1] 헤더 로고 키움 (푸터 .footer-brand .logo는 영향 없음) */

/* [4c] 햄버거 3선 -> X 모핑 (#navToggle에 .is-open 토글) */
.nav-toggle { flex-direction: column; gap: 5px; }
.nav-toggle__bar { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
#navToggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#navToggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
#navToggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* [4d] 오버레이 펼침감 — 딤이 위에서 아래로 */
.drawer__dim { clip-path: inset(0 0 100% 0); transition: clip-path .4s var(--ease), opacity .3s; }
.drawer.is-open .drawer__dim { clip-path: inset(0 0 0 0); }

/* [6] 통계 박스 숫자/라벨 다크 + 모노스페이스 */
.stat__num { color: var(--lime); font-family: "Space Mono", "Courier New", monospace; }
.stat__num .suffix { color: rgba(255,255,255,.85); }
.stat__label { color: rgba(255,255,255,.7); font-family: "Space Mono", "Courier New", monospace; }
.stat { border-right-color: rgba(255,255,255,.15); }
@media (max-width: 720px) { .stat { border-bottom-color: rgba(255,255,255,.15); } }

/* =========================================================
   STORY 본문(.story-content) 마크다운 요소 보강
   기존 .story-content 블록 미수정 — 끝에서 토큰(--blue/--lime/--ink 등)으로 추가/override.
   ========================================================= */
/* 문단 */
.story-content p { line-height: 1.8; }

/* 제목 — 라임 left-border 포인트 */
.story-content h2 { border-left: 4px solid var(--lime-ink); padding-left: 14px; margin-bottom: .5em; }
.story-content h3 { border-left: 3px solid var(--lime-ink); padding-left: 12px; margin-bottom: .4em; }

/* 목록 — 전역 reset(ul{list-style:none})로 사라진 불릿/번호 복원 + 줄간격 */
.story-content ul { list-style: disc; }
.story-content ol { list-style: decimal; }
.story-content li { line-height: 1.75; padding-left: 4px; }
.story-content li::marker { color: var(--blue); }

/* 강조 — 굵게 + 라임 하이라이트 포인트 */
.story-content strong { font-weight: 700; color: var(--ink); box-shadow: inset 0 -.38em 0 rgba(159,184,0,.35); }

/* 인용구 — 기존 blue left-border 유지하며 배경 보강 */
.story-content blockquote { background: var(--paper-2); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--ink-soft); }

/* 구분선 */
.story-content hr { border: none; border-top: 1px solid var(--line); margin: 2.2em 0; }

/* 표 — 좁은 화면 가로 스크롤 + 라운드 + zebra */
.story-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius); }
.story-content table {
  display: table; width: 100%; margin: 0;
  border-collapse: collapse; border: none;
  font-size: .96rem; line-height: 1.5;
}
.story-content thead th {
  background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 700;
  text-align: left; padding: 12px 14px; white-space: nowrap;
}
.story-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.story-content tbody tr:nth-child(even) { background: var(--paper-2); }
.story-content tbody tr:last-child td { border-bottom: none; }

/* 표 모서리: 래퍼 .story-table의 border-radius + overflow가 다크 헤더 포함 전체를 둥글게 클립 */

/* 흰 배경용 라임(채도 낮춘 올리브톤). 다크 배경엔 기존 --lime 유지 */
:root { --lime-ink: #9FB800; }

/* ──────────────────────────────────────────────
   STORY 상세 페이지 (override) — wsground posts21 스타일
   base 규칙(370행 .story-article, 371행 .story-article-head 등) 미수정.
   흰 히어로 배너 → 회색 풀폭 본문 섹션 → 넓은 본문(카드 없음).
────────────────────────────────────────────── */
/* 페이지 배경: 회색을 브라우저 좌우 끝까지 풀폭으로 (.section는 뷰포트 폭 블록) */
.section--story { background: #F1F3F6; padding: clamp(48px, 7vw, 90px) 0; }

/* 본문: 좁은 칼럼(760/880) 제거 → .wrap(1200px) 폭을 거의 꽉 채워 시원하게.
   회색 풀폭 위에 넓은 흰 카드로 띄움. */
.story-article {
    max-width: none;
    width: 100%;
    padding: clamp(20px, 3vw, 44px);
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: 0 6px 30px rgba(0,0,0,.06);
}

/* 1. 상단 Blog 히어로 배너 (가운데 정렬 페이지 타이틀) */
.story-hero { padding: clamp(72px, 11vw, 130px) 0 clamp(40px, 6vw, 64px); text-align: center; }
.story-hero .wrap { display: flex; flex-direction: column; align-items: center; }
.story-hero__pill::before { background: var(--lime-ink); }   /* 알약 라벨 포인트 점 */
.story-hero__title { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.04; letter-spacing: -.03em; margin: 18px 0 0; }
.story-hero__sub { font-family: var(--display); color: var(--ink-soft); font-size: clamp(1rem, 1.6vw, 1.22rem); margin-top: 14px; max-width: 52ch; }
.story-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

/* 2. 글 헤더 — 흰 바탕 기준 구분선/색 또렷하게, 순서: 메타 → h1 → 리드 */
.story-article-head { border-bottom-color: var(--line); }
.story-meta .story-cat { color: var(--blue); font-weight: 700; }
.story-article-head h1 { margin-top: 10px; }
.story-lead { margin-top: 18px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; color: var(--ink-soft); }

/* 3. 대표 이미지 — 넓어진 본문 폭에 맞춰 크게 (회색 박스 없음, 섹션이 이미 회색) */
.story-cover { margin: 28px 0 40px; border-radius: var(--radius); overflow: hidden; }
.story-cover img { width: 100%; height: auto; display: block; }

/* 4. 본문 인용구 — 코발트 블루 포인트 박스 (단색 통일) */
.story-content blockquote { border-left: 4px solid var(--blue); background: rgba(37,71,255,.06); }

/* ──────────────────────────────────────────────
   메인 페이지 개편 (override) — base 미수정, 맨 끝에서만.
────────────────────────────────────────────── */
/* 2. 히어로 리드: 한글 단어 안 끊기게 + 2문단 간격 */
.hero__lead { word-break: keep-all; }
.hero .hero__lead { max-width: 74ch; }
.hero__lead + .hero__lead { margin-top: .5em; }

/* 3. 섹션 리드: 한글 단어 안 끊기게 (반응형 자동 줄바꿈) */
.lead { word-break: keep-all; }

/* 5. 서비스 박스 배경이미지 (bg_image 있을 때 .has-bg) */
.svc-card.has-bg {
    position: relative;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    border-color: transparent;
}
.svc-card.has-bg::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(11,14,20,.62), rgba(11,14,20,.82));
    z-index: 0;
}
.svc-card.has-bg > * { position: relative; z-index: 1; }
.svc-card.has-bg h3,
.svc-card.has-bg p { color: #fff; }
.svc-card.has-bg .svc-card__no { color: var(--lime); }
.svc-card.has-bg .svc-card__ico { background: rgba(255,255,255,.16); color: #fff; }
.svc-card.has-bg:hover .svc-card__ico { background: var(--blue); color: #fff; }
.svc-card.has-bg .svc-card__tags span { color: #fff; background: rgba(255,255,255,.18); }

/* 6. admin 분류 관리 — 인라인 편집 행 */
.admin-catlist { display: flex; flex-direction: column; gap: 10px; }
.admin-catrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.admin-catrow label { display: flex; flex-direction: column; font-size: .78rem; color: var(--ink-soft); gap: 4px; }
.admin-catrow input[type="text"], .admin-catrow input:not([type]) { width: 110px; }
.admin-catrow input[type="color"] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.admin-catprev { padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; font-family: var(--display); }
.admin-catused { font-size: .8rem; color: var(--ink-soft); }

/* ──────────────────────────────────────────────
   Subpage hero — about/service/story/portfolio/contact
────────────────────────────────────────────── */
.page-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(360px, 48vw, 520px);
    display: flex;
    align-items: center;
    padding: clamp(72px, 10vw, 132px) 0;
    color: #fff;
    background: var(--ink) center/cover no-repeat;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11,14,20,.9) 0%, rgba(11,14,20,.68) 48%, rgba(11,14,20,.28) 100%),
        linear-gradient(180deg, rgba(11,14,20,.18), rgba(11,14,20,.62));
    z-index: 0;
}
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: .22;
    z-index: 0;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero__content { max-width: 760px; }
.page-hero .eyebrow { color: rgba(255,255,255,.88); }
.page-hero .eyebrow::before { background: var(--lime); }
.page-hero h1 {
    font-size: clamp(2.1rem, 5vw, 4.3rem);
    line-height: 1.04;
    margin: 18px 0 18px;
    color: #fff;
    word-break: keep-all;
}
.page-hero .lead {
    color: rgba(255,255,255,.78);
    max-width: 62ch;
    word-break: keep-all;
}
.page-hero--about { background-image: url('/uploads/page-heroes/about.jpg'); }
.page-hero--service { background-image: url('/uploads/page-heroes/service.jpg'); }
.page-hero--story { background-image: url('/uploads/page-heroes/story.jpg'); }
.page-hero--portfolio { background-image: url('/uploads/page-heroes/portfolio.jpg'); }
.page-hero--contact { background-image: url('/uploads/page-heroes/contact.jpg'); }

@media (max-width: 720px) {
  .page-hero {
    min-height: 330px;
    padding: 64px 0;
    background-position: 62% center;
  }
  .page-hero::before {
    background: linear-gradient(90deg, rgba(11,14,20,.92), rgba(11,14,20,.66));
  }
}

/* ──────────────────────────────────────────────
   Drawer menu redesign
────────────────────────────────────────────── */
.drawer__dim {
  background:
    linear-gradient(120deg, rgba(5,8,16,.96) 0%, rgba(11,14,20,.88) 48%, rgba(12,24,58,.78) 100%),
    url('/uploads/page-heroes/service.jpg') center/cover no-repeat;
}
.drawer__panel {
  display: grid;
  grid-template-columns: minmax(320px, 660px) minmax(280px, 380px);
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 7vw, 110px);
  padding: clamp(82px, 11vh, 124px) clamp(24px, 8vw, 112px);
}
.drawer__panel::before {
  content: "WIZM.";
  position: absolute;
  left: clamp(20px, 5vw, 72px);
  bottom: clamp(18px, 4vw, 46px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4rem, 15vw, 13rem);
  line-height: .78;
  letter-spacing: 0;
  color: rgba(255,255,255,.055);
  pointer-events: none;
}
.drawer__nav {
  counter-reset: drawer-menu;
  width: min(100%, 660px);
}
.drawer__nav a {
  counter-increment: drawer-menu;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: baseline;
  gap: clamp(14px, 2vw, 22px);
  padding: clamp(13px, 2.1vh, 20px) 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: clamp(2.25rem, 6vw, 5.1rem);
  line-height: .98;
  letter-spacing: 0;
  color: rgba(255,255,255,.9);
}
.drawer__nav a::before {
  content: counter(drawer-menu, decimal-leading-zero);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: clamp(.78rem, 1.3vw, .95rem);
  font-weight: 700;
  color: var(--lime);
  transform: translateY(-.18em);
}
.drawer__nav a::after {
  content: "";
  grid-column: 2;
  width: 0;
  height: 3px;
  background: var(--lime);
  transition: width .28s var(--ease);
}
.drawer__nav a:hover,
.drawer__nav a.is-active {
  color: #fff;
  transform: translateX(10px);
}
.drawer__nav a:hover::after,
.drawer__nav a.is-active::after {
  width: min(180px, 42%);
}
.drawer__foot {
  position: relative;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.drawer__foot::before {
  content: "Start a project";
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.08;
  color: #fff;
  margin-bottom: 22px;
}
.drawer__info {
  gap: 14px;
  padding: 0;
  border: 0;
}
.drawer__info p {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.drawer__info span {
  min-width: 0;
  color: rgba(214,255,61,.8);
}
.drawer__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 26px;
}
.drawer__actions .btn {
  width: 100%;
  justify-content: center;
}
.drawer__actions .btn--primary {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}
.drawer__actions .btn--primary:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 14px 34px rgba(214,255,61,.18);
}
.drawer__close {
  top: clamp(18px, 3vw, 32px);
  right: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (max-width: 767px) {
  .drawer__panel {
    display: flex;
    padding: 78px 24px 30px;
    gap: 26px;
  }
  .drawer__panel::before {
    font-size: 5rem;
    bottom: 12px;
  }
  .drawer__nav {
    width: 100%;
  }
  .drawer__nav a {
    grid-template-columns: 40px 1fr;
    font-size: clamp(2rem, 11vw, 3.6rem);
  }
  .drawer__foot {
    width: 100%;
    padding: 22px;
  }
}
