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

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-light: #dcfce7;
  --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; }

/* ── 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.2rem; font-weight: 800; color: var(--text); }
.nav-logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-live { font-size: 0.75rem; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }

/* ── 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; }
.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(22,163,74,0.3); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ── HERO ── */
.hero { padding: 80px 20px 70px; 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(22,163,74,0.09) 0%, transparent 65%); pointer-events: none; }
.hero-inner { position: relative; max-width: 900px; margin: 0 auto; }

.hero-badge { display: inline-block; background: var(--accent-light); border: 1px solid rgba(22,163,74,0.35); color: var(--accent); font-size: 0.78rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin-bottom: 20px; letter-spacing: 0.04em; }

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px; }
.gradient-text { background: linear-gradient(135deg, #16a34a, #059669, #0d9488); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-sub { font-size: 1.05rem; color: var(--muted); max-width: 580px; margin: 0 auto 36px; line-height: 1.7; }
.hero-sub strong { color: var(--text); }

/* Hero rate cards */
.hero-rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.hrate-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.hrate-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hrate-top { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; }
.hrate-flag { font-size: 1.4rem; }
.hrate-code { font-size: 0.85rem; font-weight: 800; color: var(--muted); letter-spacing: 0.06em; }
.hrate-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; }
.hrate-value { font-size: 1.25rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.hrate-value.loading { color: var(--border); }

.hero-timestamp { font-size: 0.78rem; color: var(--muted); }

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

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

/* ── CONVERTER ── */
.converter-section { padding: 70px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.converter-card { max-width: 560px; margin: 0 auto; }

.conv-row { display: flex; gap: 14px; align-items: flex-end; }
.conv-field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.conv-field-select { flex: 1.2; }
.conv-label { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.conv-input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 1.2rem; font-weight: 700; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.conv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,0.12); }

.conv-select { width: 100%; padding: 13px 36px 13px 14px; border: 1.5px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 0.88rem; font-weight: 500; cursor: pointer; outline: none; transition: border-color 0.15s, box-shadow 0.15s; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-color: var(--bg); }
.conv-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,0.12); }

.conv-swap-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.conv-divider { flex: 1; height: 1px; background: var(--border); }
.conv-swap-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.conv-swap-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.conv-result-field { flex: 1; }
.conv-result { width: 100%; padding: 13px 16px; border: 1.5px solid var(--accent-light); border-radius: 9px; background: var(--accent-light); color: var(--accent); font-size: 1.2rem; font-weight: 800; min-height: 52px; display: flex; align-items: center; }

.conv-rate-line { margin-top: 16px; font-size: 0.8rem; color: var(--muted); text-align: center; line-height: 1.7; min-height: 1.2em; }

/* ── RATES TABLE ── */
.table-section { padding: 70px 20px; border-top: 1px solid var(--border); }
.table-card { padding: 0; overflow: hidden; }
.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th { padding: 12px 20px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.th-rate, .th-inverse { text-align: right; }
.rate-row { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.rate-row:last-child { border-bottom: none; }
.rate-row:hover { background: var(--bg); }
.rate-flag-cell { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.rate-flag { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.rate-code { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.rate-name { font-size: 0.78rem; color: var(--muted); }
.rate-idr { text-align: right; padding: 14px 20px; font-size: 1rem; font-weight: 700; color: var(--text); }
.rate-inverse { text-align: right; padding: 14px 20px; font-size: 0.82rem; color: var(--muted); }
.table-loading { text-align: center; padding: 40px; color: var(--muted); font-size: 0.9rem; }
.table-note { margin-top: 14px; font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

/* ── INFO ── */
.info-section { padding: 70px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.info-icon { font-size: 1.8rem; margin-bottom: 12px; }
.info-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.info-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ── FAQ ── */
.faq-section { padding: 70px 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(22,163,74,0.3); }
.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; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--accent); font-weight: 700; transition: transform 0.2s; flex-shrink: 0; }
.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; }
.faq-item strong { color: var(--text); }

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 900px; margin: 0 auto; padding: 56px 20px 36px; display: flex; gap: 48px; flex-wrap: wrap; }
.footer-brand { flex: 2; min-width: 220px; }
.footer-brand p { color: var(--muted); font-size: 0.85rem; margin-top: 10px; line-height: 1.7; }
.footer-home-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 0.83rem; font-weight: 600; color: var(--accent); }
.footer-home-link:hover { color: var(--accent-hover); }
.footer-links { flex: 1; min-width: 120px; }
.footer-links h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; font-weight: 700; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.85rem; 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: 18px 20px; font-size: 0.78rem; color: var(--muted); background: var(--surface-2); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .navbar { padding: 0 16px; }
  .hero { padding: 60px 16px 50px; }
  .hero-rates { grid-template-columns: 1fr 1fr; }
  .conv-row { flex-direction: column; }
  .info-grid { grid-template-columns: 1fr; }
  .rate-inverse { display: none; }
  .th-inverse { display: none; }
  .footer-inner { gap: 28px; }
  .nav-live { display: none; }
}
@media (max-width: 420px) {
  .hero-rates { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hrate-value { font-size: 1.05rem; }
}
