/* ===== Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--text-body);
  margin: 0;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, .font-heading {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container-max {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(79, 70, 229, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.section { padding: 100px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 14px 0 12px; }
.section-head p { font-size: 1.05rem; color: var(--text-body); }
.btn-primary-tz {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.btn-primary-tz:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(79, 70, 229, 0.45); color: #fff; }
.btn-ghost-tz {
  background: var(--surface-white);
  color: var(--text-heading);
  border: 1px solid #E5E7EB;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn-ghost-tz:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ===== Header ===== */
.tz-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 999;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--surface-glass-border);
  transition: box-shadow var(--dur-fast) ease;
}
.tz-header.scrolled { box-shadow: var(--shadow-soft); }
.tz-header .container-max { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 16px; padding-left: 0; }
.tz-header-left { display: flex; align-items: center; gap: 14px; flex-shrink: 1; min-width: 0; }
.tz-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--text-heading); padding-left: 20px; flex-shrink: 0; }
.tz-logo .mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(155deg, #6366F1 0%, #4F46E5 45%, #06B6D4 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(79,70,229,0.4), inset 0 1px 1px rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  position: relative;
}
.tz-wordmark { letter-spacing: -0.01em; white-space: nowrap; }
.tz-wordmark .accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tz-weather {
  display: flex; align-items: center; gap: 7px;
  background: rgba(79, 70, 229, 0.07);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
}
.tz-weather.loaded { opacity: 1; transform: translateY(0); }
.tz-weather i { color: var(--color-accent); font-size: 0.95rem; flex-shrink: 0; }
.tz-weather-city { color: var(--text-muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.tz-header-right { display: flex; align-items: center; gap: 30px; flex-shrink: 0; margin-left: auto; padding-right: 20px; }
.tz-nav { display: flex; align-items: center; gap: 30px; }
.tz-nav a { font-weight: 500; font-size: 0.95rem; color: var(--text-body); position: relative; }
.tz-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--gradient-primary); transition: width var(--dur-fast) var(--ease-out);
}
.tz-nav a:hover { color: var(--text-heading); }
.tz-nav a:hover::after { width: 100%; }
.tz-burger { display: none; }

/* ===== Hero ===== */
.tz-hero {
  position: relative;
  padding: calc(var(--header-height) + 90px) 0 120px;
  overflow: hidden;
  isolation: isolate;
}
.tz-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: var(--gradient-mesh), var(--color-bg);
}
.tz-hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(17,24,39,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, black 40%, transparent 90%);
}
.tz-hero-inner { text-align: center; max-width: 780px; margin: 0 auto; position: relative; z-index: 2; }
.tz-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.08;
  margin: 22px 0 20px;
}
.tz-hero h1 .grad {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tz-hero p.lead { font-size: 1.15rem; color: var(--text-body); max-width: 560px; margin: 0 auto 40px; }

/* Signature search widget */
.tz-search-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  padding: 10px 10px 10px 26px;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: box-shadow var(--dur-mid) var(--ease-out), border-color var(--dur-mid) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tz-search-card:focus-within {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.13), var(--shadow-glass);
  transform: translateY(-1px);
}
.tz-search-card i.search-icon { color: var(--color-primary); font-size: 1.1rem; transition: transform var(--dur-mid) var(--ease-out); }
.tz-search-card:focus-within i.search-icon { transform: scale(1.1); }
.tz-search-input {
  flex: 1; border: none; background: transparent; outline: none !important;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--text-heading);
  padding: 14px 0;
}
.tz-search-input:focus, .tz-search-input:focus-visible { outline: none !important; box-shadow: none !important; }
.tz-search-input::placeholder { color: var(--text-muted); font-weight: 400; }
.tz-search-card button {
  background: var(--gradient-primary); border: none; color: #fff;
  padding: 13px 24px; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.9rem;
  white-space: nowrap;
}
.tz-hero-cta { display: flex; gap: 16px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* Search results dropdown */
.tz-search-wrap { position: relative; max-width: 560px; margin: 0 auto; }
.tz-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: var(--surface-white);
  border: 1px solid #EEF0F5;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 10px;
  text-align: left;
  max-height: 360px;
  overflow-y: auto;
  z-index: 30;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
}
.tz-search-dropdown.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.tz-search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
  animation: srFadeIn 0.32s var(--ease-out) backwards;
}
.tz-search-dropdown.open .tz-search-result:nth-child(1) { animation-delay: 0.02s; }
.tz-search-dropdown.open .tz-search-result:nth-child(2) { animation-delay: 0.05s; }
.tz-search-dropdown.open .tz-search-result:nth-child(3) { animation-delay: 0.08s; }
.tz-search-dropdown.open .tz-search-result:nth-child(4) { animation-delay: 0.11s; }
.tz-search-dropdown.open .tz-search-result:nth-child(5) { animation-delay: 0.14s; }
@keyframes srFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.tz-search-result:hover, .tz-search-result.active { background: rgba(79, 70, 229, 0.07); transform: translateX(2px); }
.tz-search-result .sr-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,70,229,0.08); color: var(--color-primary); font-size: 0.95rem;
  transition: transform var(--dur-fast) var(--ease-out);
}
.tz-search-result:hover .sr-icon { transform: scale(1.08) rotate(-4deg); }
.tz-search-result .sr-body { flex: 1; min-width: 0; }
.tz-search-result .sr-name { font-weight: 600; font-size: 0.92rem; color: var(--text-heading); }
.tz-search-result .sr-cat { font-size: 0.75rem; color: var(--text-muted); }
.tz-search-result .sr-arrow { color: var(--text-muted); font-size: 0.8rem; transition: transform var(--dur-fast) var(--ease-out); }
.tz-search-result:hover .sr-arrow { transform: translateX(3px); color: var(--color-primary); }
.tz-search-empty { padding: 22px 16px; text-align: center; color: var(--text-muted); font-size: 0.88rem; }
.tz-search-empty i { display: block; font-size: 1.4rem; margin-bottom: 8px; color: #D1D5DB; }
.tz-search-hint { padding: 8px 12px 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

/* Floating tool chips */
.tz-orbit { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tz-chip {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-white);
  border: 1px solid #EEF0F5;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-heading);
  pointer-events: auto;
  will-change: transform;
}
.tz-chip i { font-size: 0.85rem; }
.tz-chip.c1 { top: 6%;  left: 4%;  color: var(--color-primary); }
.tz-chip.c2 { top: 18%; right: 4%; color: var(--color-secondary); }
.tz-chip.c3 { bottom: 22%; left: 1%; color: var(--color-accent); }
.tz-chip.c4 { bottom: 8%; right: 8%; color: var(--color-success); }
.tz-chip.c5 { top: 46%; left: -2%; color: var(--color-primary); display: none; }
.tz-chip.c6 { top: 50%; right: -2%; color: var(--color-secondary); display: none; }

/* ===== Popular Tools / Cards ===== */
.tool-card {
  display: block;
  background: var(--surface-white);
  border: 1px solid #EEF0F5;
  border-radius: var(--radius-md);
  padding: 28px 24px;
  height: 100%;
  transition: transform var(--dur-mid) var(--ease-out), box-shadow var(--dur-mid) var(--ease-out), border-color var(--dur-mid);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: ""; position: absolute; inset: 0;
  background: var(--gradient-primary);
  opacity: 0; transition: opacity var(--dur-mid);
  z-index: 0;
}
.tool-card:hover { box-shadow: var(--shadow-card); border-color: transparent; }
.tool-card .tool-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,70,229,0.08); color: var(--color-primary);
  font-size: 1.3rem; margin-bottom: 18px;
  transition: all var(--dur-mid) var(--ease-out);
}
.tool-card:hover .tool-icon { background: var(--gradient-primary); color: #fff; transform: scale(1.08) rotate(-6deg); }
.tool-card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.tool-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 14px; }
.tool-card .tool-tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-secondary);
}
.tool-card .tool-arrow {
  position: absolute; top: 26px; right: 24px; color: var(--text-muted);
  transition: transform var(--dur-fast), color var(--dur-fast);
}
.tool-card:hover .tool-arrow { color: var(--color-primary); transform: translate(3px, -3px); }

/* ===== Categories ===== */
.cat-card {
  display: block;
  background: var(--color-dark);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  height: 100%;
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark);
}
.cat-card .cat-glow {
  position: absolute; width: 180px; height: 180px; border-radius: 50%;
  filter: blur(60px); opacity: 0.5; top: -60px; right: -60px;
}
.cat-card h3 { color: #fff; font-size: 1.15rem; margin: 16px 0 10px; }
.cat-card p { color: rgba(255,255,255,0.55); font-size: 0.86rem; margin-bottom: 18px; }
.cat-card .cat-count { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.8); display: inline-flex; align-items: center; gap: 6px; }
.cat-card .cat-icon-box {
  width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); font-size: 1.25rem; position: relative; z-index: 1;
}

/* ===== Why Choose ===== */
.why-item { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid #E9EBF2; }
.why-item:last-child { border-bottom: none; }
.why-icon {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: 14px;
  background: var(--gradient-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.why-item h4 { margin: 0 0 6px; font-size: 1.05rem; }
.why-item p { margin: 0; font-size: 0.92rem; color: var(--text-body); }
.tz-mock-window {
  background: var(--color-dark); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card);
}
.tz-mock-window .dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.tz-mock-body { background: #1A2233; border-radius: 12px; margin-top: 14px; padding: 22px; }
.tz-mock-line { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.08); margin-bottom: 12px; }

/* ===== Statistics ===== */
.tz-stats {
  background: var(--color-dark);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  position: relative;
  overflow: hidden;
}
.tz-stats::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(at 15% 20%, rgba(79,70,229,0.35), transparent 55%),
              radial-gradient(at 85% 80%, rgba(6,182,212,0.3), transparent 55%);
}
.stat-item { position: relative; z-index: 1; text-align: center; }
.stat-num {
  font-family: var(--font-heading); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 700;
  color: #fff; display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.stat-num .suffix { color: var(--color-accent); font-size: 1.6rem; }
.stat-label { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-top: 6px; font-weight: 500; }

/* ===== FAQ ===== */
.tz-faq-item {
  background: var(--surface-white);
  border: 1px solid #EEF0F5;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}
.tz-faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; cursor: pointer; font-weight: 600; color: var(--text-heading); font-size: 0.98rem;
}
.tz-faq-q i { transition: transform var(--dur-fast) var(--ease-out); color: var(--color-primary); }
.tz-faq-item.open .tz-faq-q i { transform: rotate(45deg); }
.tz-faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur-mid) var(--ease-out); }
.tz-faq-a p { padding: 0 24px 20px; margin: 0; color: var(--text-body); font-size: 0.92rem; }

/* ===== Footer ===== */
.tz-footer { background: var(--color-dark); color: rgba(255,255,255,0.65); padding: 70px 0 24px; }
.tz-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.tz-footer ul { list-style: none; padding: 0; margin: 0; }
.tz-footer li { margin-bottom: 10px; }
.tz-footer a { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: color var(--dur-fast); }
.tz-footer a:hover { color: #fff; }
.tz-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 50px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.tz-social { display: flex; gap: 10px; }
.tz-social a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
}
.tz-social a:hover { background: var(--gradient-primary); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-primary); outline-offset: 3px;
}
.tz-search-input:focus-visible { outline: none; }

/* ===== Theme + Language controls ===== */
.tz-controls { display: flex; align-items: center; gap: 10px; }
.tz-theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(79, 70, 229, 0.07);
  border: 1px solid rgba(79, 70, 229, 0.12);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tz-theme-toggle:hover { background: rgba(79, 70, 229, 0.14); transform: rotate(-12deg); }
.tz-theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .tz-theme-toggle .fa-moon { display: none; }
html[data-theme="dark"] .tz-theme-toggle .fa-sun { display: inline-block; }

.tz-lang-select-wrap { position: relative; display: flex; align-items: center; }
.tz-lang-select-wrap::after {
  content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  font-size: 0.6rem; color: var(--text-muted);
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}
.tz-lang-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(79, 70, 229, 0.07);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-pill);
  color: var(--text-heading);
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  padding: 8px 30px 8px 16px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.tz-lang-select:hover { background: rgba(79, 70, 229, 0.14); }

/* Dark-mode component touch-ups: flip literal light borders/surfaces that don't use variables */
html[data-theme="dark"] body { background: var(--color-bg); }
html[data-theme="dark"] .tz-header.scrolled { box-shadow: var(--shadow-soft); }
html[data-theme="dark"] .tz-header { border-bottom-color: rgba(255,255,255,0.06); }
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .value-card,
html[data-theme="dark"] .contact-info-card,
html[data-theme="dark"] .tz-faq-item,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .tz-search-dropdown,
html[data-theme="dark"] .tz-result,
html[data-theme="dark"] .tool-panel,
html[data-theme="dark"] .contact-form-panel,
html[data-theme="dark"] .related-chip,
html[data-theme="dark"] .btn-ghost-tz {
  border-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .tz-input,
html[data-theme="dark"] .tz-textarea,
html[data-theme="dark"] .tz-select {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-heading);
}
html[data-theme="dark"] .tz-result { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .tz-result.has-value { background: rgba(79,70,229,0.1); }
html[data-theme="dark"] .tz-chip-btn { background: var(--surface-white); border-color: rgba(255,255,255,0.1); color: var(--text-body); }
html[data-theme="dark"] .tz-stat-box { background: rgba(255,255,255,0.04); }
html[data-theme="dark"] .why-item { border-bottom-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .tz-timeline-dot { background: var(--surface-white); }
html[data-theme="dark"] .tz-copy-btn { background: var(--surface-white); border-color: rgba(255,255,255,0.1); }

/* RTL support (Urdu / Arabic) */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .tz-nav { flex-direction: row-reverse; }
html[dir="rtl"] .tz-header-left, html[dir="rtl"] .tz-header-right { flex-direction: row-reverse; }
html[dir="rtl"] .tz-search-card { padding: 10px 26px 10px 10px; }
html[dir="rtl"] .tz-hero-cta, html[dir="rtl"] .related-strip, html[dir="rtl"] .tz-btn-group { flex-direction: row-reverse; }
html[dir="rtl"] .why-item { flex-direction: row-reverse; text-align: right; }
