/* ZlefRemote — landing. Built on da.zlef.fr tokens. Dark, atmospheric, minimal. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--zl-bg); color: var(--zl-text);
  font-family: var(--zl-font); line-height: 1.55; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* atmospheric background */
.bg-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 78% -8%, rgba(157,174,80,.10), transparent 60%),
    radial-gradient(48vw 48vw at 8% 16%, rgba(176,149,179,.08), transparent 60%),
    radial-gradient(40vw 40vw at 50% 120%, rgba(157,174,80,.06), transparent 60%);
  animation: hazedrift 24s ease-in-out infinite alternate;
}
@keyframes hazedrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(0,-2%,0) scale(1.05); } }

main, .nav, .foot { position: relative; z-index: 1; }

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 64px); max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.brand-mark { color: var(--zl-accent-soft); font-size: 26px; line-height: 1; transform: translateY(1px); }
.brand-name b { font-weight: 800; color: var(--zl-accent-soft); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 15px; }
.nav-links a:not(.zl-btn) { color: var(--zl-text-soft); transition: color .2s; }
.nav-links a:not(.zl-btn):hover { color: var(--zl-text); }

/* hero */
.hero {
  max-width: 1200px; margin: 0 auto; padding: clamp(28px, 6vw, 80px) clamp(18px, 5vw, 64px) 40px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center;
}
.kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 700;
  color: var(--zl-accent-soft); margin-bottom: 18px;
}
.hero-title { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; margin: 0 0 20px; letter-spacing: -.02em; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--zl-text-soft); max-width: 36ch; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  font-size: 13.5px; color: var(--zl-text-soft); background: var(--zl-surface-1);
  border: 1px solid var(--zl-line); padding: 7px 13px; border-radius: var(--zl-radius-pill);
}

/* hero art: phone beaming into a monitor */
.hero-art { position: relative; height: clamp(320px, 42vw, 460px); display: grid; place-items: center; }
.phone {
  position: absolute; left: 4%; bottom: 6%; width: clamp(120px, 17vw, 165px); aspect-ratio: 9/19;
  background: linear-gradient(160deg, #16161d, #0c0c11); border: 1px solid var(--zl-line-strong);
  border-radius: 26px; padding: 12px 9px; box-shadow: var(--zl-shadow-lg);
  transform: rotate(-7deg); animation: floaty 6s ease-in-out infinite;
  z-index: 3;
}
.phone-screen { height: 100%; border-radius: 16px; background: #07070b; border: 1px solid var(--zl-line); display: grid; grid-template-rows: 1.6fr 1fr; overflow: hidden; }
.pad { position: relative; background: radial-gradient(120% 120% at 50% 30%, rgba(157,174,80,.10), transparent); border-bottom: 1px solid var(--zl-line); }
.cursor { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--zl-accent-soft); box-shadow: 0 0 12px var(--zl-accent-glow); top: 30%; left: 35%; animation: drift 5s ease-in-out infinite; }
@keyframes drift { 0%{top:30%;left:30%} 25%{top:55%;left:62%} 50%{top:42%;left:40%} 75%{top:62%;left:25%} 100%{top:30%;left:30%} }
.keys { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; padding: 8px; }
.keys i { background: var(--zl-surface-2); border-radius: 4px; aspect-ratio: 1.4; display: block; }
.keys i:nth-child(3n) { background: rgba(157,174,80,.14); }

.monitor { position: absolute; right: 3%; top: 8%; width: clamp(180px, 28vw, 290px); z-index: 1; transform: rotate(2deg); animation: floaty 7s ease-in-out infinite reverse; }
.monitor-screen { aspect-ratio: 16/10; border-radius: 10px; background: linear-gradient(150deg,#101017,#0a0a0f); border: 1px solid var(--zl-line-strong); box-shadow: inset 0 0 60px rgba(157,174,80,.06), var(--zl-shadow-md); position: relative; overflow: hidden; }
.monitor-screen::after { content:''; position:absolute; width:14px;height:14px;border-radius:50%;background:var(--zl-accent-soft);box-shadow:0 0 16px var(--zl-accent-glow); top:38%; left:46%; animation: drift 5s ease-in-out infinite; }
.monitor-stand { width: 28%; height: 16px; margin: 0 auto; background: var(--zl-surface-2); border:1px solid var(--zl-line); border-top:none; border-radius:0 0 6px 6px; }
/* Wi-Fi signal waves radiating from the phone toward the monitor.
   Concentric ring divs, each clipped to a right-pointing wedge → arcs; a pulse
   of brightness travels outward (w1 → w4). */
.signal { position: absolute; left: 24%; bottom: 50%; width: 0; height: 0; z-index: 2;
  transform: rotate(-13deg); pointer-events: none; --base: clamp(180px, 25vw, 290px); }
.signal .emitter {
  position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--zl-accent-soft); transform: translate(-50%, -50%); opacity: .7;
  box-shadow: 0 0 7px var(--zl-accent-wash); animation: emitpulse 3.8s ease-in-out infinite;
}
@keyframes emitpulse { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .5; }
  12% { transform: translate(-50%,-50%) scale(1.2); opacity: .8; } }
.signal .wave {
  position: absolute; left: 0; top: 0; width: var(--base); height: var(--base);
  border: 1.4px solid var(--zl-accent-mid); border-radius: 50%; opacity: 0;
  transform: translate(-50%, -50%) scale(var(--s));
  clip-path: polygon(50% 50%, 102% 12%, 102% 88%); /* gentle right-pointing wedge */
  animation: signalpulse 3.8s ease-in-out infinite;
}
.signal .w1 { --s: .30; animation-delay: 0s; }
.signal .w2 { --s: .54; animation-delay: .34s; }
.signal .w3 { --s: .78; animation-delay: .68s; }
.signal .w4 { --s: 1;   animation-delay: 1.02s; }
@keyframes signalpulse {
  0%   { opacity: 0; }
  22%  { opacity: .32; }
  60%  { opacity: .12; }
  100% { opacity: 0; }
}
@keyframes floaty { 0%,100%{transform:translateY(0) rotate(var(--r,-7deg));} 50%{transform:translateY(-10px) rotate(var(--r,-7deg));} }
.phone{--r:-7deg} .monitor{--r:2deg}

/* sections */
section { max-width: 1100px; margin: 0 auto; padding: clamp(40px,7vw,84px) clamp(18px,5vw,64px); }
.sect-title { text-align: center; margin: 0 0 clamp(28px,4vw,48px); font-size: clamp(28px,4vw,44px); }

.steps, .feat-grid { display: grid; gap: 18px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.feat-grid { grid-template-columns: repeat(2, 1fr); }
.step, .feat, .mode-card, .e2ee, .dlcard {
  background: var(--zl-surface-1); border: 1px solid var(--zl-line);
  border-radius: var(--zl-radius-lg); padding: clamp(20px,3vw,30px);
  transition: transform .35s var(--zl-ease,cubic-bezier(.2,.7,.2,1)), border-color .35s, box-shadow .35s;
}
.step:hover, .feat:hover, .mode-card:hover { transform: translateY(-4px); border-color: var(--zl-line-strong); box-shadow: var(--zl-shadow-md); }
.step-no { font-size: 30px; color: var(--zl-accent-soft); margin-bottom: 10px; }
.step h3, .feat h3, .mode-card h3 { margin: 0 0 8px; font-size: 19px; }
.step p, .feat p, .mode-card p, .e2ee p { margin: 0; color: var(--zl-text-soft); font-size: 15.5px; }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.mode-ico { font-size: 30px; margin-bottom: 10px; }
.mode-card.accent2 { border-color: rgba(176,149,179,.25); background: linear-gradient(180deg, rgba(176,149,179,.05), var(--zl-surface-1)); }
.e2ee { background: linear-gradient(180deg, rgba(157,174,80,.06), var(--zl-surface-1)); border-color: rgba(157,174,80,.22); }
.e2ee h3 { margin: 0 0 10px; font-size: 20px; color: var(--zl-accent-soft); }

/* download */
.dl-lede { text-align: center; color: var(--zl-text-soft); margin: -16px auto 28px; max-width: 52ch; }
.dl-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.dlcard { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; }
.dlcard:hover { transform: translateY(-4px); border-color: var(--zl-accent-soft); box-shadow: var(--zl-shadow-md); }
.dlcard.soon { opacity: .82; }
.dlicon { font-size: 38px; line-height: 1; }
.dlname { font-weight: 700; font-size: 18px; }
.dlsub { font-size: 13px; color: var(--zl-text-muted); }
.dlget { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--zl-accent-soft); }
.dlget.muted { color: var(--zl-text-muted); }
.dl-note { text-align: center; color: var(--zl-text-muted); font-size: 14px; margin-top: 22px; }
.dl-xfce { text-align: center; color: var(--zl-text-soft); font-size: 14px; margin-top: 10px; }
.dl-xfce a { color: var(--zl-accent-soft); text-decoration: none; white-space: nowrap; font-weight: 600; transition: color .18s ease; }
.dl-xfce a:hover { color: var(--zl-accent-bright); }
.dl-sep { color: var(--zl-text-faint); padding: 0 2px; }
.dl-xfce a svg { width: 14px; height: 14px; vertical-align: -2px; }


/* ── the phone app ──────────────────────────────────────────────────────── */
/* Three cards, deliberately not equal: Android ships, iOS doesn't, web is the
   fallback. The two we can't sell are muted rather than hidden — a missing
   platform card reads as an oversight, a muted one reads as an answer. */
.appsec { max-width: 1100px; margin: 0 auto; padding: clamp(36px,7vw,72px) clamp(18px,5vw,64px); }
.app-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; align-items: stretch; }
.app-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--zl-surface-1); border: 1px solid var(--zl-line); border-radius: var(--zl-radius-lg, 8px); }
.app-card.muted { background: transparent; }
.app-card h3 { margin: 0; font-size: 18px; }
.app-os { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--zl-accent-soft); }
.app-card.muted .app-os { color: var(--zl-text-muted); }
.app-os svg { width: 16px; height: 16px; }
.app-get { align-self: flex-start; margin-top: 4px; }
.app-get.is-disabled { opacity: .55; cursor: default; }
.app-meta { margin: 0; font-family: var(--zl-font-mono, ui-monospace, monospace); font-size: 13px; color: var(--zl-text-muted); }
.app-sub { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--zl-text-soft); }

.openweb { display: inline-block; margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--zl-accent-soft); text-decoration: none; }
.openweb:hover { color: var(--zl-accent-bright); }
.openweb svg { width: 14px; height: 14px; vertical-align: -2px; }

/* footer */
.foot { max-width: 1100px; margin: 0 auto; padding: 36px clamp(18px,5vw,64px); display: flex; gap: 14px; justify-content: space-between; color: var(--zl-text-muted); border-top: 1px solid var(--zl-line); font-size: 14px; }
.foot a { color: var(--zl-accent-soft); }

/* reveal on scroll — only hidden when JS is active (progressive enhancement) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--zl-ease,ease), transform .7s var(--zl-ease,ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── Tablet / small ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: clamp(20px,5vw,32px); padding-top: clamp(20px,5vw,40px); }
  .hero-copy { order: 1; }
  .hero-art { order: 2; height: clamp(220px, 56vw, 320px); }
  .lede { max-width: 46ch; }
  .steps, .feat-grid, .mode-grid, .dl-grid, .app-grid { grid-template-columns: 1fr; }
}

/* ── Phone ──────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .nav { padding: 14px 18px; }
  .brand { font-size: 18px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.zl-btn) { display: none; } /* keep only the GitHub button */
  .hero { padding-left: 20px; padding-right: 20px; }
  .hero-title { font-size: clamp(36px, 11vw, 50px); }
  .lede { font-size: 17px; }
  .hero-cta { gap: 10px; }
  .hero-cta .zl-btn { flex: 1 1 auto; }  /* full-width, easy thumb targets */
  .badges { gap: 8px; }
  .badge { font-size: 12.5px; padding: 6px 11px; }

  /* compact, tidy hero scene that fits a phone without clipping */
  .hero-art { height: 240px; }
  .phone { left: 7%; bottom: 8%; width: 100px; border-radius: 20px; padding: 9px 7px; }
  .phone-screen { border-radius: 13px; }
  .monitor { right: 5%; top: 16%; width: 168px; }
  .signal { left: 31%; bottom: 47%; --base: 150px; }

  section { padding-top: clamp(36px,9vw,56px); padding-bottom: clamp(36px,9vw,56px); }
  .sect-title { font-size: clamp(26px,7vw,34px); margin-bottom: 26px; }
  .step, .feat, .mode-card, .e2ee { padding: 20px; }
  .dl-grid { gap: 12px; max-width: 420px; margin-left: auto; margin-right: auto; }
  .dlcard { padding: 22px; }
  .foot { flex-direction: column; gap: 6px; text-align: center; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .monitor, .cursor, .bg-field, .signal .wave, .monitor-screen::after { animation: none; }
  .signal .wave { opacity: .18; }
}

/* ── Inline line-icons (replace emoji) ──────────────────────────────────── */
.ico { width: 1.05em; height: 1.05em; flex: 0 0 auto; vertical-align: -0.16em; }
.ico.flip { transform: scaleX(-1); }
.badge .ico { width: 15px; height: 15px; color: var(--zl-accent-soft); margin-right: 4px; }
.feat h3 .ico, .e2ee h3 .ico { width: 21px; height: 21px; color: var(--zl-accent-soft); margin-right: 7px; }
.feat h3, .e2ee h3 { display: flex; align-items: center; }
.mode-ico { color: var(--zl-accent-soft); margin-bottom: 12px; line-height: 0; }
.mode-ico .ico { width: 30px; height: 30px; }
.mode-card.accent2 .mode-ico { color: var(--zl-accent2-soft); }
.dlget .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }

/* device-aware hero CTA */
.cta-mobile { display: none; }
@media (max-width: 560px) {
  .cta-desktop { display: none; }
  .cta-mobile { display: inline-flex; }
}

/* ── /start page ────────────────────────────────────────────────────────── */
.start-main { max-width: 1040px; margin: 0 auto; padding: clamp(24px,5vw,56px) clamp(18px,5vw,64px) 64px; }
.start-hero { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: clamp(28px,5vw,64px); align-items: center; }
.start-preview { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pv-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--zl-text-muted); font-weight: 700; }
.start-h1 { font-size: clamp(34px,5vw,52px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 16px; }
.start-sub { font-size: clamp(16px,2vw,18px); color: var(--zl-text-soft); max-width: 48ch; margin: 0 0 26px; }

.getbox { background: var(--zl-surface-1); border: 1px solid var(--zl-line); border-radius: var(--zl-radius-lg); padding: clamp(20px,3vw,28px); }
.getbox-title { margin: 0 0 6px; font-size: 19px; }
.getbox-sub { margin: 0 0 18px; color: var(--zl-text-soft); font-size: 15px; }
.getbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.getbtn { width: 100%; }
.getbtn .ico { color: currentColor; }
#copyBtn.ok { color: var(--zl-accent-soft); border-color: var(--zl-line-focus); }
.getbox-desktop { margin: 18px 0 0; font-size: 14px; color: var(--zl-text-muted); text-align: center; }
.getbox-desktop a { color: var(--zl-accent-soft); font-weight: 600; }
.getbox-desktop .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* phone preview mockup (mirrors the real in-room remote) */
.pv-phone { width: clamp(230px, 70vw, 290px); aspect-ratio: 9 / 18.5; background: linear-gradient(160deg,#16161d,#0c0c11);
  border: 1.5px solid var(--zl-line-strong); border-radius: 30px; padding: 12px; box-shadow: var(--zl-shadow-lg); }
.pv-screen { height: 100%; background: var(--zl-bg); border: 1px solid var(--zl-line); border-radius: 20px; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto auto; }
.pv-top { display: flex; align-items: center; gap: 8px; padding: 12px 13px; border-bottom: 1px solid var(--zl-line); background: var(--zl-surface-1); }
.pv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--zl-olive-soft); box-shadow: 0 0 10px var(--zl-accent-glow); }
.pv-st { font-size: 12.5px; font-weight: 700; color: var(--zl-text-soft); }
.pv-host { margin-left: auto; font-size: 11px; color: var(--zl-text-muted); }
.pv-pad { position: relative; margin: 10px; border-radius: 12px; border: 1px solid var(--zl-line-strong);
  background: radial-gradient(120% 90% at 50% 0%, rgba(157,174,80,.08), transparent 60%), var(--zl-surface-1);
  display: grid; place-items: center; }
.pv-cursor { position: absolute; top: 34%; left: 40%; width: 9px; height: 9px; border-radius: 50%; background: var(--zl-accent-soft); box-shadow: 0 0 10px var(--zl-accent-glow); }
.pv-hint { font-size: 11.5px; color: var(--zl-text-muted); text-align: center; padding: 0 22px; }
.pv-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; padding: 0 10px 10px; }
.pv-btns span { text-align: center; padding: 11px 0; font-size: 12px; font-weight: 600; color: var(--zl-text-soft);
  background: var(--zl-surface-2); border: 1px solid var(--zl-line-strong); border-radius: 7px; }
.pv-btns .pv-lock { color: var(--zl-accent-soft); border-color: rgba(157,174,80,.3); }
.pv-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--zl-line); background: var(--zl-surface-1); }
.pv-tabs span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 11px; font-size: 10.5px; font-weight: 600; color: var(--zl-text-muted); border-top: 2px solid transparent; }
.pv-tabs span .ico { width: 17px; height: 17px; }
.pv-tabs .on { color: var(--zl-accent-soft); border-top-color: var(--zl-accent-soft); background: rgba(157,174,80,.05); }

@media (max-width: 760px) {
  .start-hero { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
  .start-copy { width: 100%; }
  .start-sub { max-width: none; }
  .start-h1 { text-align: center; }
  .start-sub { text-align: center; }
}
@media (max-width: 460px) {
  .getbtns { grid-template-columns: 1fr; }
}

/* footer links */
.foot-links { display: inline-flex; gap: 18px; align-items: center; }
.foot-links a { color: var(--zl-accent-soft); }

/* ── Legal / privacy page ───────────────────────────────────────────────── */
.legal-main { max-width: 760px; margin: 0 auto; padding: clamp(28px,5vw,56px) clamp(18px,5vw,40px) 72px; }
.legal-h1 { font-size: clamp(34px,5vw,52px); letter-spacing: -.02em; margin: 0 0 8px; }
.legal-updated { color: var(--zl-text-muted); font-size: 14px; margin: 0 0 24px; }
.legal-intro { font-size: clamp(17px,2vw,19px); color: var(--zl-text-soft); line-height: 1.6; margin: 0 0 12px;
  padding-bottom: 26px; border-bottom: 1px solid var(--zl-line); }
.priv-sec { margin-top: 34px; }
.priv-sec h2 { font-size: clamp(19px,2.4vw,23px); margin: 0 0 12px; letter-spacing: -.01em; }
.priv-sec h2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--zl-accent-soft); margin-right: 11px; vertical-align: middle; }
.priv-sec p { color: var(--zl-text-soft); line-height: 1.68; font-size: 16px; margin: 0 0 12px; max-width: 68ch; }

/* "Open the remote" — PWA entry from the mobile /start funnel */
.openapp { display: flex; align-items: center; gap: 14px; margin-top: 16px;
  background: var(--zl-accent-wash); border: 1px solid rgba(157,174,80,.35);
  border-radius: var(--zl-radius-lg); padding: 16px 18px; text-decoration: none;
  transition: background .15s, transform .06s, border-color .15s; }
.openapp:hover { background: rgba(157,174,80,.16); border-color: var(--zl-line-focus); }
.openapp:active { transform: translateY(1px); }
.openapp-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: var(--zl-accent-soft); background: var(--zl-surface-2); border: 1px solid var(--zl-line); }
.openapp-ic .ico { width: 22px; height: 22px; }
.openapp-txt { display: flex; flex-direction: column; gap: 3px; }
.openapp-t { font-weight: 700; color: var(--zl-text); font-size: 16px; }
.openapp-t .ico { width: 15px; height: 15px; vertical-align: -2px; color: var(--zl-accent-soft); }
.openapp-s { font-size: 13.5px; color: var(--zl-text-muted); line-height: 1.45; }
