/* IlmKosh marketing site — one stylesheet, no frameworks, no external requests.
   Apple-like: light default, automatic dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;

  /* Light theme (default) */
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-sunken: #EDEDF2;
  --text: #1C1C1E;
  --text-muted: #6E6E73;
  --separator: #D8D8DE;
  --accent: #007AFF;
  --accent-soft: rgba(0, 122, 255, 0.10);
  --warn: #FF9500;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.06);
  --shadow-soft: 0 1px 2px rgba(0,0,0,0.05), 0 6px 18px rgba(0,0,0,0.05);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1080px;

  /* Brand palette: blue "ilm"/voice-wave gradient, slate-blue book */
  --brand-1: #4FC3F7;
  --brand-2: #29B6F6;
  --brand-deep: #0D47A1;
  --brand-book: #4C6B8A;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1C1C1E;
    --surface-2: #1C1C1E;
    --surface-sunken: #141416;
    --text: #F5F5F7;
    --text-muted: #98989F;
    --separator: #38383A;
    --accent: #0A84FF;
    --accent-soft: rgba(10, 132, 255, 0.16);
    --warn: #FF9F0A;
    --shadow: 0 1px 3px rgba(0,0,0,0.5), 0 12px 40px rgba(0,0,0,0.55);
    --shadow-soft: 0 1px 2px rgba(0,0,0,0.4), 0 6px 20px rgba(0,0,0,0.4);
    /* Keep the wordmark gradient luminous on black */
    --brand-deep: #1E88E5;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout ------------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
.section-sunken { background: var(--surface-sunken); }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--text-muted); }

.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 19px; margin-top: 14px; }

/* Nav ---------------------------------------------------------------- */
header.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--separator);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
/* The logo SVG carries its own rounded badge; no CSS radius/shadow needed. */
.brand .mark { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 8px 16px;
  border-radius: 980px; font-weight: 600;
}
.nav-cta:hover { text-decoration: none; opacity: 0.92; }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* Hero --------------------------------------------------------------- */
.hero { padding: 72px 0 40px; text-align: center; }
.hero .lead { max-width: 40ch; margin: 26px auto 0; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* The main logo lockup: mark, wordmark, tagline, polyglot, coming-soon. */
.lockup { display: flex; flex-direction: column; align-items: center; }
.lockup .mark-lg { width: 96px; height: 96px; margin: 0 0 18px; }
.wordmark {
  margin: 0; font-size: clamp(34px, 5.5vw, 54px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1; color: var(--text);
}
/* The "ilm" gradient — shared by the hero wordmark and the header/footer brand. */
.ilm {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1.tagline {
  font-size: clamp(16px, 2vw, 19px); font-weight: 600; letter-spacing: 0;
  line-height: 1.45; color: var(--text); max-width: 44ch; margin: 16px auto 0;
}
.polyglot {
  margin: 10px auto 0; font-size: clamp(14px, 1.8vw, 16px); color: var(--text-muted);
  letter-spacing: 0.01em; max-width: 64ch;
}
.lockup .soon { margin: 16px 0 0; }
.badge-note { margin-top: 16px; font-size: 14px; color: var(--text-muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 980px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { text-decoration: none; opacity: 0.92; }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--separator); }
.btn-secondary:hover { text-decoration: none; background: var(--accent-soft); }

/* Cards & grids ------------------------------------------------------ */
.card {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-soft);
}
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 16px; margin: 0; }
.feature .ficon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.feature .ficon svg { width: 24px; height: 24px; }

/* Split feature rows ------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 84px; }
.split.reverse .split-media { order: 2; }
.split h2 { margin-bottom: 16px; }
.split p { color: var(--text-muted); font-size: 18px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split.reverse .split-media { order: 0; }
}

/* Cross-script search demo (real glyphs) ----------------------------- */
.demo {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.demo-bar {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--separator); background: var(--surface-sunken);
}
.demo-bar .q { font-size: 19px; font-weight: 600; }
.demo-bar .cursor { color: var(--text-muted); }
.demo-pill {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 5px 11px; border-radius: 980px;
}
.demo-hits { padding: 12px; display: grid; gap: 10px; }
.hit {
  border: 1px solid var(--separator); border-radius: var(--radius-sm);
  padding: 15px 17px; background: var(--surface);
}
.hit .line { font-size: 22px; line-height: 1.7; }
.hit .line.rtl { direction: rtl; text-align: right; }
.hit mark {
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 6px; border-radius: 6px; font-weight: 700;
}
.hit .cite {
  margin-top: 9px; font-size: 13px; color: var(--text-muted);
  background: var(--surface-sunken); display: inline-block; padding: 3px 10px; border-radius: 980px;
}

.demo-caption { text-align: center; font-size: 13px; color: var(--text-muted); margin: 12px 0 0; }

/* AI answer card ----------------------------------------------------- */
.ai-card {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.ai-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 20px;
  border-bottom: 1px solid var(--separator); font-weight: 600; color: var(--accent);
  background: var(--accent-soft);
}
.ai-body { padding: 20px; }
.ai-body p { color: var(--text); font-size: 16px; }
.ai-q { color: var(--text-muted); font-style: italic; margin-bottom: 14px; }
.cite-chip {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--separator); border-radius: 980px; padding: 2px 9px;
  vertical-align: baseline;
}
.ai-sources { border-top: 1px solid var(--separator); padding: 14px 20px; font-size: 13px; color: var(--text-muted); }

/* Device frame for screenshots -------------------------------------- */
.device {
  margin: 0 auto; max-width: 300px; padding: 10px;
  background: #0a0a0a; border-radius: 42px;
  box-shadow: var(--shadow), inset 0 0 0 2px #2a2a2c;
}
.device img { border-radius: 32px; display: block; }

/* Neutral mock of the reader: a paper page with skeleton text lines and one
   highlighted passage. Paper stays light in dark mode — it's a scanned page. */
.page-mock {
  border-radius: 32px; background: #FDFDFA; aspect-ratio: 30 / 62;
  padding: 26px 22px; display: flex; flex-direction: column; gap: 15px;
}
.page-mock .pm-chip {
  align-self: center; font-size: 12px; font-weight: 600; color: #6E6E73;
  background: rgba(0,0,0,0.05); padding: 3px 12px; border-radius: 980px; margin-bottom: 8px;
}
.page-mock .pm-line { height: 12px; border-radius: 6px; background: rgba(0,0,0,0.09); }
.page-mock .pm-line.rtl { margin-left: auto; }
.page-mock .w95 { width: 95%; } .page-mock .w90 { width: 90%; }
.page-mock .w85 { width: 85%; } .page-mock .w80 { width: 80%; }
.page-mock .w70 { width: 70%; } .page-mock .w60 { width: 60%; }
.page-mock .w40 { width: 40%; }
.page-mock .pm-real { font-size: 19px; line-height: 1.5; color: #1C1C1E; }
.page-mock .pm-real mark {
  background: rgba(0, 122, 255, 0.14); color: #0055CC;
  padding: 2px 8px; border-radius: 6px; font-weight: 600;
}

/* Language groups (by script family) --------------------------------- */
.lang-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .lang-groups { grid-template-columns: 1fr; } }
.lang-group { padding: 24px; }
.lang-group h3 {
  font-size: 17px; margin-bottom: 10px;
  display: flex; align-items: baseline; gap: 10px;
}
.lang-group h3 span {
  font-size: 24px; color: var(--accent); font-weight: 700;
}
.lang-group p { margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.8; }

/* Privacy highlight -------------------------------------------------- */
.privacy-band {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 100%);
}
.privacy-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 860px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-item h3 { font-size: 18px; margin-bottom: 6px; }
.privacy-item p { font-size: 15px; color: var(--text-muted); margin: 0; }
.privacy-item .ficon { margin-bottom: 14px; }

/* Pricing ------------------------------------------------------------ */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 820px; margin: 0 auto; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.price {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column;
}
.price.featured { border-color: var(--accent); box-shadow: var(--shadow); position: relative; }
.price.featured::before {
  content: "Best value"; position: absolute; top: -12px; left: 32px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 980px;
}
.price .tier { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.price .amount { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 2px; }
.price .amount small { font-size: 17px; font-weight: 500; color: var(--text-muted); }
.price .sub { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }
.price ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.price li { display: flex; gap: 11px; font-size: 15px; align-items: flex-start; }
.price li svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.price .foot { margin-top: auto; }
.price-note { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 26px; }

/* Download badges ---------------------------------------------------- */
.badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.store-badge {
  display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg) !important;
  border-radius: 14px; padding: 12px 20px; min-width: 210px;
  opacity: 0.55; cursor: default;
}
.store-badge:hover { text-decoration: none; }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .s1 { font-size: 11px; display: block; line-height: 1.2; }
.store-badge .s2 { font-size: 18px; font-weight: 600; line-height: 1.15; }
.store-badge .soon {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; background: color-mix(in srgb, var(--bg) 30%, transparent);
  padding: 2px 7px; border-radius: 6px;
}

/* Footer ------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--separator); padding: 44px 0 60px;
  color: var(--text-muted); font-size: 14px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-inner .brand { font-size: 16px; color: var(--text); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* Legal / privacy page ---------------------------------------------- */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 90px; }
.legal h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 8px; }
.legal .updated { color: var(--text-muted); font-size: 15px; margin-bottom: 40px; }
.legal h2 { font-size: 23px; margin: 40px 0 12px; }
.legal h3 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--text); font-size: 16px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; margin: 0 0 1em; }
.legal .callout {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius-sm); padding: 18px 22px; margin: 24px 0;
}
.legal .callout p { margin: 0; }
.back-link { display: inline-block; margin-bottom: 30px; font-size: 15px; font-weight: 500; }
