/* kalila.app — one stylesheet, light and dark, every language (logical properties for Arabic). */
:root {
  /* The logo's colours (DECISIONS D-28): its blue for links and buttons, cool neutrals around it. */
  --bg: #fbfbfd; --bg2: #f1f2f8; --fg: #161b2e; --muted: #555d74; --faint: #7d8399; --line: rgba(22, 27, 46, .1);
  --accent: #2f62e0; --accent-strong: #234bc0; --accent-soft: rgba(47, 98, 224, .1); --card: #ffffff;
  --button: #2f62e0; --button-hover: #234bc0; --shadow: rgba(16, 24, 64, .16);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1017; --bg2: #161925; --fg: #e8eaf2; --muted: #a7acbf; --faint: #7f8499; --line: rgba(255, 255, 255, .1);
    --accent: #7ea6ff; --accent-strong: #a3bfff; --accent-soft: rgba(126, 166, 255, .15); --card: #151824;
    --button: #3d6cf0; --button-hover: #4f7cf6; --shadow: rgba(0, 0, 0, .4); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
:lang(zh), :lang(ja), :lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans CJK SC", sans-serif; }
:lang(hi), :lang(ar) { line-height: 1.75; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
kbd { font: inherit; font-weight: 600; background: var(--bg2); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.shell { max-width: 1160px; margin: 0 auto; padding-inline: 16px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 46px; width: auto; margin-block: -4px -6px; }
.footer .brand img { height: 36px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a:not(.button) { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links > a:not(.button):hover { color: var(--fg); }
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 8px; border-radius: 8px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover { background: var(--bg2); color: var(--fg); }
.globe { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.langs-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--card); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .16), 0 0 0 1px var(--line); padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 2px; z-index: 10; }
.langs-menu a { color: var(--fg); text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: 15px; }
.langs-menu a:hover { background: var(--bg2); }
.langs-menu a[aria-current] { color: var(--accent); font-weight: 600; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px; font-weight: 650; text-decoration: none; font-size: 16px; background: var(--button); color: #fff; border: 0; }
.button:hover { background: var(--button-hover); }
.button.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.button.ghost { background: var(--bg2); color: var(--fg); }
.button.soon { cursor: default; opacity: .75; }
.button .ic { width: 20px; height: 20px; flex: none; }

/* Hero */
.hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; padding-block: 48px 64px; }
.hero h1 { font-size: clamp(36px, 4.8vw, 56px); line-height: 1.06; letter-spacing: -.02em; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
:lang(zh) .hero h1, :lang(ja) .hero h1, :lang(ko) .hero h1, :lang(hi) .hero h1, :lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.2; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.version { font-size: 14px; color: var(--faint); margin: 14px 0 0; min-height: 1em; }
.private-line { margin: 22px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--fg); font-size: 15.5px; display: flex; gap: 12px; align-items: flex-start; max-width: 34em; }
.private-line strong { color: var(--accent); }
.lock { flex: none; width: 22px; height: 22px; margin-top: 1px; background: var(--accent); -webkit-mask: url("img/lock.svg") center / contain no-repeat; mask: url("img/lock.svg") center / contain no-repeat; }
.hero-shot img { width: 100%; }

/* Three promises */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-block: 8px 56px; }
.card { background: var(--card); border-radius: 18px; padding: 22px; box-shadow: 0 0 0 1px var(--line); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

/* Features */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 64px; border-top: 1px solid var(--line); }
.feature.flip > .feature-text { order: 2; }
.feature h2, .faq h2, .cta h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 14px; }
:lang(zh) .feature h2, :lang(ja) .feature h2, :lang(ko) .feature h2, :lang(hi) .feature h2, :lang(ar) .feature h2 { letter-spacing: 0; }
.feature p { color: var(--muted); margin: 0 0 14px; }
.feature ul { color: var(--muted); padding-inline-start: 20px; margin: 0; }
.feature li { margin: 6px 0; }
.frame { border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px var(--shadow), 0 0 0 1px var(--line); background: var(--card); justify-self: center; max-width: 420px; }
.frame.wide { max-width: none; }

/* Questions, call to action */
.faq { padding-block: 64px; border-top: 1px solid var(--line); max-width: 860px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; }
details p { color: var(--muted); margin: 10px 0 0; }
.cta { text-align: center; padding-block: 64px 80px; border-top: 1px solid var(--line); }
.cta .buttons { justify-content: center; margin-top: 22px; }

/* Text pages */
.page { max-width: 760px; padding-block: 48px 72px; overflow-wrap: break-word; hyphens: auto; }
.page h1 { font-size: clamp(32px, 4vw, 44px); margin: 0 0 8px; }
.page h2 { font-size: 22px; margin: 32px 0 8px; }
.page li { margin: 6px 0; }
.page code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 15px; overflow-wrap: anywhere; }
.updated { color: var(--faint); font-size: 14px; margin: 0 0 18px; }
.translation-note { font-size: 14px; color: var(--muted); background: var(--bg2); padding: 10px 14px; border-radius: 10px; }
.notfound { text-align: center; padding-block: 120px; margin-inline: auto; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 24px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 26px; font-size: 14px; color: var(--muted); }
.footer .brand { font-size: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a, .copy a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .copy a:hover { color: var(--fg); }

@media (max-width: 900px) {
  .hero, .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip > .feature-text { order: 0; }
  .trio { grid-template-columns: 1fr; }
  .nav-links > a:not(.button) { display: none; }
}
@media (max-width: 420px) {
  .langs summary span { display: none; }
  .langs-menu { grid-template-columns: 1fr; }
  .hero .button, .cta .button { width: 100%; justify-content: center; }
}
