/* Geist — самохостинг. Раньше грузился с fonts.googleapis.com: внешний домен
   блокировал рендер, и при недоступности Google экран оставался пустым. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/geist-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Do not show tofu squares while Expo icon fonts are loading or unavailable. */
html:not(.llamas-icons-ready) [style*="Ionicons"],
html:not(.llamas-icons-ready) [style*="MaterialIcons"],
html:not(.llamas-icons-ready) [style*="MaterialCommunityIcons"],
html:not(.llamas-icons-ready) [style*="FontAwesome"] {
  visibility: hidden !important;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/geist-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Typography System */
:root {
  --font-family: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* shadcn/ui zinc theme variables */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 10% 3.9%;
  --radius: 0.5rem;

  /* Dark mode variants (default for Llamas app is dark) */
  --dark-background: 240 10% 3.9%;
  --dark-foreground: 0 0% 98%;
  --dark-card: 240 10% 3.9%;
  --dark-card-foreground: 0 0% 98%;
  --dark-popover: 240 10% 3.9%;
  --dark-popover-foreground: 0 0% 98%;
  --dark-primary: 0 0% 98%;
  --dark-primary-foreground: 240 5.9% 10%;
  --dark-secondary: 240 3.7% 15.9%;
  --dark-secondary-foreground: 0 0% 98%;
  --dark-muted: 240 3.7% 15.9%;
  --dark-muted-foreground: 240 5% 64.9%;
  --dark-accent: 240 3.7% 15.9%;
  --dark-accent-foreground: 0 0% 98%;
  --dark-destructive: 0 62.8% 30.6%;
  --dark-destructive-foreground: 0 0% 98%;
  --dark-border: 240 3.7% 15.9%;
  --dark-input: 240 3.7% 15.9%;
  --dark-ring: 240 4.9% 83.9%;

  /* Headings */
  --heading-color: #FFF;
  --heading-size: 36px;
  --heading-weight: 700;
  --heading-line-height: normal;

  /* Buttons */
  --button-color: #222;
  --button-size: 21px;
  --button-weight: 700;
  --button-line-height: normal;

  /* Body text */
  --text-color: #FFF;
  --text-size: 21px;
  --text-weight: 400;
  --text-line-height: 136%; /* 28.56px */

  /* Input placeholder */
  --placeholder-color: #8A8A95;
}

/* Global font settings */
* {
  font-feature-settings: 'liga' off, 'clig' off;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

/* Prevent iOS zoom on input focus (fontSize < 16px) */
@media screen and (max-width: 768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

html, body, #root {
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  overscroll-behavior: none;
  background-color: #000;
}

/* iOS PWA standalone safe area — applied inside app content, not on root */
@supports (padding-top: env(safe-area-inset-top)) {
  :root {
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PWA standalone mode: offset content below the notch */
@media all and (display-mode: standalone) {
  #root {
    padding-top: env(safe-area-inset-top, 0px);
    box-sizing: border-box;
  }
}

/* Typography classes */
.heading {
  color: var(--heading-color);
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--heading-size);
  font-style: normal;
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
}

.button-text {
  color: var(--button-color);
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--button-size);
  font-style: normal;
  font-weight: var(--button-weight);
  line-height: var(--button-line-height);
}

.body-text {
  color: var(--text-color);
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--text-size);
  font-style: normal;
  font-weight: var(--text-weight);
  line-height: var(--text-line-height);
}
