/* innovatica.ai/klartest/: the Klartest app's own page, in the app's colours
   (ink, cream, gold, red), not the site's. Plain CSS, no Tailwind classes:
   the pages are generated by scripts/generate_klartest_pages.py. Inter is
   the site's self-hosted copy in /static/fonts/; Arabic and Persian fall back
   to the system's Arabic fonts. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #141414; --ink-2: #4a4740; --paper: #faf8f3; --sand: #f1ede3; --line: #e3ddd0;
  --gold: #ffcc00; --gold-soft: #fff3c2; --red: #c8102e; --cream: #faf8f3; --muted: #d9d4c8;
  --radius: 22px; --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
main, .kt-hero { overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Tahoma", sans-serif;
}
[dir="rtl"] body, body[dir="rtl"] { line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
em { font-style: italic; color: var(--red); }
.kt-hero em { color: var(--gold); }
[dir="rtl"] em { font-style: normal; }

.kt-skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kt-skip:focus { width: auto; height: auto; clip: auto; inset-inline-start: 12px; top: 12px; z-index: 10; padding: 8px 12px; background: var(--gold); color: var(--ink); }
.kt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.kt-header {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 40px); background: rgba(20, 20, 20, 0.92); color: var(--cream);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.kt-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.kt-brand img { border-radius: 8px; }
.kt-brand b { color: var(--gold); }
.kt-nav { display: flex; align-items: center; gap: 10px; }
.kt-lang { position: relative; }
.kt-lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border: 1px solid rgba(250, 248, 243, 0.25); border-radius: 999px; font-size: 0.9rem; font-weight: 600; white-space: nowrap;
}
.kt-lang summary::-webkit-details-marker { display: none; }
.kt-lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; width: 260px;
  max-height: 70vh; overflow: auto; background: #1e1d1b; border: 1px solid #34322d; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.kt-lang li a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-size: 0.95rem; }
.kt-lang li a:hover, .kt-lang li a:focus-visible { background: #2c2a26; }
.kt-lang li a[aria-current="page"] { background: var(--gold); color: var(--ink); font-weight: 700; }

/* Buttons */
.kt-store {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 14px; background: var(--gold); color: var(--ink);
  font-weight: 750; font-size: 1.05rem; text-decoration: none; box-shadow: 0 10px 30px rgba(255, 204, 0, 0.25); transition: transform 0.15s ease;
}
.kt-store:hover { transform: translateY(-2px); }
.kt-store:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.kt-store-small { padding: 8px 14px; font-size: 0.9rem; border-radius: 999px; box-shadow: none; }
.kt-note { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
/* Apple's badge, unchanged, and the QR code beside it on wide screens with a mouse
   (on a phone the badge is the way in, and a phone cannot scan its own screen). */
.kt-get { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.kt-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform 0.15s ease; }
.kt-badge img { display: block; height: 54px; width: auto; }
.kt-badge:hover { transform: translateY(-2px); }
.kt-badge:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.kt-qr { display: none; margin: 0; align-items: center; gap: 12px; }
.kt-qr img { display: block; width: 112px; height: 112px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(250, 248, 243, 0.2); }
.kt-qr figcaption { max-width: 13ch; font-size: 0.85rem; line-height: 1.35; color: var(--muted); text-align: start; }
@media (min-width: 980px) and (hover: hover) { .kt-qr { display: flex; } }

/* Hero */
.kt-hero {
  display: grid; gap: 28px; align-items: center; padding: clamp(36px, 6vw, 80px) clamp(16px, 4vw, 40px) clamp(48px, 7vw, 96px);
  background: radial-gradient(ellipse 70% 60% at 75% 45%, rgba(255, 190, 40, 0.22), rgba(20, 20, 20, 0) 70%), var(--ink); color: var(--cream);
}
.kt-hero > * { max-width: var(--max); }
.kt-kicker { margin: 0 0 12px; font-size: 0.8rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
[dir="rtl"] .kt-kicker { letter-spacing: 0; }
.kt-hero .kt-kicker { color: var(--gold); }
.kt-hero h1 { font-size: clamp(2.1rem, 5.2vw, 4rem); font-weight: 850; }
.kt-lead { margin: 18px 0 0; max-width: 60ch; font-size: clamp(1.05rem, 1vw + 0.8rem, 1.25rem); color: var(--ink-2); }
.kt-hero .kt-lead { color: var(--muted); }
.kt-cta { margin-top: 28px; }
.kt-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.kt-facts li { padding: 7px 13px; border-radius: 999px; background: rgba(250, 248, 243, 0.08); border: 1px solid rgba(250, 248, 243, 0.14); font-size: 0.9rem; font-weight: 600; }
.kt-hero-art { position: relative; justify-self: center; width: min(100%, 560px); }
.kt-hero-paint { width: 100%; -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 58%, transparent 100%); }
.kt-phone {
  overflow: hidden; border-radius: 34px; padding: 7px; background: #0b0b0b; box-shadow: 0 0 0 2px #3a3833, 0 30px 70px rgba(0, 0, 0, 0.45);
}
.kt-phone img { border-radius: 28px; }
.kt-hero-phone { position: absolute; width: 38%; inset-inline-end: -4%; bottom: -14%; }

/* Sections */
.kt-section, .kt-final { padding: clamp(56px, 8vw, 104px) clamp(16px, 4vw, 40px) 0; max-width: calc(var(--max) + 80px); margin: 0 auto; }
.kt-section h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); font-weight: 820; max-width: 26ch; }
.kt-why-list { display: grid; gap: 18px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: why; }
.kt-why-list li { counter-increment: why; padding: 24px; border-radius: var(--radius); background: var(--sand); border-top: 4px solid var(--gold); }
.kt-why-list li::before { content: counter(why); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; background: var(--ink); color: var(--gold); font-weight: 800; }
.kt-why-list h3, .kt-feature h3 { font-size: 1.25rem; font-weight: 780; }
.kt-why-list p, .kt-feature p { margin: 8px 0 0; color: var(--ink-2); }

.kt-shots { display: flex; gap: 22px; margin: 36px calc(-1 * clamp(16px, 4vw, 40px)) 0; padding: 4px clamp(16px, 4vw, 40px) 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(16px, 4vw, 40px); scrollbar-width: thin; }
.kt-shot { flex: none; width: min(68vw, 260px); margin: 0; scroll-snap-align: start; }
.kt-shot figcaption { margin-top: 14px; font-size: 0.95rem; color: var(--ink-2); }
.kt-shot figcaption strong { display: block; color: inherit; font-size: 1.02rem; }
.kt-shots-section h2 + .kt-shots { margin-top: 32px; }
.kt-shot figcaption strong { color: var(--ink); }

.kt-feature { display: grid; gap: 18px; align-items: center; margin-top: 36px; padding: 22px; border-radius: var(--radius); background: var(--sand); }
.kt-feature img { width: 100%; max-width: 260px; justify-self: center; border-radius: 18px; }
@media (prefers-color-scheme: dark) { .kt-feature img { opacity: 0.95; } }
.kt-more-h { margin-top: 44px; font-size: 1.3rem; }
.kt-more { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.kt-more li { position: relative; padding-inline-start: 34px; color: var(--ink-2); }
.kt-more li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.25em; width: 20px; height: 20px; border-radius: 6px; background: var(--red); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat, linear-gradient(#000, #000); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

.kt-lang-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.kt-lang-grid a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--sand); text-decoration: none; font-weight: 650; white-space: nowrap; transition: border-color 0.15s ease;
}
.kt-lang-grid a:hover, .kt-lang-grid a:focus-visible { border-color: var(--gold); }
.kt-lang-grid a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.kt-privacy { text-align: center; }
.kt-privacy h2, .kt-privacy .kt-lead { margin-inline: auto; }

.kt-faq-item { margin-top: 14px; padding: 18px 22px; border-radius: 16px; background: var(--sand); }
.kt-faq-item:first-of-type { margin-top: 32px; }
.kt-faq-item summary { cursor: pointer; font-weight: 720; font-size: 1.08rem; }
.kt-faq-item p { margin: 10px 0 0; color: var(--ink-2); }

.kt-final { display: grid; justify-items: center; gap: 18px; text-align: center; padding-bottom: clamp(56px, 8vw, 104px); }
.kt-final img { border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
.kt-final h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 820; max-width: 22ch; }
.kt-final .kt-note { color: var(--ink-2); margin-top: 0; }
.kt-final .kt-get { justify-content: center; }
.kt-final .kt-qr img { box-shadow: 0 0 0 1px var(--line); }
.kt-final .kt-qr figcaption { color: var(--ink-2); }

.kt-footer { padding: 28px clamp(16px, 4vw, 40px) 40px; background: var(--ink); color: var(--muted); font-size: 0.9rem; text-align: center; }
.kt-footer p { margin: 4px 0; }
.kt-footer a { color: var(--cream); }

@media (min-width: 760px) {
  .kt-why-list { grid-template-columns: repeat(3, 1fr); }
  .kt-feature { grid-template-columns: 240px 1fr; padding: 28px 34px; }
  .kt-more { grid-template-columns: 1fr 1fr; column-gap: 32px; }
}
@media (min-width: 980px) {
  .kt-hero { grid-template-columns: 1.05fr 1fr; justify-content: center; }
  .kt-hero > * { max-width: none; }
  .kt-hero-text { justify-self: end; max-width: 600px; }
  .kt-hero-art { justify-self: start; }
  .kt-shots { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .kt-store-small { display: none; }
  .kt-hero-phone { width: 34%; bottom: -8%; inset-inline-end: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .kt-store, .kt-badge { transition: none; } }

/* Dark: last, so it wins over the light rules above. */
@media (prefers-color-scheme: dark) {
  :root { --paper: #121212; --sand: #1b1a18; --line: #2c2a26; --ink-2: #b9b3a6; color-scheme: dark; }
  body { color: var(--cream); }
  .kt-section h2, .kt-why h3, .kt-feature h3, .kt-more-h, .kt-faq summary, .kt-final h2, .kt-lang-grid a, .kt-shot figcaption strong { color: var(--cream); }
}
