:root {
  --bg-canvas: #080a0f;
  --bg-surface: #121620;
  --bg-elevated: #181e2c;
  --bg-input: #0d111a;
  --bg-hover: #1e2638;
  --border: #263044;
  --border-strong: #36435e;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-text: #a5b4fc;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --accent-border: rgba(99, 102, 241, 0.45);
  --ok: #10b981;
  --ok-text: #34d399;
  --ok-soft: rgba(16, 185, 129, 0.14);
  --ok-border: rgba(16, 185, 129, 0.36);
  --accent-2: #38bdf8;
  --header-bg: rgba(8, 10, 15, 0.78);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.65);
  --font-sans: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Pretendard Variable", "Consolas", monospace;
}

[data-theme="light"] {
  --bg-canvas: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-elevated: #f6f8fc;
  --bg-input: #f1f5f9;
  --bg-hover: #e8eef6;
  --border: #d5dce7;
  --border-strong: #94a3b8;
  --text: #0f172a;
  --text-dim: #475569;
  --text-muted: #64748b;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #3730a3;
  --accent-soft: rgba(79, 70, 229, 0.10);
  --accent-border: rgba(79, 70, 229, 0.36);
  --ok: #10b981;
  --ok-text: #047857;
  --ok-soft: rgba(16, 185, 129, 0.12);
  --ok-border: rgba(5, 150, 105, 0.32);
  --accent-2: #0284c7;
  --header-bg: rgba(245, 247, 251, 0.85);
  --shadow-lg: 0 24px 56px -16px rgba(15, 23, 42, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Ambient background */
.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 75% 45% at 50% -10%, rgba(99, 102, 241, 0.14), transparent 70%),
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

main, header, footer { position: relative; z-index: 1; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
}
.brand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
  white-space: nowrap;
}
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 10px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: var(--bg-surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--bg-surface);
  color: var(--text-dim);
  border-color: var(--border);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); }

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  color: var(--ok-text);
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22); }
.dot-accent { background: var(--accent); }

/* Hero */
.hero { padding: 68px 0 42px; text-align: center; }
.hero h1 {
  margin: 20px auto 16px;
  max-width: 760px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-sub {
  margin: 0 auto 28px;
  max-width: 620px;
  font-size: clamp(15px, 1.8vw, 17.5px);
  color: var(--text-dim);
  line-height: 1.7;
}
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-note { font-size: 13px; color: var(--text-muted); }

/* Interactive Webmail Workspace Frame */
.webmail-section { padding: 12px 0 54px; }
.app-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.app-topbar {
  height: 48px;
  padding: 0 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.win-dots { display: inline-flex; gap: 6px; }
.win-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.app-domain-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 6px;
}
.app-top-right { display: flex; align-items: center; gap: 8px; }
.shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ok-text);
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  padding: 3px 10px;
  border-radius: 999px;
}

.webmail-grid {
  display: grid;
  grid-template-columns: 220px 330px minmax(0, 1fr);
  min-height: 470px;
}

.wm-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-input);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wm-folder-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}
.wm-folder-btn:hover { background: var(--bg-hover); color: var(--text); }
.wm-folder-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--text);
}
.wm-folder-left { display: inline-flex; align-items: center; gap: 8px; }
.wm-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.wm-folder-btn.active .wm-count { background: var(--accent); border-color: var(--accent); color: #fff; }

.wm-alias-box {
  margin-top: auto;
  padding: 10px 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.wm-alias-title { font-size: 11.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 4px; }
.wm-alias-addr { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-text); word-break: break-all; }

.wm-list {
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
}
.wm-list-hdr {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}
.wm-items { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.wm-item {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wm-item:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.wm-item.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.wm-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.wm-item-subj { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-item-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.wm-item-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wm-item-from { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-code-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: #ffffff;
  flex-shrink: 0;
}
.wm-item-to { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wm-reader {
  padding: 18px 20px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.wm-reader-hdr {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wm-reader-subj { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.35; }
.wm-reader-meta {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 4px 10px;
  font-size: 13px;
}
.wm-meta-k { color: var(--text-muted); font-weight: 600; }
.wm-meta-v { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); word-break: break-all; }

.wm-otp-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.wm-otp-left { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wm-otp-label { font-size: 13px; font-weight: 700; color: var(--text); }
.wm-otp-code { font-family: var(--font-mono); font-size: 21px; font-weight: 800; letter-spacing: 3px; color: var(--accent-text); }

.wm-reader-body {
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
}

/* Metrics Strip */
.metrics-strip { padding: 8px 0 56px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.metric-val { font-family: var(--font-mono); font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.metric-lbl { font-size: 13px; color: var(--text-dim); }

/* Sections */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 8px;
}
.section-head h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.025em; }
.section-head p { margin: 0; color: var(--text-dim); font-size: 15.5px; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: border-color 0.16s, transform 0.16s;
}
.feature-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.feature-card p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.65; }

/* Security Split */
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.sec-points { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.sec-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sec-point-icon { color: var(--ok-text); flex-shrink: 0; margin-top: 2px; }
.sec-point h4 { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; }
.sec-point p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.dns-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.dns-card-hdr {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}
.dns-rows { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.dns-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}
.dns-row-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dns-name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; }
.dns-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verified-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  color: var(--ok-text);
  flex-shrink: 0;
}

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-surface) 38%);
}
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { font-size: 18px; font-weight: 800; margin: 0; }
.plan-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.plan-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--text-dim); }
.plan-desc { margin: 0; font-size: 14px; color: var(--text-dim); }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); }
.plan-list svg { color: var(--ok-text); flex-shrink: 0; }

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq-q {
  width: 100%;
  padding: 16px 18px;
  background: transparent;
  border: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
.faq-q svg { transition: transform 0.18s; color: var(--text-dim); flex-shrink: 0; }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--accent-hover); }
.faq-a { display: none; padding: 0 18px 16px; color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* Bottom CTA & Footer */
.cta-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 28px;
  text-align: center;
}
.cta-banner h2 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.cta-banner p { margin: 0 auto 22px; max-width: 560px; color: var(--text-dim); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-links button {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-dim);
  font-size: 13px;
}
.footer-links button:hover { color: var(--text); text-decoration: underline; }

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-hdr {
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-hdr h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px; font-size: 14px; color: var(--text-dim); line-height: 1.7; }
.modal-email-box {
  margin: 14px 0;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal-email-addr { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  z-index: 99;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.18s, transform 0.18s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .webmail-grid { grid-template-columns: 185px 280px minmax(0, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .security-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .webmail-grid { grid-template-columns: minmax(0, 1fr); }
  .wm-sidebar { border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .wm-folder-btn { width: auto; flex: 1 1 135px; min-width: 0; }
  .wm-alias-box { display: none; }
  .wm-list, .wm-items, .wm-item, .wm-reader { min-width: 0; max-width: 100%; }
  .wm-list { border-right: none; border-bottom: 1px solid var(--border); }
  .feature-grid { grid-template-columns: 1fr; }
  .shield-badge { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-actions .btn-portal { display: none; }
  .status-pill { font-size: 11.5px; padding: 5px 10px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 32px; }
  .hero-cta .btn-lg { width: 100%; }
}
