/*
Theme Name: Coati
Theme URI: https://coati.kr
Author: Elifunt Company
Description: coati.kr 사이트 테마. 디자인 시스템은 theme.json, 화면 틀은 templates·parts, 섹션은 patterns 에 있다.
Version: 0.2.9
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: coati
*/

/* theme.json 으로 못 하는 것만 여기에 둔다. 값은 웹사이트 와이어프레임(가독성·톤 정리판)과 같다. */

body { word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3 { text-wrap: balance; }

/* 버튼: 보조 버튼은 흰 면 + 테두리만, 주요 버튼만 그림자 */
.wp-block-button.is-style-secondary .wp-block-button__link { background: #fff; box-shadow: none; }
.wp-block-button .wp-block-button__link { transition: transform .12s, box-shadow .12s; }
.wp-block-button:not(.is-style-secondary) .wp-block-button__link:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; }
.wp-block-button.is-style-secondary .wp-block-button__link:hover { background: var(--wp--preset--color--mist); }
@media (prefers-reduced-motion: reduce) { .wp-block-button .wp-block-button__link { transition: none; } }

/* 섹션 위 작은 영문 머리말 */
.coati-eyebrow { font-size: 14px; font-weight: 700; color: var(--wp--preset--color--orange-text); margin-bottom: 4px !important; }
.has-ink-background-color .coati-eyebrow { color: var(--wp--preset--color--orange); }
/* 소개 문단은 34em 로 좁히되, 왼쪽 시작점은 위 제목(1120px 가운데 정렬)과 맞춘다.
   margin-left:0 이면 화면이 1120px 보다 넓을 때 제목보다 왼쪽으로 튀어나온다. */
.coati-lead { font-size: 18px; max-width: 34em; margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size, 1120px)) / 2)) !important; }

/* 헤더 */
header.wp-block-template-part { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + env(safe-area-inset-top, 0px)); z-index: 20; }
.coati-header { background: #fff; }
.coati-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 10px; padding: 6px 0 !important; box-shadow: 0 6px 16px rgba(0,0,0,.08); min-width: 168px !important; }
.coati-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 9px 16px !important; }
.coati-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--orange-text); }
.coati-header .wp-block-buttons .wp-block-button__link { padding: 7px 14px; font-size: 14px; }
.coati-logo img { height: 34px; width: auto; display: block; }
@media (max-width: 781px) { .coati-header .coati-login { display: none; } .coati-logo img { height: 28px; } }

/* 카드: 테두리 없이 면으로 구분 */
.coati-card { background: var(--wp--preset--color--mist); border-radius: 12px; padding: 24px; }
.has-mist-background-color .coati-card { background: #fff; }
.coati-card p { margin-top: 10px; font-size: 15px; }

/* 문제 카드 그래픽·콘텐츠 전략 그래픽 */
.coati-graphic svg, .coati-graphic img { display: block; width: 100%; height: auto; border-radius: 14px; }

/* 비교표 */
.coati-compare table { border-collapse: collapse; min-width: 620px; }
.coati-compare th, .coati-compare td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); text-align: left; vertical-align: top; }
.coati-compare thead th { border-bottom: 2px solid #000; background: var(--wp--preset--color--mist); }
.coati-compare thead th:nth-child(2) { background: #000; color: #fff; }
.coati-compare tbody td:nth-child(2) { background: var(--wp--preset--color--orange-soft); font-weight: 700; color: #000; }
.coati-compare tbody tr:last-child td { border-bottom: 0; }
.coati-compare { overflow-x: auto; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; }

/* 단계 번호·라벨 */
.coati-step-n { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 15px; color: var(--wp--preset--color--orange-text); margin-bottom: 0 !important; }

/* 진행 방식 화면 캡처 */
.coati-shot img { border: 1px solid var(--wp--preset--color--line); border-radius: 8px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; }

/* 검정 띠·마무리 CTA */
.coati-band { border-radius: 16px; }
.coati-band h2, .coati-band h3 { color: #fff; }
.coati-band p { color: #CFCFCF; }
.coati-endcta { border-radius: 16px; }

/* 홈 */
/* 첫 화면 제목 안 로고: 로고는 꾸밈 이미지(alt 비움)로 두고, 솔루션 이름은 화면에 안 보이는 텍스트로 H1 에 넣는다. */
.coati-hero-h1 .coati-hero-logo { display: block; height: clamp(56px, 7vw, 80px); width: auto; margin-top: 20px; }
/* 첫 화면 제품 화면: 넓은 화면에서는 오른쪽 여백까지 최대 160px 더 넓혀 크게 보여준다(모바일·좁은 화면은 그대로). */
@media (min-width: 1200px) { .coati-hero-shot { margin-right: calc(-1 * clamp(0px, (100vw - 1120px) / 2 - 32px, 160px)) !important; } }
.coati-card h3 { margin-top: 0; }
.coati-case-sub { color: var(--wp--preset--color--orange-text); font-weight: 700; font-size: 15px; margin-top: 6px !important; }
.coati-graphic { margin-bottom: 20px; }
.coati-steps > .coati-card { display: flex; flex-direction: column; gap: 8px; }
.coati-steps .coati-shot { margin: 0 0 12px; }
.coati-band-btn .wp-block-button__link { background: #fff; box-shadow: none; }
.coati-band-btn .wp-block-button__link:hover { background: var(--wp--preset--color--mist); transform: none; box-shadow: none; }
@media (max-width: 781px) { .coati-compare table { font-size: 14px; } }

/* 솔루션: 폴더형 탭 */
.coati-tablist { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid #000; margin-bottom: 0; }
.coati-tablist [role="tab"] { position: relative; margin: 0 0 -2px; padding: 14px 22px 12px; font: inherit; font-size: 16px; font-weight: 700; color: var(--wp--preset--color--muted); background: rgba(0,0,0,.05); border: 2px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; cursor: pointer; }
.coati-tablist [role="tab"]:hover { color: #000; background: rgba(0,0,0,.09); }
.coati-tablist [role="tab"][aria-selected="true"] { color: #000; background: #fff; border-color: #000; box-shadow: inset 0 4px 0 var(--wp--preset--color--orange); }
.coati-tablist [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #fff; }
.coati-tablist [role="tab"]:focus-visible { outline: 3px solid var(--wp--preset--color--orange); outline-offset: 2px; }
.coati-tabpanel { display: none; background: #fff; border: 2px solid #000; border-top: 0; border-radius: 0 0 14px 14px; padding: clamp(24px, 4vw, 48px); margin-top: 0 !important; }
.coati-tabpanel.is-active { display: block; }
.coati-tabpanel .coati-card { background: var(--wp--preset--color--mist); }
.coati-tabpanel h4 { font-size: 17px; margin: 0; }
.coati-sub-h { margin-top: 48px !important; margin-bottom: 18px !important; font-size: 22px !important; }
.coati-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px !important; }
.coati-signals span { background: var(--wp--preset--color--mist); color: var(--wp--preset--color--muted); border-radius: 4px; padding: 3px 8px; font-size: 13px; }
.coati-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.coati-fcol { background: var(--wp--preset--color--mist); border-radius: 12px; padding: 20px; }
.coati-fst { font-size: 13px; color: var(--wp--preset--color--muted); }
.coati-fst span { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: #000; color: #fff; font-weight: 700; }
.coati-fst.is-last span { background: var(--wp--preset--color--orange); color: #000; }
.coati-topics { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.coati-topics li { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--wp--preset--color--line); }
.coati-topics li:first-child { border-top: 0; padding-top: 0; }
.coati-topics strong { color: #000; font-size: 15px; line-height: 1.5; }
.coati-kw { font-size: 13px; color: var(--wp--preset--color--orange-text); }
@media (max-width: 600px) { .coati-tablist { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .coati-tablist [role="tab"] { flex: none; white-space: nowrap; padding: 12px 16px 10px; font-size: 15px; } }

/* 한글이 단어 중간에서 끊기지 않게(제목·본문 모두) */
h1, h2, h3, h4, p, li, td, th, a, button { word-break: keep-all; overflow-wrap: break-word; }

/* 요금제 */
.coati-plans, .coati-stats { margin-left: 0 !important; }
.coati-plans { max-width: 880px; }
.coati-plan { position: relative; background: #fff; border: 2px solid #000; border-radius: 16px; padding: 28px !important; display: flex; flex-direction: column; gap: 12px; }
.coati-plan.is-featured { box-shadow: 6px 6px 0 #000; }
.coati-plan > .wp-block-buttons { margin-top: auto; }
.coati-badge { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; border: 1.5px solid #000; border-radius: 999px; padding: 1px 10px; background: var(--wp--preset--color--orange); color: #000; margin: 0; }
.coati-badge.is-dark { background: #000; color: #fff; }
.coati-plan-name { font-family: var(--wp--preset--font-family--display); font-size: 28px !important; margin: 0; }
.coati-plan-who { color: var(--wp--preset--color--muted); font-size: 15px; }
.coati-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 34px; color: #000; line-height: 1.1; padding-top: 14px; border-top: 1px solid var(--wp--preset--color--line); font-variant-numeric: tabular-nums; }
.coati-price small { font-family: var(--wp--preset--font-family--noto-sans-kr); font-size: 15px; font-weight: 500; color: var(--wp--preset--color--muted); }
.coati-listhead { font-size: 13px; font-weight: 700; color: var(--wp--preset--color--muted); margin-bottom: 0 !important; }
.coati-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.coati-checks li { padding-left: 24px; position: relative; }
.coati-checks li::before { content: "✓"; position: absolute; left: 0; font-weight: 900; color: var(--wp--preset--color--orange-text); }
.coati-callout { background: var(--wp--preset--color--orange-soft); border-radius: 10px; padding: 14px 16px; font-size: 15px; }
.coati-kv table { border-collapse: collapse; font-size: 15px; }
.coati-kv th, .coati-kv td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 9px 0; text-align: left; vertical-align: top; }
.coati-kv th { width: 30%; color: var(--wp--preset--color--muted); font-weight: 500; }
.coati-wideplan { max-width: none; }
.coati-wideplan > .wp-block-column { display: flex; flex-direction: column; gap: 12px; }

/* 만든 팀 */
.coati-stats { max-width: 640px; }
.coati-big-n { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(36px, 4vw, 48px); color: #000; line-height: 1.1; margin-bottom: 4px !important; font-variant-numeric: tabular-nums; }
.coati-person { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.coati-avatar img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.coati-role { color: var(--wp--preset--color--muted); font-size: 14px; font-weight: 700; margin-top: 0 !important; }
.coati-skills { font-size: 13px !important; color: var(--wp--preset--color--muted); border-top: 1px solid var(--wp--preset--color--line); padding-top: 10px; align-self: stretch; }

/* 리소스 */
.coati-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.coati-chips a { text-decoration: none; border: 1.5px solid var(--wp--preset--color--line); border-radius: 999px; padding: 7px 16px; font-size: 15px; font-weight: 700; color: #000; background: #fff; }
.coati-chips a:hover { border-color: #000; }
.coati-chips a[aria-current="page"] { background: #000; border-color: #000; color: #fff; }
.coati-catdesc { color: var(--wp--preset--color--muted); margin-top: 16px; }
.coati-post { background: #fff; border-radius: 12px; padding: 16px; height: 100%; display: flex; flex-direction: column; gap: 8px; }
.coati-thumb { margin: 0 0 4px !important; }
.coati-thumb img, .coati-post .wp-block-post-featured-image:empty { border-radius: 8px; background: var(--wp--preset--color--mist); }
.coati-post:not(:has(.wp-block-post-featured-image img))::before { content: ""; display: block; aspect-ratio: 16 / 10; border-radius: 8px; background: var(--wp--preset--color--mist); }
.coati-post-cat { font-size: 13px; font-weight: 700; }
.coati-post-cat a { color: var(--wp--preset--color--orange-text); text-decoration: none; }
.coati-post-title { font-size: 17px !important; line-height: 1.5; margin: 0; }
.coati-post-title a { text-decoration: none; }
.coati-post-excerpt { font-size: 14px; color: var(--wp--preset--color--muted); }
.coati-post-date { font-size: 13px; color: var(--wp--preset--color--muted); margin-top: auto; }
.coati-subscribe-slot { border: 1px dashed #777; border-radius: 10px; padding: 12px 16px; color: #CFCFCF; font-size: 14px; margin: 0; }

/* 문의하기 */
.coati-qlist { list-style: none; padding: 0; display: grid; gap: 10px; }
.coati-qlist li { padding-left: 24px; position: relative; }
.coati-qlist li::before { content: "Q"; position: absolute; left: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; color: var(--wp--preset--color--orange-text); }
.coati-form-slot { background: #fff; border: 2px solid #000; border-radius: 14px; padding: 32px; box-shadow: 6px 6px 0 #000; }
.coati-form-slot p + p { margin-top: 10px; color: var(--wp--preset--color--muted); font-size: 15px; }

/* 만든 팀·요금제: 섹션 제목·소개·숫자·요금 카드를 가운데로 */
.coati-center .coati-eyebrow, .coati-center h1, .coati-center h2, .coati-center .coati-lead,
.coati-center .has-small-font-size:not(.coati-plan *) { text-align: center; }
.coati-center .coati-lead { margin-left: auto !important; margin-right: auto !important; }
.coati-center .coati-stats { margin-left: auto !important; margin-right: auto !important; text-align: center; }
.coati-center .coati-plans { margin-left: auto !important; margin-right: auto !important; }
.coati-center .coati-plan h2, .coati-center .coati-band h2 { text-align: left; }
.coati-center .coati-band { text-align: center; }
.coati-center .coati-band h2 { text-align: center; }

/* 푸터 */
.coati-footer a { text-decoration: none; color: #BDBDBD; }
.coati-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.coati-footer .coati-foot-h { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.coati-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

/* 3분 데모 영상 팝업(assets/js/demo.js) */
.coati-video { width: min(960px, calc(100vw - 32px)); padding: 0; border: 2px solid #000; border-radius: 14px; background: #000; overflow: visible; }
.coati-video::backdrop { background: rgba(0, 0, 0, .7); }
.coati-video-frame { aspect-ratio: 16 / 9; }
.coati-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.coati-video-close { position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #000; font-size: 22px; line-height: 1; cursor: pointer; }

/* 화면에는 안 보이고 검색엔진·스크린리더만 읽는 텍스트(예: H1 안 솔루션 이름) */
.coati-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
