/*
Theme Name: 셀변환 (CellConvert)
Theme URI: https://example.com
Author: CellConvert Studio
Author URI: https://example.com
Description: CSV, JSON, PDF 등 다양한 형식을 엑셀로 변환하는 온라인 툴을 위한 워드프레스 테마입니다. 브라우저에서 직접 처리되어 파일이 서버에 업로드되지 않습니다.
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cellconvert
Tags: e-commerce, blog, one-column, two-columns, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready

셀변환 WordPress Theme, Copyright 2026
셀변환 is distributed under the terms of the GNU GPL.
*/

/* ==========================================================================
   디자인 토큰 (Design Tokens)
   컨셉: 스프레드시트의 셀 구조 + 신뢰감 있는 사무 도구의 정갈함
   ========================================================================== */

:root {
  /* Color: 잉크 그린 계열 + 종이 + 승인 도장 앰버 */
  --ink-900: #16302A;
  --ink-800: #1B3A2E;
  --ink-700: #24493A;
  --sage-500: #8FA891;
  --sage-300: #C3D2C4;
  --sage-100: #E7EDE5;
  --paper-0: #FBF9F4;
  --paper-100: #F7F5F0;
  --paper-200: #EFEBE1;
  --amber-600: #B5701F;
  --amber-500: #D98E3D;
  --amber-100: #F5E3C8;
  --line: #D8D2C2;
  --ink-text: #1F2A24;
  --ink-muted: #5B6B60;

  /* Type */
  --font-mono: 'JetBrains Mono', 'Roboto Mono', SFMono-Regular, Consolas, monospace;
  --font-serif: 'Source Serif 4', 'Noto Serif KR', Georgia, serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;

  /* Layout */
  --container-w: 1180px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --cell-w: 34px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-text);
  background: var(--paper-0);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink-800); text-decoration: none; }
a:hover { color: var(--amber-600); }

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 2px;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   시그니처 배경: 셀 그리드 패턴
   ========================================================================== */

.cell-grid-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--cell-w) var(--cell-w);
  background-position: -1px -1px;
}

/* ==========================================================================
   헤더
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper-0);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink-900);
}

.site-logo__mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink-900);
  border-radius: var(--radius-sm);
  position: relative;
  flex-shrink: 0;
}
.site-logo__mark::before,
.site-logo__mark::after {
  content: '';
  position: absolute;
  background: var(--ink-900);
}
.site-logo__mark::before { top: 8px; left: 0; right: 0; height: 2px; }
.site-logo__mark::after { top: 0; bottom: 0; left: 8px; width: 2px; }

.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
  background: var(--sage-100);
  color: var(--ink-900);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-900);
  color: var(--paper-0);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.header-cta:hover { background: var(--amber-600); color: #fff; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

/* ==========================================================================
   히어로 / 컨버터 툴 섹션
   ========================================================================== */

.hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-700);
  background: var(--sage-100);
  border: 1px solid var(--sage-300);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero__eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--amber-500);
  border-radius: 50%;
}

.hero__title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  max-width: 14ch;
  margin-bottom: 18px;
}

.hero__title em {
  font-style: normal;
  color: var(--amber-600);
}

.hero__desc {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 52ch;
  margin-bottom: 36px;
}

/* 변환기 위젯 */
.converter {
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 1px 0 var(--paper-0), 0 12px 30px -18px rgba(22, 48, 42, 0.35);
}

.converter__tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.converter__tab {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
}

.converter__tab.is-active {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--paper-0);
}

.converter__dropzone {
  border: 2px dashed var(--sage-500);
  border-radius: var(--radius-md);
  background: var(--paper-0);
  padding: 40px 20px;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
  cursor: pointer;
}

.converter__dropzone.is-dragover {
  border-color: var(--amber-500);
  background: var(--amber-100);
}

.converter__dropzone-icon {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border: 2px solid var(--ink-800);
  border-radius: var(--radius-sm);
  position: relative;
}
.converter__dropzone-icon::before {
  content: '↓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ink-800);
}

.converter__dropzone-title {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 6px;
}

.converter__dropzone-sub {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.converter__filename {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-800);
  margin-top: 10px;
  word-break: break-all;
}

.converter__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.converter__select {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-0);
  color: var(--ink-text);
}

.converter__btn {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--amber-500);
  color: var(--ink-900);
}
.converter__btn:hover { background: var(--amber-600); color: #fff; }
.converter__btn:disabled { background: var(--sage-300); color: #fff; cursor: not-allowed; }

.converter__status {
  margin-top: 16px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  min-height: 1.4em;
}

.converter__status.is-success { color: var(--ink-700); font-weight: 700; }
.converter__status.is-error { color: #A83A2E; font-weight: 700; }

.converter__privacy-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.8rem;
  color: var(--ink-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ==========================================================================
   섹션 공통
   ========================================================================== */

.section { padding: 72px 0; }
.section--alt { background: var(--paper-100); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}

.section__title {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  max-width: 24ch;
  margin-bottom: 14px;
}

.section__desc {
  font-family: var(--font-serif);
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-bottom: 44px;
}

/* 지원 형식 그리드 */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.format-cell {
  background: var(--paper-0);
  padding: 26px 20px;
  text-align: center;
}

.format-cell__ext {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink-900);
  margin-bottom: 8px;
}

.format-cell__desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* 특징 리스트 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--paper-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
}

.feature-card__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sage-500);
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* 단계 안내 */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.step {
  counter-increment: step;
  background: var(--paper-0);
  padding: 30px 26px;
  border-right: 1px solid var(--line);
  position: relative;
}
.step:last-child { border-right: none; }

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-600);
  background: var(--amber-100);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 14px;
}

.step h3 { font-size: 1rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--ink-muted); margin-bottom: 0; }

/* ==========================================================================
   블로그 / 아티클
   ========================================================================== */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.post-card {
  background: var(--paper-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-card__thumb {
  aspect-ratio: 16/9;
  background: var(--sage-100);
  border-bottom: 1px solid var(--line);
}

.post-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.post-card__cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-700);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.post-card__title {
  font-size: 1.02rem;
  margin-bottom: 8px;
}
.post-card__title a { color: var(--ink-900); }

.post-card__excerpt {
  font-size: 0.88rem;
  color: var(--ink-muted);
  flex: 1;
  margin-bottom: 14px;
}

.post-card__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage-500);
}

.single-article {
  max-width: 760px;
  margin: 0 auto;
}

.single-article__meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.single-article__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.single-article .entry-content {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--ink-text);
}

.single-article .entry-content h2 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  margin-top: 1.6em;
  padding-top: 0.4em;
  border-top: 1px solid var(--line);
}

.single-article .entry-content h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  margin-top: 1.3em;
}

.single-article .entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--amber-500);
  color: var(--ink-muted);
  font-style: italic;
}

.single-article .entry-content code {
  font-family: var(--font-mono);
  background: var(--paper-200);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.88em;
}

.single-article .entry-content img {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

/* ==========================================================================
   위젯 / 사이드바
   ========================================================================== */

.widget-area { padding-left: 8px; }

.widget {
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--paper-0);
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-700);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.widget ul { list-style: none; padding-left: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px dotted var(--line); font-size: 0.9rem; }
.widget li:last-child { border-bottom: none; }

/* 광고 슬롯 (승인 전 빈 자리 확보) */
.ad-slot {
  background: var(--paper-200);
  border: 1px dashed var(--sage-500);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-bottom: 32px;
}

/* ==========================================================================
   콘텐츠 + 사이드바 레이아웃
   ========================================================================== */

.content-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ==========================================================================
   페이지 (정책/문의)
   ========================================================================== */

.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}

.page-header__title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 8px; }
.page-header__breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.page-header__breadcrumb a { color: var(--ink-muted); }

.legal-content {
  max-width: 780px;
  font-family: var(--font-serif);
  font-size: 1.02rem;
}

.legal-content h2 {
  font-family: var(--font-body);
  font-size: 1.3rem;
  margin-top: 2em;
}

/* 문의 폼 */
.contact-form { max-width: 560px; }

.form-row { margin-bottom: 18px; }

.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-800);
  margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper-0);
  color: var(--ink-text);
}

.form-row textarea { resize: vertical; min-height: 130px; }

.form-submit {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 12px 26px;
  background: var(--ink-900);
  color: var(--paper-0);
  border: none;
  border-radius: var(--radius-sm);
}
.form-submit:hover { background: var(--amber-600); }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list { max-width: 760px; }

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  padding: 18px 0;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-900);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: 'Q';
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  background: var(--sage-100);
  color: var(--ink-700);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-item p {
  padding: 0 0 20px 36px;
  color: var(--ink-muted);
  font-family: var(--font-serif);
}

/* ==========================================================================
   푸터
   ========================================================================== */

.site-footer {
  background: var(--ink-900);
  color: var(--sage-100);
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand__logo {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-brand__desc {
  font-size: 0.88rem;
  color: var(--sage-300);
  max-width: 32ch;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-300);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--sage-100); font-size: 0.9rem; }
.footer-col a:hover { color: var(--amber-500); }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--sage-300);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   페이지네이션 / 댓글
   ========================================================================== */

.pagination {
  display: flex;
  gap: 8px;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-text);
}

.pagination .current {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}

.comments-area { margin-top: 48px; }

.comment-list { list-style: none; padding: 0; }

.comment-body {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.comment-author {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.comment-metadata {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

/* ==========================================================================
   반응형
   ========================================================================== */

@media (max-width: 960px) {
  .formats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--line); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper-0); border-bottom: 1px solid var(--line); padding: 12px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .menu-toggle { display: block; }
  .formats-grid { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .converter__controls { flex-direction: column; align-items: stretch; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

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