/* ==========================================================================
   theme.css  |  Fancivo design tokens + global overrides on top of Bootstrap 5.3

   CSS load order (see index.html):
   bootstrap.min.css -> fonts.css -> theme.css -> components.css
                     -> animations.css -> sections.css
   ========================================================================== */


/* 1. DESIGN TOKENS ---------------------------------------------------------
   Same palette as the Lovable design.
   Hex values are a fallback for very old browsers; the oklch() block below
   restores the exact original colours everywhere oklch() is supported.     */
:root {
  --font-sans: "Poppins", ui-sans-serif, system-ui, sans-serif;

  --background: #050613;
  --foreground: #eff2f7;
  --primary: #7453fe;
  --primary-foreground: #f7f9fa;
  --muted-foreground: #9aa5bb;
  --accent: #00caca;
  --aurora-1: #8e2dee;   /* violet  */
  --aurora-2: #1762f4;   /* blue    */
  --aurora-3: #00caca;   /* cyan    */
  --aurora-4: #de25b4;   /* magenta */
  --logo-surface: #f8f8f8;
  --border: rgba(255, 255, 255, .12);

  /* Corner radii (original theme: --radius 1rem, then +/- offsets) */
  --radius: 1rem;
  --radius-md: calc(var(--radius) - 2px);    /* 14px */
  --radius-xl: calc(var(--radius) + 4px);    /* 20px */
  --radius-2xl: calc(var(--radius) + 8px);   /* 24px */
  --radius-3xl: calc(var(--radius) + 12px);  /* 28px */

  --ease-standard: cubic-bezier(.4, 0, .2, 1);
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --background: oklch(13% .03 276);
    --foreground: oklch(96% .008 260);
    --primary: oklch(58% .24 285);
    --primary-foreground: oklch(98% .003 250);
    --muted-foreground: oklch(72% .035 265);
    --accent: oklch(76% .13 195);
    --aurora-1: oklch(55% .26 300);
    --aurora-2: oklch(55% .23 262);
    --aurora-3: oklch(76% .13 195);
    --aurora-4: oklch(62% .25 340);
    --logo-surface: oklch(98% 0 0);
  }
}


/* The original design never declares a colour-scheme, so browser-drawn UI (scrollbars,
   form-validation bubbles, the default focus ring) keeps its normal look. Bootstrap's dark
   theme would switch all of that to dark, so it is reset here. */
[data-bs-theme="dark"] {
  color-scheme: normal;
}


/* 2. BOOTSTRAP VARIABLE MAPPING --------------------------------------------
   The page is dark, so it runs in Bootstrap's dark mode (data-bs-theme="dark"
   on <html>). Here Bootstrap's own variables are pointed at the Fancivo
   tokens, so any Bootstrap component you add later matches the design.     */
:root,
[data-bs-theme="dark"] {
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: 1rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.5;
  --bs-body-color: var(--foreground);
  --bs-body-color-rgb: 239, 242, 247;
  --bs-body-bg: var(--background);
  --bs-body-bg-rgb: 5, 6, 19;
  --bs-secondary-color: var(--muted-foreground);   /* .text-body-secondary = muted text */
  --bs-secondary-color-rgb: 154, 165, 187;
  --bs-border-color: var(--border);
  --bs-heading-color: inherit;
  --bs-primary: var(--primary);
  --bs-primary-rgb: 116, 83, 254;
  --bs-link-color-rgb: 0, 202, 202;
  --bs-link-hover-color-rgb: 239, 242, 247;
}


/* 3. BASE ------------------------------------------------------------------ */
html {
  scroll-behavior: smooth;           /* same smooth anchor scrolling as the original */
}

body {
  -webkit-font-smoothing: antialiased;
}

/* anchored sections stop below the floating header */
section[id] {
  scroll-margin-top: 6rem;
}

/* Layout container: max 72rem of content (1152px) with 1.5rem side padding,
   exactly like the original (max-w-6xl + px-6). */
.container {
  --bs-gutter-x: 3rem;
  max-width: 75rem;
}

/* The design controls its own vertical rhythm, so Bootstrap's default bottom
   margins on text blocks are zeroed inside the page. Use mb-* utilities if
   you add new content and want spacing. */
.page-wrapper :is(h1, h2, h3, h4, h5, h6, p, ul, ol, figure) {
  margin-bottom: 0;
}

/* Soft glows / the floating hero chips can poke past the viewport edge on
   phones (the original page scrolled sideways by 8px). Clip it. */
.page-wrapper {
  overflow-x: hidden;
  overflow-x: clip;
}


/* 4. SMALL HELPERS (extend Bootstrap's scale) -------------------------------- */

/* extra gutter sizes for .row (Bootstrap only ships g-0 ... g-5) */
.g-split { --bs-gutter-x: 3.5rem; --bs-gutter-y: 3.5rem; }   /* two-column sections  */
.g-form  { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.25rem; } /* contact form fields  */

.text-balance { text-wrap: balance; }
.text-accent  { color: var(--accent); }
