/* drjnab.com — Salem. System fonts only, no third-party requests. Colours follow the app's wordmark (navy #102B40, teal dot). */
:root {
  --navy: #102b40;
  --navy-2: #1b3a54;
  --teal: #13877b;
  --teal-dot: #2fd3c0;
  --bg: #ffffff;
  --bg-alt: #f2f5f8;
  --surface: #ffffff;
  --text: #13222f;
  --muted: #4d5f6e;
  --line: #d8e0e7;
  --mark-bg: #fff1c2;
  --mark-text: #6b4a00;
  --note-bg: #fff8e1;
  --note-line: #f0c75e;
  --shadow: 0 18px 40px rgba(16, 43, 64, 0.16);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Noto Sans", "Geeza Pro", Tahoma, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1822;
    --bg-alt: #122230;
    --surface: #16293a;
    --text: #e6edf3;
    --muted: #a8b6c3;
    --line: #2a3e50;
    --teal: #3cc4b4;
    --mark-bg: #4a3a0c;
    --mark-text: #ffe39a;
    --note-bg: #2b2410;
    --note-line: #8a6d1d;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, .docname { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 0.05em 0.35em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--teal); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--teal-dot); outline-offset: 2px; border-radius: 4px; }

/* Field still empty: visible on purpose until website/FIELDS.md is filled. */
mark.field { background: var(--mark-bg); color: var(--mark-text); border-radius: 4px; padding: 0 0.3em; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; white-space: nowrap; unicode-bidi: isolate; }

/* Header */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; }
.wordmark { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif; }
.wordmark .dot { color: var(--teal-dot); }
.wordmark.small { font-size: 1.25rem; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .lang { color: #dbe6ee; text-decoration: none; padding: 8px 10px; border-radius: 8px; white-space: nowrap; font-size: 0.95rem; }
.nav a:hover, .lang:hover { background: var(--navy-2); color: #fff; }
.lang { border: 1px solid #3b5a74; }
@media (max-width: 719px) {
  .topbar-inner { gap: 4px 12px; padding-top: 8px; padding-bottom: 4px; }
  .brand { order: 1; }
  .lang { order: 2; margin-inline-start: auto; }
  .nav { order: 3; flex-basis: 100%; margin-inline: -10px; }
}

/* Hero */
.hero { background: linear-gradient(180deg, var(--navy) 0%, #15344d 100%); color: #fff; padding: 48px 0 56px; overflow: hidden; }
.hero-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .hero-inner { grid-template-columns: 1fr 300px; } .hero { padding: 72px 0 80px; } }
.eyebrow { color: var(--teal-dot); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 0.6em; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
.tagline { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; color: #fff; margin-bottom: 0.8em; }
.lead { color: #cfdbe5; max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.button { display: inline-block; background: var(--teal-dot); color: var(--navy); font-weight: 700; padding: 12px 20px; border-radius: 10px; text-decoration: none; }
.button:hover { filter: brightness(1.07); }
.button.ghost { background: transparent; color: #fff; border: 1px solid #5d7c95; }
.hero-phone { justify-self: center; width: min(300px, 78vw); }

/* Phone frame around synthetic screenshots */
.phone { margin: 0; border-radius: 30px; padding: 8px; background: #0a1520; box-shadow: var(--shadow); }
.phone img { border-radius: 23px; width: 100%; }

/* Sections */
.section { padding: 64px 0; }
section[id], .legal h2 { scroll-margin-top: 112px; }
@media (min-width: 720px) { section[id], .legal h2 { scroll-margin-top: 72px; } }
.section.alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); max-width: 64ch; }

.cards { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { color: var(--teal); }
.card p { margin: 0; color: var(--text); }

.not { margin-top: 28px; border: 1px solid var(--line); border-inline-start: 4px solid var(--navy-2); border-radius: var(--radius); padding: 22px 24px; background: var(--bg-alt); }
@media (prefers-color-scheme: dark) { .not { border-inline-start-color: var(--teal); } }
.not ul { margin: 0; padding-inline-start: 1.2em; }
.not li { margin-bottom: 0.4em; }

.synthetic { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; max-width: 72ch; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 48px; }
.step { display: grid; gap: 24px; align-items: center; }
.step .phone { width: min(260px, 70vw); justify-self: center; }
@media (min-width: 760px) {
  .step { grid-template-columns: 260px 1fr; gap: 48px; }
  .step:nth-child(even) { grid-template-columns: 1fr 260px; }
  .step:nth-child(even) .phone { order: 2; }
  .step .phone { width: 260px; }
}
.step-num { color: var(--teal); font-weight: 700; margin-bottom: 0.3em; font-size: 0.95rem; }
.step h3 { font-size: 1.45rem; }
.caption { font-weight: 600; color: var(--text); }
.step-text p:last-child { color: var(--muted); }

.founder-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 760px; }
.founder-name { font-size: 1.45rem; font-weight: 700; margin-bottom: 0.1em; }
.founder-title { color: var(--teal); font-weight: 600; }
.founder-patent { margin: 0; padding-top: 1em; border-top: 1px solid var(--line); color: var(--muted); }

.contact { display: grid; gap: 12px; margin: 24px 0; max-width: 640px; }
.contact div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.contact dt { font-weight: 600; }
.contact dd { margin: 0; overflow-wrap: anywhere; }

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

/* Legal pages (rendered from docs/salem/store) */
.legal { max-width: 820px; padding-top: 36px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-top: 0.4em; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal ul { padding-inline-start: 1.3em; }
.legal li { margin-bottom: 0.5em; }
.legal blockquote { margin: 1.2em 0; padding: 14px 18px; background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 10px; }
.legal blockquote p:last-child { margin: 0; }
.back a { text-decoration: none; font-weight: 600; }
.source { margin-top: 3em; border-top: 1px solid var(--line); padding-top: 1em; }

.nf { padding: 12px 0 28px; }

/* Footer */
.footer { background: var(--navy); color: #cfdbe5; padding: 32px 0; }
.footer-inner { display: grid; gap: 12px; }
.footer .wordmark { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: #fff; }
.footer .fine { color: #a9bccb; margin: 0; }
.footer mark.field { background: #4a3a0c; color: #ffe39a; }
