/* ============= Design Tokens ============= */
:root {
  --teal: #00897B;
  --teal-dark: #00695C;
  --teal-light: #4DB6AC;
  --coral: #FF6B6B;
  --coral-dark: #EE5A5A;
  --coral-light: #FF8A8A;
  --black: #1A1A2E;
  --gray-900: #2D2D44;
  --gray-800: #3A3A54;
  --gray-600: #6E6E8A;
  --gray-400: #9E9EB8;
  --gray-200: #E0E0EA;
  --gray-100: #F5F5F7;
  --white: #FFFFFF;
  --gradient-main: linear-gradient(135deg, #00897B 0%, #FF6B6B 100%);
  --gradient-teal: linear-gradient(135deg, #00897B, #00695C);
  --gradient-hero: linear-gradient(160deg, #0a0a1a 0%, #1A1A2E 40%, #0d2b27 100%);
  --font: 'Pretendard Variable', 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-xl: 24px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --shadow-glow: 0 0 40px rgba(0,137,123,.2);
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ============= Reset & Base ============= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============= Gradient Text ============= */
.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-light {
  background: linear-gradient(135deg, #4DB6AC, #FF8A8A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============= Buttons ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-primary {
  background: var(--gradient-teal);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,137,123,.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,137,123,.4);
}
.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-outline:hover { background: var(--teal); color: var(--white); }
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

/* ============= Navigation ============= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}
.nav-scrolled {
  background: rgba(26,26,46,.92);
  backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-img { width: 36px; height: auto; }
.nav-logo-text { font-size: 1.25rem; font-weight: 800; color: var(--white); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: rgba(255,255,255,.75); font-size: .9rem; font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--gradient-teal) !important;
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
}
.nav-cta:hover { box-shadow: 0 4px 16px rgba(0,137,123,.4); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ============= Hero ============= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: var(--gradient-hero);
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(0,137,123,.15), transparent),
    radial-gradient(ellipse 500px 500px at 80% 30%, rgba(255,107,107,.1), transparent);
}
.hero-bg::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--white), transparent);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(0,137,123,.15);
  border: 1px solid rgba(0,137,123,.3);
  border-radius: 100px;
  color: var(--teal-light);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 32px;
  animation: fadeInDown .8s ease;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 24px;
  animation: fadeInUp .8s ease .1s both;
}
.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.8;
  margin-bottom: 40px;
  animation: fadeInUp .8s ease .2s both;
}
.hero-desc strong { color: var(--coral-light); }
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
  animation: fadeInUp .8s ease .3s both;
}
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  animation: fadeInUp .8s ease .4s both;
}
.stat { text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--teal-light); }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.5); margin-top: 4px; }

/* ============= Sections ============= */
.section { padding: 100px 0; }
.section-dark { background: var(--black); color: var(--white); }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0,137,123,.1);
  border-radius: 100px;
  color: var(--teal);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.section-dark .section-tag { background: rgba(77,182,172,.15); color: var(--teal-light); }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; line-height: 1.3; }
.section-desc { font-size: 1.05rem; color: var(--gray-600); margin-top: 12px; }
.section-dark .section-desc { color: var(--gray-400); }

/* ============= Problems Grid ============= */
.problems-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.problem-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  position: relative;
  transition: var(--transition);
}
.problem-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--coral); }
.problem-icon { font-size: 2.4rem; margin-bottom: 16px; }
.problem-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.problem-card p { font-size: .9rem; color: var(--gray-600); line-height: 1.7; }
.problem-tag {
  position: absolute; top: 20px; right: 20px;
  padding: 4px 12px; border-radius: 100px;
  font-size: .7rem; font-weight: 700;
}
.tag-danger { background: rgba(255,107,107,.1); color: var(--coral); }
.tag-warning { background: rgba(255,165,0,.1); color: #e6930a; }

/* ============= Comparison Table ============= */
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--gray-900);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 500px;
}
.compare-table th, .compare-table td { padding: 18px 24px; text-align: center; }
.compare-table thead th {
  font-size: 1.1rem; font-weight: 700;
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.compare-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.05); }
.compare-table tbody tr:hover { background: rgba(255,255,255,.03); }
.compare-label { text-align: left; font-weight: 600; color: var(--gray-400); }
.badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
}
.badge-good { background: rgba(0,137,123,.15); color: var(--teal-light); }
.badge-bad { background: rgba(255,107,107,.15); color: var(--coral-light); }

/* ============= Features Grid ============= */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-highlight { background: linear-gradient(135deg, rgba(0,137,123,.05), rgba(255,107,107,.03)); border-color: var(--teal-light); }
.feature-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: .9rem; color: var(--gray-600); line-height: 1.7; }

/* ============= Security Flow ============= */
.security-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.flow-step {
  background: var(--gray-900);
  padding: 28px 24px;
  border-radius: var(--radius);
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  border: 1px solid rgba(255,255,255,.06);
  transition: var(--transition);
}
.flow-step:hover { border-color: var(--teal); box-shadow: var(--shadow-glow); }
.flow-encrypt { border-color: rgba(0,137,123,.3); background: linear-gradient(135deg, rgba(0,137,123,.1), var(--gray-900)); }
.flow-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: var(--white);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: .9rem;
}
.flow-content h4 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.flow-content p { font-size: .8rem; color: var(--gray-400); }
.flow-arrow { font-size: 1.4rem; color: var(--teal-light); font-weight: 700; }

.security-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.sec-feat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--gray-900);
  border: 1px solid rgba(255,255,255,.05);
  transition: var(--transition);
}
.sec-feat:hover { border-color: rgba(0,137,123,.3); }
.sec-icon { font-size: 1.6rem; flex-shrink: 0; }
.sec-feat strong { display: block; font-size: .95rem; margin-bottom: 4px; }
.sec-feat p { font-size: .8rem; color: var(--gray-400); margin-top: 2px; }

/* ============= Migration ============= */
.migration-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}
.migration-step {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.migration-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.step-number {
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.migration-step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.migration-step p { font-size: .9rem; color: var(--gray-600); }

.migration-qr-section { text-align: center; }
.qr-card {
  display: inline-block;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}
.qr-hint { margin-top: 16px; font-size: .85rem; color: var(--gray-600); }

/* ============= Tech Grid ============= */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.tech-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--gray-900);
  border: 1px solid rgba(255,255,255,.06);
  transition: var(--transition);
}
.tech-card:hover { border-color: var(--teal); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.tech-icon { font-size: 2rem; margin-bottom: 12px; }
.tech-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.tech-card p { font-size: .8rem; color: var(--gray-400); }

/* ============= Download ============= */
.section-download {
  background: var(--gradient-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.section-download::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 50%, rgba(0,137,123,.2), transparent),
    radial-gradient(ellipse 500px 500px at 70% 60%, rgba(255,107,107,.1), transparent);
}
.section-download .container { position: relative; z-index: 1; }
.download-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.download-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
}
.download-btn:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.download-btn small { font-size: .7rem; opacity: .7; display: block; }
.download-btn strong { font-size: 1rem; display: block; }
.download-web { margin-top: 16px; }

/* ============= Footer ============= */
.footer {
  background: var(--black);
  color: var(--gray-400);
  padding: 64px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-logo { width: 40px; margin-bottom: 12px; }
.footer-tagline { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.footer-values { font-size: .8rem; }
.footer-links { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h5 { color: var(--white); font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.footer-col a { font-size: .85rem; transition: var(--transition); }
.footer-col a:hover { color: var(--teal-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-open { color: var(--teal-light); }

/* ============= Scroll Reveal ============= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }
.reveal:nth-child(4) { transition-delay: .3s; }
.reveal:nth-child(5) { transition-delay: .4s; }
.reveal:nth-child(6) { transition-delay: .5s; }

/* ============= Animations ============= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============= Responsive ============= */
@media (max-width: 768px) {
  .nav-links { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(26,26,46,.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero { min-height: auto; padding: 140px 24px 60px; }
  .hero-title br { display: none; }
  .hero-desc br { display: none; }
  .hero-stats { gap: 24px; }

  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }

  .security-flow { flex-direction: column; gap: 8px; }
  .flow-arrow { transform: rotate(90deg); }
  .flow-step { max-width: 100%; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .hero-desc { font-size: .95rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .download-buttons { flex-direction: column; align-items: center; }
}
