/* Cladx Switcher website.
   Colours are the app's own Obsidian Ember tokens (qml/Studio/Theme.qml). The app has one dark
   theme, so the site does too. Ember marks actions, champagne marks links.
   Type is Segoe UI Variable, the face the app itself uses and that every Windows 11 PC ships. */
:root {
  color-scheme: dark;
  --canvas: #0b090b;
  --glass: #141113;
  --glass-top: #1a1718;
  --rim: rgba(255, 242, 224, 0.09);
  --rim-strong: rgba(255, 242, 224, 0.17);
  --lit: rgba(255, 199, 153, 0.75);
  --ink: #f6eedf;
  --body: #ddd3c3;
  --muted: #a39a8e;
  --faint: #6f675f;
  --champagne: #d8b98a;
  --ember: #e97851;
  --ember-top: #a5563a;
  --ember-bottom: #6e3220;
  --radius: 14px;
  --page: 1200px;
  --measure: 66ch;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --small: "Segoe UI Variable Small", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, ui-monospace, monospace;
}

/* --- base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; -webkit-tap-highlight-color: transparent; }
a, summary, .btn { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
body { margin: 0; background: var(--canvas); color: var(--body); font: 400 1.0625rem/1.6 var(--text); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--champagne); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 600; }
h1 { font-size: clamp(2.75rem, 5.4vw, 4.5rem); line-height: 1.03; letter-spacing: -0.026em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.018em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0; }
p + p { margin-top: 0.85em; }
strong { color: var(--ink); font-weight: 600; }
code, kbd, pre { font-family: var(--mono); }
:not(pre) > code { font-size: 0.88em; color: var(--ink); background: var(--glass-top); border: 1px solid var(--rim); border-radius: 6px; padding: 0.08em 0.38em; }
kbd { font-size: 0.85em; color: var(--ink); background: var(--glass-top); border: 1px solid var(--rim-strong); border-bottom-width: 2px; border-radius: 6px; padding: 0 0.35em; }

.wrap { width: min(var(--page), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -64px; z-index: 20; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--canvas); font-weight: 600; }
.skip:focus { top: 12px; }

/* --- header --- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(11, 9, 11, 0.8); border-bottom: 1px solid var(--rim);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.06rem/1 var(--display); }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.top nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font: 500 0.95rem/1 var(--small); }
.top nav a:hover { color: var(--ink); background: rgba(255, 242, 224, 0.05); }
.top nav .lang { color: var(--body); }
@media (max-width: 760px) { .top nav a:not(.lang) { display: none; } }

/* --- buttons: the app's ember button and its quiet sibling --- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .actions .btn { flex: 1 1 auto; } }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 12px;
  font: 600 1rem/1 var(--small); text-decoration: none; white-space: nowrap; transition: transform 120ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: var(--ink); background: linear-gradient(180deg, var(--ember-top), var(--ember-bottom)); border: 1px solid var(--ember);
  box-shadow: inset 0 1px 0 rgba(255, 214, 190, 0.28), 0 12px 32px -16px rgba(233, 120, 81, 0.8); }
.btn-primary:hover { color: #fffaf2; box-shadow: inset 0 1px 0 rgba(255, 214, 190, 0.36), 0 14px 36px -14px rgba(233, 120, 81, 0.95); }
.btn-quiet { color: var(--ink); border: 1px solid var(--rim-strong); background: rgba(255, 242, 224, 0.03); }
.btn-quiet:hover { color: var(--ink); background: rgba(255, 242, 224, 0.08); }

/* --- hero: the real app, running off the edge of the screen --- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  width: min(var(--page), 100% - 32px); margin-inline: auto; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero-copy p { margin: 22px 0 32px; max-width: 30ch; font-size: clamp(1.15rem, 1.7vw, 1.3rem); line-height: 1.5; color: var(--body); }
.hero-shot { position: relative; margin-inline-end: calc((100vw - min(var(--page), 100vw - 32px)) / -2); }
.hero-shot::after { content: ""; position: absolute; inset: 8% 0 -6% 6%; z-index: -1; filter: blur(60px);
  background: radial-gradient(closest-side, rgba(233, 120, 81, 0.28), transparent); }
.hero-shot img { border: 1px solid var(--rim); border-inline-end: 0; border-start-start-radius: var(--radius); border-end-start-radius: var(--radius);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.95); }
.hero-shot::before { content: ""; position: absolute; top: 0; inset-inline: 24px 0; height: 1.5px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--lit) 18%, rgba(216, 185, 138, 0.55) 60%, transparent); transform-origin: left; }
[dir="rtl"] .hero-shot::before { background: linear-gradient(270deg, transparent, var(--lit) 18%, rgba(216, 185, 138, 0.55) 60%, transparent); transform-origin: right; }
@media (prefers-reduced-motion: no-preference) {
  .hero-shot img { animation: arrive 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero-shot::before { animation: light 1100ms 350ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes arrive { from { opacity: 0; transform: translateY(18px); } }
@keyframes light { from { transform: scaleX(0); opacity: 0; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-shot { margin-inline-end: 0; }
  .hero-shot img { border-inline-end: 1px solid var(--rim); border-radius: var(--radius); }
  .hero-shot::before { inset-inline: 24px; }
}

/* --- sections --- */
.band { padding: clamp(64px, 9vw, 112px) 0; }
.band + .band { border-top: 1px solid var(--rim); }
.head { max-width: var(--measure); margin-bottom: clamp(28px, 4vw, 44px); }
.head p { margin-top: 14px; color: var(--muted); font-size: 1.125rem; }

/* what it is: plain prose, the answer in one read */
.lead { max-width: 40em; font-size: clamp(1.2rem, 2vw, 1.42rem); line-height: 1.55; color: var(--body); }
.lead p + p { margin-top: 1em; }

/* limits: one wide picture */
.wide img { border-radius: var(--radius); border: 1px solid var(--rim); }

/* when a limit hits: picture and text side by side */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--radius); border: 1px solid var(--rim); }
.split h2 { margin-bottom: 18px; }
.split h3 { margin: 26px 0 6px; font-size: 1.1rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* everything else: six tiles, three of them pictures */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "tokens tokens warmup" "search modes warmup" "pin float float"; gap: 16px; }
.tile { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--rim); border-radius: var(--radius); background: var(--glass); }
.tile > div { padding: 22px 24px 24px; }
.tile p { margin-top: 8px; color: var(--muted); }
.tile img { width: 100%; object-fit: cover; border-bottom: 1px solid var(--rim); }
.tile.text { justify-content: flex-end; background: linear-gradient(160deg, var(--glass-top), var(--glass) 60%); }
.t-tokens { grid-area: tokens; } .t-tokens img { aspect-ratio: 1225 / 640; object-position: top; }
.t-warmup { grid-area: warmup; } .t-warmup img { flex: 1; min-height: 0; object-fit: contain; object-position: top; background: #0b090c; }
.t-search { grid-area: search; } .t-search img, .t-modes img { aspect-ratio: 16 / 9; }
.t-modes { grid-area: modes; } .t-pin { grid-area: pin; } .t-float { grid-area: float; }
.also { max-width: var(--measure); margin-top: 28px; color: var(--muted); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "tokens tokens" "search warmup" "modes warmup" "pin float"; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "tokens" "warmup" "search" "modes" "pin" "float"; }
  .t-warmup img { max-height: 420px; object-fit: cover; object-position: left top; }
}

/* how it works: a real sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-top: 58px; }
.steps li::before { content: counter(step); position: absolute; top: 0; inset-inline-start: 0; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 2px solid var(--ember); color: var(--ink); font: 600 1rem/1 var(--display); background: var(--canvas); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 20px; inset-inline: 52px -16px; height: 1px; background: var(--rim-strong); }
.steps li:last-child::after { content: none; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 28px; padding-inline-start: 60px; }
  .steps li::after { top: 46px; bottom: 6px; inset-inline: 20px auto; width: 1px; height: auto; }
  .steps li:last-child { padding-bottom: 0; }
}

/* comparison */
.table-wrap { overflow-x: auto; border: 1px solid var(--rim); border-radius: var(--radius); background: var(--glass); }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 16px 20px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--rim); font-variant-numeric: tabular-nums; }
thead th { color: var(--ink); font: 600 0.98rem/1.35 var(--small); background: var(--glass-top); }
thead th:nth-child(2) { color: var(--champagne); }
tbody th { color: var(--ink); font-weight: 500; }
tbody tr:last-child > * { border-bottom: 0; }
td.yes { color: var(--ink); }
td.no { color: var(--faint); }
.note { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }

/* command line and agents */
pre { margin: 0; max-width: 860px; padding: 20px 22px; overflow-x: auto; border: 1px solid var(--rim); border-radius: var(--radius); background: var(--glass);
  color: var(--ink); font-size: 0.93rem; line-height: 1.7; }
pre .c { color: var(--faint); }
.agents { max-width: 860px; margin: 36px 0 0; }
.agents > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 24px; padding: 18px 0; border-top: 1px solid var(--rim); }
.agents dt { color: var(--ink); font-weight: 600; }
.agents dd { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .agents > div { grid-template-columns: 1fr; } }

/* privacy: four promises */
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; max-width: 980px; margin: 0; }
.promises > div { padding: 22px 0; border-top: 1px solid var(--rim); }
.promises dt { color: var(--ink); font: 600 1.15rem/1.3 var(--display); margin-bottom: 6px; }
.promises dd { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .promises { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { max-width: 820px; border-top: 1px solid var(--rim); }
.faq-list details { border-bottom: 1px solid var(--rim); }
.faq-list summary { display: flex; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h3 { flex: 1; font-size: 1.12rem; font-weight: 600; }
.faq-list summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--rim-strong); color: var(--champagne); font: 400 1.2rem/1 var(--text); transition: transform 200ms ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover h3 { color: #fffaf2; }
.faq-list details > div { padding: 0 46px 22px 0; color: var(--body); max-width: var(--measure); }
[dir="rtl"] .faq-list details > div { padding: 0 0 22px 46px; }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after, .btn { transition: none; } }

/* download */
.download { text-align: center; }
.download h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
.download .actions { justify-content: center; margin-top: 30px; }
.download p { margin: 20px auto 0; max-width: 52ch; color: var(--muted); }

/* footer */
footer { padding: 40px 0 56px; border-top: 1px solid var(--rim); color: var(--muted); font-size: 0.93rem; }
footer .wrap { display: grid; gap: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
footer a { color: var(--body); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
footer small { color: var(--faint); font-size: 0.87rem; line-height: 1.6; }

/* Arabic */
[dir="rtl"] body { font-family: "thmanyah sans", "Segoe UI", Tahoma, system-ui, sans-serif; line-height: 1.85; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .brand, [dir="rtl"] .promises dt { font-family: "thmanyah sans", "Segoe UI", Tahoma, system-ui, sans-serif; letter-spacing: 0; }
[dir="rtl"] h1 { line-height: 1.25; }
[dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.45; }
[dir="rtl"] .btn, [dir="rtl"] .top nav a, [dir="rtl"] thead th { font-family: "thmanyah sans", "Segoe UI", Tahoma, system-ui, sans-serif; }
[dir="rtl"] .brand bdi, [dir="rtl"] pre, [dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] pre { text-align: left; }
