@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ── CSS Custom Properties (Light Mode) ─────────────────────── */
:root {
  --bg:           #ffffff;
  --bg-subtle:    #f0fdfa;
  --bg-teal:      #f0fdfa;
  --bg-accent:    #ccfbf1;
  --bg-card:      #ffffff;
  --bg-nav:       rgba(255,255,255,0.95);
  --bg-footer:    #f0fdfa;
  --bg-input:     #ffffff;

  --text:         #111827;
  --text-2:       #6b7280;
  --text-3:       #374151;
  --text-muted:   #9ca3af;

  --border:       #e5e7eb;
  --border-teal:  #99f6e4;

  --teal:         #0d9488;
  --teal-hover:   #0f766e;
  --teal-light:   #f0fdfa;
  --teal-bright:  #14b8a6;

  --shadow:       0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08);
}

/* ── Dark Mode (Navy) ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #0a1628;
  --bg-subtle:    #0a2535;
  --bg-teal:      #0a2535;
  --bg-accent:    #0d3045;
  --bg-card:      #0f2040;
  --bg-nav:       rgba(10,22,40,0.97);
  --bg-footer:    #080f1e;
  --bg-input:     #152035;

  --text:         #e1e8f4;
  --text-2:       #8ba5c0;
  --text-3:       #b8cfe0;
  --text-muted:   #5a7a9a;

  --border:       #1e3456;
  --border-teal:  #1d4a62;

  --teal:         #2dd4bf;
  --teal-hover:   #14b8a6;
  --teal-light:   #0a2535;
  --teal-bright:  #5eead4;

  --shadow:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.4);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: 'Pretendard', 'Inter', system-ui, sans-serif; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); line-height: 1.6; transition: background 0.2s, color 0.2s; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg-nav); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display:flex; align-items:center; gap:0.45rem; text-decoration:none; }
.nav-logo img { flex-shrink:0; }
.logo-text { font-size:1.1rem; font-weight:900; color:var(--teal); letter-spacing:-0.02em; line-height:1; }
.logo-co { color:var(--text); }
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links a { padding: 0.4rem 0.75rem; border-radius: 6px; font-size: 0.9rem; color: var(--text-2); text-decoration: none; font-weight: 500; transition: all 0.15s; }
.nav-links a:hover, .nav-links a.active { background: var(--bg-teal); color: var(--teal); }
.nav-cta { padding: 0.5rem 1.25rem; background: var(--teal); color: #fff !important; border-radius: 8px; font-weight: 600; }
.nav-cta:hover { background: var(--teal-hover) !important; color: #fff !important; }

/* Theme toggle button */
.theme-toggle {
  width: 36px; height: 36px; border: 1.5px solid var(--border);
  background: var(--bg-subtle); border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all 0.15s; color: var(--text-2);
  margin-left: 0.5rem; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; background: var(--teal); color: #fff; font-weight: 700; border-radius: 8px; text-decoration: none; transition: background 0.15s; font-size: 0.95rem; }
.btn-primary:hover { background: var(--teal-hover); }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; background: transparent; color: var(--teal); font-weight: 700; border-radius: 8px; border: 2px solid var(--teal); text-decoration: none; transition: all 0.15s; font-size: 0.95rem; }
.btn-secondary:hover { background: var(--bg-teal); }
.btn-ghost { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; background: transparent; color: var(--text-2); font-weight: 700; border-radius: 8px; border: 2px solid var(--border); text-decoration: none; transition: all 0.15s; font-size: 0.95rem; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ── Cards ───────────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.75rem; box-shadow: var(--shadow); transition: background 0.2s, border-color 0.2s; }

/* ── Typography ──────────────────────────────────────────────── */
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; color: var(--text); line-height: 1.25; }
.section-sub { font-size: 1.1rem; color: var(--text-2); margin-top: 0.75rem; line-height: 1.7; }
.text-teal { color: var(--teal); }
.tag { display: inline-block; background: var(--bg-teal); color: var(--teal); font-size: 0.8rem; font-weight: 600; padding: 0.35rem 0.9rem; border-radius: 999px; border: 1px solid var(--border-teal); }

/* ── Layout ──────────────────────────────────────────────────── */
.container    { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 700px;  margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.bg-gray    { background: var(--bg-subtle); }
.bg-teal-cls { background: var(--teal); }
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }   .mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }  .mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }      .mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.flex { display: flex; }          .gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }          .items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }   .justify-center { justify-content: center; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%); padding: 5rem 0 4rem; }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #0a1628 0%, #0a2535 100%) !important; }

/* Hero visual ring (en pages) */
.hero-inner { display: grid; grid-template-columns: 1fr 380px; gap: 4rem; align-items: center; }
.hero-text .hero-badge { display: inline-block; background: var(--bg-teal); color: var(--teal); font-size: 0.8rem; font-weight: 700; padding: 0.35rem 1rem; border-radius: 999px; border: 1px solid var(--border-teal); margin-bottom: 1.25rem; }
.hero-title { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900; color: var(--text); line-height: 1.15; }
.hero-title span { color: var(--teal); }
.hero-sub { font-size: 1.05rem; color: var(--text-2); margin-top: 1rem; line-height: 1.75; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--teal); }
.stat-label { font-size: 0.8rem; color: var(--text-2); }
.hero-visual { position: relative; height: 340px; display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; border-radius: 50%; opacity: 0.2; }
.ring-1 { width: 300px; height: 300px; border: 2px solid var(--teal); animation: spin 20s linear infinite; }
.ring-2 { width: 220px; height: 220px; border: 2px solid var(--teal); animation: spin 14s linear infinite reverse; }
.hero-core { width: 100px; height: 100px; background: var(--bg-teal); border: 2px solid var(--teal); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.ring-tag { position: absolute; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 0.3rem 0.75rem; font-size: 0.78rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.ring-tag::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--teal); border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2rem 0; }
.stat-item { text-align: center; padding: 1rem; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--teal); }
.stat-label { font-size: 0.85rem; color: var(--text-2); margin-top: 0.25rem; }

/* ── Process Steps ───────────────────────────────────────────── */
.step { display: flex; gap: 1.5rem; align-items: flex-start; }
.step-num { width: 48px; height: 48px; background: var(--teal); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }

/* ── Badge ───────────────────────────────────────────────────── */
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 4px; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-teal { background: var(--bg-teal); color: var(--teal-hover); }

/* ── Check icon ──────────────────────────────────────────────── */
.check { display: inline-block; width: 16px; height: 16px; background: var(--teal); border-radius: 50%; flex-shrink: 0; position: relative; }
.check::after { content: '✓'; position: absolute; color: #fff; font-size: 10px; top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* ── FAQ ─────────────────────────────────────────────────────── */
details.faq { border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1.5rem; background: var(--bg-card); margin-bottom: 0.75rem; }
details.faq summary { font-weight: 600; color: var(--text); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq summary::after { content: '▾'; color: var(--teal); flex-shrink: 0; }
details.faq[open] summary::after { transform: rotate(180deg); }
details.faq p { margin-top: 1rem; color: var(--text-2); font-size: 0.95rem; line-height: 1.7; }

/* ── Hero teal (CTA sections) ────────────────────────────────── */
.hero-teal { background: var(--teal); color: #fff; padding: 4rem 0; text-align: center; }
.hero-teal .section-title { color: #fff; }
.hero-teal .section-sub { color: rgba(255,255,255,0.8); }

/* ── Info box ────────────────────────────────────────────────── */
.info-box { background: var(--bg-teal); border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; padding: 1.5rem 1.75rem; }

/* ── Footer ──────────────────────────────────────────────────── */
footer { background: var(--bg-footer); border-top: 1px solid var(--border); margin-top: 6rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 4rem 1.5rem 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-logo { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.footer-logo span { color: var(--teal); }
.footer-desc { color: var(--text-2); font-size: 0.9rem; margin-top: 0.75rem; line-height: 1.6; }
.footer-email { color: var(--teal); font-size: 0.9rem; margin-top: 1rem; text-decoration: none; display: block; }
footer h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 1rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.5rem; }
footer ul li a { color: var(--text-2); text-decoration: none; font-size: 0.9rem; }
footer ul li a:hover { color: var(--teal); }
.footer-bottom { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }

/* ── Tech badge ──────────────────────────────────────────────── */
.tech-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600; }

/* ── Article / Blog prose ────────────────────────────────────── */
.prose h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); margin: 2rem 0 1rem; }
.prose h3 { font-size: 1.1rem; font-weight: 700; color: var(--teal-hover); margin: 1.5rem 0 0.75rem; }
.prose p { color: var(--text-3); line-height: 1.8; margin-bottom: 1rem; }
.prose ul { margin: 1rem 0 1rem 1.5rem; }
.prose ul li { color: var(--text-3); line-height: 1.8; margin-bottom: 0.5rem; }
.prose code { background: var(--bg-teal); color: var(--teal-hover); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.875rem; font-family: 'Fira Code', monospace; }
.prose pre { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1.5rem; overflow-x: auto; margin: 1.5rem 0; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 4px solid var(--teal); background: var(--bg-teal); padding: 1rem 1.5rem; border-radius: 0 8px 8px 0; margin: 1.5rem 0; color: var(--teal-hover); font-style: italic; }

/* ── Dark mode — inline style overrides (important) ──────────── */
[data-theme="dark"] section,
[data-theme="dark"] div.section,
[data-theme="dark"] .section { color: var(--text); }

/* Section backgrounds */
[data-theme="dark"] section[style*="background:linear-gradient"] { background: linear-gradient(135deg, var(--bg) 0%, var(--bg-subtle) 100%) !important; }
[data-theme="dark"] section[style*="background:#f9fafb"],
[data-theme="dark"] div[style*="background:#f9fafb"]  { background: var(--bg-subtle) !important; }
[data-theme="dark"] section[style*="background:#fff"],
[data-theme="dark"] div[style*="background:#fff"]     { background: var(--bg) !important; }
[data-theme="dark"] div[style*="background:#f0fdfa"]  { background: var(--bg-teal) !important; }
[data-theme="dark"] div[style*="background:#f1f5f9"]  { background: var(--bg-subtle) !important; }
[data-theme="dark"] div[style*="background:#f9fafb"]  { background: var(--bg-subtle) !important; }

/* Text colors */
[data-theme="dark"] [style*="color:#111827"] { color: var(--text) !important; }
[data-theme="dark"] [style*="color:#374151"] { color: var(--text-3) !important; }
[data-theme="dark"] [style*="color:#6b7280"] { color: var(--text-2) !important; }
[data-theme="dark"] [style*="color:#9ca3af"] { color: var(--text-muted) !important; }
[data-theme="dark"] [style*="color:#4b5563"] { color: var(--text-2) !important; }
[data-theme="dark"] [style*="color:#475569"] { color: var(--text-2) !important; }

/* Border colors */
[data-theme="dark"] [style*="border-bottom:1px solid #e5e7eb"],
[data-theme="dark"] [style*="border-top:1px solid #e5e7eb"],
[data-theme="dark"] [style*="border-right:1px solid #e5e7eb"],
[data-theme="dark"] [style*="border: 1px solid #e5e7eb"],
[data-theme="dark"] [style*="border:1px solid #e5e7eb"]  { border-color: var(--border) !important; }

/* Form inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--bg-input) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--text-muted) !important; }

/* Stats bar dividers */
[data-theme="dark"] .stat-item { border-right-color: var(--border); }

/* Teal CTA sections — keep but slightly darken */
[data-theme="dark"] section[style*="background:#0d9488"] { background: #0a7a70 !important; }

/* Dark border overrides on inline table cells */
[data-theme="dark"] th { color: var(--teal) !important; }
[data-theme="dark"] td { color: var(--text-3) !important; }
[data-theme="dark"] [style*="border-bottom:2px solid #99f6e4"] { border-bottom-color: var(--border-teal) !important; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3rem 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
