@import 'tailwindcss';

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

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

@theme inline {
    --font-display: "Exo", sans-serif;
    --font-body: "Public Sans", sans-serif;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --radius-2xl: calc(var(--radius) + 8px);
    --radius-3xl: calc(var(--radius) + 12px);
    --radius-4xl: calc(var(--radius) + 16px);

    --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-ring-offset-background: var(--background);
    --color-brand-gold: var(--brand-gold);
    --color-brand-cyan: var(--brand-cyan);
    --color-brand-green: var(--brand-green);
}

:root {
    --radius: 0rem;

    /* New HSE Horizon logo palette */
    --brand-red: #c41e24;
    --brand-green: #065f46;
    --brand-green-dark: #044a38;
    --brand-gold: #c9971a;
    --brand-silver: #eef1f5;
    --brand-cyan: #bae6fd;

    --background: var(--brand-silver);
    --foreground: #1c2b26;
    --card: #ffffff;
    --card-foreground: #1c2b26;
    --popover: #ffffff;
    --popover-foreground: #1c2b26;
    --primary: var(--brand-red);
    --primary-foreground: #ffffff;
    --secondary: var(--brand-green-dark);
    --secondary-foreground: #ffffff;
    --muted: #e5e7eb;
    --muted-foreground: #6b7280;
    --accent: #d4eeff;
    --accent-foreground: var(--brand-green-dark);
    --destructive: #b91c1c;
    --destructive-foreground: #ffffff;
    --border: #d1d5db;
    --input: #d1d5db;
    --ring: var(--brand-red);
}

@layer base {
    * {
        border-color: var(--color-border);
    }

    body {
        background-color: var(--color-background);
        color: var(--color-foreground);
        font-family: var(--font-body);
    }

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

@keyframes hr-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes hr-slide-in-down {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hr-slide-in-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hr-clip-reveal {
    from { opacity: 0; transform: scale(1.12); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes hr-word-up {
    from { opacity: 0; transform: translateY(100%) rotate(4deg); }
    to { opacity: 1; transform: translateY(0) rotate(0); }
}

@utility animate-marquee {
    animation: hr-marquee 45s linear infinite;
}

@utility animate-marquee-pause {
    animation-play-state: paused;
}

@utility ani-down {
    opacity: 0;
    animation: hr-slide-in-down 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@utility ani-up {
    opacity: 0;
    animation: hr-slide-in-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@utility ani-reveal {
    opacity: 0;
    animation: hr-clip-reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@utility word-up {
    display: inline-block;
    opacity: 0;
    animation: hr-word-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@utility clip-logo-plate {
    clip-path: polygon(0 0, 100% 0, calc(100% - 62px) 100%, 0 100%);
}

@utility clip-hero-media {
    clip-path: polygon(38% 0, 100% 0, 100% 100%, 8% 100%);
}

@utility clip-hero-triangle {
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

@utility clip-hero-band {
    clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%);
}

@utility bg-brand-gradient {
    background: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-green) 100%);
}

.btn-slide {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background-color 0.35s ease;
}

.btn-slide .btn-label {
    position: relative;
    display: block;
    height: 1.25rem;
    overflow: hidden;
}

.btn-slide .text-one,
.btn-slide .text-two {
    display: block;
    line-height: 1.25rem;
    white-space: nowrap;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-slide .text-two {
    position: absolute;
    inset: 0;
    transform: translateY(100%);
}

.btn-slide:hover .text-one {
    transform: translateY(-100%);
}

.btn-slide:hover .text-two {
    transform: translateY(0);
}

.btn-slide svg {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-slide:hover svg {
    transform: translate(4px, -4px);
}

.nav-link {
    position: relative;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 100%;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
}

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

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

[data-animate].in-view .ani-down,
[data-animate].in-view .ani-up,
[data-animate].in-view .ani-reveal,
[data-animate].in-view .word-up {
    animation-play-state: running;
}

[data-animate]:not(.in-view) .ani-down,
[data-animate]:not(.in-view) .ani-up,
[data-animate]:not(.in-view) .ani-reveal,
[data-animate]:not(.in-view) .word-up {
    animation-play-state: paused;
    opacity: 0;
}

[data-animate].in-view .ani-down,
[data-animate].in-view .ani-up,
[data-animate].in-view .ani-reveal {
    opacity: 1;
}

[data-animate].in-view .word-up {
    opacity: 1;
}
