/* ===================================
   CalcMyPay.CA — Main Stylesheet
   2025 Premium Design System
=================================== */

:root {
  --bg-base: #0a0c10;
  --bg-card: #111318;
  --bg-card2: #161921;
  --bg-input: #1a1e27;
  --border: #252a35;
  --border-light: #2e3444;
  --gold: #f0b429;
  --gold-light: #ffd166;
  --gold-dark: #c97d0a;
  --green: #22c55e;
  --green-dark: #16a34a;
  --orange: #fb923c;
  --blue: #60a5fa;
  --red: #f87171;
  --text-primary: #f0f2f6;
  --text-secondary: #8b92a5;
  --text-muted: #555e70;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(240,180,41,0.08);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,12,16,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 800;
  color: var(--text-primary);
  text-decoration: none; letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 8px;
}
.logo-icon { font-size: 20px; }
.logo-accent { color: var(--gold); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  color: var(--text-secondary);
  text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 8px;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold); background: rgba(240,180,41,0.08);
}

/* HERO */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse 800px 400px at 50% 0%, rgba(240,180,41,0.06) 0%, transparent 70%);
}
.hero-badge {
  display: inline-block;
  background: rgba(240,180,41,0.12);
  color: var(--gold);
  border: 1px solid rgba(240,180,41,0.3);
  border-radius: 100px;
  padding: 6px 18px; font-size: 13px; font-weight: 600;
  margin-bottom: 28px; letter-spacing: 0.3px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, #ff9f43 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 32px; line-height: 1.7;
}
.trust-bar {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
}
.trust-bar span {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  color: var(--green);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
}

/* CALCULATOR SECTION */
.calculator-section { padding: 40px 0 80px; }
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* CARDS */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow), var(--shadow-glow);
}
.card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
}
.card-icon { font-size: 24px; }

/* FORM STYLES */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 20px; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 16px;
}
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.required { color: var(--gold); }
input[type="number"], select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.15);
}
.input-wrap { position: relative; }
.input-wrap.dollar::before {
  content: '$';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 15px; font-weight: 600;
  pointer-events: none; z-index: 1;
}
.input-wrap.dollar input { padding-left: 26px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b92a5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }
.hint { display: block; font-size: 11px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }

/* CALCULATE BUTTON */
.calc-btn {
  width: 100%; padding: 16px 24px;
  background: linear-gradient(135deg, var(--gold) 0%, #ff9f43 100%);
  color: #0a0c10; font-family: var(--font-head);
  font-size: 16px; font-weight: 700; letter-spacing: 0.3px;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 20px rgba(240,180,41,0.35);
}
.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(240,180,41,0.45);
}
.calc-btn:active { transform: translateY(0); }

/* RESULTS CARD */
.results-card { position: sticky; top: 90px; }
.take-home-hero {
  background: linear-gradient(135deg, rgba(240,180,41,0.1), rgba(255,159,67,0.06));
  border: 1px solid rgba(240,180,41,0.2);
  border-radius: var(--radius-sm);
  padding: 28px; text-align: center; margin-bottom: 20px;
}
.take-home-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 8px; }
.take-home-amount {
  font-family: var(--font-head);
  font-size: 52px; font-weight: 800; letter-spacing: -2px;
  color: var(--gold); line-height: 1;
  margin-bottom: 8px;
}
.take-home-period { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.annual-strip {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; margin-bottom: 24px;
}
.annual-item {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 12px; text-align: center;
}
.annual-lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 5px; }
.annual-val { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.annual-val.green { color: var(--green); }
.annual-val.orange { color: var(--orange); }

.breakdown-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); margin-bottom: 12px; font-weight: 700;
}

/* BREAKDOWN TABLE */
.breakdown-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 24px; }
.breakdown-row {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 8px; padding: 9px 14px; font-size: 13px;
  align-items: center;
}
.breakdown-row span:not(:first-child) { text-align: right; min-width: 70px; }
.header-row {
  background: var(--bg-card2); border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted);
}
.gross-row { background: rgba(96,165,250,0.06); font-weight: 600; border-bottom: 1px solid var(--border); }
.category { background: rgba(255,255,255,0.02); color: var(--text-secondary); font-weight: 600; border-top: 1px solid var(--border); font-size: 12px; }
.sub { color: var(--text-secondary); }
.sub:hover { background: rgba(255,255,255,0.02); }
.net-row {
  background: rgba(34,197,94,0.08);
  border-top: 2px solid rgba(34,197,94,0.3);
  font-weight: 700; color: var(--green); font-size: 14px;
}
.breakdown-group:last-of-type .sub { border-bottom: none; }

/* TAX VISUAL */
.tax-visual { background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; margin-bottom: 16px; }
.tax-visual-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 14px; }
.tax-bars { display: flex; height: 28px; border-radius: 8px; overflow: hidden; margin-bottom: 14px; gap: 2px; }
.tax-bar { height: 100%; transition: all 0.6s cubic-bezier(0.34,1.56,0.64,1); border-radius: 4px; }
.tax-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.disclaimer {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; font-size: 11px;
  color: var(--text-muted); line-height: 1.5;
}

/* EXPLAINER SECTION */
.explainer-section { padding: 80px 0; background: rgba(255,255,255,0.01); }
.section-title {
  font-family: var(--font-head); font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; letter-spacing: -1px; text-align: center; margin-bottom: 12px;
}
.section-sub { text-align: center; color: var(--text-secondary); font-size: 17px; margin-bottom: 48px; }
.explainer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.explainer-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.explainer-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.exp-icon { font-size: 36px; margin-bottom: 16px; }
.explainer-card h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.3px; }
.explainer-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 14px; }
.rate-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rate-chips span {
  background: rgba(96,165,250,0.1); color: var(--blue);
  border: 1px solid rgba(96,165,250,0.2);
  padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.rate-chips.ca span { background: rgba(240,180,41,0.1); color: var(--gold); border-color: rgba(240,180,41,0.25); }
.tax-fact {
  background: rgba(240,180,41,0.08); border: 1px solid rgba(240,180,41,0.2);
  color: var(--gold); border-radius: 8px; padding: 8px 12px;
  font-size: 12px; font-weight: 600; text-align: center;
}

/* FAQ SECTION */
.faq-section { padding: 80px 0; }
.faq-grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item.open { border-color: rgba(240,180,41,0.3); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; cursor: pointer; gap: 16px;
  font-size: 15px; font-weight: 600;
  transition: color 0.2s;
}
.faq-item.open .faq-q { color: var(--gold); }
.faq-arrow {
  color: var(--text-muted); transition: transform 0.3s;
  font-size: 12px; flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--gold); }
.faq-a {
  display: none; padding: 0 22px 18px;
  color: var(--text-secondary); font-size: 14px; line-height: 1.75;
  border-top: 1px solid var(--border);
}
.faq-item.open .faq-a { display: block; }

/* BLOG SECTION */
.blog-section { padding: 80px 0; background: rgba(255,255,255,0.01); }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.blog-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240,180,41,0.3);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 20px rgba(240,180,41,0.05);
}
.blog-cat {
  display: inline-block; background: rgba(240,180,41,0.1); color: var(--gold);
  border: 1px solid rgba(240,180,41,0.25); padding: 4px 12px;
  border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  align-self: flex-start;
}
.blog-card h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.3; }
.blog-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; flex: 1; }
.blog-read { font-size: 13px; font-weight: 600; color: var(--gold); margin-top: 4px; }

/* FOOTER */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand .logo { font-size: 20px; margin-bottom: 12px; display: inline-flex; }
.footer-brand p { font-size: 14px; color: var(--text-secondary); max-width: 300px; line-height: 1.6; }
.footer-links { display: flex; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col strong { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; }
.footer-bottom p { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

/* BLOG PAGE STYLES */
.blog-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 600px 300px at 50% 0%, rgba(240,180,41,0.04) 0%, transparent 70%);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-secondary); text-decoration: none; font-size: 14px;
  margin-bottom: 24px; transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }
.blog-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.blog-meta .blog-cat { font-size: 12px; }
.blog-meta span { color: var(--text-muted); font-size: 13px; }
.blog-hero h1 {
  font-family: var(--font-head); font-size: clamp(32px, 5vw, 52px);
  font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 16px;
}
.blog-hero .hero-sub { text-align: left; margin: 0; font-size: 17px; }
.blog-content { max-width: 760px; margin: 0 auto; padding: 60px 24px; }
.blog-content h2 { font-family: var(--font-head); font-size: 28px; font-weight: 800; margin: 40px 0 16px; letter-spacing: -0.5px; }
.blog-content h3 { font-family: var(--font-head); font-size: 21px; font-weight: 700; margin: 30px 0 12px; }
.blog-content p { font-size: 16px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 18px; }
.blog-content ul, .blog-content ol { color: var(--text-secondary); padding-left: 24px; margin-bottom: 18px; }
.blog-content li { font-size: 16px; line-height: 1.8; margin-bottom: 8px; }
.blog-content strong { color: var(--text-primary); }
.blog-content a { color: var(--gold); }
.blog-content .info-box {
  background: rgba(240,180,41,0.07); border: 1px solid rgba(240,180,41,0.2);
  border-left: 3px solid var(--gold); border-radius: var(--radius-sm);
  padding: 20px 22px; margin: 28px 0;
}
.blog-content .info-box p { margin: 0; color: var(--text-primary); }
.blog-table { width: 100%; border-collapse: collapse; margin: 24px 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.blog-table th { background: var(--bg-card2); color: var(--gold); font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.blog-table td { padding: 12px 16px; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:hover td { background: rgba(255,255,255,0.02); }
.cta-box {
  background: linear-gradient(135deg, rgba(240,180,41,0.1), rgba(255,159,67,0.06));
  border: 1px solid rgba(240,180,41,0.25); border-radius: var(--radius);
  padding: 36px; text-align: center; margin: 48px 0 0;
}
.cta-box h3 { font-family: var(--font-head); font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.cta-box p { color: var(--text-secondary); margin-bottom: 24px; font-size: 15px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--gold), #ff9f43);
  color: #0a0c10; font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  padding: 14px 32px; border-radius: var(--radius-sm);
  text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(240,180,41,0.35);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(240,180,41,0.45); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
  .results-card { position: static; }
  .explainer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .header-inner { flex-direction: column; gap: 12px; }
  .main-nav { justify-content: center; }
  .hero { padding: 48px 0 40px; }
  .calc-card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .annual-strip { grid-template-columns: 1fr; gap: 8px; }
  .explainer-grid { grid-template-columns: 1fr; }
  .take-home-amount { font-size: 40px; }
  .footer-links { flex-direction: column; gap: 24px; }
}

/* SMOOTH ANIMATION FOR RESULTS */
.results-card { transition: opacity 0.3s; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-animate { animation: fadeSlideIn 0.4s ease forwards; }
