/* ============================================
   CALCWISE — Main Stylesheet
   Design: Dark Luxury Editorial
   Fonts: Playfair Display + DM Sans
   ============================================ */

:root {
  --bg:         #0a0a0b;
  --bg-2:       #111113;
  --bg-3:       #18181c;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);
  --gold:       #ff6b2b;
  --gold-2:     #ff8c55;
  --gold-dim:   rgba(255,107,43,0.12);
  --text:       #e8e6e1;
  --text-2:     #9a9893;
  --text-3:     #5a5856;
  --white:      #ffffff;
  --success:    #3fcf8e;
  --danger:     #f0666b;
  --crypto:     #f7931a;
  --finance:    #3b82f6;
  --converter:  #8b5cf6;
  --tax:        #10b981;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.6);
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
input, button { font-family: inherit; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 2rem;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon { color: var(--gold); font-size: 1.1rem; }
.logo-accent { color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--gold-2); transform: translateY(-1px); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 1.5rem 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: block;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #ff6b2b, transparent 70%);
  top: -200px; left: -100px;
  animation: orb-float 8s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #e63946, transparent 70%);
  bottom: -100px; right: -50px;
  animation: orb-float 10s ease-in-out infinite reverse;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 20px); }
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-dim);
  border: 1px solid rgba(212,168,83,0.3);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: fade-up 0.6s ease both;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fade-up 0.6s 0.1s ease both;
}
.hero-accent {
  color: var(--gold);
  font-style: italic;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2.5rem;
  animation: fade-up 0.6s 0.2s ease both;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  animation: fade-up 0.6s 0.3s ease both;
}
.btn-primary {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--gold-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,168,83,0.3); }
.btn-ghost {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 20px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  animation: fade-up 0.6s 0.4s ease both;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1;
}
.stat span { color: var(--gold); }
.stat-label {
  font-size: 0.75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== AD ZONE ===== */
.ad-zone {
  padding: 1.5rem 24px;
  text-align: center;
}
.ad-label {
  font-size: 0.68rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.ad-placeholder {
  background: var(--bg-3);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 0.8rem;
  margin: 0 auto;
}
.ad-banner { width: 100%; max-width: 728px; height: 90px; }
.ad-rectangle { width: 300px; height: 250px; }

/* ===== TOOLS SECTION ===== */
.tools-section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.section-desc { color: var(--text-2); font-size: 1.05rem; }

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(212,168,83,0.04));
  opacity: 0;
  transition: var(--transition);
}
.tool-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tool-card:hover::before { opacity: 1; }
.tool-card.featured { border-color: rgba(212,168,83,0.3); }
.card-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.card-icon.crypto  { background: rgba(247,147,26,0.12); }
.card-icon.finance { background: rgba(59,130,246,0.12); }
.card-icon.converter { background: rgba(139,92,246,0.12); }
.card-icon.tax     { background: rgba(16,185,129,0.12); }
.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin: 4px 0 8px;
  line-height: 1.3;
}
.card-body p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.55;
}
.card-arrow {
  margin-top: auto;
  font-size: 1rem;
  color: var(--text-3);
  transition: var(--transition);
  align-self: flex-end;
}
.tool-card:hover .card-arrow { color: var(--gold); transform: translateX(4px); }

/* Hidden filter */
.tool-card.hidden { display: none; }

/* ===== FEATURED TOOL ===== */
.featured-tool {
  padding: 80px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.featured-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.featured-info .section-tag { display: block; margin-bottom: 0.75rem; }
.featured-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
}
.featured-info p { color: var(--text-2); line-height: 1.7; margin-bottom: 1.5rem; }
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.feature-list li { font-size: 0.9rem; color: var(--text-2); }
.feature-list li::first-letter { color: var(--success); }

/* ===== CALC WIDGET ===== */
.calc-widget {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.live-badge {
  font-size: 0.7rem;
  color: var(--success);
  font-family: 'JetBrains Mono', monospace;
}
.calc-body { padding: 1.5rem; }
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.input-group input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'JetBrains Mono', monospace;
  transition: var(--transition);
  width: 100%;
}
.input-group input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.calc-btn {
  width: 100%;
  background: var(--gold);
  color: #000;
  border: none;
  padding: 13px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1rem;
}
.calc-btn:hover { background: var(--gold-2); }
.calc-results {
  background: var(--bg-3);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-2);
}
.result-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--white);
}
.result-val.profit { color: var(--success); }
.result-val.loss   { color: var(--danger); }
.result-val.muted  { color: var(--text-2); }

/* ===== WHY SECTION ===== */
.why-section { padding: 80px 0; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.why-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}
.why-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.why-icon { font-size: 2rem; margin-bottom: 1rem; }
.why-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.why-card p { font-size: 0.875rem; color: var(--text-2); line-height: 1.6; }

/* ===== FAQ SECTION ===== */
.faq-section { padding: 80px 0; background: var(--bg-2); }
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item { background: var(--bg-2); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: var(--transition);
}
.faq-q:hover { color: var(--white); background: var(--bg-3); }
.faq-icon {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-q.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 1.5rem 1.25rem;
}
.faq-a p { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; }
.faq-a.open { display: block; }

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(212,168,83,0.04) 100%);
  border-top: 1px solid var(--border);
}
.cta-inner { text-align: center; max-width: 560px; margin: 0 auto; }
.cta-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.cta-text p { color: var(--text-2); margin-bottom: 2rem; }
.cta-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.cta-form input {
  flex: 1;
  min-width: 240px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 0.9rem;
}
.cta-form input:focus { outline: none; border-color: var(--gold); }
.cta-form button {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 12px 24px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.cta-form button:hover { background: var(--gold-2); }
.cta-note { font-size: 0.78rem; color: var(--text-3); }

/* ===== FOOTER ===== */
.footer {
  padding: 60px 0 32px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 240px;
  margin-bottom: 1.25rem;
}
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a {
  width: 36px; height: 36px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-2);
  transition: var(--transition);
}
.footer-socials a:hover { border-color: var(--gold); color: var(--gold); }
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col li a {
  font-size: 0.85rem;
  color: var(--text-2);
  transition: var(--transition);
}
.footer-col li a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .featured-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 120px 0 70px; }
  .hero-stats { gap: 1.5rem; }
  .faq-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
  .input-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .stat-divider { display: none; }
  .tools-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}
