/* LlamaBar site — dark-first, palette drawn from the app icon
   (deep plum + neon orange, after the glowing-llama artwork) */
:root {
  --bg: #17131f;
  --bg-soft: #1e1929;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #221c30;
  --border: rgba(255, 255, 255, 0.09);
  --text: #ece9f3;
  --text-2: #a49fb8;
  --accent: #f0863a;
  --accent-2: #f6a353;
  --accent-grad: linear-gradient(135deg, #f6a353, #e8722a);
  --ok: #58c472;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fa;
    --bg-soft: #eef1f6;
    --panel: rgba(15, 23, 42, 0.035);
    --panel-solid: #ffffff;
    --border: rgba(15, 23, 42, 0.1);
    --text: #18223a;
    --text-2: #5b6780;
    --shadow: 0 24px 60px rgba(24, 34, 58, 0.14);
    color-scheme: light;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Decorative overflow (the hero glow reaches past its wrapper) must never
   widen the page — zoomed-out mobile otherwise left-aligns the content.
   `clip` instead of `hidden`: no scroll container, sticky header intact. */
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[data-lang="en"] :is(.lang-tr, .lang-de, .lang-es) { display: none !important; }
html[data-lang="tr"] :is(.lang-en, .lang-de, .lang-es) { display: none !important; }
html[data-lang="de"] :is(.lang-en, .lang-tr, .lang-es) { display: none !important; }
html[data-lang="es"] :is(.lang-en, .lang-tr, .lang-de) { display: none !important; }
[hidden] { display: none !important; }

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 22px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.brand img { width: 22px; height: 29px; }   /* bare llama silhouette, 100:130 */
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 0.92rem; }
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta { color: var(--accent); font-weight: 600; white-space: nowrap; }
.nav-links a.nav-cta:hover { color: var(--accent-2); }
.lang-btn {
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent); }
select.lang-btn {
  -webkit-appearance: none; appearance: none; font-family: inherit;
  padding: 4px 24px 4px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5'><path d='M1 1l3 3 3-3' fill='none' stroke='%239aa6bc' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
}

/* Hero — the brand artwork rebuilt live: the glowing llama peeks over a
   menu-bar pill that is always exactly as wide as the title beneath it.
   The inline-block wrapper shrinks to the h1's text width in every
   language, and the bar simply spans 100% of it. */
.hero { padding: 64px 0 40px; text-align: center; }
.hero-mark { display: inline-block; max-width: 100%; position: relative; }
.hero-stage { position: relative; z-index: 0; margin-bottom: clamp(-44px, -3.5vw, -22px); }
.hero-stage::before {
  content: ""; position: absolute; inset: -8% -28%; z-index: -1; filter: blur(8px);
  background: radial-gradient(ellipse 52% 58% at 50% 44%,
    rgba(222, 112, 32, 0.42), rgba(150, 82, 30, 0.16) 55%, transparent 76%);
}
.hero-llama { display: block; margin: 0 auto; height: clamp(150px, 24vw, 235px); }
.hero-bar {
  position: relative; z-index: 1; display: flex; align-items: center;
  gap: 4%; padding: 0 4%; height: clamp(34px, 5.5vw, 52px); border-radius: 999px;
  background: linear-gradient(180deg, #767090, #5c566f);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.3);
}
.hero-bar i { height: 36%; border-radius: 999px; background: #948cab; }
.hero-bar i:nth-child(1) { width: 18%; }
.hero-bar i:nth-child(2) { width: 14%; }
.hero-bar i:nth-child(3) { width: 17%; }
.hero-bar i.dim { width: 26%; margin-left: auto; background: #4a4560; }
.hero h1 {
  margin-top: clamp(18px, 3vw, 30px); font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.12;
}
.hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { margin: 18px auto 0; max-width: 640px; color: var(--text-2); font-size: 1.08rem; }
.badge-row { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* Apple's official Mac App Store badge — artwork is used unmodified (no recolor,
   no border, no background); the wrapper only carries focus/hover affordance. */
.mas-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform 0.15s ease; }
.mas-badge img { height: 44px; width: auto; display: block; }
.mas-badge:hover { transform: translateY(-1px); }
.mas-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .mas-badge { transition: none; } .mas-badge:hover { transform: none; } }
.reqs { color: var(--text-2); font-size: 0.85rem; }
.reqs a { color: var(--accent); text-decoration: none; }

/* Popover mock — mirrors the real popover: header card (glyph, Listening,
   model line + engine badge), numbered row cards, cache pills, big percent
   with phase label, footer bar */
.mock-stage { display: flex; flex-direction: column; align-items: center; padding: 38px 0 8px; }
/* Engine switch: green MLX / orange GGUF, matching the engine badge colors.
   Mode spans mirror the lang-span pattern, scoped to the mock popover. */
.mode-toggle { display: flex; gap: 6px; margin-bottom: 14px; }
.mode-toggle button {
  font: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-2);
}
.mode-toggle button[data-mode="mlx"][aria-pressed="true"] {
  background: rgba(88, 196, 114, 0.16); color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, var(--border));
}
.mode-toggle button[data-mode="gguf"][aria-pressed="true"] {
  background: rgba(240, 134, 58, 0.16); color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border));
}
.mode-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#mockPopover[data-mode="mlx"] .mode-gguf,
#mockPopover[data-mode="gguf"] .mode-mlx { display: none !important; }
[data-info] { cursor: pointer; border-radius: 6px; }
[data-info]:hover, [data-info]:focus-visible {
  outline: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}
.mock-info {
  margin-top: 10px; padding: 11px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-solid));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  font-size: 0.84rem; line-height: 1.5; color: var(--text); cursor: pointer;
}
.mock-info strong { color: var(--accent-2); }
.mock-hint { margin-top: 14px; text-align: center; color: var(--text-2); font-size: 0.82rem; max-width: 460px; }
.popover {
  width: min(440px, 92vw); text-align: left; position: relative;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow); padding: 12px;
}
.popover::before {
  content: ""; position: absolute; top: -7px; left: 50%; margin-left: -7px;
  width: 13px; height: 13px; transform: rotate(45deg);
  background: var(--panel-solid);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}
.pop-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
}
.pop-card + .pop-card { margin-top: 10px; }
.pop-head { display: flex; align-items: center; gap: 12px; }
.pop-head img { width: 42px; height: 42px; border-radius: 10px; }
/* the bare tinted llama, exactly like the app's popover header logo — the
   canvas includes room for its state props (sprout, thought bubbles) */
.pop-head .llama-mark { width: 53px; height: 43px; color: var(--accent); flex: none; }
.pop-head .t { font-weight: 700; font-size: 0.95rem; }
.pop-head .status { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-2); margin-top: 1px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.pop-head > div { min-width: 0; }
.pop-head .model-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.78rem; color: var(--text-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.model-line .mode-mlx, .model-line .mode-gguf { display: inline-flex; align-items: center; gap: 6px; }
.engine { font-size: 0.68rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(240, 134, 58, 0.16); color: var(--accent-2); }
.engine.mlx { background: rgba(88, 196, 114, 0.16); color: var(--ok); }
.gpu-ok { color: var(--ok); }
.l1 { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; min-width: 0; }
.num { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
/* 15-char names (qwen3.6:35b-mlx) must truncate on narrow phones, not
   push the pill/timestamp out of the row. */
.mname { color: var(--text-2); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  font-size: 0.72rem; font-weight: 650; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--text-2) 16%, transparent); color: var(--text-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pill.green { background: rgba(88, 196, 114, 0.16); color: var(--ok); }
.time { margin-left: auto; font-size: 0.76rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.xbtn { color: var(--text-2); font-size: 0.78rem; }
.l2 { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.bigpct { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.phase { color: var(--text-2); font-size: 0.86rem; }
.tps { margin-left: auto; font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.genstar { color: var(--accent); font-weight: 700; }
.seal {
  margin-left: auto; align-self: center; width: 21px; height: 21px; border-radius: 50%;
  background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800;
}
.bar { margin-top: 9px; height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--text-2) 18%, transparent); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; }
.bar i.fill-orange { width: 48%; background: linear-gradient(90deg, #f6a353, #e8722a); }
.bar i.fill-green { width: 100%; background: linear-gradient(90deg, #4cc06c, #35c8a4); }
.l3 { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.78rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pop-foot { display: flex; align-items: center; gap: 8px; padding: 8px; }
.chip {
  border: 1px solid var(--border); background: color-mix(in srgb, var(--text-2) 10%, transparent);
  color: var(--text); border-radius: 10px; padding: 6px 14px; font-size: 0.84rem; font-family: inherit;
}
.chip.sq { padding: 6px 11px; }
.pop-foot .spacer { flex: 1; }

/* Sections */
section { padding: 58px 0; }
section.alt { background: var(--bg-soft); }
section.cta { padding: 52px 0 58px; text-align: center; border-top: 1px solid var(--border); }
section.cta .badge-row { margin-top: 24px; }
h2 { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.015em; text-align: center; }
.section-sub { text-align: center; color: var(--text-2); margin: 10px auto 0; max-width: 560px; }
.grid { margin-top: 38px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px;
}
.card .ic { font-size: 1.5rem; }
.card h3 { margin-top: 10px; font-size: 1.02rem; font-weight: 700; }
.card p { margin-top: 6px; color: var(--text-2); font-size: 0.92rem; }

/* Steps */
.steps { margin-top: 38px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.step .n {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); color: #fff; font-weight: 800; font-size: 0.9rem;
}
.step h3 { margin-top: 12px; font-size: 1rem; }
.step p { margin-top: 6px; color: var(--text-2); font-size: 0.92rem; }
.step a { color: var(--accent); text-decoration: none; }

/* Privacy / support strip */
.duo { margin-top: 38px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.duo .card a.more { display: inline-block; margin-top: 12px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.92rem; }

/* Content pages (privacy / support) */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 22px 80px; }
.doc h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.doc .updated { color: var(--text-2); font-size: 0.88rem; margin-top: 6px; }
.doc h2 { text-align: left; font-size: 1.2rem; margin-top: 34px; }
.doc p, .doc li { color: var(--text-2); margin-top: 12px; font-size: 0.98rem; }
.doc p strong, .doc li strong { color: var(--text); }
.doc a { color: var(--accent); text-decoration: none; }
.doc code { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 0.88em; }
.doc kbd { background: var(--panel); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; font-size: 0.85em; }
.back { display: inline-block; margin-bottom: 22px; color: var(--accent); text-decoration: none; font-size: 0.92rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 34px 0 46px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
footer p { color: var(--text-2); font-size: 0.85rem; }
footer a { color: var(--text-2); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .legal { flex-basis: 100%; margin-top: 4px; }

@media (max-width: 560px) {
  .nav-links a.hide-sm { display: none; }
  /* The hero badge sits just below the fold on phones — the nav CTA would only
     push the language select off-screen. */
  .nav-links a.nav-cta { display: none; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.88rem; }
  .hero { padding-top: 52px; }
}
