/* emberviewer docs - self-contained, no external dependencies */

:root {
  --ember: #d9772b;
  --ember-dark: #b25e1c;
  --ember-soft: #fbe8d8;
  --bg: #ffffff;
  --bg-alt: #faf7f4;
  --surface: #ffffff;
  --border: #e7e1da;
  --text: #1f2328;
  --text-muted: #5c6168;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --maxw: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-alt: #14171d;
    --surface: #1a1e25;
    --border: #2a2f38;
    --text: #e9ecf1;
    --text-muted: #a4abb6;
    --ember-soft: #2a1d10;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--ember-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  a { color: var(--ember); }
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.nav .spacer { flex: 1; }
.nav a.navlink { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.nav a.navlink:hover { color: var(--ember-dark); text-decoration: none; }
@media (prefers-color-scheme: dark) { .nav a.navlink:hover { color: var(--ember); } }

@media (max-width: 640px) {
  .nav a.navlink.hide-sm { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ember);
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 119, 43, 0.35);
}
.btn-primary:hover { background: var(--ember-dark); color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--ember); color: var(--ember-dark); }
@media (prefers-color-scheme: dark) { .btn-ghost:hover { color: var(--ember); } }
.btn svg { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  text-align: center;
}
/* Blurred screenshot backdrop - its own layer so the blur never touches the
   title/icon. Bled past the edges and scaled up so the blur has no hard border. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: url("MainScreenshot.png") center top / cover no-repeat;
  filter: blur(2px) saturate(1.05);
  transform: scale(1.03);
  opacity: 0.72;
  z-index: 0;
}
/* Readability veil + the original ember glow, over the screenshot. Uses the
   theme background colour so text stays legible in both light and dark mode,
   and fades to solid at the bottom for a seamless hand-off to the next section. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 360px at 50% -120px, var(--ember-soft), transparent 70%),
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg) 35%, transparent) 0%,
      color-mix(in srgb, var(--bg) 58%, transparent) 55%,
      var(--bg) 100%
    );
  z-index: 1;
}
.hero .wrap { position: relative; z-index: 2; }
.hero .logo-big { margin: 0 auto 22px; display: block; }
.hero h1 {
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero .tagline {
  font-size: clamp(18px, 3vw, 23px);
  color: var(--text-muted);
  margin: 0 auto 10px;
  max-width: 640px;
}
.hero .blurb {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 auto 30px;
  max-width: 620px;
}
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 18px; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Sections ---------- */
section { padding: 64px 0; border-top: 1px solid var(--border); }
section.alt { background: var(--bg-alt); }
section h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
section .lead { color: var(--text-muted); margin: 0 0 32px; max-width: 660px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ember);
  margin: 0 0 8px;
}

/* ---------- Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.why-card h3 { margin: 0 0 6px; font-size: 18px; }
.why-card p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.feature .dot {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 6px;
  background: var(--ember-soft);
  display: grid;
  place-items: center;
  color: var(--ember-dark);
}
@media (prefers-color-scheme: dark) { .feature .dot { color: var(--ember); } }
.feature .dot svg { display: block; }
.feature h3 { margin: 0 0 2px; font-size: 15.5px; }
.feature p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.5; }

.subhead { margin: 34px 0 14px; font-size: 14px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.subhead:first-of-type { margin-top: 8px; }
.aside { margin: 26px 0 0; font-size: 15px; color: var(--text-muted); }

/* ---------- Tested devices ---------- */
.devices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.device {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 500;
}
.device::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
}
.note-tested { margin: 22px 0 0; font-size: 14px; color: var(--text-muted); }

/* ---------- Screenshot carousel ---------- */
.carousel { position: relative; }
.carousel-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  background: var(--surface);
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;             /* Firefox */
}
.carousel-track::-webkit-scrollbar { display: none; }  /* WebKit */
.slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: center;
}
.slide img {
  display: block;
  width: 100%;
  /* A neutral 16:10 stage: the three screenshots have different native aspect
     ratios, so `contain` fits each one whole (never cropping UI) on a subtle
     backdrop, while keeping every slide the same height for clean swiping. */
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--bg-alt);
}
.slide figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--ember-soft) 35%, transparent);
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(4px);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.carousel-arrow:hover { border-color: var(--ember); color: var(--ember-dark); }
@media (prefers-color-scheme: dark) { .carousel-arrow:hover { color: var(--ember); } }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.carousel-arrow svg { display: block; }
.carousel-dots { display: flex; justify-content: center; gap: 9px; margin-top: 16px; }
.carousel-dots .dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.carousel-dots .dot:hover { background: var(--text-muted); }
.carousel-dots .dot.is-active { background: var(--ember); transform: scale(1.25); }
@media (max-width: 640px) {
  .carousel-arrow { width: 38px; height: 38px; }
}

/* ---------- Code blocks ---------- */
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
:not(pre) > code {
  background: var(--ember-soft);
  color: var(--ember-dark);
  padding: 2px 6px;
  border-radius: 5px;
}
@media (prefers-color-scheme: dark) { :not(pre) > code { color: var(--ember); } }
pre code { background: none; color: inherit; padding: 0; }

.steps { display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.step .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ember); color: #fff; font-weight: 700;
  display: grid; place-items: center;
}
.step h3 { margin: 4px 0 6px; font-size: 18px; }
.step p { margin: 0 0 8px; color: var(--text-muted); }

/* ---------- New-feature highlight ---------- */
.pill {
  display: inline-block;
  background: var(--ember);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}
.flow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ember);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 4px 0 26px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- Docs (protocol) callout ---------- */
.callout {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ember);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.callout .txt { flex: 1; min-width: 260px; }
.callout h3 { margin: 0 0 4px; font-size: 19px; }
.callout p { margin: 0; color: var(--text-muted); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 14.5px;
}
footer.site .frow { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--text-muted); }
footer.site a:hover { color: var(--ember-dark); }
@media (prefers-color-scheme: dark) { footer.site a:hover { color: var(--ember); } }
footer.site .links { display: flex; gap: 18px; flex-wrap: wrap; }
