import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

// Self-hosted fonts (no Google CDN on the critical path: no FOUT on the
// Cormorant ritual screens, serif works offline, and launch-to-interactive
// stays inside the one-second budget). Weights match actual usage:
// DM Sans 300–700 (apparatus), Cormorant 400–600 + italics (voice).
import '@fontsource/dm-sans/300.css';
import '@fontsource/dm-sans/400.css';
import '@fontsource/dm-sans/500.css';
import '@fontsource/dm-sans/600.css';
import '@fontsource/dm-sans/700.css';
import '@fontsource/cormorant-garamond/400.css';
import '@fontsource/cormorant-garamond/500.css';
import '@fontsource/cormorant-garamond/600.css';
import '@fontsource/cormorant-garamond/400-italic.css';
import '@fontsource/cormorant-garamond/500-italic.css';

import './index.css';
import App from './App';
import { initializeNative } from './lib/native';

// Native lifecycle plumbing (splash hide, status bar, keyboard).
// No-op on web — every step in initializeNative short-circuits when
// Capacitor.isNativePlatform() is false.
initializeNative();

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <App />
  </StrictMode>,
);
