/* PDFworx website. Colors and fonts are the app's (docs/05-ui-ux.md, design tokens). */
@font-face { font-family: 'IBM Plex Sans'; src: url(/fonts/IBMPlexSans-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url(/fonts/IBMPlexSans-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url(/fonts/IBMPlexSans-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(/fonts/IBMPlexSansArabic-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(/fonts/IBMPlexSansArabic-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(/fonts/IBMPlexSansArabic-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #E9EDF1;
  --window: #F7F8FA;
  --surface: #FFFFFF;
  --stage: #DDE3E9;
  --line: #D3DAE2;
  --text: #18212C;
  --muted: #5A6675;
  --accent: #2C5C8F;
  --on-accent: #FFFFFF;
  --red: #D4382C;
  --red-tint: #FBE9E7;
  --green: #1F8A4C;
  --green-tint: #E2F2E8;
  --green-text: #17663A;
  --bar: #C9D1DA;
  --shadow: 0 18px 40px rgba(24, 33, 44, .12);
  --ui: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101419;
    --window: #181D23;
    --surface: #20262E;
    --stage: #0D1115;
    --line: #2F3741;
    --text: #E3E8EE;
    --muted: #98A3B1;
    --accent: #86B0DC;
    --on-accent: #101419;
    --red: #FF6B5D;
    --red-tint: #3A2220;
    --green: #4CC27E;
    --green-tint: #183526;
    --green-text: #7FD8A4;
    --bar: #3A4450;
    --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  }
}
html[lang="ar"] { --ui: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--window); color: var(--text); font-family: var(--ui); font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
a { color: var(--accent); }
img, svg { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
html[lang="ar"] .eyebrow { font-size: 14px; letter-spacing: 0; text-transform: none; }
kbd { font-family: var(--mono); font-size: .85em; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--text); white-space: nowrap; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; color: var(--text); }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid var(--accent); white-space: nowrap; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 40px 64px; }
.hero h1 { font-size: clamp(36px, 6.4vw, 62px); line-height: 1.05; letter-spacing: -1.4px; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 36ch; }
html[lang="ar"] .hero h1, html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.3; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 16px; } }

/* The PDF page in the hero */
.doc { background: var(--stage); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); max-width: 440px; width: 100%; justify-self: center; }
.doc .bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 0 4px 12px; }
.doc .bar b { color: var(--text); font-weight: 600; }
.page { background: #FFFFFF; border-radius: 4px; padding: 26px 24px 30px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); position: relative; }
.page .ln { display: block; height: 7px; border-radius: 4px; background: #D3DAE2; margin: 0 0 11px; }
.page .ln.h { height: 12px; width: 46%; background: #8C99A8; margin-bottom: 18px; }
.page .gap { height: 10px; }
.w90 { width: 90%; } .w95 { width: 95%; } .w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; } .w40 { width: 40%; }
.page .mark { position: relative; border: 2.5px solid #D4382C; border-radius: 3px; padding: 8px 8px 0; margin: 4px -10px 14px; }
.page .note { position: absolute; inset-inline-end: -6px; top: -16px; transform: translateY(-50%); background: #D4382C; color: #FFFFFF; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.page .sig { display: flex; justify-content: flex-end; margin-top: 16px; }
.page .sig svg { width: 120px; height: 34px; }
.doc .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 4px 0; font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--green-tint); color: var(--green-text); font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.12; letter-spacing: -.6px; margin: 0 0 14px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 60ch; margin: 0 0 32px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid4 { grid-template-columns: 1fr; } }
.card { background: var(--window); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
section:not(.alt) .card { background: var(--surface); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.num { font-weight: 700; color: var(--accent); font-size: 14px; margin-bottom: 8px; }

/* Click budgets */
.budgets { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.budgets li { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--window); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.budgets .task { font-weight: 600; }
.budgets .how { color: var(--muted); font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.budgets .count { font-weight: 700; color: var(--green-text); background: var(--green-tint); border-radius: 999px; padding: 2px 10px; font-size: 13px; }

ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ul.ticks li { padding-inline-start: 30px; position: relative; color: var(--muted); }
ul.ticks li::before { content: ''; position: absolute; inset-inline-start: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%231F8A4C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
ul.ticks li b { color: var(--text); }

.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.langs span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 15px; }

/* Early access */
.signup { background: var(--accent); color: var(--on-accent); border-radius: 20px; padding: 36px; }
.signup h2 { color: inherit; }
.signup p { margin: 0 0 20px; opacity: .9; max-width: 56ch; }
.signup form { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] { flex: 1 1 260px; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1.5px solid transparent; font: inherit; font-size: 16px; background: var(--surface); color: var(--text); }
.signup .btn { background: var(--surface); color: var(--text); border-color: var(--surface); }
.signup .small-print { font-size: 14px; margin: 14px 0 0; opacity: .85; }
.signup .small-print a { color: inherit; }
.signup .msg { font-weight: 600; margin: 14px 0 0; }
.signup .msg:empty { display: none; }
section.early { padding-top: 8px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; color: var(--muted); }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Text pages */
.text { padding-block: 24px 64px; }
.text h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -1px; margin: 12px 0 8px; line-height: 1.1; }
.text h2 { font-size: 22px; letter-spacing: -.2px; margin: 36px 0 8px; }
.text p, .text li { color: var(--muted); }
.text table { border-collapse: collapse; width: 100%; font-size: 15px; }
.text th, .text td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.text th { font-weight: 600; color: var(--text); }
.tablewrap { overflow-x: auto; }
@media (max-width: 520px) { .text table .ex { display: none; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .row { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; color: inherit; }
footer a:hover { color: var(--text); }
footer .fonts { flex-basis: 100%; font-size: 13px; margin: 0; }
footer .fonts a { text-decoration: underline; }
