﻿.landing-body { background: #fff; font-family: "Kanit", Tahoma, "Segoe UI", sans-serif; }
.hackathon-page.landing { max-width: none; padding: 0; }
.landing-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.landing .event-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(480px, 58vh, 660px);
    margin: 0;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(125deg, #063b30, #047857);
    border-radius: 0;
    box-shadow: none;
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(48px, 8vw, 100px); }
.hero-copy { max-width: 54%; }
.landing .hero-copy h1 { margin: 8px 0 18px; font-size: clamp(36px, 5.1vw, 70px); line-height: 1.08; text-wrap: balance; }
.hero-copy h1 span { display: block; margin-bottom: 8px; color: #bbf7d0; font-size: .48em; }
.hero-copy p { font-size: clamp(16px, 1.65vw, 20px); font-weight: 300; color: #ecfdf5; }
.hero-copy .hero-label { color: #d1fae5; font-size: 15px; font-weight: 500; }
.hero-copy .button { margin-top: 14px; }
.event-hero img { position: absolute; inset: 0 0 0 auto; width: 56%; height: 100%; object-fit: cover; border: 0; border-radius: 0; mask-image: linear-gradient(to right, transparent, #000 37%); }
.section-links { background: #ecfdf5; border-bottom: 1px solid #e2e8f0; }
.section-links-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-block: 20px; }
.section-link-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(6, 78, 59, .09);
    color: #065f46;
    text-decoration: none;
}
.section-link-card img { width: 100%; height: clamp(80px, 12vw, 132px); object-fit: cover; border: 0; border-radius: 0; }
.section-link-label { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; font-weight: 600; }
.section-link-card:hover, .section-link-card:focus-visible { border-color: #047857; background: #d1fae5; }
.section-link-card:focus-visible, .back-to-top:focus-visible { outline: 3px solid #0f766e; outline-offset: 3px; }
.landing .content-card[id] { scroll-margin-top: 16px; }
.back-to-top {
    position: fixed;
    z-index: 5;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #047857;
    color: #fff;
    box-shadow: 0 4px 16px rgba(6, 78, 59, .24);
    text-decoration: none;
}
.back-to-top:hover { background: #065f46; }
.landing-content { padding: clamp(20px, 4vw, 48px) 0 68px; }
.track-details summary { color: #065f46; font-weight: 600; }
.landing .content-card { padding: clamp(16px, 3vw, 28px); }
.landing .content-card h2 { font-size: clamp(20px, 2.5vw, 26px); color: #065f46; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.event-grid > div { padding: 14px 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.event-grid dt { color: #065f46; font-weight: 700; }
.event-grid dt span { display: block; color: #475569; font-size: .85em; }
.event-grid dd { margin: 4px 0 0; }
.event-rules { padding-inline-start: 24px; }
.event-rules li + li { margin-top: 8px; }
.track-details { margin-top: 16px; }
.track-details summary { cursor: pointer; }
.track-details .track-image { margin: 12px auto 0; }
.registration-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.registration-callout p { margin: 0; }
@media (max-width: 760px) {
    .landing-container { width: calc(100% - 32px); }
    .section-links-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .landing .event-hero { flex-direction: column; min-height: auto; }
    .hero-inner { padding-block: 36px 28px; }
    .hero-copy { max-width: 100%; }
    .landing .hero-copy h1 { font-size: clamp(32px, 8.5vw, 48px); text-wrap: initial; }
    .event-hero img { position: static; width: 100%; height: clamp(200px, 55vw, 350px); mask-image: none; }
}
@media (max-width: 680px) {
    .event-grid { grid-template-columns: minmax(0, 1fr); }
    .registration-callout { align-items: flex-start; flex-direction: column; }
}
.landing .illustrated-section {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    grid-template-areas: "copy art";
    align-items: start;
    gap: clamp(18px, 3vw, 36px);
    background: linear-gradient(155deg, #fff 60%, var(--section-tint));
}
#about { --section-tint: #e6f8ef; }
#eligibility { --section-tint: #fff4df; }
#tracks { --section-tint: #e1f7f7; }
#deliverables { --section-tint: #f0edff; }
.section-copy { grid-area: copy; }
.section-art {
    grid-area: art;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(6, 78, 59, .12);
}
.illustrated-section .event-grid > div {
    background: linear-gradient(135deg, var(--section-tint), #fff 80%);
}
@media (max-width: 900px) {
    .landing .illustrated-section {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "art" "copy";
    }
    .section-art { width: min(100%, 540px); justify-self: center; }
}

/* Hackathon registration */
.event-page { background: #f4f9f5; }
.registration-nav { background: #fff; border-bottom: 1px solid #dce9e1; }
.registration-nav-inner, .registration-nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 22px;
}
.registration-nav-inner { justify-content: space-between; padding-block: 12px; }
.registration-nav a { color: #123e2c; text-decoration: none; }
.registration-nav .button { color: #fff; }
.registration-brand { font-size: 1.2rem; font-weight: 700; }
.event-page .registration-hero { isolation: isolate; min-height: clamp(420px, 62vh, 630px); }
.event-page .registration-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mask-image: none;
    object-position: center 42%;
}
.registration-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 35, 24, .98), rgba(5, 35, 24, .80) 50%, rgba(5, 35, 24, .2));
}
.event-page .hero-copy { max-width: 660px; }
.event-page .hero-copy h1 { text-wrap: initial; }
.event-page .hero-copy h1 span { margin: 0; font-size: inherit; color: #d2f4a3; }
.event-page .registration-primary { background: #d2f4a3; color: #13391d; }
.event-page .registration-primary:hover { background: #e5fac6; }
.registration-page .registration-entry { border-top: 4px solid #047857; background: #ecfdf5; }
.registration-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.registration-actions label { margin-inline-start: 5px; }
.registration-actions input[type="checkbox"] { accent-color: #047857; }
.registration-page .registration-form { border-top: 4px solid #047857; }
.event-page a:focus-visible, .event-page input:focus-visible {
    outline: 3px solid #08916c;
    outline-offset: 3px;
}
@media (max-width: 760px) {
    .event-page .registration-hero { justify-content: center; }
    .registration-hero::after { background: rgba(5, 35, 24, .77); }
    .registration-nav-links { gap: 8px 14px; }
}

.event-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.event-hero-actions .button { margin-top: 0; }
.event-hero-actions .event-secondary { border: 1px solid #e5f5df; background: rgba(5, 35, 24, .45); color: #fff; }
.event-hero-actions .event-secondary:hover { background: #065f46; }

/* Motion on the Hackathon home page */
@media (prefers-reduced-motion: no-preference) {
    html:has(.event-motion) { scroll-behavior: smooth; }
    .event-motion .hero-copy > * {
        animation: event-rise 720ms cubic-bezier(.22, 1, .36, 1) both;
    }
    .event-motion .hero-copy h1 { animation-delay: 100ms; }
    .event-motion .hero-copy h1 + p { animation-delay: 200ms; }
    .event-motion .event-hero-actions { animation-delay: 300ms; }
    .event-motion .registration-hero > img { animation: event-photo 1400ms ease-out both; }
    .event-motion .registration-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(115deg, transparent 34%, rgba(210, 244, 163, .16) 50%, transparent 66%);
        animation: event-light 1600ms ease-out both;
    }
    .event-motion .section-link-card,
    .event-motion .event-hero-actions .button,
    .event-motion .back-to-top { transition: transform 220ms ease, box-shadow 220ms ease; }
    .event-motion .section-link-card img { transition: transform 360ms ease; }
    .event-motion .section-link-card:is(:hover, :focus-visible) {
        transform: translateY(-5px);
        box-shadow: 0 12px 24px rgba(6, 78, 59, .18);
    }
    .event-motion .section-link-card:is(:hover, :focus-visible) img { transform: scale(1.07); }
    .event-motion .event-hero-actions .button:is(:hover, :focus-visible),
    .event-motion .back-to-top:is(:hover, :focus-visible) { transform: translateY(-3px); }
}

@keyframes event-rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes event-photo {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}
@keyframes event-light {
    from { opacity: 0; transform: translateX(-58%); }
    30% { opacity: 1; }
    to { opacity: 0; transform: translateX(44%); }
}

.event-motion .rotating-hero > .hero-alternate { opacity: 0; animation: none; }
.event-motion .rotating-hero.show-alternate > .hero-alternate { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    .rotating-hero > .hero-alternate { transition: opacity 900ms ease-in-out; }
}
