/* Hisabdar Marketing Site — Nordic design tokens from app/lib/app/theme.dart */
:root {
  --primary: #2f5d7c;
  --primary-hover: #244963;
  --on-primary: #ffffff;
  --primary-tint: rgba(47, 93, 124, 0.1);
  --secondary: #4f7a65;
  --paid: #2e6b4a;
  --paid-tint: rgba(46, 107, 74, 0.12);
  --debt: #a63434;
  --debt-tint: rgba(166, 52, 52, 0.1);

  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-subtle: #eef2f6;
  --border: #e3e8ed;
  --text: #1c2630;
  --text-muted: #4b5968;
  --header-bg: rgba(246, 248, 250, 0.92);
  --phone-bezel: #1c2630;

  --shadow-sm: 0 1px 3px rgba(28, 38, 48, 0.05);
  --shadow-md: 0 8px 24px rgba(28, 38, 48, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container-max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #9cc3de;
    --primary-hover: #b4d3e8;
    --on-primary: #14191f;
    --primary-tint: rgba(156, 195, 222, 0.14);
    --secondary: #a9cdb9;
    --paid: #8fd3a8;
    --paid-tint: rgba(143, 211, 168, 0.14);
    --debt: #f29494;
    --debt-tint: rgba(242, 148, 148, 0.14);

    --bg: #14191f;
    --surface: #1d242c;
    --surface-subtle: #252e38;
    --border: #323c47;
    --text: #e6ebf0;
    --text-muted: #a4b1be;
    --header-bg: rgba(20, 25, 31, 0.92);
    --phone-bezel: #323c47;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
}

[dir="rtl"] body {
  font-family: "Vazirmatn", "Noto Naskh Arabic", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.9;
}

[dir="ltr"] {
  font-family: var(--font-sans);
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 200;
  padding: 0.65rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 24px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--on-primary);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface-subtle);
  color: var(--text);
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

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

.brand img {
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.desktop-nav {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  list-style: none;
  margin: 0;
}

.lang-switch a {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

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

.lang-switch a[aria-current="page"] {
  background-color: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Mobile menu (<768px) */
.menu {
  display: block;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.menu-toggle::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1rem 16px 1.25rem;
}

.menu-nav-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-nav-list a {
  display: block;
  padding: 0.6rem 0.5rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.menu-nav-list a:hover {
  background-color: var(--surface-subtle);
}

.menu-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .menu {
    display: none;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex: 1;
    margin-inline-start: 1.5rem;
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 960px) {
  .desktop-nav {
    margin-inline-start: 0.75rem;
    gap: 0.75rem;
  }

  .nav-links {
    gap: 0.65rem;
  }

  .nav-links a {
    font-size: 0.88rem;
  }
}

/* Sections */
section[id] {
  scroll-margin-top: 5.25rem;
}

.section {
  padding-block: 3.5rem;
}

@media (min-width: 768px) {
  .section {
    padding-block: 4.5rem;
  }
}

.section-header {
  max-width: 680px;
  margin-bottom: 2.25rem;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

[dir="rtl"] .section-header h2 {
  letter-spacing: 0;
  line-height: 1.5;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding-block: 3rem 2.75rem;
  background-image: radial-gradient(
    ellipse 85% 65% at 50% 0%,
    var(--primary-tint),
    transparent 70%
  );
}

@media (min-width: 768px) {
  .hero {
    padding-block: 4.5rem 3.5rem;
  }
}

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

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-tint);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

[dir="rtl"] .hero-copy h1 {
  letter-spacing: 0;
  line-height: 1.45;
}

.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Phone Mockup (pure HTML/CSS) */
.hero-visual {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 100%;
  max-width: 316px;
  background-color: var(--surface);
  border: 6px solid var(--phone-bezel);
  border-radius: 28px;
  padding: 0.85rem;
  box-shadow: var(--shadow-md);
}

.phone-notch {
  width: 72px;
  height: 5px;
  margin: 0 auto 0.85rem;
  background-color: var(--border);
  border-radius: 999px;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.phone-status {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background-color: var(--paid-tint);
  color: var(--paid);
}

.mock-balance {
  background-color: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.mock-balance-label {
  font-size: 0.78rem;
  opacity: 0.9;
}

.mock-balance-amount {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
}

.mock-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.mock-name {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.mock-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.mock-amount {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.mock-amount-debt {
  color: var(--debt);
}

.mock-amount-paid {
  color: var(--paid);
}

.mock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mock-btn {
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
}

.mock-btn-primary {
  background-color: var(--primary-tint);
  color: var(--primary);
}

.mock-btn-secondary {
  background-color: var(--paid-tint);
  color: var(--paid);
}

/* Trust strip */
.trust-strip-wrap {
  padding-block: 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--secondary);
  flex-shrink: 0;
}

/* Cards & Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.15rem;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary-tint);
  color: var(--primary);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* How it works */
.section-alt {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  min-width: 0;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--on-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.step-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
}

.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Download card */
.download-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .download-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.25rem;
  }
}

.download-copy {
  max-width: 560px;
}

.download-copy h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}

.download-copy p {
  margin: 0;
  color: var(--text-muted);
}

.download-note {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.badge-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background-color: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: not-allowed;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pricing-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.pricing-card-featured {
  border-color: var(--primary);
}

.pricing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pricing-top h3 {
  margin: 0;
  font-size: 1.35rem;
}

.plan-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background-color: var(--primary-tint);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.price-amount {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.price-amount-soon {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.price-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.check-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.check-icon {
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--paid);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.faq-answer p {
  margin: 0;
}

/* Contact */
.contact-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .contact-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.25rem;
  }
}

.contact-copy h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}

.contact-copy p {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding-block: 2.5rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand p {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* 404 Page */
.error-main {
  padding-block: 4rem;
}

.error-card {
  max-width: 680px;
  margin-inline: auto;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.error-code {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background-color: var(--primary-tint);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
}

.error-block + .error-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.error-block h1,
.error-block h2 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
}

.error-block p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
