@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:wght@400;500&display=swap');

:root {
  --navy:        #0b1426;
  --blue:        #2563eb;
  --blue-hover:  #1d4ed8;
  --blue-light:  #eff6ff;
  --blue-pale:   #f0f7ff;
  --page-bg:     #f7f9fc;
  --surface:     #ffffff;
  --surface-2:   #f1f5f9;
  --border:      #e2e8f0;
  --border-2:    #cbd5e1;
  --text-1:      #0b1426;
  --text-2:      #4a5568;
  --text-3:      #94a3b8;
  --text-4:      #cbd5e1;
  --success:     #059669;
  --success-bg:  #ecfdf5;
  --warning:     #d97706;
  --warning-bg:  #fffbeb;
  --danger:      #dc2626;
  --danger-bg:   #fef2f2;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.10);
  --t:           0.16s ease;
  --max-w:       1140px;
  --font-head:   'Outfit', system-ui, sans-serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--text-1);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--blue-hover); }
button, input, select, textarea { font-family: inherit; }
main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Nav ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-logo-icon {
  width: 32px; height: 32px;
  background: var(--navy);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 18px; height: 18px; }
.nav-logo-text {
  font-family: var(--font-head);
  font-size: 17px; font-weight: 700;
  color: var(--navy); letter-spacing: -0.3px;
}
.nav-logo-text span { color: var(--blue); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--navy); background: var(--surface-2); text-decoration: none; }
.nav-link.active { color: var(--navy); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.nav-badge--active { background: var(--success-bg); border-color: #a7f3d0; color: var(--success); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ── Hero Section ─────────────────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 0;
  align-items: center;
  min-height: 520px;
  padding: 60px 0 40px;
  background: linear-gradient(180deg, #f0f5ff 0%, #f7f9fc 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-bg-left,
.hero-bg-right {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  opacity: 0.85;
}
.hero-bg-right { align-items: flex-end; }
.hero-float-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 178px;
}
.hfc-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.hfc-value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.hfc-sub { font-size: 10px; color: var(--text-3); margin-top: 3px; }

.hero-center { text-align: center; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: var(--blue-light); border: 1.5px solid #bfdbfe;
  border-radius: 24px;
  font-size: 11px; font-weight: 700; color: var(--blue);
  margin-bottom: 24px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--navy);
  margin-bottom: 18px;
}
.hero-h1 span { color: var(--blue); }
.hero-sub {
  font-size: 17px;
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.65;
}
.hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 40px;
}
.hero-stats {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-stat {
  padding: 16px 28px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num {
  font-family: var(--font-head);
  font-size: 24px; font-weight: 800;
  color: var(--navy); line-height: 1;
}
.hero-stat-label { font-size: 11px; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* ── Usage strip ──────────────────────────────────────────── */
.usage-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 32px 0 44px;
  font-size: 14px; box-shadow: var(--shadow-sm);
}
.usage-strip-left { color: var(--text-2); }
.usage-strip-left strong { color: var(--navy); font-weight: 700; }
.usage-strip-right { color: var(--blue); font-weight: 600; cursor: pointer; font-size: 13px; }
.usage-strip-right:hover { color: var(--blue-hover); }

/* ── Category ─────────────────────────────────────────────── */
.category-section { margin-bottom: 44px; }
.category-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.category-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px;
  background: var(--navy); border-radius: 20px;
  font-size: 11px; font-weight: 700; color: #fff;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.category-line { flex: 1; height: 1px; background: var(--border); }

/* ── Tool Grid ────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.tool-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.tool-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(37,99,235,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.tool-card-icon {
  width: 38px; height: 38px;
  background: var(--blue-pale); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.tool-card-icon svg { color: var(--blue); }
.tool-card-name {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600;
  color: var(--navy); line-height: 1.3;
}
.tool-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }

/* Tags */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.tag-ai    { background: #eef2ff; color: #4338ca; }
.tag-calc  { background: var(--success-bg); color: #065f46; }
.tag-gen   { background: var(--warning-bg); color: #92400e; }
.tag-check { background: #fdf4ff; color: #6b21a8; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--t); border: none;
  text-decoration: none; white-space: nowrap;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 1px 4px rgba(37,99,235,0.25);
}
.btn-primary:hover { background: var(--blue-hover); color: #fff; text-decoration: none; box-shadow: 0 4px 14px rgba(37,99,235,0.35); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; border: 1.5px solid var(--border-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.btn-full { width: 100%; }
.btn-loading { pointer-events: none; opacity: 0.65; }
.btn-sm { padding: 7px 15px; font-size: 13px; }

/* ── Tool page ────────────────────────────────────────────── */
.tool-page { padding: 48px 0 80px; }
.tool-page-inner { max-width: 700px; margin: 0 auto; }
.tool-breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 28px; display: flex; align-items: center; gap: 6px; }
.tool-breadcrumb a { color: var(--text-3); }
.tool-breadcrumb a:hover { color: var(--blue); }
.tool-title { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; margin-bottom: 10px; }
.tool-desc { font-size: 16px; color: var(--text-2); line-height: 1.65; margin-bottom: 28px; }

/* ── Form ─────────────────────────────────────────────────── */
.tool-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-1); }
.form-label span { font-weight: 400; color: var(--text-3); margin-left: 4px; }
.form-input, .form-textarea, .form-select {
  padding: 11px 14px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: 14px; color: var(--text-1);
  transition: border-color var(--t), box-shadow var(--t); width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-4); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.65; }
.form-hint { font-size: 12px; color: var(--text-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Result ───────────────────────────────────────────────── */
.result-box { margin-top: 22px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.result-header { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-3); background: var(--surface-2); letter-spacing: 0.06em; text-transform: uppercase; }
.result-body { padding: 22px; font-size: 15px; line-height: 1.8; color: var(--text-1); white-space: pre-wrap; word-break: break-word; }
.result-copy { font-size: 11px; padding: 4px 11px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-2); background: white; cursor: pointer; color: var(--text-2); font-weight: 700; transition: all var(--t); text-transform: uppercase; letter-spacing: 0.03em; }
.result-copy:hover { background: var(--navy); color: white; border-color: var(--navy); }
.result-copy.copied { background: var(--success); color: white; border-color: var(--success); }

/* ── Usage bar ────────────────────────────────────────────── */
.usage-bar-wrap { background: var(--blue-pale); border: 1.5px solid #bfdbfe; border-radius: var(--radius-md); padding: 11px 16px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.usage-label { color: var(--text-2); }
.usage-label strong { color: var(--navy); font-weight: 700; }
.usage-unlock { color: var(--blue); cursor: pointer; font-weight: 600; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 16px; border: 1.5px solid; line-height: 1.65; }
.alert-error   { background: var(--danger-bg);  border-color: #fca5a5; color: #991b1b; }
.alert-success { background: var(--success-bg); border-color: #a7f3d0; color: #065f46; }
.alert-info    { background: var(--blue-light);  border-color: #bfdbfe; color: #1e40af; }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner { width: 15px; height: 15px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(11,20,38,0.55); backdrop-filter: blur(6px); z-index: 1000; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 32px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); }
.modal h2 { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--text-2); margin-bottom: 20px; line-height: 1.6; }
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-error { font-size: 12px; color: var(--danger); display: none; }
.modal-privacy { font-size: 11px; color: var(--text-3); text-align: center; }
.modal-icon { width: 46px; height: 46px; background: var(--blue-light); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }

/* ── CTA section ──────────────────────────────────────────── */
.cta-section { text-align: center; padding: 72px 0 56px; border-top: 1px solid var(--border); margin-top: 40px; }
.cta-label { display: inline-block; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px; }
.cta-title { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--navy); margin-bottom: 10px; letter-spacing: -0.4px; }
.cta-sub { font-size: 15px; color: var(--text-2); margin-bottom: 26px; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: auto; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--navy); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-2); font-weight: 500; }
.footer-links a:hover { color: var(--navy); }
.footer-legal { font-size: 12px; color: var(--text-3); }
.footer-legal a { color: var(--text-3); }
.footer-legal a:hover { color: var(--blue); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-bg-left, .hero-bg-right { display: none; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-stats { flex-direction: column; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-stat:last-child { border-bottom: none; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .tools-grid { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}
