/* Ersali landing — professional product marketing */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn[wght].woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-muted: #64748b;
  --paper: #ffffff;
  --paper-warm: #faf9f7;
  --paper-muted: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  --accent: #e85d04;
  --accent-hover: #c2410c;
  --accent-soft: #fff7ed;
  --accent-line: #fed7aa;
  --navy: #0f172a;
  --navy-soft: #1e293b;

  --container: 1120px;
  --gutter: 24px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper-warm);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.page {
  overflow-x: hidden;
}

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

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

.container {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* ── Skip link ── */

.skip-link {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  transform: translateY(-200%);
  padding: 8px 12px;
  background: var(--navy);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── Header ── */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}

.logo img,
.logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-primary {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(232, 93, 4, 0.28);
}

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

.btn-secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--ink-muted);
  box-shadow: var(--shadow-sm);
}

.btn-light {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--paper);
  box-shadow: none;
}

.btn-light:hover {
  background: var(--paper-muted);
  border-color: var(--paper-muted);
}

.btn-full {
  width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Hero ── */

.hero-band {
  padding: 56px 0 0;
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 48px;
}

.hero-grid > * {
  min-width: 0;
}

.hero-content {
  max-width: 520px;
}

.section-label {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
}

.hero h1 {
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.text-accent {
  color: var(--accent);
}

.hero-copy {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-visual-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
}

.hero-visual-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-visual-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 16px;
  border-inline-start: 1px solid var(--line);
  text-align: center;
}

.stat-item:first-child {
  border-inline-start: none;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  font-feature-settings: "tnum";
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

/* ── Audience strip ── */

.audience-strip {
  padding: 20px 0;
  background: var(--navy);
  color: var(--paper);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.audience-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.12);
}

.audience-item:first-child {
  border-inline-start: none;
}

.audience-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

/* ── Sections ── */

.section {
  padding: 72px 0;
}

.section--muted {
  background: var(--paper-muted);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 560px;
  margin-bottom: 40px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.section-note {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-muted);
  text-align: center;
}

.section-note a {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 1px solid var(--accent-line);
}

.section-note a:hover {
  border-bottom-color: var(--accent);
}

/* ── Method cards ── */

.method-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.method-card {
  position: relative;
  padding: 28px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.method-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.method-card--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--paper) 100%);
}

.method-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius);
}

.method-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  background: var(--paper-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent);
}

.method-card--featured .method-icon {
  background: var(--paper);
  border-color: var(--accent-line);
}

.method-card h3 {
  font-size: 18px;
  font-weight: 700;
}

.method-card p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ── Showcase band ── */

.showcase-band {
  padding: 72px 0;
  background: var(--navy);
  color: var(--paper);
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.showcase-grid > * {
  min-width: 0;
}

.showcase-copy h2 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.showcase-copy p {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.85;
}

.showcase-list {
  margin-top: 24px;
  list-style: none;
}

.showcase-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.showcase-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.showcase-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  max-width: 100%;
  overflow: hidden;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  flex: 1 1 0;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  text-align: center;
}

.flow-step--accent {
  background: rgba(232, 93, 4, 0.2);
  border-color: rgba(232, 93, 4, 0.4);
}

.flow-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.flow-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.flow-arrow {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Feature cards ── */

.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.feature-card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── Process track ── */

.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  list-style: none;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 28px 20px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: none;
}

.process-step:first-child {
  border-inline-start: 1px solid var(--line);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.process-step:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.process-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 50%;
}

.process-step h3 {
  font-size: 15px;
  font-weight: 700;
}

.process-step p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── FAQ ── */

.faq-list {
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}

.faq-item {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 700;
}

.faq-item p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ── CTA ── */

.cta-box {
  padding: 56px 48px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-radius: var(--radius-lg);
  color: var(--paper);
  text-align: center;
}

.cta-inner {
  max-width: 520px;
  margin-inline: auto;
}

.cta-box h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-box p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.8;
}

.cta-box .btn {
  margin-top: 24px;
}

/* ── Footer ── */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

/* ── Mobile CTA ── */

.mobile-cta {
  display: none;
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px 16px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

/* ── Reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-content {
    max-width: none;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .method-cards,
  .feature-cards {
    grid-template-columns: 1fr 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .process-track {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .process-step {
    border-inline-start: 1px solid var(--line);
    border-radius: var(--radius-lg) !important;
  }

  .audience-grid {
    grid-template-columns: 1fr 1fr;
  }

  .audience-item {
    border-inline-start: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .hero-band {
    padding-top: 28px;
  }

  .hero-grid {
    gap: 24px;
    padding-bottom: 28px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-inline-start: none;
    border-top: 1px solid var(--line);
    padding: 18px 12px;
  }

  .stat-item:first-child {
    border-top: none;
  }

  .stat-value {
    font-size: 26px;
  }

  .section {
    padding: 40px 0;
  }

  .showcase-band {
    padding: 48px 0;
  }

  .showcase-grid {
    gap: 24px;
  }

  .method-cards,
  .feature-cards,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .method-card {
    padding: 22px 18px;
  }

  .method-badge {
    top: 12px;
    left: 12px;
  }

  .process-track {
    grid-template-columns: 1fr;
  }

  .process-step {
    text-align: right;
    padding: 20px 18px;
  }

  .process-num {
    margin: 0 0 12px;
  }

  .showcase-flow {
    flex-direction: column;
    padding: 20px 12px;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .flow-step {
    width: 100%;
  }

  .cta-box {
    padding: 32px 20px;
  }

  .nav {
    min-height: 56px;
  }

  .btn {
    min-height: 42px;
    padding: 0 16px;
    font-size: 13px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .mobile-cta {
    display: block;
  }

  body {
    padding-bottom: 76px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 32px;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
