@import 'tailwindcss';
@import '@fontsource/outfit/700.css';
@import '@fontsource/inter/400.css';
@import '@fontsource/inter/500.css';
@import '@fontsource/inter/500-italic.css';

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

/* Self-hosted Fontshare fonts (ITF Free Font License) */
@font-face {
    font-family: 'General Sans';
    src: url('../fonts/general-sans-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'General Sans';
    src: url('../fonts/general-sans-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'General Sans';
    src: url('../fonts/general-sans-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Boska';
    src: url('../fonts/boska-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Boska';
    src: url('../fonts/boska-400-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Boska';
    src: url('../fonts/boska-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Boska';
    src: url('../fonts/boska-500-italic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

/* Design tokens from the Figma file (docs/FIGMA_AUDIT.md section 2) */
@theme {
    --font-sans: 'General Sans', ui-sans-serif, system-ui, sans-serif;
    --font-serif: 'Boska', Georgia, serif;
    --font-outfit: 'Outfit', 'General Sans', sans-serif;
    --font-inter: 'Inter', 'General Sans', sans-serif;

    --color-primary: #03428e;
    --color-primary-alt: #004795;
    --color-primary-deep: #0852aa;
    --color-sky: #588cca;
    --color-accent: #f58220;
    --color-accent-alt: #f17f26;
    --color-accent-soft: #fff6ef;
    --color-accent-tile: #fff7f0;
    --color-accent-dot-1: #feb373;
    --color-accent-dot-2: #fed3ae;
    --color-ink: #111111;
    --color-body: #666666;
    --color-navy: #374474;
    --color-line: #dddddd;
    --color-input: #cbd5e1;
    --color-surface: #f1f5f9;
    --color-surface-alt: #f8fafc;
    --color-chip-line: #e2e8f0;
    --color-panel: #f4f4f4;
    --color-footer: #1e1e1e;
    --color-footer-bottom: #f9f9f9;
    --color-footer-text: #e4e4e4;

    /* Fluid type: Figma sizes at 1920px, scaled down to mobile */
    --text-display: clamp(2.125rem, 1.15rem + 2.75vw, 4.125rem);
    --text-display--line-height: 1.15;
    --text-hero: clamp(2rem, 1.1rem + 2.45vw, 3.625rem);
    --text-hero--line-height: 1.14;
    --text-h3: clamp(1.75rem, 1.2rem + 1.45vw, 2.75rem);
    --text-h3--line-height: 1.32;
    --text-h4: clamp(1.375rem, 1.1rem + 0.75vw, 2rem);
    --text-h4--line-height: 1.25;
    --text-h5: clamp(1.25rem, 1.1rem + 0.35vw, 1.5rem);
    --text-h5--line-height: 1.2;
    --text-lead: clamp(1rem, 0.95rem + 0.15vw, 1.125rem);
    --text-lead--line-height: 1.556;

    --radius-card: 12px;
    --radius-media: 16px;

    --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@layer base {
    html {
        -webkit-text-size-adjust: 100%;
        scroll-behavior: smooth;
        scroll-padding-top: 110px;
    }

    body {
        @apply bg-white font-sans text-ink antialiased;
        text-rendering: optimizeLegibility;
    }

    :focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 3px;
    }

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

    /* Tailwind resets buttons to the default arrow cursor; clickable things should show the hand. */
    button:not(:disabled),
    [role='button']:not([aria-disabled='true']),
    summary,
    select:not(:disabled),
    input[type='checkbox']:not(:disabled),
    input[type='submit']:not(:disabled) {
        cursor: pointer;
    }

    @media (prefers-reduced-motion: reduce) {
        html {
            scroll-behavior: auto;
        }

        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

@layer components {
    .container-site {
        width: 100%;
        max-width: 1920px;
        margin-inline: auto;
        padding-inline: clamp(1.25rem, 3.125vw, 3.75rem);
    }

    .section-gap {
        margin-top: clamp(4rem, 2.5rem + 3.2vw, 6.25rem);
    }

    .eyebrow {
        @apply flex items-center gap-3 text-sm font-medium uppercase text-accent sm:text-base;
        line-height: 26px;
    }

    .eyebrow::before {
        content: '';
        width: 48px;
        height: 1px;
        flex: none;
        background: currentColor;
    }

    .heading-regular {
        @apply font-sans font-normal text-sky;
    }

    .heading-accent {
        @apply font-serif font-medium italic text-primary;
    }

    .text-copy {
        @apply text-lead text-body;
    }

    .btn {
        @apply inline-flex items-center justify-center gap-3 rounded-full bg-primary py-2 pr-3 pl-[30px] font-medium text-white;
        font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1.125rem);
        line-height: 28px;
        transition:
            background-color 0.25s var(--ease-soft),
            box-shadow 0.25s var(--ease-soft);
    }

    .btn:hover {
        @apply bg-primary-alt;
        box-shadow: 0 8px 24px rgb(3 66 142 / 0.22);
    }

    .btn-sm {
        font-size: 16px;
    }

    .btn-light {
        @apply bg-white text-ink;
    }

    .btn-light:hover {
        @apply bg-white;
        box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
    }

    .btn-icon {
        @apply size-[34px] flex-none;
        transition: transform 0.3s var(--ease-soft);
    }

    .btn:hover .btn-icon,
    .group:hover .btn-icon {
        transform: rotate(45deg);
    }

    .card-zoom img {
        transition: transform 0.6s var(--ease-soft);
    }

    .card-zoom:hover img {
        transform: scale(1.04);
    }

    .form-label {
        @apply mb-2 block text-sm font-medium text-ink;
    }

    .form-input {
        @apply block h-[57px] w-full rounded-lg border border-input bg-white px-[18px] text-base text-ink;
        transition:
            border-color 0.2s,
            box-shadow 0.2s;
    }

    .form-input::placeholder {
        @apply text-body;
    }

    .form-input:focus {
        @apply border-primary outline-none;
        box-shadow: 0 0 0 3px rgb(3 66 142 / 0.12);
    }

    .form-input[aria-invalid='true'] {
        @apply border-red-600;
    }

    .form-error {
        @apply mt-1.5 text-sm text-red-700;
    }

    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition:
            opacity 0.7s var(--ease-soft),
            transform 0.7s var(--ease-soft);
    }

    .reveal.is-visible {
        opacity: 1;
        transform: none;
    }

    @media (prefers-reduced-motion: reduce) {
        .reveal {
            opacity: 1;
            transform: none;
        }
    }

    .no-js .reveal {
        opacity: 1;
        transform: none;
    }
}

@layer components {
    .hero-dot {
        display: block;
        width: 10px;
        height: 10px;
        margin-inline: 10px;
        border-radius: 9999px;
        background: rgb(255 255 255 / 0.5);
        transition:
            width 0.3s,
            height 0.3s,
            background-color 0.3s;
    }

    .hero-dot.is-active {
        width: 14px;
        height: 14px;
        background: #fff;
    }
}

/* Sideways auto-scrolling row (campus walkthrough highlights). Pauses on hover and focus. */
@keyframes marquee-scroll {
    to {
        transform: translateX(-50%);
    }
}

.marquee-track {
    animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
    will-change: transform;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .marquee {
        overflow-x: auto;
    }

    .marquee-track {
        animation: none;
    }

    .marquee-track > [aria-hidden='true'] {
        display: none;
    }
}

/* History timeline (Figma 1:79): the card that is up next is shorter than the active one, and it grows when it becomes active. */
.tl-card {
    container-type: inline-size;
}

@media (min-width: 768px) {
    .tl-media {
        aspect-ratio: auto;
        height: 36.3cqw; /* 443 / 1219 */
        transition: height 0.7s ease;
    }

    .swiper-slide:not(.swiper-slide-active) .tl-media {
        height: 25.5cqw; /* 311 / 1219 */
    }
}

@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
    .tl-media {
        transition: none;
    }
}
