/* Base Reset and Typography */

@font-face {
  font-family: "Google Sans Flex";
  src: url("/assets/fonts/GoogleSansFlex.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: block;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: "Google Sans Flex", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Accessibility outline */
:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 4px;
}

/* Typography and Spacing */
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  line-height: 1.3;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 720px;
}

ul, ol {
  margin-bottom: 24px;
  padding-left: 20px;
  max-width: 720px;
}

li {
  margin-bottom: 8px;
  font-size: 1.05rem;
  opacity: 0.85;
}

/* Anchor tags */
a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

p a, li a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

p a:hover, li a:hover {
  opacity: 0.7;
}

img {
  max-width: 100%;
  display: block;
}

/* Custom Scrollbar Webkit Styles */
::-webkit-scrollbar {
  display: none;
}

/* Theme transitions enabled only during toggling to prevent page load glitches */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Disable transitions entirely on load/restore */
.no-transitions,
.no-transitions * {
  transition: none !important;
}
