/* GEKCO Time Impact — transparent floating outline.
   Replace src/main/resources/static/time-widget.css with this file.
   Keep index.html and time-widget.js unchanged. */
.gekco-time-counter {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 1100px;
    margin: 24px auto;
    padding: clamp(32px, 5vw, 62px) clamp(18px, 4vw, 52px);
    text-align: center;
    border: 1px solid rgba(228, 87, 46, .25);
    border-radius: 28px;
    background: transparent;
    box-shadow: 0 12px 24px rgba(54, 46, 39, .12),
        0 28px 64px rgba(54, 46, 39, .17),
        0 48px 90px rgba(228, 87, 46, .09);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: gekco-time-float 5.5s ease-in-out infinite;
}

.gekco-time-counter::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 163, 92, .68), rgba(255, 123, 53, .13) 42%, rgba(228, 87, 46, .42) 85%, rgba(255, 163, 92, .68));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Soft ground shadow makes the transparent card feel suspended. */
.gekco-time-counter::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(64, 51, 42, .24);
    filter: blur(19px);
    opacity: .8;
    pointer-events: none;
    z-index: -1;
}

.gekco-time-counter[hidden] {
    display: none !important;
}

.gekco-time-counter .tc-kicker {
    color: #bc613a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.gekco-time-counter .tc-number {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: clamp(16px, 3vw, 48px);
    margin: 20px auto 24px;
    font-variant-numeric: tabular-nums;
}

.gekco-time-counter .tc-unit {
    min-width: 0;
}

.gekco-time-counter .tc-unit strong {
    display: block;
    font-size: clamp(45px, 9vw, 110px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.055em;
    color: #e4572e;
    /* Fallback for browsers without text clipping */
    background-image: linear-gradient(100deg, #ffa35c 0%, #ff7b35 30%, #e4572e 65%, #a2482f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gekco-time-counter .tc-unit small {
    display: block;
    margin-top: 8px;
    color: #6e6b68;
    font-size: clamp(12px, 1.8vw, 16px);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gekco-time-counter .tc-label {
    margin: 10px 0;
    color: #e4572e;
    font-size: clamp(22px, 3.8vw, 36px);
    font-weight: 800;
    line-height: 1.25;
    background-image: linear-gradient(100deg, #ff9d56 0%, #e4572e 60%, #a2482f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gekco-time-counter .tc-info {
    margin-top: 12px;
    color: #77716d;
    font-size: 13px;
}

[data-theme="dark"] .gekco-time-counter {
    border-color: rgba(255, 163, 92, .22);
    background: transparent;
    box-shadow: 0 12px 25px rgba(0, 0, 0, .28),
        0 28px 65px rgba(0, 0, 0, .42),
        0 48px 90px rgba(255, 163, 92, .07);
}

[data-theme="dark"] .gekco-time-counter::after {
    background: rgba(0, 0, 0, .55);
}

[data-theme="dark"] .gekco-time-counter .tc-unit strong {
    background-image: linear-gradient(100deg, #ffe8c8 0%, #ffd29a 22%, #ffa35c 48%, #ff7b35 74%, #e4572e 100%);
}

[data-theme="dark"] .gekco-time-counter .tc-label {
    background-image: linear-gradient(100deg, #ffe8c8 0%, #ffa35c 45%, #ff7b35 100%);
}

[data-theme="dark"] .gekco-time-counter .tc-kicker {
    color: #ffc391;
}

[data-theme="dark"] .gekco-time-counter .tc-unit small,
[data-theme="dark"] .gekco-time-counter .tc-info {
    color: #c7bdb5;
}

@keyframes gekco-time-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gekco-time-counter {
        animation: none;
    }
}

/* Keep counter below navigation, before Hero. */
main>.gekco-time-counter:first-child {
    margin-top: 112px;
    margin-bottom: 20px;
}

main>.gekco-time-counter:first-child+.hero-section {
    min-height: auto;
    padding-top: clamp(36px, 5vw, 70px);
}

@media (max-width: 992px) {
    main>.gekco-time-counter:first-child {
        margin-top: 96px;
        width: calc(100% - 24px);
    }

    main>.gekco-time-counter:first-child+.hero-section {
        padding-top: 36px;
    }
}

/* GEKCO v2: centered floating counter; clear separation before Hero */
main>.gekco-time-counter:first-child {
    width: min(760px, calc(100% - 32px));
    margin: clamp(132px, 16vh, 190px) auto clamp(64px, 8vw, 104px);
    padding: clamp(28px, 4.5vw, 52px) clamp(20px, 5vw, 56px);
    left: auto;
    right: auto;
}

/* Give the two-line "TIME / IS YOURS" heading breathing space after the counter. */
main>.gekco-time-counter:first-child+.hero-section {
    padding-top: clamp(42px, 6vw, 90px);
}

.gekco-time-counter .tc-number {
    flex-wrap: nowrap;
    gap: clamp(12px, 4vw, 42px);
}

.gekco-time-counter .tc-unit {
    flex: 1 1 0;
}

.gekco-time-counter .tc-unit strong {
    font-size: clamp(36px, 8vw, 86px);
}

.gekco-time-counter .tc-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 10px 19px;
    border: 1px solid rgba(228, 87, 46, .52);
    border-radius: 100px;
    color: #b94c2b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, .05);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.gekco-time-counter .tc-source-link:hover,
.gekco-time-counter .tc-source-link:focus-visible {
    background: rgba(228, 87, 46, .09);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(54, 46, 39, .12);
}

.gekco-time-counter .tc-source-link[hidden] {
    display: none !important;
}

[data-theme="dark"] .gekco-time-counter .tc-source-link {
    color: #ffbc8d;
    border-color: rgba(255, 163, 92, .48);
}

@media (max-width: 600px) {
    main>.gekco-time-counter:first-child {
        width: calc(100% - 24px);
        margin-top: 112px;
        margin-bottom: 44px;
        padding: 28px 14px;
    }

    .gekco-time-counter .tc-number {
        gap: 8px;
    }

    .gekco-time-counter .tc-unit strong {
        font-size: clamp(34px, 10vw, 56px);
    }

    main>.gekco-time-counter:first-child+.hero-section {
        padding-top: 38px;
    }
}

/* Center the counter vertically inside the first viewport; hero starts below */
main>.gekco-time-counter:first-child {
    margin: 0 auto 0;
    width: min(830px, calc(100% - 32px));
}

main:has(> .gekco-time-counter:not([hidden])) {
    padding-top: 0
}

main>.gekco-time-counter:not([hidden]):first-child {
    margin-top: clamp(90px, calc((100svh - 520px)/2), 230px);
    margin-bottom: clamp(56px, 12vh, 130px)
}

main>.gekco-time-counter:first-child+.gekco-scroll-cue {
    display: block;
    text-align: center;
    margin: -50px auto 80px;
    text-decoration: none;
    color: var(--color-text-secondary, #777);
    font-size: 14px;
    font-weight: 600
}

main>.gekco-time-counter[hidden]+.gekco-scroll-cue {
    display: none
}

main>.gekco-scroll-cue+.hero-section {
    padding-top: clamp(70px, 10vw, 145px)
}

@media(max-width:650px) {
    main>.gekco-time-counter:not([hidden]):first-child {
        margin-top: 100px;
        margin-bottom: 76px
    }

    main>.gekco-time-counter:first-child+.gekco-scroll-cue {
        margin: -24px auto 55px
    }
}

@media(prefers-reduced-motion:reduce) {
    .gekco-time-counter {
        animation: none !important
    }
}

/* 2026-10-30 adjustment: position floating card lower in first viewport. */
@media(min-width:651px) {
    main>.gekco-time-counter:not([hidden]):first-child {
        margin-top: clamp(145px, 22vh, 260px) !important;
        margin-bottom: clamp(64px, 11vh, 115px) !important;
    }
}