:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --success: #16a34a;
  --shadow: 0 4px 20px rgba(15,23,42,0.08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "맑은 고딕", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
}
.nav {
  max-width: 1120px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-weight: 800; font-size: 20px; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; }
.logo span { font-size: 22px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a.active { color: var(--primary); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #fff; padding: 72px 24px 80px;
}
.hero-wrap { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.25; margin-bottom: 18px; font-weight: 800; letter-spacing: -0.5px; }
.hero p { font-size: 18px; opacity: 0.95; margin-bottom: 24px; }
.hero .badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 10px;
  font-weight: 700; cursor: pointer; border: none; font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #1a1a1a; box-shadow: 0 6px 18px rgba(245,158,11,0.4); }
.btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }

/* Sections */
section { padding: 64px 24px; }
.container { max-width: 1120px; margin: 0 auto; }
.section-title { font-size: 30px; margin-bottom: 12px; letter-spacing: -0.3px; font-weight: 800; }
.section-sub { color: var(--text-muted); font-size: 17px; margin-bottom: 36px; max-width: 720px; }

/* Coupon Cards */
.coupons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.coupon-card {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border: 2px dashed var(--primary-light);
  position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.coupon-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(37,99,235,0.15); }
.coupon-card::before {
  content: ""; position: absolute; left: -10px; top: 50%; width: 20px; height: 20px;
  background: var(--bg); border-radius: 50%; transform: translateY(-50%);
}
.coupon-card::after {
  content: ""; position: absolute; right: -10px; top: 50%; width: 20px; height: 20px;
  background: var(--bg); border-radius: 50%; transform: translateY(-50%);
}
.coupon-tag { display: inline-block; background: var(--primary-light); color: var(--primary-dark); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.coupon-code {
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 26px;
  font-weight: 800; color: var(--primary-dark); letter-spacing: 2px;
  padding: 14px; background: var(--primary-light); border-radius: 8px;
  text-align: center; margin: 14px 0;
}
.coupon-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.coupon-btn {
  width: 100%; background: var(--primary); color: #fff; padding: 12px;
  border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 14px;
  transition: background 0.15s;
}
.coupon-btn:hover { background: var(--primary-dark); }
.coupon-btn.copied { background: var(--success); }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.feature {
  background: var(--surface); padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.feature img { border-radius: 10px; margin-bottom: 16px; aspect-ratio: 4/3; object-fit: cover; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.step {
  background: var(--surface); padding: 26px; border-radius: var(--radius);
  border-top: 4px solid var(--primary); position: relative;
}
.step-num {
  position: absolute; top: -18px; left: 26px;
  background: var(--primary); color: #fff; width: 36px; height: 36px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.step h3 { font-size: 17px; margin: 12px 0 6px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* Table */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; font-size: 14px; }
td { font-size: 15px; }
tr:last-child td { border-bottom: none; }
.highlight-row { background: #fffbeb; }
.highlight-row td:first-child { font-weight: 700; color: var(--accent); }

/* Calculator */
.calc-box {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.calc-form label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
.calc-form input, .calc-form select {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit;
}
.calc-result {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 10px; padding: 24px; display: flex; flex-direction: column; justify-content: center;
}
.calc-result h3 { font-size: 16px; color: var(--text-muted); margin-bottom: 8px; }
.calc-result .value { font-size: 36px; font-weight: 800; color: var(--primary-dark); }
.calc-result .save { color: var(--success); font-size: 16px; font-weight: 600; margin-top: 8px; }

/* FAQ */
.faq-item {
  background: var(--surface); border-radius: 10px; padding: 18px 22px;
  margin-bottom: 12px; border: 1px solid var(--border); cursor: pointer;
}
.faq-q { font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: "+"; font-size: 22px; color: var(--primary); transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { color: var(--text-muted); font-size: 15px; margin-top: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s, margin-top 0.3s; }
.faq-item.open .faq-a { max-height: 300px; margin-top: 12px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.gallery img { border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; box-shadow: var(--shadow); }

/* Footer */
footer { background: #0f172a; color: #cbd5e1; padding: 48px 24px 28px; margin-top: 48px; }
.footer-wrap { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-wrap h4 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.footer-wrap a { color: #cbd5e1; display: block; padding: 4px 0; font-size: 14px; }
.footer-bottom { text-align: center; padding-top: 28px; margin-top: 28px; border-top: 1px solid #1e293b; font-size: 13px; color: #64748b; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--text); color: #fff; padding: 14px 24px; border-radius: 10px;
  box-shadow: var(--shadow); z-index: 100; transition: transform 0.3s; font-weight: 600;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 860px) {
  .hero-wrap, .calc-box, .footer-wrap { grid-template-columns: 1fr; }
  .coupons, .feature-grid, .gallery { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 30px; }
  .section-title { font-size: 24px; }
  .nav-links { gap: 16px; font-size: 14px; }
  section { padding: 48px 20px; }
}