// Nāvika Operator site — production app shell.
// Theme persists via localStorage. No Tweaks panel.
// Mock in-app screens (Bridge/Dispatch/Admin/Sign-in) are hidden for launch.

function App() {
  const [mode, setMode] = React.useState(() => {
    try { return localStorage.getItem('navika.theme') === 'light' ? 'light' : 'dark'; }
    catch (e) { return 'dark'; }
  });
  React.useEffect(() => {
    try { localStorage.setItem('navika.theme', mode); } catch (e) {}
  }, [mode]);

  const tagline = {
    text: 'The complete platform for modern pilotage.',
    sub: 'Pilotage planning, scheduling and crew — in one connected platform.',
  };

  return <Cinematic tagline={tagline} mode={mode} setMode={setMode} />;
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
