/* Misal Writer landing — minimal custom CSS layered over Tailwind CDN.
   All colors come from DESIGN.md tokens; we do not invent new ones. */

@font-face {
  font-family: "Jameel Noori Nastaleeq";
  src: url("./fonts/JameelNooriNastaleeq.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink:       #0F2740;
  --ink-soft:  #3A5169;
  --brand:     #15598A;
  --brand-dk:  #0E436A;
  --accent:    #1F9D57;
  --danger:    #D8412F;
  --warn:      #E0A106;
  --violet:    #6B4BD0;
  --line:      #D9E2EC;
  --line-soft: #EEF2F7;
  --bg:        #F4F7FB;
  --panel:     #FFFFFF;
  --paper-shadow: 0 10px 30px rgba(16,40,64,.2);
  --card-shadow:  0 1px 2px rgba(16,40,64,.06), 0 8px 24px rgba(16,40,64,.06);
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Urdu copy uses Nastaliq. Apply on any element with .ur. */
.ur,
[lang="ur"] {
  font-family: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif;
  line-height: 2.1;
}

/* Bilingual visibility — both languages co-exist in HTML, JS only toggles. */
[data-lang="en"] .ur { display: none !important; }
[data-lang="ur"] .en { display: none !important; }

/* Headings inherit weights from DESIGN.md type scale. */
.brand-title { color: var(--brand-dk); }

.btn-primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-dk));
  color: #fff;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,40,64,.12), 0 8px 18px rgba(21,89,138,.18);
  transition: transform .08s ease, box-shadow .15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:focus { outline: none; box-shadow: 0 0 0 3px rgba(21,89,138,.18); }

.btn-secondary {
  background: var(--panel);
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .12s ease;
}
.btn-secondary:hover { background: var(--line-soft); }

.btn-ghost {
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 500;
}
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.chip-soon  { background: #FFF6DA; color: #7C5A00; border: 1px solid #F1DA9A; }
.chip-free  { background: #E6F5EC; color: #0E5A33; border: 1px solid #B6E2C5; }
.chip-ai    { background: #EFE9FC; color: #4A2EAE; border: 1px solid #D6C9F4; }
.chip-voice { background: #E6F5EC; color: #0E5A33; border: 1px solid #B6E2C5; }

.section { padding: 72px 0; }
.container-mw { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Mock paper preview — CSS-drawn, clearly a placeholder, not a fake screenshot. */
.paper-mock {
  background: #fff;
  border-radius: 2px;
  border: 1px solid var(--line);
  box-shadow: var(--paper-shadow);
  padding: 28px 28px 36px;
  position: relative;
  overflow: hidden;
}
.paper-mock::after {
  content: "Preview";
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10px;
  letter-spacing: .14em;
  color: #B5C2D1;
  text-transform: uppercase;
  font-family: "Inter", system-ui, sans-serif;
}
[dir="rtl"] .paper-mock::after { right: auto; left: 12px; }

.paper-row {
  display: flex; justify-content: space-between; gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.paper-title {
  text-align: center;
  font-weight: 700;
  color: var(--brand-dk);
  border-bottom: 2px solid var(--ink);
  padding: 12px 0 8px;
  margin: 14px 0;
  font-size: 20px;
}
.token-yellow { background: #FFF6DA; padding: 0 4px; border-radius: 3px; }
.token-violet { background: #EFE9FC; padding: 0 4px; border-radius: 3px; color: #4A2EAE; }
.token-empty  { color: #B5C2D1; }

/* Form field for signup */
.field-label { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; margin-bottom: 6px; display: block; }
.field-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21,89,138,.12);
}
.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
.field-error.show { display: block; }

/* Footer */
.footer {
  background: #0B2237;
  color: #B7C5D6;
  padding: 48px 0 32px;
  margin-top: 64px;
}
.footer a { color: #DDE6F1; }
.footer a:hover { color: #fff; }

/* Mobile */
@media (max-width: 720px) {
  .section { padding: 48px 0; }
  .hide-mobile { display: none; }
}
