/* ==========================================================================
   Invoice for Trades - Premium Design System (Mobile-First Vanilla CSS)
   ========================================================================== */

:root {
  /* Brand Colors - Contractor / Trade Tech */
  --color-primary: #0f172a;       /* Deep Navy */
  --color-primary-light: #1e293b;
  --color-accent: #ff5e14;        /* Electric Trade Orange / Amber */
  --color-accent-hover: #e04e0b;
  --color-accent-subtle: #fff4ed;
  --color-blue: #2563eb;          /* Trust Blue */
  --color-blue-subtle: #eff6ff;
  --color-success: #10b981;
  
  /* Neutrals */
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-card: #ffffff;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-white: #ffffff;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Layout & Spacing */
  --container-max: 1140px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-accent: 0 10px 20px -5px rgba(255, 94, 20, 0.28);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Section Header Shared */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-subtle);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 94, 20, 0.15);
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: none;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: var(--color-white) !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-header:hover {
  background: var(--color-accent);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 4.5rem 0;
  background: radial-gradient(circle at 50% 0%, #fff7ed 0%, #ffffff 70%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 850;
  line-height: 1.18;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-title .highlight {
  color: var(--color-accent);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.btn-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #000000;
  color: #ffffff !important;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn-play-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(255, 94, 20, 0.35);
}

.play-badge-icon {
  width: 28px;
  height: 28px;
}

.play-badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.play-badge-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

.play-badge-main {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.1;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
  max-width: 500px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Phone Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-mockup-frame {
  position: relative;
  width: 270px;
  border: 10px solid #0f172a;
  border-radius: 40px;
  background: #0f172a;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.phone-notch {
  width: 110px;
  height: 20px;
  background: #0f172a;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.phone-screen {
  background: #ffffff;
  border-radius: 30px;
  overflow: hidden;
  height: 540px;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section: Target Trades */
.trades-section {
  padding: 5rem 0;
  background-color: var(--color-bg-subtle);
}

.trades-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.trade-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.trade-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
}

.trade-icon {
  font-size: 2rem;
  flex-shrink: 0;
  background: var(--color-bg-subtle);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.trade-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.trade-info p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Section: Features */
.features-section {
  padding: 5rem 0;
  background-color: var(--color-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.2s ease;
}

.feature-card:hover {
  background: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.feature-card-icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--color-primary);
  margin-bottom: 0.65rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Section: How It Works */
.how-section {
  padding: 5rem 0;
  background-color: var(--color-primary);
  color: var(--color-white);
}

.how-section .badge {
  background: rgba(255, 94, 20, 0.2);
  color: #ff9153;
  border-color: rgba(255, 94, 20, 0.3);
}

.how-section .section-title {
  color: var(--color-white);
}

.how-section .section-subtitle {
  color: #94a3b8;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  position: relative;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.65rem;
}

.step-card p {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Section: FAQ */
.faq-section {
  padding: 5rem 0;
  background-color: var(--color-bg-subtle);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent);
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  margin-top: 0.85rem;
  font-size: 0.93rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* CTA Banner */
.cta-banner {
  padding: 5rem 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--color-white);
  text-align: center;
}

.cta-banner-content {
  max-width: 650px;
  margin: 0 auto;
}

.cta-banner h2 {
  font-size: 2.2rem;
  font-weight: 850;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.05rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  background: #0b1120;
  color: #94a3b8;
  padding: 3rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}

.footer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-white);
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-link {
  color: #94a3b8;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-copy {
  color: #64748b;
  font-size: 0.82rem;
}

/* Responsive Media Queries (Desktop / Tablet enhancements) */
@media (min-width: 640px) {
  .trades-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    text-align: left;
  }
  
  .hero-content {
    text-align: left;
  }
  
  .hero-subtitle {
    margin-left: 0;
    margin-right: 0;
  }
  
  .hero-cta-group {
    align-items: flex-start;
  }
  
  .hero-stats {
    margin: 0;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .nav-links {
    display: flex;
  }
  
  .section-title {
    font-size: 2.35rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .footer-wrapper {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Language Switcher */
.lang-section {
  padding: 2.5rem 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.lang-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lang-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.lang-chip {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.lang-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(255, 94, 20, 0.06);
}

.lang-chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
}

@media (min-width: 640px) {
  .lang-wrapper {
    flex-direction: row;
    justify-content: center;
  }
}

/* ==========================================================================
   Inner Pages: Trades, Blog / Guides & Interactive Tools
   ========================================================================== */

/* Breadcrumbs */
.breadcrumb-nav {
  padding: 1rem 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
}
.breadcrumb-item a {
  color: var(--color-blue);
  text-decoration: none;
}
.breadcrumb-item a:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  color: var(--color-text-subtle);
}

/* Subpage Hero */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, var(--color-bg-subtle) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}
.page-hero .container {
  max-width: 800px;
}
.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.25;
  margin: 0.75rem 0 1rem;
}
.page-hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Article & Content Layout */
.content-section {
  padding: 3.5rem 0 5rem;
}
.prose-container {
  max-width: 780px;
  margin: 0 auto;
}
.prose h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 2.25rem 0 1rem;
  line-height: 1.3;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.75rem 0 0.75rem;
}
.prose p {
  margin-bottom: 1.25rem;
  color: #334155;
  line-height: 1.75;
  font-size: 1.05rem;
}
.prose ul, .prose ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: #334155;
  line-height: 1.75;
}
.prose li {
  margin-bottom: 0.5rem;
}

/* Backlink Banner Box */
.backlink-card {
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: var(--color-accent-subtle);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
}
.backlink-card h4 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.backlink-card p {
  margin-bottom: 1rem;
  font-size: 0.98rem;
  color: #475569;
}
.backlink-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.backlink-btn:hover {
  color: var(--color-accent-hover);
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .guides-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.guide-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-hover);
}
.guide-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 0.75rem;
}
.guide-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.guide-card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}
.guide-read-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-blue);
}

/* Calculator Tool Styles */
.calc-wrapper {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  margin: 2rem 0;
}
@media (min-width: 640px) {
  .calc-wrapper {
    padding: 2.5rem;
  }
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}
.form-group .hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text-main);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.12);
}
.calc-results {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.95rem;
}
.calc-result-row.total-row {
  border-bottom: none;
  padding-top: 1.25rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--color-border);
}
.calc-total-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-accent);
}
.calc-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

