/* Emberbyte website. Colours come from the app's own palettes (assets/themes.js sets the variables). */
@font-face {
  font-family: "Roboto Flex";
  src: url("assets/fonts/roboto-flex.woff2") format("woff2");
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-display: swap;
}

:root {
  --bg: #110F19; --surface: #1D1929; --surface2: #2A2440; --text: #E8E1F5; --muted: #B3A9CC;
  --primary: #D0BCFF; --on-primary: #2A1858; --accent: #C9F0D3; --on-accent: #0D3A1F;
  --warn: #FFD98A; --danger: #FFB4AB; --track: #4A4360;
  --radius: 28px; --small: 8px;
  --maxw: 1120px;
  color-scheme: dark;
}
:root[data-mode="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Roboto Flex", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 84px 0; }
h1, h2, h3 { margin: 0; line-height: 1.04; letter-spacing: -0.02em; font-weight: 800; font-stretch: 55%; }
h1 { font-size: clamp(3rem, 8vw, 5.6rem); font-stretch: 40%; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
h3 { font-size: 1.35rem; font-stretch: 85%; letter-spacing: -0.01em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; margin: 0 0 28px; }
.eyebrow { display: inline-flex; gap: 10px; align-items: center; font-size: .9rem; font-weight: 700; color: var(--accent); letter-spacing: .02em; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-stretch: 70%; font-size: 1.35rem; }
.brand svg { width: 30px; height: 30px; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav li a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav li a:hover { background: var(--surface2); color: var(--text); }
.mode { border: 0; background: var(--surface2); color: var(--text); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
@media (max-width: 820px) { .nav li:not(.keep) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 700;
  padding: 15px 26px; min-height: 52px; border-radius: 999px; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.ghost { background: var(--surface2); color: var(--text); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 .num { color: var(--primary); }
.hero h1 .unit { display: inline-grid; place-items: center; position: relative; width: 1.05em; height: 1.05em; vertical-align: -.12em; margin-left: .12em; }
.hero h1 .unit span { position: relative; font-size: .36em; font-stretch: 110%; font-weight: 850; color: var(--on-primary); letter-spacing: 0; }
.cookie { position: absolute; inset: 0; color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding: 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: 7px 14px; border-radius: 999px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.chips li b { color: var(--text); }
.phones { position: relative; height: 640px; }
.phone { position: absolute; width: 270px; aspect-ratio: 1080 / 2340; border-radius: 40px; background: var(--surface2); padding: 8px;
  box-shadow: 0 30px 70px rgba(0,0,0,.45), inset 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent); }
.phone img { width: 100%; height: 100%; display: block; border-radius: 33px; object-fit: cover; }
.phone.a { left: 50%; top: 0; transform: translateX(-50%); z-index: 3; }
.phone.b { left: -2%; top: 70px; transform: rotate(-7deg); z-index: 2; width: 230px; opacity: .96; }
.phone.c { right: -2%; top: 90px; transform: rotate(7deg); z-index: 2; width: 230px; opacity: .96; }
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 560px; }
  .phone.b, .phone.c { display: none; }
  .phone.a { width: 250px; }
}

/* Feature bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 36px; }
.tile { background: var(--surface); border-radius: var(--radius) var(--radius) var(--radius) var(--small); padding: 28px; position: relative; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
.tile:nth-child(even) { border-radius: var(--radius) var(--radius) var(--small) var(--radius); }
.tile h3 { margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 1rem; }
.tile .icon { font-size: 1.7rem; margin-bottom: 14px; display: block; }
.t-wide { grid-column: span 4; } .t-mid { grid-column: span 3; } .t-small { grid-column: span 2; }
.tile.hi { background: var(--primary); color: var(--on-primary); }
.tile.hi p { color: color-mix(in srgb, var(--on-primary) 82%, transparent); }
.tile.ac { background: var(--accent); color: var(--on-accent); }
.tile.ac p { color: color-mix(in srgb, var(--on-accent) 82%, transparent); }
@media (max-width: 860px) { .t-wide, .t-mid, .t-small { grid-column: span 6; } }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.sw[aria-pressed="true"] { border-color: var(--text); }
.sw::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--sw2); box-shadow: 0 0 0 2px var(--sw1); }
.theme-name { margin-top: 12px; font-weight: 700; font-size: .95rem; }

/* Gallery */
.gallery { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; margin-top: 28px; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; width: 230px; }
.gallery img { width: 100%; height: auto; border-radius: 28px; display: block; box-shadow: 0 16px 40px rgba(0,0,0,.35); aspect-ratio: 1080/2340; object-fit: cover; }
.gallery figcaption { margin-top: 12px; color: var(--muted); font-size: .92rem; font-weight: 600; }

/* Privacy */
.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-top: 30px; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }
.perms { background: var(--surface); border-radius: var(--radius) var(--radius) var(--radius) var(--small); padding: 22px 24px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .86rem; line-height: 1.9; border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
.perms .no { color: var(--accent); font-weight: 700; }
.perms .dim { color: var(--muted); }
.perms .head { color: var(--muted); display: block; margin-bottom: 8px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.points b { color: var(--text); }
.points span.ok { color: var(--accent); font-weight: 800; }

/* Download */
.dl { background: var(--surface); border-radius: var(--radius) var(--radius) var(--radius) var(--small); padding: 36px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
@media (max-width: 860px) { .dl { grid-template-columns: 1fr; padding: 24px; } }
.stores { display: grid; gap: 12px; align-content: start; }
.store { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 20px; background: var(--surface2); text-decoration: none; color: var(--text); font-weight: 700; }
.store small { display: block; color: var(--muted); font-weight: 500; }
.store[aria-disabled="true"] { opacity: .6; }
.store-badge { justify-self: start; display: inline-block; line-height: 0; border-radius: 14px; }
.store-badge img { display: block; height: 60px; width: auto; }
.store-badge:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.tag { margin-left: auto; font-size: .78rem; background: var(--bg); padding: 4px 10px; border-radius: 999px; color: var(--muted); }
pre { margin: 0; background: var(--bg); border-radius: 18px; padding: 16px 18px; overflow-x: auto; font-size: .82rem; line-height: 1.7; color: var(--text); }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.fp { word-break: break-all; color: var(--accent); }
.copy { margin-top: 10px; font-size: .88rem; padding: 8px 16px; min-height: 40px; }

/* Makers */
.makers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
@media (max-width: 760px) { .makers { grid-template-columns: 1fr; } }
.maker { background: var(--surface); border-radius: var(--radius) var(--radius) var(--radius) var(--small); padding: 28px; display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: start; border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
.maker:nth-child(2) { border-radius: var(--radius) var(--radius) var(--small) var(--radius); }
.avatar { position: relative; width: 84px; height: 84px; display: grid; place-items: center; font-weight: 850; font-stretch: 110%; font-size: 1.5rem; color: var(--on-primary); }
.maker h3 { margin-bottom: 4px; }
.maker .role { color: var(--accent); font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.maker p { margin: 0 0 10px; color: var(--muted); font-size: .98rem; }
.credit { margin-top: 22px; color: var(--muted); font-size: .95rem; }

/* Changelog / news */
.cols { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; margin-top: 30px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.card { background: var(--surface); border-radius: var(--radius) var(--radius) var(--radius) var(--small); padding: 28px; border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
.ver { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ver h3 { font-size: 1.8rem; }
.ver time { color: var(--muted); font-size: .95rem; }
.card ul { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.card li { margin: 6px 0; }
.card li b { color: var(--text); }
.news { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 18px; }
.news li { padding-bottom: 18px; border-bottom: 1px solid color-mix(in srgb, var(--text) 9%, transparent); }
.news li:last-child { border: 0; padding: 0; }
.news time { display: block; color: var(--muted); font-size: .85rem; }
.news a { font-weight: 700; color: var(--text); text-decoration: none; }
.news a:hover { color: var(--primary); }

/* Report */
.report { background: var(--primary); color: var(--on-primary); border-radius: var(--radius) var(--radius) var(--radius) var(--small); padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.report h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 6px; }
.report p { margin: 0; max-width: 34em; color: color-mix(in srgb, var(--on-primary) 85%, transparent); }
.report .btn { background: var(--on-primary); color: var(--primary); }

footer { padding: 46px 0 60px; color: var(--muted); font-size: .94rem; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
footer ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } .btn:hover { transform: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Generated changelog and news */
.notes h4, .notes h5, .notes h6 { margin: 18px 0 6px; font-size: 1.05rem; font-stretch: 100%; letter-spacing: 0; color: var(--text); }
.notes p { margin: 8px 0; color: var(--muted); }
.notes ul { margin: 0 0 12px; }
.notes code { background: var(--bg); padding: 2px 7px; border-radius: 6px; font-size: .85em; }
.older-h { margin: 26px 0 8px; font-size: 1rem; font-stretch: 100%; color: var(--muted); letter-spacing: 0; }
.news .t { font-weight: 700; color: var(--text); }
.news .body { margin-top: 4px; color: var(--muted); font-size: .96rem; }
.news .body p { margin: 4px 0; }
.news code { background: var(--bg); padding: 1px 6px; border-radius: 6px; }
