/* =========================================================
   HERO: Brigade Group Projects Showcase @ Singapore
   Full-screen photo under a navy shade, copy on the left,
   event details in a glass panel, "Register Today" CTA.
   ========================================================= */
.sg-hero {
    --sg-navy: #0f1f3d;
    --sg-deep: #060e22;
    --sg-gold: #c9a24b;
    --sg-gold-2: #e3c27a;
    --sg-gold-hi: #f3dca6;
    --sg-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sg-ease: cubic-bezier(.2, .7, .2, 1);

    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: var(--sg-deep);
    color: #fff;
    font-family: var(--sg-sans);
}

@media (min-width: 1200px) {
    .sg-hero { min-height: max(100svh, 720px); }
}

/* photo */
.sg-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.sg-hero-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center;
    animation: sgZoom 18s var(--sg-ease) both;
}

/* navy shade: heavy on the left for the copy, along the bottom, a warm glow behind the title */
.sg-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(55% 65% at 14% 52%, rgba(201, 162, 75, .16) 0%, rgba(201, 162, 75, 0) 62%),
        linear-gradient(90deg, rgba(6, 14, 34, .95) 0%, rgba(6, 14, 34, .84) 30%, rgba(6, 14, 34, .42) 58%, rgba(6, 14, 34, .12) 80%, rgba(6, 14, 34, .32) 100%),
        linear-gradient(0deg, rgba(6, 14, 34, .9) 0%, rgba(6, 14, 34, 0) 36%),
        linear-gradient(180deg, rgba(6, 14, 34, .6) 0%, rgba(6, 14, 34, 0) 24%);
}

/* gold hairline where the hero meets the next section */
.sg-hero::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sg-gold) 28%, var(--sg-gold-hi) 50%, var(--sg-gold) 72%, transparent);
}

/* ---------- brand tab (the site header stays hidden until scroll) ---------- */
.sg-hero-top {
    position: relative;
    z-index: 1;
}

.sg-hero-brand {
    display: inline-flex;
    align-items: center;
    padding: 14px 20px 12px;
    border-bottom: 2px solid var(--sg-gold);
    border-radius: 0 0 18px 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
    animation: sgDrop .8s var(--sg-ease) both;
}

.sg-hero-brand img {
    display: block;
    width: auto;
    height: 50px;
}

/* ---------- copy ---------- */
.sg-hero-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    padding-top: 40px;
    padding-bottom: clamp(56px, 10vh, 110px);
}

.sg-hero-copy {
    min-width: 0;
    max-width: 1000px;
}

.sg-title {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}

.sg-title-kicker {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    font-family: var(--sg-sans);
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .46em;
    text-transform: uppercase;
    color: var(--sg-gold-2);
    animation: sgRise .9s var(--sg-ease) both;
}

.sg-title-kicker::before {
    content: "";
    flex: none;
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, rgba(227, 194, 122, 0), var(--sg-gold-2));
}

.sg-title-main {
    display: block;
    font-size: clamp(36px, 4.7vw, 78px);
    line-height: 1.04;
    letter-spacing: .01em;
    text-shadow: 0 6px 34px rgba(0, 0, 0, .4);
    animation: sgRise .9s var(--sg-ease) .1s both;
}

.sg-title-at {
    display: block;
    margin-top: 10px;
    font-size: clamp(26px, 3vw, 50px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: .02em;
    animation: sgRise .9s var(--sg-ease) .2s both;
}

/* slow gold shimmer across "@ Singapore" */
.sg-title-at em {
    display: inline-block;
    padding-right: .1em;
    font-style: inherit;
    background: linear-gradient(100deg, #c9a24b 0%, #f7e2ad 25%, #c9a24b 50%, #f7e2ad 75%, #c9a24b 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: sgShimmer 7s linear infinite;
}

/* ---------- event details panel ---------- */
.sg-facts {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, auto);
    width: fit-content;
    max-width: 100%;
    margin: 38px 0 0;
    padding: 20px 6px;
    overflow: hidden;
    list-style: none;
    border: 1px solid rgba(227, 194, 122, .32);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(20, 38, 74, .62) 0%, rgba(6, 14, 34, .74) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .07);
    animation: sgRise .9s var(--sg-ease) .32s both;
}

/* one light sweep after the panel lands */
.sg-facts::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(243, 220, 166, .16), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: sgSweep 1.8s ease-in-out 1.3s both;
}

.sg-fact {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 6px 30px;
}

.sg-fact + .sg-fact::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: linear-gradient(180deg, rgba(227, 194, 122, 0), rgba(227, 194, 122, .75), rgba(227, 194, 122, 0));
}

.sg-fact-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(227, 194, 122, .55);
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(227, 194, 122, .28), rgba(227, 194, 122, .05) 70%);
    box-shadow: 0 0 0 5px rgba(227, 194, 122, .06);
    color: var(--sg-gold-hi);
}

.sg-fact-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sg-fact-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.sg-fact-label {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--sg-gold-2);
}

.sg-fact-value {
    font-family: var(--sg-sans);
    font-size: clamp(18px, 1.45vw, 22px);
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: lining-nums;
    white-space: nowrap;
    color: #fff;
}

.sg-fact-value sup {
    top: -.7em;
    margin-left: 1px;
    font-size: .56em;
}

.sg-fact-sub {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .85);
}

/* ---------- icon animations ---------- */
.sg-fact-icon { position: relative; }
.sg-fact-icon svg { overflow: visible; }

/* gold ring that ripples out of each icon, one after another */
.sg-fact-icon::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(243, 220, 166, .7);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: sgIconRing 3.6s ease-out infinite;
    animation-delay: calc(1.6s + var(--n, 0) * 1.2s);
}

.sg-ico-cal { --n: 1; }
.sg-ico-clock { --n: 2; }

/* location: pin hops and lands, its shadow shrinks while it is in the air */
.sg-pin {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: sgPinHop 2.4s ease-in-out infinite;
}

.sg-pin-shadow {
    fill: rgba(243, 220, 166, .35);
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
    animation: sgPinShadow 2.4s ease-in-out infinite;
}

/* calendar: the days light up in turn, the binder rings give a small lift */
.sg-cal-days path {
    opacity: .35;
    animation: sgDay 3s ease-in-out infinite;
    animation-delay: calc(var(--d) * .35s);
}

.sg-cal-ring {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: sgCalRing 3s ease-in-out infinite;
}

/* time: minute hand sweeps, hour hand creeps */
.sg-clock-min,
.sg-clock-hour { transform-origin: 12px 12px; }

.sg-clock-min { animation: sgSpin 4s linear infinite; }
.sg-clock-hour { animation: sgSpin 48s linear infinite; }

@keyframes sgIconRing {
    0%       { opacity: .8; transform: scale(1); }
    60%, 100% { opacity: 0; transform: scale(1.45); }
}

@keyframes sgPinHop {
    0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
    20%           { transform: translateY(-3.5px) scale(.96, 1.04); }
    40%           { transform: translateY(0) scale(1.06, .94); }
    50%           { transform: translateY(-1px) scale(1, 1); }
}

@keyframes sgPinShadow {
    0%, 60%, 100% { opacity: 1; transform: scale(1); }
    20%           { opacity: .45; transform: scale(.6); }
    40%           { opacity: 1; transform: scale(1.1); }
}

@keyframes sgDay {
    0%, 100% { opacity: .35; }
    12%, 30% { opacity: 1; }
}

@keyframes sgCalRing {
    0%, 70%, 100% { transform: translateY(0); }
    78%           { transform: translateY(-1.5px); }
    86%           { transform: translateY(0); }
}

@keyframes sgSpin {
    to { transform: rotate(360deg); }
}

/* ---------- CTA ---------- */
.sg-hero-cta {
    margin-top: 34px;
    animation: sgRise .9s var(--sg-ease) .44s both;
}

.sg-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 62px;
    padding: 8px 8px 8px 32px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(120deg, #c9a24b 0%, #f3dca6 45%, #d9b565 60%, #c9a24b 100%);
    background-size: 220% 100%;
    background-position: 0% 50%;
    color: var(--sg-navy);
    font-family: var(--sg-sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(201, 162, 75, .32), inset 0 1px 0 rgba(255, 255, 255, .55);
    transition: background-position .6s ease, transform .25s ease, box-shadow .25s ease;
}

/* soft ring that pulses outward */
.sg-btn::before {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(243, 220, 166, .75);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    animation: sgRing 2.8s ease-out 1.6s infinite;
}

.sg-btn-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--sg-navy);
    color: var(--sg-gold-hi);
    transition: transform .3s ease;
}

.sg-btn-icon svg {
    width: 18px;
    height: 18px;
}

@media (hover: hover) {
    .sg-btn:hover {
        background-position: 100% 50%;
        transform: translateY(-2px);
        box-shadow: 0 22px 44px rgba(201, 162, 75, .42), inset 0 1px 0 rgba(255, 255, 255, .6);
    }

    .sg-btn:hover .sg-btn-icon { transform: translateX(4px); }
}

.sg-btn:active { transform: translateY(0) scale(.98); }

.sg-btn:focus-visible {
    outline: 2px solid var(--sg-gold-hi);
    outline-offset: 4px;
}

/* ---------- registration form ---------- */
/* desktop: copy left, form right */
@media (min-width: 1200px) {
    .sg-hero-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 48px;
        align-items: center;
    }
}

/* narrower desktops: tighten the details panel so it fits beside the form */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .sg-fact {
        gap: 12px;
        padding: 6px 18px;
    }

    .sg-fact-icon {
        width: 46px;
        height: 46px;
    }
}

/* tablet and phone: the form drops below the details */
@media (max-width: 1199.98px) {
    .sg-hero-inner {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    .sg-form {
        width: 100%;
        max-width: 520px;
        margin-top: 40px;
    }
}

.sg-form {
    position: relative;
    min-width: 0;
    padding: 30px 28px 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .97);
    color: var(--sg-navy);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
    animation: sgRise .9s var(--sg-ease) .5s both;
}

/* gold accent along the top edge */
.sg-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--sg-gold), var(--sg-gold-hi), var(--sg-gold));
}

.sg-form-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* green "live" dot: registrations are open */
.sg-form-live {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
    animation: sgLive 1.8s ease-out infinite;
}

.sg-form-title {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--sg-navy);
}

.sg-field { margin-bottom: 12px; }

.sg-form .form-control {
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e4dccb;
    border-radius: 12px;
    background: #faf8f3;
    box-shadow: none;
    font-family: var(--sg-sans);
    font-size: 15px;
    color: var(--sg-navy);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sg-form .form-control::placeholder { color: #8a8f9c; }

.sg-form .form-control:focus {
    border-color: var(--sg-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201, 162, 75, .18);
    outline: 0;
}

.sg-form .iti {
    display: block;
    width: 100%;
}

.sg-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 16px;
}

.sg-consent input {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--sg-gold);
}

.sg-consent label {
    font-size: 11.5px;
    line-height: 1.45;
    color: #6b7486;
}

.sg-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sg-navy), #1b2f57);
    color: var(--sg-gold-hi);
    font-family: var(--sg-sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .2em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(15, 31, 61, .3);
    transition: background .3s ease, color .3s ease, transform .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
    .sg-submit:hover {
        background: linear-gradient(135deg, var(--sg-gold), var(--sg-gold-2));
        color: var(--sg-navy);
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(201, 162, 75, .4);
    }
}

.sg-submit:active { transform: scale(.98); }

.sg-submit:focus-visible {
    outline: 2px solid var(--sg-gold);
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    .sg-form {
        max-width: none;
        margin-top: 32px;
        padding: 26px 20px 22px;
        border-radius: 18px;
    }

    .sg-form::before {
        left: 20px;
        right: 20px;
    }

    .sg-form-title { font-size: 24px; }
}

@keyframes sgLive {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
    100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
}

/* ---------- animations ---------- */
@keyframes sgZoom {
    from { transform: scale(1.12); }
    to   { transform: scale(1); }
}

@keyframes sgRise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}

@keyframes sgDrop {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: none; }
}

@keyframes sgShimmer {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

@keyframes sgSweep {
    from { left: -40%; }
    to   { left: 140%; }
}

@keyframes sgRing {
    0%   { opacity: .85; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.06, 1.35); }
}

@media (prefers-reduced-motion: reduce) {
    .sg-hero-bg img,
    .sg-hero-brand,
    .sg-title-kicker,
    .sg-title-main,
    .sg-title-at,
    .sg-title-at em,
    .sg-facts,
    .sg-facts::after,
    .sg-hero-cta,
    .sg-btn::before,
    .sg-fact-icon::after,
    .sg-pin,
    .sg-pin-shadow,
    .sg-cal-days path,
    .sg-cal-ring,
    .sg-clock-min,
    .sg-clock-hour,
    .sg-form,
    .sg-form-live { animation: none !important; }

    .sg-cal-days path { opacity: 1; }

    .sg-btn,
    .sg-btn-icon { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .sg-fact {
        gap: 12px;
        padding: 6px 18px;
    }

    .sg-fact-icon {
        width: 44px;
        height: 44px;
    }

    .sg-fact-icon svg {
        width: 21px;
        height: 21px;
    }

    .sg-fact-value { font-size: 17px; }
    .sg-fact-sub { font-size: 13.5px; }
}

@media (max-width: 767.98px) {
    /* phones: photo first as its own block, all the details below it on navy */
    .sg-hero { min-height: 0; }
    .sg-hero::after { display: none; }

    .sg-hero-bg {
        position: relative;
        inset: auto;
        z-index: 0;
        aspect-ratio: 4 / 3;
    }

    /* photo fades into the navy below it */
    .sg-hero-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background:
            linear-gradient(180deg, rgba(6, 14, 34, .45) 0%, rgba(6, 14, 34, 0) 22%),
            linear-gradient(0deg, var(--sg-deep) 0%, rgba(6, 14, 34, .6) 18%, rgba(6, 14, 34, 0) 45%);
    }

    .sg-hero-bg img { object-position: 64% center; }

    /* logo tab stays on top of the photo */
    .sg-hero-top {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2;
    }

    .sg-hero-brand {
        padding: 10px 14px 9px;
        border-radius: 0 0 14px 14px;
    }

    .sg-hero-brand img { height: 38px; }

    /* details start just over the faded bottom edge of the photo */
    .sg-hero-inner {
        align-items: flex-start;
        margin-top: -34px;
        padding-top: 0;
        padding-bottom: 44px;
    }

    .sg-hero-copy { width: 100%; }

    .sg-title-kicker {
        gap: 12px;
        margin-bottom: 14px;
        font-size: 12px;
        letter-spacing: .36em;
    }

    .sg-title-kicker::before { width: 32px; }

    .sg-title-main { font-size: clamp(31px, 9.4vw, 44px); }

    .sg-title-at {
        margin-top: 8px;
        font-size: clamp(22px, 6.4vw, 30px);
    }

    .sg-facts {
        grid-template-columns: 1fr;
        width: 100%;
        margin-top: 26px;
        padding: 4px 18px;
        border-radius: 18px;
    }

    .sg-fact {
        gap: 14px;
        padding: 12px 0;
    }

    .sg-fact + .sg-fact::before {
        top: 0;
        right: 0;
        bottom: auto;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, rgba(227, 194, 122, .65), rgba(227, 194, 122, 0));
    }

    .sg-fact-icon {
        width: 42px;
        height: 42px;
    }

    .sg-fact-value {
        font-size: 18px;
        white-space: normal;
    }

    .sg-hero-cta { margin-top: 24px; }

    /* compact CTA on phones */
    .sg-btn {
        gap: 12px;
        min-height: 46px;
        padding: 5px 5px 5px 20px;
        font-size: 12px;
        letter-spacing: .18em;
        box-shadow: 0 10px 24px rgba(201, 162, 75, .28), inset 0 1px 0 rgba(255, 255, 255, .55);
    }

    .sg-btn-icon {
        width: 36px;
        height: 36px;
    }

    .sg-btn-icon svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 380px) {
    .sg-title-main { font-size: 29px; }
    .sg-fact-value { font-size: 16.5px; }
}
