@import url('../fonts/fonts-display.css');

@font-face {
    font-family: Inter;
    src: url("../3D/earth2/fonts/inter-400.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --lime: #edff73;
    --ink: #f3f3ef;
    --edge: clamp(22px, 2.35vw, 48px);

    --shade-start: 50%;
    --shade-solid: 110%;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #080e17;
    color: var(--ink);
    font-family: Inter, Arial, "Microsoft JhengHei", sans-serif;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 6px;
}

button {
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
button svg,
a {
    touch-action: manipulation;
}

[hidden] {
    display: none !important;
}

.hero {
    height: 100svh;
    min-height: 660px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.visual {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: #1a262c;
}

.poster,
#footage,
#lightning,
.shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

.hero.effect-ready .poster,
.hero.effect-ready #footage {
    visibility: hidden;
}

.poster {
    filter: brightness(0.9);
}

#footage {
    opacity: 0;
}

#footage.ready {
    opacity: 1;
}

#lightning {
    opacity: 0;
    transition: opacity 0.65s;
}

#lightning.ready {
    opacity: 1;
}

.shade {
    --span: calc(var(--shade-solid) - var(--shade-start));
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0) var(--shade-start),
            rgba(2, 3, 5, 0.54) calc(var(--shade-start) + var(--span) * 0.29),
            rgba(1, 2, 3, 0.88) calc(var(--shade-start) + var(--span) * 0.57),
            rgba(0, 0, 0, 0.98) calc(var(--shade-start) + var(--span) * 0.80),
            #000 var(--shade-solid));
    pointer-events: none;
}

.header {
    position: absolute;
    left: var(--edge);
    right: var(--edge);
    top: 24px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 32px;
    z-index: 5;
}

.header:after {
    content: "";
    position: absolute;
    left: 38%;
    right: 0;
    bottom: -14px;
    height: 1px;
    background: #ffffff50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.2em;
}

.brand img {
    width: 27px;
    height: 28px;
    object-fit: contain;
}

.header-note {
    font-size: 10px;
    letter-spacing: 0.13em;
    color: #f3f3efbd;
}

.tools {
    margin-left: auto;
    display: flex;
    gap: 22px;
    align-items: center;
}

.tool {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 0;
    background: none;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.tool svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.tool:hover,
.home-link:hover {
    color: var(--lime);
}

.tool .play-icon {
    display: none;
}

.is-paused .pause-icon {
    display: none;
}

.is-paused .play-icon {
    display: block;
}

.home-link {
    font-size: 10px;
    letter-spacing: 0.08em;
}

.center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.headline {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 3.6vw, 52px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: #fff;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.4vw, 18px);
    font-weight: 400;
    margin: 24px 0 16px;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: #fff;
}

.view-button {
    background: transparent;
    color: var(--lime);
    font-size: 12px;
    letter-spacing: 0.09em;
    padding: 10px 20px;
    text-shadow: 0 1px 12px #0008;
    transition: letter-spacing 0.3s;
    margin-bottom: 24px;
    pointer-events: auto;
}

.view-button span {
    display: inline-block;
    margin: 0 12px;
}

.view-button:hover {
    letter-spacing: 0.19em;
}

.desc {
    font-family: 'Inter', sans-serif;
    font-size: clamp(9px, 0.8vw, 11px);
    line-height: 1.8;
    letter-spacing: 0.02em;
    color: #d0d0d0;
    margin: 0 auto;
    max-width: 600px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.intro {
    position: absolute;
    left: var(--edge);
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1.75;
    letter-spacing: 0.04em;
    z-index: 10;
}

.eyebrow {
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--lime);
}

.intro p {
    margin: 15px 0;
    font-size: clamp(14px, 1.2vw, 21px);
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.13em;
}

.intro-small {
    font-size: 8px;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.scroll-down {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.scroll-down span {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-style: italic;
    letter-spacing: 0.05em;
    color: #fff;
}

.scroll-down .line {
    width: 1px;
    height: 60px;
    background: #fff;
}

.side-pagination {
    position: absolute;
    right: 32px;
    top: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.side-pagination .numbers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    color: #fff;
}

.side-pagination .divider {
    width: 24px;
    height: 1px;
    background: #fff;
}

.side-pagination .dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.side-pagination .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff55;
}

.side-pagination .dot.active {
    width: 8px;
    height: 8px;
    background: transparent;
    border: 1px solid #fff;
}

.footer {
    position: absolute;
    bottom: 18px;
    left: var(--edge);
    right: var(--edge);
}

.scene-info {
    display: grid;
    grid-template-columns: 55px auto;
    column-gap: 12px;
    row-gap: 6px;
    margin-bottom: 17px;
    font-size: 9px;
    letter-spacing: 0.09em;
}

.scene-info>span:first-child {
    grid-row: 1/3;
    color: var(--lime);
    padding-top: 2px;
}

.scene-title {
    font-size: 12px;
    letter-spacing: 0.075em;
}

.scene-subtitle {
    font-size: 10px;
    opacity: 0.72;
    letter-spacing: 0.08em;
}

.scene-list {
    display: flex;
    gap: 10px;
    padding-bottom: 22px;
}

.scene {
    position: relative;
    width: 108px;
    height: 76px;
    padding: 0;
    background: #111;
    overflow: hidden;
    border: 1px solid #ffffff35;
    opacity: 0.58;
    transition:
        opacity 0.25s,
        border-color 0.25s;
}

.scene img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
    opacity: 0.72;
}

.scene span {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 8px;
    letter-spacing: 0.07em;
    text-shadow: 0 1px 5px #000;
}

.scene i {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: left;
}

.scene:hover {
    opacity: 1;
}

.scene:hover img {
    transform: scale(1.08);
}

.scene.active {
    opacity: 1;
    border-color: var(--lime);
}

.scene.active i {
    transform: scaleX(1);
}

.footer-rule {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #ffffff4a;
    padding-top: 12px;
    font-size: 8px;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.settings {
    position: absolute;
    z-index: 10;
    right: var(--edge);
    top: 90px;
    width: 280px;
    padding: 19px 20px;
    background: #121817ed;
    border: 1px solid #ffffff2b;
    backdrop-filter: blur(24px);
    box-shadow: 0 16px 70px #0004;
}

.settings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 22px;
    color: var(--lime);
}

.settings-heading button {
    background: none;
    font-size: 24px;
    line-height: 1;
    padding: 0 0 0 10px;
}

.settings label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.07em;
    margin-top: 18px;
}

.settings output {
    float: right;
    font-size: 10px;
    color: #bec8c1;
    font-variant-numeric: tabular-nums;
}

.settings input {
    display: block;
    width: 100%;
    height: 16px;
    margin: 10px 0 0;
    accent-color: var(--lime);
    cursor: pointer;
}

.reset {
    margin-top: 24px;
    width: 100%;
    padding: 12px 4px;
    background: none;
    border: 1px solid #ffffff4a;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.reset:hover {
    border-color: var(--lime);
    color: var(--lime);
}

.cursor-bolt {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    width: 17px;
    height: 23px;
    z-index: 50;
    opacity: 0;
    filter: drop-shadow(0 1px 3px #0006);
}

.cursor-bolt svg {
    width: 100%;
    height: 100%;
    fill: var(--lime);
}

.exit-immersive {
    display: none;
    position: absolute;
    right: var(--edge);
    top: 28px;
    z-index: 20;
    padding: 12px 15px;
    border: 1px solid #ffffff66;
    background: #1117;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.immersive .header,
.immersive .center-content,
.immersive .intro,
.immersive .footer,
.immersive .scroll-down,
.immersive .side-pagination {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.immersive .shade {
    opacity: 0;
}

.immersive .exit-immersive {
    display: block;
}

.immersive .settings {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (pointer: fine) and (min-width: 601px) {
    .hero.pointer-active:not(:has(.settings:not([hidden]))) {
        cursor: none;
    }

    .hero.pointer-active:not(:has(.settings:not([hidden]))) a,
    .hero.pointer-active:not(:has(.settings:not([hidden]))) button {
        cursor: none;
    }

    .hero.pointer-active:not(:has(.settings:not([hidden]))) .cursor-bolt {
        opacity: 1;
    }
}

@media (min-aspect-ratio: 2/1) and (min-width: 901px) {
    .hero {
        min-height: 580px;
    }

    .scene {
        height: 61px;
        width: 92px;
    }
}

@media (max-width: 900px) {
    .header-note {
        display: none;
    }

    .tools {
        gap: 18px;
    }

    .brand {
        font-size: 10px;
    }

    .scene {
        width: 87px;
        height: 67px;
    }

    .scene-title {
        font-size: 10px;
    }

    .scene-list {
        gap: 8px;
    }

    .intro-small {
        display: none;
    }
}

@media (max-width: 600px) {
    :root {
        --edge: 20px;
    }

    .hero {
        min-height: 720px;
        height: 100svh;
    }

    .header {
        top: 18px;
        height: 30px;
        gap: 12px;
    }

    .brand {
        gap: 8px;
        font-size: 9px;
        letter-spacing: 0.15em;
    }

    .brand img {
        width: 22px;
        height: 24px;
    }

    .header:after {
        left: 0;
        bottom: -15px;
    }

    .home-link {
        display: none;
    }

    .tools {
        gap: 16px;
    }

    .tool {
        font-size: 9px;
        gap: 5px;
    }

    .tool svg {
        width: 12px;
        height: 12px;
    }

    .intro {
        top: 30%;
        font-size: 10px;
    }

    .intro p {
        font-size: 13px;
        line-height: 1.7;
        margin: 9px 0;
    }

    .eyebrow {
        font-size: 7px;
    }

    .center-content {
        top: 55%;
    }

    .headline {
        font-size: clamp(24px, 6vw, 32px);
    }

    .subtitle {
        font-size: clamp(12px, 3vw, 14px);
    }

    .desc {
        font-size: 9px;
        max-width: 90%;
    }

    .view-button {
        font-size: 10px;
        white-space: nowrap;
    }

    .view-button span {
        margin: 0 7px;
    }
    
    .scroll-down {
        display: none;
    }
    
    .side-pagination {
        display: none;
    }

    .footer {
        bottom: 19px;
    }

    .scene-info {
        margin-bottom: 14px;
        font-size: 8px;
        grid-template-columns: 42px auto;
    }

    .scene-title {
        font-size: 10px;
    }

    .scene-subtitle {
        font-size: 9px;
    }

    .scene-list {
        padding-bottom: 18px;
        gap: 9px;
    }

    .scene {
        width: calc((100vw - 58px) / 3);
        height: 72px;
    }

    .scene span {
        font-size: 7px;
    }

    .footer-rule {
        font-size: 7px;
    }

    .settings {
        top: 76px;
        width: min(290px, calc(100vw - 40px));
    }

    .cursor-bolt {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.shape-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 22px;
}

.shape-picker button {
    background: transparent;
    border: 1px solid #ffffff35;
    color: #c5cdc8;
    font-size: 8px;
    letter-spacing: 0.025em;
    padding: 13px 2px;
}

.shape-picker button[aria-pressed="true"] {
    border-color: var(--lime);
    background: #edff7312;
    color: var(--lime);
}

.shape-picker button:hover {
    border-color: var(--lime);
}

.hero[data-shape="logo"] .cursor-bolt {
    width: 22px;
    height: 22px;
}

#cursor-logo {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--lime);
    mask: url("../images/power/logo-outline.svg") center/contain no-repeat;
    -webkit-mask: url("../images/power/logo-outline.svg") center/contain no-repeat;
}

#cursor-light {
    display: none;
    width: 100%;
    height: 100%;
    background: var(--lime);
    mask: url("../images/power/light-outline.svg") center/contain no-repeat;
    -webkit-mask: url("../images/power/light-outline.svg") center/contain no-repeat;
}

.hero[data-shape="logo"] #cursor-lightning,
.hero[data-shape="lightning"] #cursor-logo {
    display: none;
}

.hero[data-shape="light"] .cursor-bolt {
    width: 15px;
    height: 29px;
}

.hero[data-shape="light"] #cursor-light {
    display: block;
}

.hero[data-shape="light"] #cursor-logo,
.hero[data-shape="light"] #cursor-lightning,
.hero[data-shape="light"] #cursor-wordmark {
    display: none;
}

#cursor-wordmark {
    display: none;
    width: 100%;
    height: 100%;
    background: var(--lime);
    mask: url("../images/power/recharge-wordmark.svg") center/contain no-repeat;
    -webkit-mask: url("../images/power/recharge-wordmark.svg") center/contain no-repeat;
}

.hero[data-shape="wordmark"] .cursor-bolt {
    width: 66px;
    height: 15px;
}

.hero[data-shape="wordmark"] #cursor-wordmark {
    display: block;
}

.hero[data-shape="wordmark"] #cursor-logo,
.hero[data-shape="wordmark"] #cursor-light,
.hero[data-shape="wordmark"] #cursor-lightning {
    display: none;
}

.hero[data-shape="wordmark"] .view-button {
    top: calc(53.5% + clamp(42px, 6.5vw, 110px));
}

@media (max-width: 600px) {
    .hero[data-shape="wordmark"] .view-button {
        top: calc(46.5% + 42px);
    }
}