/* ─────────────────────────────────────────
   ClosingAI Theme — main.css
   ───────────────────────────────────────── */

:root {
  --bg:       #0a0a0f;
  --bg2:      #10101a;
  --surface:  #14141f;
  --surface2: #1c1c2e;
  --border:   rgba(120,100,255,0.15);
  --accent:   #7c5cfc;
  --accent2:  #a78bfa;
  --accent3:  #06d6a0;
  --danger:   #ff4d6d;
  --warning:  #ffa552;
  --text:     #f0eeff;
  --text2:    #a09bc0;
  --text3:    #6a6680;
  --glow:     rgba(124,92,252,0.35);
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Instrument Serif', serif;
  --max-w: 1100px;
  --max-w-sm: 900px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.35;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ─── UTILITIES ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.center { text-align: center; }

.danger       { color: var(--danger); }
.danger-em    { font-style: italic; color: var(--danger); }
.section-head { margin-bottom: 56px; }

/* ─── TYPOGRAPHY ─── */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent2);
  margin-bottom: 12px; display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12; letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  font-size: 17px; color: var(--text2); max-width: 520px; line-height: 1.7;
}

.center .section-sub { margin-left: auto; margin-right: auto; }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  text-decoration: none; padding: 14px 32px;
  border-radius: 10px; font-size: 15px; font-weight: 700;
  box-shadow: 0 0 30px var(--glow);
  transition: all .2s; border: none; cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 40px var(--glow); background: #6b4de8; color: #fff; }

.btn-outline {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--text2);
  text-decoration: none; padding: 14px 32px;
  border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); transition: all .2s;
}
.btn-outline:hover { color: var(--text); border-color: rgba(124,92,252,0.5); background: rgba(124,92,252,0.05); }

/* ─── NAV ─── */
.cai-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: padding .3s;
}

.cai-nav.scrolled { padding: 12px 48px; }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 22px; color: var(--text);
  text-decoration: none;
}

.nav-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 8px var(--accent); transform: scale(1); }
  50% { box-shadow: 0 0 20px var(--accent), 0 0 40px var(--glow); transform: scale(1.2); }
}

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.nav-cta {
  background: var(--accent); color: #fff;
  padding: 9px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .2s;
  box-shadow: 0 0 20px var(--glow);
}
.nav-cta:hover { background: #6b4de8; box-shadow: 0 0 32px var(--glow); transform: translateY(-1px); color: #fff; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: all .3s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none;
  position: fixed; top: 65px; left: 0; right: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  flex-direction: column; gap: 4px;
  padding: 20px 24px 28px; z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { color: var(--text2); text-decoration: none; font-size: 16px; font-weight: 500; padding: 10px 0; border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: none; margin-top: 12px; text-align: center; }
.nav-mobile .btn-primary { color: #fff; justify-content: center; }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 100px;
  position: relative; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,92,252,0.18), transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 80%, rgba(6,214,160,0.08), transparent 60%);
}

.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 80%);
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,92,252,0.12);
  border: 1px solid rgba(124,92,252,0.3);
  padding: 6px 16px; border-radius: 100px;
  font-size: 12px; font-weight: 600; color: var(--accent2);
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  position: relative; z-index: 1;
  animation: fadeUp .8s ease both;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent3); box-shadow: 0 0 8px var(--accent3);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.06; letter-spacing: -0.025em;
  position: relative; z-index: 1;
  animation: fadeUp .8s .1s ease both;
}
.hero-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 560px; font-size: 18px; color: var(--text2);
  line-height: 1.7; margin: 24px auto 40px;
  position: relative; z-index: 1;
  animation: fadeUp .8s .2s ease both;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  position: relative; z-index: 1;
  animation: fadeUp .8s .3s ease both;
}

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text3); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  z-index: 1;
  animation: fadeUp .8s .6s ease both;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDown 2.2s infinite;
}

@keyframes scrollDown {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SECTION MASALAH ─── */
.section-masalah {
  padding: 100px 0;
  position: relative; z-index: 1;
}

.problem-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: border-color .25s, transform .25s;
}
.problem-card:hover { border-color: rgba(255,77,109,0.4); transform: translateY(-4px); }

.pc-icon  { font-size: 28px; margin-bottom: 12px; }
.pc-platform { font-family: var(--font-display); font-size: 36px; color: var(--danger); line-height: 1; margin-bottom: 8px; }
.pc-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--text2); }
.pc-desc  { font-size: 13px; color: var(--text2); line-height: 1.7; }
.pc-desc strong.danger { color: var(--danger); }

/* ─── SECTION KALKULATOR ─── */
.section-kalkulator {
  padding: 100px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 1;
}

.calc-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 60px rgba(124,92,252,0.08), 0 40px 80px rgba(0,0,0,0.4);
}

.calc-input-panel {
  padding: 40px;
  border-right: 1px solid var(--border);
}

.calc-input-panel h3, .calc-result-panel h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 24px;
  display: flex; align-items: center; gap: 8px;
}

.platform-tabs { display: flex; gap: 8px; margin-bottom: 28px; }

.ptab {
  flex: 1; padding: 10px 8px;
  border: 1px solid var(--border);
  background: transparent; border-radius: 8px;
  cursor: pointer; font-family: var(--font-body);
  font-size: 12px; font-weight: 600; color: var(--text3);
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ptab-icon { font-size: 18px; }
.ptab.active { border-color: var(--accent); background: rgba(124,92,252,0.1); color: var(--text); }
.ptab:hover:not(.active) { border-color: rgba(124,92,252,0.4); color: var(--text2); }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text2); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600; color: var(--text);
  outline: none; transition: border-color .2s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.12);
}
.form-group input::placeholder { color: var(--text3); font-weight: 400; }
.form-group select option { background: var(--bg2); }
.form-group select { cursor: pointer; }

.input-prefix { position: relative; }
.input-prefix > span {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: 13px; font-weight: 500; pointer-events: none;
}
.input-prefix input { padding-left: 40px; }

.calc-result-panel {
  padding: 40px;
  background: var(--surface2);
  display: flex; flex-direction: column;
}

.result-total-loss {
  background: rgba(255,77,109,0.08);
  border: 1px solid rgba(255,77,109,0.25);
  border-radius: 14px; padding: 24px;
  text-align: center; margin-bottom: 20px;
}
.rtl-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--danger); margin-bottom: 8px; }
.rtl-value { font-family: var(--font-display); font-size: 44px; color: var(--danger); line-height: 1; }
.rtl-period { font-size: 12px; color: var(--text3); margin-top: 4px; }

.breakdown-list { display: flex; flex-direction: column; gap: 10px; flex: 1; }

.breakdown-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.bi-left { display: flex; flex-direction: column; gap: 2px; }
.bi-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.bi-pct   { font-size: 11px; color: var(--text3); }
.bi-val   { font-size: 15px; font-weight: 700; color: var(--danger); }

.result-divider { height: 1px; background: var(--border); margin: 20px 0; }

.result-saving {
  background: rgba(6,214,160,0.08);
  border: 1px solid rgba(6,214,160,0.25);
  border-radius: 14px; padding: 20px; text-align: center;
}
.rs-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent3); margin-bottom: 6px; }
.rs-value { font-family: var(--font-display); font-size: 32px; color: var(--accent3); line-height: 1; }
.rs-desc  { font-size: 12px; color: var(--text2); margin-top: 8px; line-height: 1.6; }
.rs-desc strong { color: var(--accent3); }
.rs-desc a { color: var(--accent3); }

.calc-note { text-align: center; font-size: 13px; color: var(--text3); margin-top: 20px; line-height: 1.7; }
.calc-note a { color: var(--accent2); text-decoration: none; }
.calc-note a:hover { text-decoration: underline; }

/* ─── SECTION SOLUSI ─── */
.section-solusi {
  padding: 100px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}

.features-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: all .25s;
  position: relative; overflow: hidden;
}
.feat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  opacity: 0; transition: opacity .25s;
}
.feat-card:hover { border-color: rgba(124,92,252,0.3); transform: translateY(-4px); }
.feat-card:hover::before { opacity: 1; }

.feat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(124,92,252,0.12);
  border: 1px solid rgba(124,92,252,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.feat-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.feat-desc  { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* ─── SECTION PERBANDINGAN ─── */
.section-perbandingan {
  padding: 100px 0;
  position: relative; z-index: 1;
}
.section-perbandingan .container { max-width: var(--max-w-sm); }

.compare-table {
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  margin-top: 48px;
}

.ct-head {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  background: var(--surface2);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.ct-head div { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ct-head div:first-child { color: var(--text2); text-align: left; }
.col-danger  { color: var(--danger) !important; text-align: center; }
.col-warning { color: var(--warning) !important; text-align: center; }
.col-green   { color: var(--accent3) !important; text-align: center; }

.ct-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center; transition: background .15s;
}
.ct-row:last-child { border-bottom: none; }
.ct-row:hover { background: rgba(124,92,252,0.04); }
.ct-row div:first-child { font-size: 14px; font-weight: 500; text-align: left; }
.ct-row div { text-align: center; font-size: 14px; }

.tick  { color: var(--accent3); font-size: 16px; font-weight: 700; }
.cross { color: var(--danger); font-size: 14px; }
.warn  { color: var(--warning); font-size: 13px; font-weight: 600; }

.compare-note {
  font-size: 13px; color: var(--text3); margin-top: 16px; text-align: center;
}
.compare-note a { color: var(--accent2); text-decoration: none; }
.compare-note a:hover { text-decoration: underline; }

/* ─── CTA ─── */
.section-cta {
  padding: 120px 24px;
  text-align: center;
  position: relative; overflow: hidden; z-index: 1;
}
.cta-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(124,92,252,0.15), transparent 70%);
}
.cta-actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  position: relative; z-index: 1;
}

/* ─── FOOTER ─── */
.cai-footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  position: relative; z-index: 1;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 20px; color: var(--text);
  text-decoration: none;
}
.footer-copy { font-size: 12px; color: var(--text3); text-align: center; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text3); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text2); }

/* ─── HIDE WORDPRESS ADMIN BAR SPACE ─── */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }
body.admin-bar .cai-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .cai-nav { top: 46px; } }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .cai-nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .calc-wrap { grid-template-columns: 1fr; }
  .calc-input-panel { border-right: none; border-bottom: 1px solid var(--border); padding: 28px; }
  .calc-result-panel { padding: 28px; }

  .problem-grid,
  .features-grid { grid-template-columns: 1fr; }

  .ct-head, .ct-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; padding: 12px 16px; }
  .ct-head div, .ct-row div { font-size: 11px; }

  .cai-footer { flex-direction: column; text-align: center; padding: 32px 24px; }
  .footer-links { justify-content: center; }
}

@media (max-width: 600px) {
  .hero { padding: 100px 20px 80px; }
  .section-masalah, .section-solusi, .section-perbandingan { padding: 72px 0; }
  .section-kalkulator { padding: 72px 0; }
  .section-cta { padding: 80px 20px; }

  .ct-head, .ct-row { grid-template-columns: 1.2fr 1fr 1fr; }
  /* Hide Tokopedia column on mobile */
  .ct-head div:nth-child(3), .ct-row div:nth-child(3) { display: none; }
  .col-warning { display: none; }
}
