/* Sajjil: the app's paper / ink / mint look. */
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/JetBrainsMono.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #0b1020;
  --ink-2: #252b3d;
  --paper: #f6f7fb;
  --paper-2: #eceef6;
  --line: rgba(11, 16, 32, 0.08);
  --muted: rgba(11, 16, 32, 0.58);
  --blue: #0f766e;
  --indigo: #14b8a6;
  --sky: #5eead4;
  --grad: linear-gradient(135deg, #5eead4 0%, #2dd4bf 50%, #14b8a6 100%);
  --red: #ff4d5e;
  --ok: #16a37a;
  --display: "Space Grotesk", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e2e6f2 radial-gradient(1200px 600px at 50% -100px, #f4f6fc 0%, #e9ecf6 60%, #e2e6f2 100%) no-repeat;
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.top { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
header.top img { width: 32px; height: 32px; border-radius: 9px; }
header.top .name { font: 700 19px var(--display); letter-spacing: -0.02em; text-decoration: none; }
header.top nav { margin-inline-start: auto; display: flex; gap: 18px; font-size: 15px; }
header.top nav a { color: var(--muted); text-decoration: none; }
header.top nav a:hover { color: var(--ink); }

/* Landing hero: headline, lead and store button beside the animated phone. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
  padding: 24px 0 48px;
}
.hero { min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); align-content: center; }
.hero > * { min-width: 0; }
.label { font: 600 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
/* Arabic letters must stay joined: no letter spacing, a font that has them. */
[dir="rtl"] .label, [dir="rtl"] .doc .updated { font: 600 13px -apple-system, "SF Arabic", sans-serif; letter-spacing: 0; }
.hero h1 {
  font: 700 clamp(40px, 5vw, 68px)/1.02 var(--display);
  letter-spacing: -0.03em;
  margin: 12px 0 18px;
}
.hero h1 span { background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .hero h1 { letter-spacing: 0; font-family: -apple-system, "SF Arabic", "Segoe UI", sans-serif; line-height: 1.25; }
.hero .lead { font-size: 19px; color: var(--ink-2); margin: 0 0 28px; max-width: 520px; }

/* Store button: App Store, coming soon. */
.ctas { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 520px; }
.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 28px rgba(11, 16, 32, 0.22);
}
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-btn .txt { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.store-btn .txt small { font-size: 11px; font-weight: 600; opacity: 0.8; }
.store-btn.soon { background: #fff; color: var(--muted); border: 1px solid var(--line); box-shadow: none; cursor: not-allowed; }
.store-btn.soon em {
  font: 700 10px var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--ink);
}
[dir="rtl"] .store-btn.soon em { font: 700 12px -apple-system, "SF Arabic", sans-serif; letter-spacing: 0; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* Animated demo: a phone records, writes the transcript live, then makes notes. */
.phone {
  width: min(320px, 80vw, 62vh);
  aspect-ratio: 402 / 760;
  margin-inline: auto;
  padding: 10px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 30px 60px rgba(11, 16, 32, 0.28), 0 0 0 1px rgba(11, 16, 32, 0.6);
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 34px;
  background: var(--paper);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.app-head { display: flex; align-items: center; gap: 7px; font: 700 14px var(--display); }
[dir="rtl"] .app-head { font-family: -apple-system, "SF Arabic", sans-serif; }
.app-head i { width: 20px; height: 20px; border-radius: 6px; background: var(--grad); display: grid; place-items: center; }
.app-head i svg { width: 12px; height: 12px; color: var(--ink); }
.screen h2 { margin: 2px 0 0; font: 700 25px/1.02 var(--display); letter-spacing: -0.02em; }
.screen h2 span { color: var(--muted); }
[dir="rtl"] .screen h2 { font-family: -apple-system, "SF Arabic", sans-serif; letter-spacing: 0; line-height: 1.25; font-size: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: 0 1px 0 rgba(11, 16, 32, 0.04), 0 2px 8px rgba(11, 16, 32, 0.05); }
.rec { display: flex; align-items: center; gap: 10px; }
.rec .dot { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.18); }
.rec.on .dot { animation: pulse 1.2s ease-in-out infinite; }
.rec .time { font: 600 13px var(--mono); direction: ltr; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; direction: ltr; }
.wave b { flex: 1; height: 15%; border-radius: 2px; background: var(--blue); opacity: 0.75; transition: height 0.15s; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 77, 94, 0.06); } }
.lines { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.ln { opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.ln.show { opacity: 1; transform: none; }
.ln strong { display: block; font-size: 10.5px; color: var(--c, var(--blue)); }
.ln span { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.toast {
  position: absolute;
  inset-inline: 12px;
  bottom: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: none; }
.toast b { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 4px; }
.toast b i { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--grad); color: var(--ink); display: grid; place-items: center; font-style: normal; font-size: 10px; }
.toast ul { margin: 0; padding-inline-start: 16px; color: rgba(246, 247, 251, 0.82); }

/* Sections under the hero. */
.block { padding: 56px 0; }
.block h2 { font: 700 clamp(30px, 4vw, 44px)/1.08 var(--display); letter-spacing: -0.025em; margin: 0 0 8px; }
[dir="rtl"] .block h2 { font-family: -apple-system, "SF Arabic", sans-serif; letter-spacing: 0; line-height: 1.3; }
.block .sub { color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.mark { background: linear-gradient(transparent 58%, rgba(45, 212, 191, 0.35) 58%, rgba(45, 212, 191, 0.35) 92%, transparent 92%); padding: 0 4px; }

.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; }
.how .step { grid-row: span 2; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: var(--ink); font: 700 16px var(--display); }
.how h3 { margin: 0 0 2px; font-size: 17px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 1px 0 rgba(11, 16, 32, 0.03); transition: border-color 0.2s ease, transform 0.2s ease; }
.feature:hover { border-color: rgba(11, 16, 32, 0.2); transform: translateY(-2px); }
.feature i { width: 44px; height: 44px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; margin-bottom: 14px; }
.feature i svg { width: 22px; height: 22px; color: var(--ink); }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.open { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--ink); color: var(--paper); border-radius: 28px; padding: 40px; }
.open .sub { color: rgba(246, 247, 251, 0.66); margin: 0; }
.open .mark { background: none; padding: 0; color: var(--sky); }
.open ul { margin: 0; padding: 0; list-style: none; }
.open li { position: relative; padding: 8px 0; padding-inline-start: 32px; color: rgba(246, 247, 251, 0.85); }
.open li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 800; }

/* Documents (privacy, support, terms). */
.doc { max-width: 760px; padding: 24px 0 48px; }
.doc h1 { font: 700 42px/1.05 var(--display); letter-spacing: -0.02em; margin: 8px 0; }
[dir="rtl"] .doc h1 { font-family: -apple-system, "SF Arabic", sans-serif; letter-spacing: 0; line-height: 1.3; }
.doc h2 { font-size: 20px; margin: 30px 0 6px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { font: 500 13px var(--mono); color: var(--muted); }
.doc details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin: 10px 0; }
.doc summary { cursor: pointer; font-weight: 600; }
.doc details p { margin: 8px 0 0; }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .spacer { flex: 1; }
body.landing footer { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .ln, .toast, .wave b, .feature { transition: none; }
  .rec.on .dot { animation: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; text-align: center; padding-top: 12px; }
  .hero .hero-text { display: contents; }
  .hero .label { order: 0; }
  .hero h1 { order: 1; margin: 0; }
  .hero .phone { order: 2; width: min(250px, 64vw); aspect-ratio: 402 / 700; border-radius: 36px; padding: 8px; }
  .hero .screen .label { font-size: 10px; white-space: nowrap; }
  .hero .screen { text-align: start; border-radius: 28px; }
  .hero .lead { order: 3; margin: 4px auto 0; }
  .hero .ctas { order: 4; width: 100%; margin-inline: auto; }
  .hero .note { order: 5; margin: 0; }
  .block { text-align: center; }
  .how, .features { grid-template-columns: 1fr 1fr; text-align: start; }
  .open { grid-template-columns: 1fr; padding: 28px; text-align: start; }
}
@media (max-width: 600px) {
  .how, .features { grid-template-columns: 1fr; }
  header.top { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  header.top nav { flex-basis: 100%; margin-inline-start: 0; justify-content: center; gap: 18px; font-size: 15px; }
  .hero { min-height: calc(100vh - 92px); min-height: calc(100svh - 92px); }
  .hero h1 { font-size: 40px; }
  .hero .lead { font-size: 17px; }
  .block { padding: 40px 0; }
  .open { padding: 22px; }
  .store-btn { padding: 12px 10px; }
  footer { justify-content: center; }
  footer .spacer { display: none; }
}
