*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --accent: #eab308;
  --accent-hover: #ca8a04;
  --accent-light: #fef9c3;
  --text: #0f172a;
  --muted: #64748b;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.88em; background: var(--accent-light); color: #854d0e; padding: 1px 5px; border-radius: 4px; }

/* ── NAV ─────────────────────────────────────────────────────── */
.navbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; height: 60px; background: rgba(248,250,252,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-logo { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.nav-logo span { color: var(--accent); }

/* ── HERO ────────────────────────────────────────────────────── */
.hero { padding: 100px 20px 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%); width: 900px; height: 500px; background: radial-gradient(ellipse, rgba(234,179,8,0.12) 0%, transparent 65%); pointer-events: none; }
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.hero-badge { display: inline-block; background: var(--accent-light); border: 1px solid rgba(234,179,8,0.35); color: #854d0e; font-size: 0.8rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin-bottom: 24px; letter-spacing: 0.04em; text-transform: uppercase; }

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 20px; color: var(--text); }
.gradient-text { background: linear-gradient(135deg, #eab308, #ca8a04); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto 32px; line-height: 1.7; }
.hero-sub strong { color: var(--text); }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 48px; }
.hero-note { font-size: 0.8rem; color: var(--muted); }

.hero-stats { display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 32px; box-shadow: var(--shadow); }
.hstat { display: flex; flex-direction: column; align-items: center; padding: 0 28px; }
.hstat strong { font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, #eab308, #ca8a04); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hstat span { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.hstat-div { width: 1px; height: 36px; background: var(--border); }

/* ── SECTIONS ────────────────────────────────────────────────── */
.section-inner { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section-inner--narrow { max-width: 720px; }
.section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; text-align: center; margin-bottom: 48px; letter-spacing: -0.02em; color: var(--text); }

/* ── FEATURES ────────────────────────────────────────────────── */
.features { padding: 80px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.feature-card:hover { border-color: rgba(234,179,8,0.4); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feat-icon { font-size: 1.8rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ── TOOL ────────────────────────────────────────────────────── */
.tool-section { padding: 80px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow); }

/* category tabs */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.cat-tab { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1.5px solid var(--border); color: var(--muted); font-size: 0.85rem; font-weight: 600; padding: 9px 16px; border-radius: 9px; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.cat-tab:hover { color: var(--text); border-color: #94a3b8; }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* converter card */
.converter-card { display: flex; align-items: center; gap: 14px; max-width: 640px; margin-left: auto; margin-right: auto; }
.conv-row { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.conv-input { width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; color: var(--text); padding: 13px 16px; font-size: 1.3rem; font-weight: 700; font-family: 'SF Mono', 'Fira Code', monospace; outline: none; transition: border-color 0.15s, box-shadow 0.15s; -moz-appearance: textfield; }
.conv-input::-webkit-outer-spin-button, .conv-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.conv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234,179,8,0.12); }
.conv-select { width: 100%; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 10px; font-size: 0.85rem; font-weight: 600; outline: none; cursor: pointer; }
.swap-btn { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 1.1rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, transform 0.2s; margin-top: 18px; }
.swap-btn:hover { background: var(--accent-hover); transform: rotate(180deg); }

.result-row { max-width: 640px; margin: 0 auto; display: flex; justify-content: flex-end; }

/* reference table */
.ref-card { max-width: 640px; margin-left: auto; margin-right: auto; }
.card-label { font-size: 0.85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; display: block; }
.card-label span { color: var(--accent); }
.ref-table { display: flex; flex-direction: column; }
.ref-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.86rem; align-items: center; }
.ref-row:last-child { border-bottom: none; }
.ref-row span:first-child { font-family: 'SF Mono', 'Fira Code', monospace; color: var(--accent-hover); font-weight: 700; }
.ref-row em { color: var(--muted); font-style: normal; }
.ref-header { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ref-header span:first-child { color: var(--muted); }

/* ── HOW IT WORKS ─────────────────────────────────────────────── */
.how-section { padding: 80px 20px; border-top: 1px solid var(--border); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-light); border: 1px solid rgba(234,179,8,0.35); color: #854d0e; font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.step p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

/* ── ABOUT ───────────────────────────────────────────────────── */
.about-section { padding: 80px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.about-content { display: flex; flex-direction: column; gap: 16px; }
.about-content p { font-size: 0.95rem; color: var(--muted); line-height: 1.8; }
.about-content em { color: var(--text); font-style: italic; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-section { padding: 80px 20px; border-top: 1px solid var(--border); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; transition: border-color 0.15s; }
.faq-item:hover { border-color: rgba(234,179,8,0.35); }
.faq-item summary { padding: 18px 20px; font-weight: 600; font-size: 0.95rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; color: var(--text); }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--accent-hover); transition: transform 0.2s; font-weight: 700; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 9px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: background 0.15s, transform 0.1s, box-shadow 0.15s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(234,179,8,0.3); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: #94a3b8; background: var(--surface-2); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; font-size: 0.88rem; font-weight: 500; padding: 10px 20px; border-radius: 30px; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 999; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 60px 20px 40px; display: flex; gap: 60px; flex-wrap: wrap; }
.footer-brand { flex: 2; min-width: 220px; }
.footer-brand p { color: var(--muted); font-size: 0.88rem; margin-top: 10px; line-height: 1.7; }
.footer-home-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 0.85rem; font-weight: 600; color: var(--accent-hover); transition: color 0.15s; }
.footer-home-link:hover { color: var(--text); }
.footer-links { flex: 1; min-width: 120px; }
.footer-links h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.88rem; color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); text-align: center; padding: 20px; font-size: 0.8rem; color: var(--muted); background: var(--surface-2); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .navbar { padding: 0 20px; }
  .hero { padding: 70px 16px 60px; }
  .hero-stats { padding: 16px; flex-wrap: wrap; gap: 8px; }
  .hstat { padding: 0 10px; }
  .hstat-div { display: none; }
  .converter-card { flex-direction: column; }
  .swap-btn { margin-top: 0; transform: rotate(90deg); }
  .swap-btn:hover { transform: rotate(270deg); }
  .ref-row { grid-template-columns: 70px 1fr; }
  .footer-inner { gap: 32px; }
}
