/*
Theme Name:  foxnail
Theme URI:   https://foxnail.kr
Description: foxnail 기술 블로그 + OPEN_GRID 제품 사이트
Author:      foxnail
Version:     1.0.0
*/

/* ── CSS 변수 ───────────────────────────────────────────── */
:root {
  --fn-navy:    #1a1f36;
  --fn-navy2:   #2d3561;
  --fn-blue:    #4a90d9;
  --fn-light:   #f0f2f8;
  --fn-white:   #ffffff;
  --fn-text:    #1c2030;
  --fn-muted:   #6b7280;
  --fn-border:  #e2e6f0;
  --fn-code-bg: #282c34;
  --fn-radius:  10px;
  --fn-font:    'Pretendard', 'Noto Sans KR', system-ui, sans-serif;
  --fn-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

/* ── 기본 ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--fn-font);
  color: var(--fn-text);
  background: var(--fn-white);
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════
   fn-icon — Bootstrap처럼 color/font-size 만으로 제어
   사용법:
     <span class="fn-icon"></span>
     <span class="fn-icon" style="color:white; font-size:48px"></span>
   ════════════════════════════════════════════════════════ */
.fn-icon {
  display:            inline-block;
  width:              1em;               /* font-size 를 그대로 상속 */
  height:             1em;
  background-color:   currentColor;     /* color 속성이 로고 색상이 됨 */
  -webkit-mask-image: url('assets/img/foxnail-logo.png');
          mask-image: url('assets/img/foxnail-logo.png');
  -webkit-mask-size:    contain;
          mask-size:    contain;
  -webkit-mask-repeat:  no-repeat;
          mask-repeat:  no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  vertical-align:     middle;
  flex-shrink:        0;
}

/* ── 로고 — 원본 디자인 유지 + 배경 투명 PNG + CSS filter 색상 제어 ─ */
/*
  foxnail-logo.png = 원본 JPEG에서 배경 제거한 투명 PNG (디자인 동일)
  filter: brightness(0)          → 로고를 검정으로
  filter: brightness(0) invert(1)→ 로고를 흰색으로
  어떤 색이든: filter: brightness(0) sepia(1) saturate(3) hue-rotate(Xdeg)
*/
.fn-logo {
  display: inline-block;
  flex-shrink: 0;
  background: transparent;
}
/* 헤더/히어로/푸터 (모두 네이비 배경) → 흰색 로고 */
.fn-logo-header {
  width:36px; height:36px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.fn-logo-hero {
  width:72px; height:72px;
  filter: brightness(0) invert(1)
          drop-shadow(0 3px 10px rgba(0,0,0,0.3));
}
/* 인라인 히어로 로고 — h1 폰트 크기에 맞춤 */
.fn-hero-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  line-height: 1.2;
}
.fn-hero-headline .fn-icon {
  width:  1.6em;
  height: 1.6em;
}
.fn-logo-hero-inline {
  height: 1em;
  width:  auto;
  flex-shrink: 0;
  vertical-align: middle;
  filter: brightness(0) invert(1)
          drop-shadow(0 3px 10px rgba(0,0,0,0.3));
}
.fn-hero-logo-text {
  color: var(--fn-blue);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  flex-shrink: 0;
}
.fn-hero-logo { display:flex; justify-content:center; margin-bottom:16px; }
.fn-logo-footer {
  width:22px; height:22px;
  filter: brightness(0) invert(1);
  opacity: 0.75;
  margin-right: 6px;
}
.fn-hero-logo { display:flex; justify-content:center; margin-bottom:16px; }

/* 밝은 배경에서 쓸 경우 (필요 시 사용) */
.fn-logo-dark { filter: brightness(0); }

/* ── 소셜 공유 버튼 ─────────────────────────────────────── */
.fn-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fn-share-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}
.fn-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
  opacity: 0.75;
}
.fn-share-btn:hover { opacity: 1; transform: scale(1.12); }
.fn-share-btn svg   { width: 15px; height: 15px; }
.fn-share-fb      { background: #1877f2; color: #fff; }
.fn-share-x       { background: #000;    color: #fff; }
.fn-share-threads { background: #000;    color: #fff; }

/* SVG 폴백 (인라인 SVG 사용 시) */
.fn-logo-svg { fill: currentColor; flex-shrink: 0; display: block; }

/* ── 네비게이션 ─────────────────────────────────────────── */
.site-header {
  background: var(--fn-navy);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-branding img  { height: 36px; width: auto; }
.site-branding span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fn-white);
  letter-spacing: -0.3px;
}

.main-navigation ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 4px;
}
.main-navigation a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.main-navigation a:hover { background: rgba(255,255,255,0.12); color: #fff; }

.nav-cta {
  background: var(--fn-blue) !important;
  color: #fff !important;
  font-weight: 600;
}
.nav-cta:hover { background: #3a7bc8 !important; }

/* ── 홈 Hero ────────────────────────────────────────────── */
.fn-hero {
  background: linear-gradient(135deg, var(--fn-navy) 0%, var(--fn-navy2) 100%);
  color: var(--fn-white);
  text-align: center;
  padding: 100px 24px 80px;
}
.fn-hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fn-blue);
  margin-bottom: 20px;
}
.fn-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.fn-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin: 0 auto 40px;
}
.fn-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 버튼 ───────────────────────────────────────────────── */
.fn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--fn-radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
}
.fn-btn-primary {
  background: var(--fn-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74,144,217,0.35);
}
.fn-btn-primary:hover {
  background: #3a7bc8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74,144,217,0.45);
}
.fn-btn-outline {
  background: transparent;
  color: var(--fn-white);
  border: 2px solid rgba(255,255,255,0.5);
}
.fn-btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ── 섹션 공통 ──────────────────────────────────────────── */
.fn-section { padding: 72px 24px; }
.fn-section-inner { max-width: 1080px; margin: 0 auto; }
.fn-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fn-navy);
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}
.fn-section-sub { color: var(--fn-muted); margin-bottom: 40px; }
.fn-alt { background: var(--fn-light); }

/* ── OPEN_GRID 제품 카드 (홈) ───────────────────────────── */
.fn-product-card {
  background: var(--fn-navy);
  color: #fff;
  border-radius: 16px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.fn-product-info h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.fn-product-info p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 440px;
}
.fn-product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.fn-product-tags span {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 20px;
}
.fn-product-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.fn-stat-num  { font-size: 2rem; font-weight: 800; color: var(--fn-blue); }
.fn-stat-label{ font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 2px; }
.fn-mit-badge {
  display: inline-block;
  background: rgba(74,144,217,0.25);
  color: var(--fn-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 12px;
}

/* ── 블로그 카드 ─────────────────────────────────────────── */
.fn-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.fn-blog-card {
  background: var(--fn-white);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  padding: 28px;
  transition: box-shadow 0.18s, transform 0.18s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.fn-blog-card:hover {
  box-shadow: 0 8px 24px rgba(26,31,54,0.1);
  transform: translateY(-3px);
}
.fn-blog-card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fn-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.fn-blog-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fn-navy);
  margin-bottom: 10px;
  line-height: 1.4;
}
.fn-blog-card p { font-size: 0.9rem; color: var(--fn-muted); }
.fn-blog-card-meta {
  font-size: 0.78rem;
  color: var(--fn-muted);
  margin-top: 16px;
}

/* ── 단일 포스팅 ─────────────────────────────────────────── */
.fn-post-header { max-width: 780px; margin: 48px auto 32px; padding: 0 24px; }
.fn-post-content { max-width: 780px; margin: 0 auto; padding: 0 24px 64px; }
.fn-post-content h2, .fn-post-content h3 { color: var(--fn-navy); }
.fn-post-content a { color: var(--fn-blue); }
.fn-post-content code {
  font-family: var(--fn-mono);
  font-size: 0.88em;
  background: var(--fn-light);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--fn-navy2);
}
.fn-post-content pre {
  background: var(--fn-code-bg);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}
.fn-post-content pre code {
  background: none;
  padding: 0;
  color: #abb2bf;
  font-size: 0.88rem;
}

/* ── OPEN_GRID 제품 페이지 ───────────────────────────────── */
.fn-og-hero {
  background: linear-gradient(135deg, var(--fn-navy) 0%, #1e2d5a 100%);
  color: #fff;
  text-align: center;
  padding: 80px 24px 60px;
}
.fn-og-hero h1 { font-size: clamp(2rem,5vw,3.2rem); font-weight:800; margin-bottom:12px; }
.fn-og-hero p  { color: rgba(255,255,255,0.8); max-width:540px; margin:0 auto 32px; font-size:1.05rem; }

.fn-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 20px;
}
.fn-feature-card {
  background: #fff;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  padding: 24px;
}
.fn-feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.fn-feature-card h3 { font-size: 1rem; font-weight:700; margin-bottom:6px; color: var(--fn-navy); }
.fn-feature-card p  { font-size: 0.85rem; color: var(--fn-muted); }

.fn-install-block {
  background: var(--fn-code-bg);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}
.fn-install-block code {
  font-family: var(--fn-mono);
  color: #98c379;
  font-size: 1rem;
}

/* ── 푸터 — fixed bottom bar ─────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(26, 31, 54, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
}
.fn-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fn-footer-brand {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  font-size: 0.85rem;
}
.fn-footer-mid {
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
}
.fn-footer-contact,
.fn-footer-contact a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 0.8rem;
}
.fn-footer-contact:hover,
.fn-footer-contact a:hover { color: rgba(255,255,255,0.75); text-decoration: none; }
.fn-footer-contact:visited,
.fn-footer-contact a:visited { color: rgba(255,255,255,0.45); }

/* 푸터 높이만큼 본문 여백 확보 */
body { padding-bottom: 44px; }

/* ── 반응형 ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .fn-product-card { padding: 32px 24px; flex-direction: column; }
  .fn-hero { padding: 64px 20px 48px; }
}
