/* ===========================
   Magellan Awards — Shared CSS
   =========================== */

:root {
    --black-900: #010101;
    --black-800: #1a1a1a;
    --black-700: #231f20;
    /* Annual accent colors — update these each year */
    --accent-1: #e02830;   /* Red */
    --accent-2: #c42228;   /* Dark Red (hover) */
    --white: #ffffff;
    --cream: #fafaf8;
    --gray-100: #f5f5f3;
    --gray-200: #e8e8e6;
    --gray-400: #a3a3a1;
    --gray-500: #737371;
    --color-primary: var(--accent-1);
    --color-border: rgba(1, 1, 1, 0.1);
    --color-border-dark: rgba(255, 255, 255, 0.15);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --banner-height: 28px;
    --header-height: 90px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overscroll-behavior: none;
}

body {
    font-family: var(--font-family);
    color: var(--black-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .container { padding: 0 3rem; }
}

/* Alert Banner */
.alert-banner {
    background: var(--black-800);
    color: var(--white);
    text-align: center;
    padding: 0.4rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
}

.alert-banner a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 0.25rem;
}

.alert-banner a:hover {
    opacity: 0.85;
}

/* Header */
.site-header {
    position: fixed;
    top: var(--banner-height);
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 102;
    transition: all 0.3s ease;
}

.site-header--transparent {
    background: transparent;
}

.site-header--scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-inner nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-logo {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
}

.logo-image {
    width: auto;
    height: clamp(40px, 5vw, 56px);
    transition: filter 0.3s;
    filter: brightness(0) invert(1);
}

.site-header--scrolled .logo-image {
    filter: none;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.primary-menu a,
.primary-menu span {
    display: block;
    padding: 0.5rem clamp(0.4rem, 1vw, 1rem);
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
}

.primary-menu span.current-page {
    display: block;
    padding: 0.5rem clamp(0.4rem, 1vw, 1rem);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
}

.site-header--transparent .primary-menu a,
.site-header--transparent .primary-menu span {
    color: rgba(255, 255, 255, 0.9);
}

.site-header--transparent .primary-menu a:hover {
    color: var(--white);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    cursor: default;
}

.nav-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 5px;
    vertical-align: 2px;
}

.nav-dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 110;
}

.nav-dropdown:hover .nav-dropdown__menu {
    display: block;
}

.nav-dropdown__menu a {
    display: block;
    padding: 0.6rem 1.25rem !important;
    font-size: 14px !important;
    color: var(--black-800) !important;
    white-space: nowrap;
    transition: background 0.15s;
}

.nav-dropdown__menu a:hover {
    background: var(--gray-100);
    color: var(--color-primary) !important;
}

/* Mobile nav dropdown */
.mobile-nav__sub {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav__sub a {
    font-size: 1rem !important;
    font-weight: 400 !important;
    opacity: 0.7;
    padding: 0.4rem 1.5rem !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.25s;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-2);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--black-900);
}

.btn-outline {
    background: transparent;
    color: var(--black-900);
    border-color: var(--black-900);
}

.btn-outline:hover {
    background: var(--black-900);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 0.875rem;
}

/* Sections */
.section {
    padding: 6rem 0;
}

@media (min-width: 1024px) {
    .section { padding: 8rem 0; }
}

.section--dark {
    background: var(--black-800);
    color: var(--white);
}

.section--cream {
    background: var(--cream);
}

.section--gray {
    background: var(--gray-100);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section--dark .section-label {
    color: var(--color-primary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    line-height: 1.7;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Page Banner */
.page-banner {
    padding-top: calc(var(--header-height) + var(--banner-height) + 3rem);
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .page-banner {
        padding-top: calc(var(--header-height) + var(--banner-height) + 4.5rem);
        padding-bottom: 5rem;
    }
}

.page-banner .section-intro {
    color: rgba(255, 255, 255, 0.6);
}

/* Footer */
.site-footer {
    background: var(--black-800);
    color: var(--white);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 4rem;
    }
    .footer-brand {
        grid-column: auto;
    }
}

.footer-logo .logo-image {
    height: clamp(80px, 12vw, 160px);
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
    transform: translateX(-10%);
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    max-width: 280px;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer-menu a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.legal-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.legal-menu a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.legal-menu a:hover {
    color: var(--white);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 103;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span {
    background: var(--white);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 101;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a,
.mobile-nav span {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

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

.mobile-nav span.current-page {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-nav .btn-primary {
    margin-top: 1.5rem;
    padding: 1rem 2.5rem;
}

/* Scroll Hint */
.scroll-hint {
    position: relative;
}

.scroll-hint::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--white));
    pointer-events: none;
    transition: opacity 0.3s;
}

.scroll-hint.no-overflow::after,
.scroll-hint.scrolled::after {
    opacity: 0;
}

/* Narrow desktop — tighten nav */
@media (max-width: 1280px) {
    .primary-menu a,
    .primary-menu span,
    .primary-menu span.current-page {
        font-size: 14px;
        padding: 0.5rem clamp(0.5rem, 0.8vw, 0.75rem);
    }
    .logo-image {
        height: clamp(36px, 4vw, 48px);
    }
}

/* Tablet — collapse nav to hamburger */
@media (max-width: 1024px) {
    .primary-menu, .header-actions { display: none; }
    .mobile-menu-toggle { display: block; }
}

/* Mobile */
@media (max-width: 768px) {
    .header-inner { padding: 0 1.5rem; }
    .section { padding: 3rem 0; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .section-title { font-size: 1.75rem; }
    .section-intro { font-size: 0.9375rem; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-tagline { max-width: 100%; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .container { padding: 0 1.25rem; }
    .page-banner {
        padding-top: calc(var(--header-height) + var(--banner-height) + 3rem);
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .section { padding: 2.5rem 0; }
    .page-banner {
        padding-top: calc(var(--header-height) + var(--banner-height) + 3rem);
    }
}
