/* Law Diary landing page: the app's palette and type, no frameworks, small enough for 3G. */
:root {
  --pine: #173b32;
  --pine-2: #22493e;
  --brass: #c29a57;
  --brass-soft: #efe3cc;
  --paper: #fffdf8;
  --ground: #f2efe7;
  --ink: #1d2d28;
  --muted: #5f675f;
  --line: #e3ddd0;
  --rule: #e9e3d6;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.2vw, 54px); }
h2 { font-size: clamp(27px, 3.4vw, 36px); margin-bottom: 14px; }
h3 { font-size: 21px; margin-bottom: 6px; }
p { margin: 0 0 12px; }
/* Text blocks stay near 70 characters a line. In em, not ch: "ch" is the width of a 0,
   wider than an average letter, so 60ch allowed ~90 characters. */
main p, main li, main summary { max-width: 31em; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
/* Hidden above the page until focused (not off to one side, which breaks right-to-left pages). */
.skip { position: absolute; inset-inline-start: 16px; top: 0; z-index: 10; transform: translateY(-120%); background: var(--paper); padding: 8px 12px; border-radius: 8px; }
.skip:focus { transform: translateY(12px); }

/* Content is capped and centred; text blocks stay near 65–70 characters. */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 64px 0; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none; text-align: center; }
.btn:hover { border-color: #cfc7b6; }
.btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn.primary:hover { background: var(--pine-2); }
.btn.big { min-height: 54px; font-size: 18px; padding: 0 26px; }

/* Header */
.top { background: var(--pine); color: #fff; }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 500 22px var(--serif); }
.mark { width: 32px; height: 32px; }
.top-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.top-nav a { color: #d6e2db; text-decoration: none; font-size: 15px; }
.top-nav a:hover { color: #fff; }
.lang { border: 1px solid #ffffff55; background: transparent; color: #fff; border-radius: 999px; padding: 4px 14px; font: 18px/1.6 'Noto Nastaliq Urdu', var(--sans); cursor: pointer; }
html[lang="ur"] .lang { font-family: var(--sans); font-size: 15px; }

/* Hero */
.hero { background: var(--pine); color: #fff; padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.eyebrow { color: #e5c98f; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.hero h1 { max-width: 16ch; margin-bottom: 18px; }
.lede { color: #d1ddd6; font-size: 19px; max-width: 54ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.hero .btn:not(.primary) { background: transparent; color: #fff; border-color: #ffffff66; }
.hero .btn.primary { background: var(--brass); border-color: var(--brass); color: var(--pine); }
.hero .muted { color: #a9bdb3; }
.hero-shot { margin: 0; }
.page-card { background: var(--paper); color: var(--ink); border-radius: 14px; padding: 22px 26px; font: 18px/30px var(--serif); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, var(--rule) 29px, var(--rule) 30px); border-inline-start: 4px solid #e8c9c3; }
.page-card p { margin: 0; }
.page-date { color: var(--brass); font: 600 14px/30px var(--sans); }
.page-title { font-size: 24px; }
.page-fee { color: var(--pine); }
.hero-shot figcaption { margin-top: 12px; color: #a9bdb3; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.feature p { color: var(--muted); margin: 0; }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.shots figure { margin: 0; }
.shots img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(23, 59, 50, 0.1); background: var(--ground); }
.shots figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* Download */
.download { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.download > div > p { max-width: 31em; }
.release { display: grid; gap: 6px; margin: 22px 0 8px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.release div { display: flex; gap: 12px; align-items: baseline; }
.release dt { color: var(--muted); min-width: 72px; }
.release dd { margin: 0; min-width: 0; }
.release code { font-size: 12.5px; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.copy { margin-inline-start: 6px; font: 600 12px var(--sans); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.steps { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.steps ol { margin: 10px 0 14px; padding-inline-start: 22px; }
.steps li { margin-bottom: 10px; }
.steps li::marker { color: var(--brass); font-weight: 600; }

.web-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.web-cta p { max-width: 31em; margin: 0; }

/* FAQ */
details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }
.contact-mail { font-size: 20px; font-weight: 600; margin-top: 12px; }
.contact-mail a { overflow-wrap: anywhere; }

/* Footer */
.foot { background: var(--pine); color: #c4d4cb; padding: 28px 0; font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: #fff; }

/* Legal pages */
.legal-head { background: var(--pine); color: #fff; padding: 40px 0 36px; }
.legal-head p { color: #c4d4cb; }
.legal { padding: 40px 0 64px; }
.legal article { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 4vw, 40px); }
.legal h2 { font-size: 26px; margin: 28px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: #3d4a44; }
.legal .notice { background: #f6e3b4; color: #6b4e14; border-radius: 10px; padding: 12px 16px; margin: 0 0 22px; }

html:not([lang="ur"]) .ur-only { display: none; }

/* Urdu: right-to-left with Noto Nastaliq Urdu, which needs generous line height. */
html[lang="ur"] body { font-family: 'Noto Nastaliq Urdu', var(--sans); line-height: 2.1; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3, html[lang="ur"] .brand { font-family: 'Noto Nastaliq Urdu', var(--serif); line-height: 1.9; letter-spacing: 0; }
html[lang="ur"] h1 { font-size: clamp(28px, 4.2vw, 44px); }
html[lang="ur"] .eyebrow { text-transform: none; letter-spacing: 0; }
html[lang="ur"] .btn { line-height: 2; padding-block: 6px; }
html[lang="ur"] .page-card { font-family: var(--serif); }

@media (max-width: 900px) {
  .hero-grid, .download { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 44px 0; }
  .top-nav { display: none; }
  .lang { margin-inline-start: auto; }
  .hero { padding: 24px 0 48px; }
  .features, .shots { grid-template-columns: minmax(0, 1fr); }
  .cta .btn, .btn.big { width: 100%; }
  .release div { flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
