@import 'tailwindcss';

@import 'tw-animate-css';

@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

@custom-variant dark (&:is(.dark *));

/* Fraunces — self-hosted TTFs (display/heading font) */
@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/Fraunces-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/Fraunces-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/Fraunces-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Mona Sans — self-hosted TTFs */
@font-face {
    font-family: 'Mona Sans';
    src: url('/fonts/MonaSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mona Sans';
    src: url('/fonts/MonaSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mona Sans';
    src: url('/fonts/MonaSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mona Sans';
    src: url('/fonts/MonaSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@theme {
    --font-sans: 'Mona Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-serif: 'Fraunces', ui-serif, Georgia, serif;
    --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Custom font weights */
    --font-weight-350: 350;
    --font-weight-600: 600;
    --font-weight-700: 700;
    --font-weight-800: 800;
    --font-weight-900: 900;

    /* Custom letter-spacing */
    --tracking-widest-2: 0.2em;
    --tracking-widest-3: 0.3em;

    --radius-lg: var(--radius);
    --radius-md: calc(var(--radius) - 2px);
    --radius-sm: calc(var(--radius) - 4px);

    --color-background: var(--background);
    --color-foreground: var(--foreground);

    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);

    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);

    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);

    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);

    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);

    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);

    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);

    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);

    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);

    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);

    /* ABEC Africa brand tokens */
    --color-brand-navy: #1b265c;
    --color-brand-crimson: #df2548;
    --color-brand-gold: #D4A843;
    --color-brand-offwhite: #F9F7F4;
    --color-brand-charcoal: #1C1C1E;
    --color-brand-charcoal-dark: #111113;
    --color-brand-charcoal-mid: #2C2C2E;
}

:root {
    /* ABEC Africa — light mode */
    --background: #F9F7F4;
    --foreground: #0D1020;

    --card: #FFFFFF;
    --card-foreground: #0D1020;

    --popover: #FFFFFF;
    --popover-foreground: #0D1020;

    --primary: #1b265c;
    --primary-foreground: #F9F7F4;

    --secondary: #eceef6;
    --secondary-foreground: #1b265c;

    --muted: #f0f1f8;
    --muted-foreground: #555e8a;

    --accent: #D4A843;
    --accent-foreground: #1b265c;

    --destructive: #df2548;
    --destructive-foreground: #FFFFFF;

    --border: #d0d4ec;
    --input: #d0d4ec;
    --ring: #df2548;

    --radius: 0.5rem;

    /* Charts */
    --chart-1: #1b265c;
    --chart-2: #df2548;
    --chart-3: #D4A843;
    --chart-4: #2E9E6E;
    --chart-5: #1C1C1E;

    /* Sidebar — deep charcoal-navy for admin */
    --sidebar: #111113;
    --sidebar-foreground: #eceef6;
    --sidebar-primary: #df2548;
    --sidebar-primary-foreground: #FFFFFF;
    --sidebar-accent: #1b265c;
    --sidebar-accent-foreground: #eceef6;
    --sidebar-border: #252a4a;
    --sidebar-ring: #df2548;
}

.dark {
    /* ABEC Africa — dark mode */
    --background: #0a0c18;
    --foreground: #eceef6;

    --card: #111326;
    --card-foreground: #eceef6;

    --popover: #111326;
    --popover-foreground: #eceef6;

    --primary: #df2548;
    --primary-foreground: #eceef6;

    --secondary: #1a1d36;
    --secondary-foreground: #eceef6;

    --muted: #1a1d36;
    --muted-foreground: #8890c0;

    --accent: #D4A843;
    --accent-foreground: #0a0c18;

    --destructive: #df2548;
    --destructive-foreground: #FFFFFF;

    --border: #252a4a;
    --input: #252a4a;
    --ring: #df2548;

    --chart-1: #df2548;
    --chart-2: #D4A843;
    --chart-3: #2E9E6E;
    --chart-4: #1b265c;
    --chart-5: #eceef6;

    --sidebar: #080a14;
    --sidebar-foreground: #eceef6;
    --sidebar-primary: #df2548;
    --sidebar-primary-foreground: #FFFFFF;
    --sidebar-accent: #111326;
    --sidebar-accent-foreground: #eceef6;
    --sidebar-border: #1a1d36;
    --sidebar-ring: #df2548;
}

@layer base {
    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground;
        font-size: 17px;
        line-height: 1.75;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    p, li {
        font-size: 1rem;
        line-height: 1.8;
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--font-display);
        font-weight: 700;
        letter-spacing: -0.02em;
    }
}

/* Public site utility classes */
@layer components {
    .section-rule {
        width: 3rem;
        height: 2px;
        background-color: #df2548;
        margin-bottom: 1.5rem;
    }

    .section-rule-long {
        width: 6rem;
        height: 2px;
        background-color: #df2548;
        margin-bottom: 2rem;
    }

    .label-caps {
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: #df2548;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f1f8;
}
::-webkit-scrollbar-thumb {
    background: #1b265c;
    border-radius: 3px;
}

::selection {
    background: #df2548;
    color: white;
}
