/* VidyaTrack marketing — matches app blue/indigo theme */
:root {
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-50: #eff6ff;
  --indigo-50: #eef2ff;
  --slate-50: #f8fafc;
  --slate-600: #475569;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --radius: 0.75rem;
}

/* Dark mode (default) */
html[data-theme='dark'],
:root {
  --text: #f1f5f9;
  --muted: #94a3b8;
  --card: #0f172a;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(15, 23, 42, 0.9);
  --body-bg: linear-gradient(135deg, var(--slate-950) 0%, var(--slate-900) 50%, #0c1222 100%);
}

html[data-theme='light'] {
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --body-bg: linear-gradient(135deg, var(--slate-50) 0%, var(--blue-50) 45%, var(--indigo-50) 100%);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--body-bg);
  line-height: 1.6;
  overflow-x: clip;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue-600);
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.nav-links {
  display: none;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.nav-demo-short {
  display: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.theme-toggle svg {
  display: none;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--blue-600);
  border-color: rgba(37, 99, 235, 0.35);
}

html[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme='light'] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme='light'] .theme-toggle .icon-moon {
  display: block;
}

@media (max-width: 767px) {
  .nav-inner {
    gap: 0.5rem;
    padding: 0.5rem 0;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-logo {
    width: 2rem;
    height: 2rem;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  .nav-actions .btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .nav-demo-long {
    display: none;
  }

  .nav-demo-short {
    display: inline;
  }

  .theme-toggle {
    width: 2rem;
    height: 2rem;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .brand {
    flex: 0 1 auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
  text-align: center;
}

.hero .container {
  position: relative;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-600);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero h1 {
  position: relative;
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero .tagline {
  position: relative;
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-sub {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 36rem;
  color: var(--muted);
}

/* Cards grid */
.grid-2 {
  display: grid;
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p,
.card li {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.tab.active {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
}

.flow-panel {
  display: none;
}

.flow-panel.active {
  display: block;
}

.flow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.flow-steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.flow-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue-600);
  font-weight: 700;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}

/* Pricing */
.pricing-rates {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .pricing-rates {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rate-card {
  text-align: center;
  padding: 1.5rem;
}

.rate-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-600);
}

.rate-card .unit {
  font-size: 0.85rem;
  color: var(--muted);
}

.calculator {
  max-width: 28rem;
  margin: 0 auto 2rem;
}

.calculator label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.calculator input,
.calculator select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.calc-result {
  text-align: center;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.calc-result .amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-600);
}

.examples-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.examples-table th,
.examples-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.examples-table th {
  color: var(--muted);
  font-weight: 600;
}

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Footer */
.footer {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-watermark {
  position: absolute;
  left: 50%;
  bottom: 0.25rem;
  transform: translateX(-50%);
  font-size: clamp(2.5rem, 14vw, 6rem);
  font-weight: 800;
  color: var(--blue-600);
  opacity: 0.08;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  line-height: 1;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(28rem, 100%);
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.modal .sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-msg {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  min-height: 1.25rem;
}

.form-msg.error {
  color: #dc2626;
}

.form-msg.success {
  color: #16a34a;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.trust-list {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .trust-list {
    grid-template-columns: 1fr 1fr;
  }
}

.trust-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.trust-item span:first-child {
  color: var(--blue-600);
  font-weight: 700;
}
