/**
 * Wolly AI - Common Design System & Global Styles
 * ==============================================================================
 * This stylesheet defines the global design tokens, CSS reset, base typography,
 * reusable component patterns (appbar, footer, content boxes), accessibility
 * utilities, and global responsive breakpoints across all pages.
 * ==============================================================================
 */

/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================================================== */
:root {
  /* Brand Primary Palette */
  --color-primary: #1f6aff;
  --color-primary-hover: #1752cc;
  --color-primary-active: #1443a6;
  --color-primary-light: rgba(31, 106, 255, 0.6);
  --color-primary-tint: rgba(31, 106, 255, 0.12);
  --color-primary-subtle: rgba(31, 106, 255, 0.05);

  /* Neutral & Text Colors */
  --color-text-main: #0f172a;
  /* Slate 900 */
  --color-text-body: #334155;
  /* Slate 700 */
  --color-text-muted: #64748b;
  /* Slate 500 */
  --color-text-subtle: #94a3b8;
  /* Slate 400 */
  --color-text-inverse: #ffffff;

  /* Surfaces & Backgrounds */
  --color-bg-page: #f8fafc;
  /* Soft slate off-white */
  --color-bg-surface: #ffffff;
  --color-bg-card: rgba(255, 255, 255, 0.95);
  --color-bg-subtle: #f1f5f9;
  /* Slate 100 */

  /* Borders & Dividers */
  --color-border: #e2e8f0;
  /* Slate 200 */
  --color-border-hover: #cbd5e1;
  /* Slate 300 */
  --color-border-input: #cbd5e1;

  /* Feedback & Status Colors */
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;
  --color-error: #ef4444;
  --color-error-text: #dc2626;
  --color-error-bg: #fef2f2;
  --color-error-border: #fecaca;
  --color-error-tint: rgba(239, 68, 68, 0.15);
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;

  /* Typography */
  --font-family-base: "Baloo Bhaijaan 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-nav: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 0 3px var(--color-primary-tint);

  /* Layout Constraints */
  --container-max-width: 1200px;
  --content-box-max-width: 860px;
  --appbar-height: 64px;
}

/* ==========================================================================
   2. FONT DECLARATIONS
   ========================================================================== */
@font-face {
  font-family: "Baloo Bhaijaan 2";
  /* No [ ] in the filename: brackets break the URL on many hosts */
  src: url("../fonts/BalooBhaijaan2-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   3. CSS RESET & GLOBAL BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}



html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  
  font-family: var(--font-family-base);
  color: var(--color-text-main);
  background-color: var(--color-bg-page);

  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* top padding follows the fixed appbar height so content never hides under it */
  padding: calc(var(--appbar-height) + 56px) 8% 24px 8%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

img,
picture,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-main);
  line-height: 1.25;
  text-wrap: balance;
  font-weight: var(--font-weight-bold);
}

p {
  color: var(--color-text-body);
  text-wrap: pretty;
}

/* Inline link inside body copy (replaces repeated inline style="" attributes) */
.text-link {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  text-decoration: underline;
}

.text-link:hover {
  color: var(--color-primary-hover);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 56px 0 0 0;
  width: 100%;
}

/* ==========================================================================
   4. ACCESSIBILITY UTILITIES
   ========================================================================== */
/* Visually Hidden for Screen Readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Accessible Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ==========================================================================
   5. NAVIGATION BAR (Appbar)
   ========================================================================== */
.appbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;

  /* Always pinned to the top of the viewport while scrolling */
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;

  height: var(--appbar-height);
  padding-inline: 8%;

  /* Nearly opaque so scrolled content never shows through the text */
  background: rgba(248, 250, 252, 0.281);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

/* Brand Link */
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-radius: var(--radius-sm);
}


.logo-box {
  display: flex;
  align-items: center;
}

.brand-logo {
  width: auto;
  height: 50px;
}

/* ==========================================================================
   6. GLOBAL CONTENT BOX (Shared by Informational & Legal Pages)
   ========================================================================== */
.content-box {
  max-width: var(--content-box-max-width);
  margin: 32px auto 64px auto;
  padding: 48px;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  line-height: 1.75;
}

.content-box h1 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.content-box .page-meta {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.content-box h2 {
  font-size: 22px;
  margin: 32px 0 14px 0;
  color: var(--color-text-main);
}

.content-box h3 {
  font-size: 18px;
  margin: 20px 0 10px 0;
  color: var(--color-text-main);
}

.content-box p {
  color: var(--color-text-body);
  font-size: 16px;
  margin-bottom: 16px;
}

.content-box ul,
.content-box ol {
  padding-left: 24px;
  margin-bottom: 20px;
  color: var(--color-text-body);
}

.content-box li {
  margin-bottom: 8px;
  line-height: 1.65;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 12px 0;
  gap: 20px;
}

.footer p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  padding: 4px 0;
}

.footer a:hover,
.footer a[aria-current="page"] {
  color: var(--color-primary);
}

/* ==========================================================================
   8. GLOBAL RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  body {
    padding: calc(var(--appbar-height) + 32px) 5% 20px 5%;
  }

  .appbar {
    padding-inline: 5%;
  }

  .content-box {
    padding: 36px 28px;
    margin: 24px auto 48px auto;
  }
}

@media (max-width: 640px) {
  :root {
    --appbar-height: 56px;
  }

  body {
    padding: calc(var(--appbar-height) + 24px) 16px 20px 16px;
  }

  .appbar {
    padding-inline: 16px;
  }

  .brand-logo {
    height: 40px;
  }

  hr {
    margin-top: 32px;
  }

  .content-box {
    margin: 12px auto 32px auto;
  }

  .content-box {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 20px 0;
  }

  .footer-links {
    justify-content: center;
    gap: 18px;
  }

  .footer a {
    padding: 8px 0;
  }
}