/*
  DemandBird Tools — Shared Design System
  ========================================
  Import this file into every tool page for consistent branding.
  Each tool page also needs the Google Fonts link in <head>:

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&display=swap" rel="stylesheet">
*/

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  /* Colours */
  --bg:            #FAFAF8;
  --bg-card:       #FFFFFF;
  --text:          #1A1A18;
  --text-muted:    #6B6B63;
  --text-light:    #9C9C91;
  --accent:        #E85D26;
  --accent-hover:  #D14E1A;
  --accent-soft:   #FFF0EB;
  --border:        #E8E8E3;
  --border-light:  #F0F0EB;
  --green:         #2D8A4E;
  --green-soft:    #EEFBF2;
  --blue:          #3B6FC2;
  --blue-soft:     #EEF4FF;
  --purple:        #7C5CBF;
  --purple-soft:   #F4F0FF;
  --yellow:        #B07D1E;
  --yellow-soft:   #FFF9E6;

  /* Radii */
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Typography */
  --font-display: 'Fraunces', serif;
  --font-body:    'DM Sans', sans-serif;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:  0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
  --shadow-lg:  0 4px 6px rgba(0,0,0,0.04), 0 16px 48px rgba(0,0,0,0.08);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

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


.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* Nav CTA button — must override the generic .nav-links a colour */
.nav-links .btn-primary {
  color: #FFFFFF;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}
.nav-links .btn-primary:hover { color: #FFFFFF; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 93, 38, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
}

.btn-ghost:hover { color: var(--text); background: var(--border-light); }

.btn-large { padding: 14px 32px; font-size: 16px; }
.btn-sm    { padding: 7px 16px;  font-size: 13px; }

/* =============================================
   TOOL PAGE LAYOUT
   ============================================= */
.tool-page {
  padding-top: 72px; /* nav height offset */
  min-height: 100vh;
}

.tool-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 32px 40px;
  text-align: center;
}

.tool-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-decoration: none;
}

.tool-breadcrumb:hover { color: var(--accent); }

.tool-breadcrumb svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.tool-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.tool-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.tool-description {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.tool-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card-sm { padding: 20px 24px; border-radius: var(--radius); }

.card-elevated {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label, .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.label-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 6px;
}

input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 38, 0.1);
}

input::placeholder, textarea::placeholder { color: var(--text-light); }

.input-with-suffix {
  position: relative;
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

/* =============================================
   SECTION LABELS & TYPOGRAPHY
   ============================================= */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  line-height: 1.15;
}

/* =============================================
   RESULT / SCORE DISPLAY
   ============================================= */
.result-value {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.result-unit {
  font-size: 0.45em;
  font-weight: 500;
  color: var(--text-muted);
  vertical-align: super;
  margin-left: 2px;
}

/* Benchmark colour states */
.score-excellent { color: var(--green); }
.score-good      { color: var(--blue); }
.score-average   { color: var(--yellow); }
.score-low       { color: var(--accent); }

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}

.score-badge.excellent { background: var(--green-soft);  color: var(--green); }
.score-badge.good      { background: var(--blue-soft);   color: var(--blue); }
.score-badge.average   { background: var(--yellow-soft); color: var(--yellow); }
.score-badge.low       { background: var(--accent-soft); color: var(--accent); }

/* =============================================
   PROGRESS / GAUGE BARS
   ============================================= */
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-fill.accent   { background: var(--accent); }
.progress-fill.green    { background: var(--green); }
.progress-fill.blue     { background: var(--blue); }
.progress-fill.gradient {
  background: linear-gradient(90deg, var(--accent), #FF8C5A);
}

/* =============================================
   TABS
   ============================================= */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--border-light);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* =============================================
   INFO / TOOLTIP CHIPS
   ============================================= */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* =============================================
   CTA STRIP (bottom of tool pages)
   ============================================= */
.tool-cta {
  background: var(--text);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  margin-top: 64px;
}

.tool-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(232, 93, 38, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.tool-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  position: relative;
}

.tool-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 28px;
  position: relative;
}

.tool-cta .btn-primary {
  position: relative;
  background: white;
  color: var(--text);
}

.tool-cta .btn-primary:hover {
  background: #f0f0f0;
  box-shadow: 0 4px 16px rgba(255,255,255,0.2);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover { color: var(--text); }

.footer-links {
  display: flex;
  gap: 24px;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

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

.animate-fade-up  { animation: fadeUp 0.5s ease both; }
.animate-fade-in  { animation: fadeIn 0.4s ease both; }
.animate-scale-in { animation: scaleIn 0.4s ease both; }

/* =============================================
   UTILITY
   ============================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }

.divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  margin: 24px 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links a:not(.btn) { display: none; }

  .tool-header { padding: 48px 20px 32px; }
  .tool-container { padding-left: 20px; padding-right: 20px; }

  .tabs { width: 100%; overflow-x: auto; }
  .tab-btn { padding: 8px 14px; font-size: 13px; }

  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  .tool-cta { padding: 40px 24px; }
}
