/* ===== Variables (set by JS for light/dark) ===== */
:root {
  --bg: #f8f9fa;
  --bg-section: #fff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: #e8e8e8;
  --accent: #6b4ce6;
  --accent-soft: rgba(107, 76, 230, 0.12);
  --card-bg: #fff;
  --header-bg: rgba(248, 249, 250, 0.95);
  --footer-bg: #f0f0f0;
}

[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg-section: #141414;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --border: #2a2a2a;
  --accent: #8b6cf7;
  --accent-soft: rgba(139, 108, 247, 0.18);
  --card-bg: #1a1a1a;
  --header-bg: rgba(13, 13, 13, 0.95);
  --footer-bg: #0d0d0d;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
.logo-light { display: block; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.nav {
  display: none;
  gap: 28px;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-dropdown {
  display: none;
  flex-direction: column;
  padding: 0 20px 16px;
  border-top: 1px solid var(--border);
  gap: 4px;
}
.nav-dropdown.is-open { display: flex; }
.nav-dropdown a {
  display: block;
  padding: 12px 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-dropdown a:hover { color: var(--text); }

.nav-theme {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.nav-theme-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.nav-theme-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-theme-btn {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.nav-theme-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nav-theme-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

@media (min-width: 768px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .nav-dropdown { display: none !important; }
}

/* ===== Hero ===== */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 56px;
  text-align: center;
}
.hero-inner {
  max-width: 520px;
  margin: 0 auto;
}
.hero-logo {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}
.hero-logo-img {
  max-width: 200px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-left: -18px; /* 살짝 왼쪽으로 */
}
.hero-logo .logo-light { display: block; }
.hero-logo .logo-dark { display: none; }
[data-theme="dark"] .hero-logo .logo-light { display: none; }
[data-theme="dark"] .hero-logo .logo-dark { display: block; }

.hero-tagline {
  margin: 0 0 32px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 400;
}
@media (min-width: 480px) {
  .hero-tagline { font-size: 1.25rem; }
}

.cta-appstore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--text);
  color: #fff; /* 라이트 모드: 버튼 텍스트·애플 로고 흰색 */
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
[data-theme="dark"] .cta-appstore {
  background: #fff;
  color: #0d0d0d;
}
.cta-appstore:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}
.cta-appstore:active { transform: translateY(0); }
.cta-appstore-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== Sections ===== */
.section {
  padding: 56px 24px;
}
.container {
  max-width: 900px;
  margin: 0 auto;
}
.section-title {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.section-lead {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}
.br-desk { display: none; }
@media (min-width: 600px) {
  .section { padding: 72px 24px; }
  .section-title { font-size: 1.75rem; }
  .section-lead { font-size: 1.0625rem; }
  .br-desk { display: inline; }
}

/* ===== About ===== */
.section-about {
  background: var(--bg-section);
}

/* ===== Features ===== */
.section-features { background: var(--bg); }
.feature-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-soft);
}
.feature-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 12px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}
@media (min-width: 600px) {
  .feature-list { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
  .feature-card { padding: 28px; }
}
@media (min-width: 900px) {
  .feature-list { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Safety ===== */
.section-safety { background: var(--bg-section); }
.safety-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.safety-list li {
  position: relative;
  padding: 14px 0 14px 36px;
  font-size: 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.safety-list li:last-child { border-bottom: none; }
.safety-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
@media (min-width: 600px) {
  .safety-list { margin-top: 40px; }
  .safety-list li { padding-left: 40px; font-size: 1.0625rem; }
}

/* ===== CTA ===== */
.section-cta { background: var(--bg); }
.section-cta .container { text-align: center; }
.section-cta .section-lead { margin-bottom: 28px; }
.cta-appstore-bottom {
  display: inline-flex;
}

/* ===== Footer ===== */
.footer {
  padding: 24px 20px;
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
}
.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}
