/* Page-specific layout and decoration for homepage.
   Cross-page base (colors, header, footer, buttons, cards): /assets/theme-gmt.css */

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

/* === Decorative background elements (page-unique) === */
.bg-orbit,
.scan-grid {
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.bg-orbit {
    width: 44vw;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    filter: blur(6px);
    opacity: 0.76;
    animation: drift 14s ease-in-out infinite alternate;
}

.bg-orbit-left {
    left: -14vw;
    top: 18vh;
    background: radial-gradient(circle, rgba(255, 79, 0, 0.46), rgba(255, 216, 74, 0.16) 64%, transparent 72%);
}

.bg-orbit-right {
    right: -14vw;
    top: -8vh;
    background: radial-gradient(circle, rgba(0, 247, 255, 0.42), rgba(184, 253, 255, 0.14) 66%, transparent 74%);
    animation-delay: 2.2s;
}

.scan-grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(140deg, rgba(0, 247, 255, 0.2), transparent 42%);
    background-size: 30px 30px, 30px 30px, auto;
    mask-image: radial-gradient(circle at 50% 20%, black, transparent 80%);
    opacity: 0.62;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 79, 0, 0.5); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 79, 0, 0.8); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 79, 0, 0.5) transparent; }

/* === Body: page-specific background gradient and padding for fixed header === */
body {
    overflow-x: hidden;
    padding: 104px 0 0;
    background:
        radial-gradient(980px 520px at 78% -10%, rgba(0, 245, 255, 0.34), transparent 54%),
        radial-gradient(1040px 620px at -4% 12%, rgba(255, 79, 0, 0.44), transparent 50%),
        linear-gradient(165deg, var(--gmt-ink-2), var(--gmt-ink-1) 50%, var(--gmt-ink-0));
}

/* === Header: position/layout only — background/border/shadow/padding from theme === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

/* Logo */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gmt-text);
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    padding: 2px;
    border: 2px solid rgba(0, 247, 255, 0.88);
    background: radial-gradient(circle at 30% 30%, rgba(0, 247, 255, 0.18), rgba(255, 79, 0, 0.24));
    object-fit: cover;
    box-shadow:
        0 0 0 2px rgba(255, 79, 0, 0.5),
        0 0 20px rgba(255, 79, 0, 0.46),
        0 0 28px rgba(0, 247, 255, 0.56);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text small {
    color: var(--gmt-text-subtle);
    font-size: 0.66rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Primary nav links (plain text, not buttons) */
.site-nav {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.site-nav a {
    color: var(--gmt-text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 140ms ease, text-shadow 140ms ease;
}

.site-header .site-nav a:hover {
    color: var(--gmt-ember) !important;
    text-shadow: 0 0 12px rgba(255, 79, 0, 0.62);
}

.header-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* === Page layout container === */
.layout {
    width: min(1160px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 24px;
    padding-inline: clamp(14px, 4vw, 48px);
}

/* === Hero section === */
.hero {
    position: relative;
    border: 1px solid rgba(0, 247, 255, 0.4);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 42px);
    background:
        radial-gradient(640px 320px at 0% 0%, rgba(255, 79, 0, 0.34), transparent 58%),
        radial-gradient(500px 280px at 100% 0%, rgba(0, 247, 255, 0.32), transparent 60%),
        linear-gradient(155deg, rgba(13, 23, 43, 0.91), rgba(7, 11, 22, 0.94));
    box-shadow: 0 0 0 1px rgba(255, 79, 0, 0.24) inset, 0 28px 70px rgba(0, 0, 0, 0.62), 0 0 52px rgba(0, 247, 255, 0.2);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -88px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(5, 228, 255, 0.24);
    box-shadow: inset 0 0 0 10px rgba(5, 228, 255, 0.03);
}

.eyebrow {
    margin: 0 0 12px;
    font: 600 0.72rem/1 "Chakra Petch", sans-serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gmt-spark-soft);
}

h1 {
    margin: 0;
    max-width: 20ch;
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: clamp(1.95rem, 4.6vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: 0.02em;
    font-weight: 800;
    text-transform: none;
}

.glow-text {
    display: block;
    margin-top: 8px;
    text-shadow: 0 0 22px rgba(255, 79, 0, 0.48), 0 0 38px rgba(0, 247, 255, 0.38);
}

.lead {
    margin: 16px 0 0;
    max-width: 66ch;
    line-height: 1.68;
}

.hero-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Hero buttons: scoped to .hero-actions to avoid conflict with theme's global .btn */
.hero-actions .btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 17px;
    font: 700 0.81rem/1 "Sora", sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    color: var(--gmt-text);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hero-actions .btn:hover {
    transform: translateY(-1px);
}

.hero-actions .btn-primary {
    background: linear-gradient(115deg, var(--gmt-ember), var(--gmt-flame));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.4) inset,
        0 16px 34px rgba(255, 79, 0, 0.56),
        0 0 32px rgba(255, 216, 74, 0.46);
}

.hero-actions .btn-primary:hover {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.45) inset,
        0 18px 40px rgba(255, 79, 0, 0.62),
        0 0 36px rgba(255, 216, 74, 0.52);
}

.hero-actions .btn-outline {
    border-color: rgba(0, 245, 255, 0.34);
    background: linear-gradient(145deg, rgba(10, 19, 37, 0.97), rgba(6, 11, 23, 0.93));
    box-shadow: 0 0 0 1px rgba(255, 59, 0, 0.12) inset;
}

.hero-actions .btn-outline:hover {
    border-color: rgba(0, 245, 255, 0.64);
    box-shadow:
        0 0 0 1px rgba(0, 247, 255, 0.44),
        0 14px 30px rgba(0, 247, 255, 0.3),
        0 0 30px rgba(0, 247, 255, 0.3);
}

/* === Status strip === */
.status-strip {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.status-card {
    border: 2px solid rgba(0, 247, 255, 0.52);
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(12, 18, 32, 0.82), rgba(7, 12, 24, 0.9));
    padding: 14px;
    box-shadow: 0 0 0 1px rgba(255, 79, 0, 0.22) inset, 0 0 22px rgba(0, 247, 255, 0.18);
}

.status-card:nth-child(1) {
    border-color: rgba(255, 216, 74, 0.68);
    box-shadow: 0 0 0 1px rgba(255, 79, 0, 0.28) inset, 0 0 24px rgba(255, 216, 74, 0.2);
}

.status-card:nth-child(2) {
    border-color: rgba(0, 247, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 79, 0, 0.24) inset, 0 0 24px rgba(0, 247, 255, 0.22);
}

.status-card:nth-child(3) {
    border-color: rgba(255, 79, 0, 0.68);
    box-shadow: 0 0 0 1px rgba(255, 216, 74, 0.22) inset, 0 0 24px rgba(255, 79, 0, 0.2);
}

.status-card span {
    display: block;
    color: var(--gmt-text-subtle);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 6px;
}

.status-card strong {
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.03rem;
    line-height: 1.3;
}

/* === Feature grid === */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feature-card {
    border: 1px solid rgba(0, 245, 255, 0.22);
    border-radius: 16px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(11, 20, 38, 0.9), rgba(6, 11, 22, 0.95));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.48), 0 0 18px rgba(0, 245, 255, 0.09);
}

.feature-card h2 {
    margin: 0;
    font-size: 1.07rem;
    font-family: "Chakra Petch", sans-serif;
}

.feature-card p {
    margin: 10px 0 0;
    color: var(--gmt-text-muted);
    font-size: 0.9rem;
    line-height: 1.62;
}

.feature-card.ember {
    border-color: rgba(255, 194, 41, 0.54);
    box-shadow: 0 18px 34px rgba(255, 59, 0, 0.28), 0 0 20px rgba(255, 194, 41, 0.16);
}

.feature-card.spark {
    border-color: rgba(0, 247, 255, 0.78);
    box-shadow: 0 18px 34px rgba(0, 247, 255, 0.38), 0 0 32px rgba(0, 247, 255, 0.28);
}

/* === Showcase section === */
.showcase {
    border: 1px solid rgba(0, 245, 255, 0.24);
    border-radius: 22px;
    padding: 22px;
    background: linear-gradient(165deg, rgba(10, 18, 35, 0.91), rgba(6, 10, 19, 0.94));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 26px rgba(0, 245, 255, 0.1);
}

.showcase h2 {
    margin: 0;
    font: 700 clamp(1.3rem, 2.5vw, 2.1rem)/1.2 "Chakra Petch", sans-serif;
}

.showcase p {
    margin: 10px 0 0;
    color: var(--gmt-text-muted);
    line-height: 1.58;
}

.frame {
    margin-top: 16px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(0, 247, 255, 0.68);
    background: linear-gradient(180deg, rgba(15, 23, 39, 0.95), rgba(7, 11, 20, 0.96));
    transform-style: preserve-3d;
    transition: transform 180ms ease;
    box-shadow:
        0 0 0 2px rgba(255, 79, 0, 0.35) inset,
        0 22px 48px rgba(0, 0, 0, 0.56),
        0 0 30px rgba(0, 247, 255, 0.3),
        0 0 26px rgba(255, 79, 0, 0.18);
}

.frame-top {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-ember { background: var(--gmt-ember); }
.dot-flame { background: var(--gmt-flame); }
.dot-spark { background: var(--gmt-spark); }

.frame-top p {
    margin-left: 6px;
    color: var(--gmt-text-subtle);
    font-size: 0.78rem;
}

.frame-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 300px;
}

.mini-nav {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: linear-gradient(170deg, rgba(255, 70, 24, 0.08), rgba(255, 154, 26, 0.04), rgba(10, 14, 24, 0));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-item {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(13, 20, 36, 0.78);
    color: var(--gmt-text);
    border-radius: 12px;
    text-align: left;
    padding: 10px 12px;
    font-family: "Sora", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 140ms ease, transform 140ms ease;
}

.mini-item:hover {
    transform: translateX(2px);
    border-color: rgba(5, 228, 255, 0.48);
}

.mini-item.active {
    border-color: rgba(255, 154, 26, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 154, 26, 0.22), 0 0 22px rgba(255, 70, 24, 0.2);
    position: relative;
}

.mini-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, var(--gmt-ember), var(--gmt-flame), transparent);
}

.mini-content {
    padding: 18px;
}

.mini-content h3 {
    margin: 0;
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.3rem;
}

.mini-content p {
    margin: 10px 0 14px;
    color: var(--gmt-text-muted);
    max-width: 52ch;
    line-height: 1.6;
}

.dashboard-overview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    min-height: 220px;
    align-items: start;
    transition: opacity 160ms ease;
}

.dashboard-overview-gallery.is-switching {
    opacity: 0.72;
}

.dashboard-overview-gallery img {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    border: 1px solid rgba(0, 247, 255, 0.45);
    background: rgba(9, 14, 26, 0.8);
    box-shadow: 0 0 18px rgba(0, 247, 255, 0.2), 0 0 0 1px rgba(255, 79, 0, 0.24) inset;
    max-height: none;
    object-fit: contain;
}

/* === Module grid === */
.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.module-card {
    border: 1px solid rgba(0, 247, 255, 0.38);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(11, 20, 38, 0.9), rgba(6, 11, 22, 0.95));
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.14), 0 0 0 1px rgba(255, 79, 0, 0.15) inset;
}

.module-card h3 {
    margin: 0;
    font-size: 1rem;
    font-family: "Chakra Petch", sans-serif;
}

.module-card p {
    margin-top: 8px;
    color: var(--gmt-text-muted);
    font-size: 0.87rem;
    line-height: 1.5;
}

/* === Footer: static — zobrazí se až po doscrolování === */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
}

/* === Reveal animation === */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 420ms ease, transform 460ms ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(0, -12px, 0) scale(1.04); }
}

/* === Responsive === */
@media (max-width: 1080px) {
    body {
        /* reduce mobile top padding to a reasonable header offset */
        padding-top: calc(96px + constant(safe-area-inset-top));
        padding-top: calc(96px + env(safe-area-inset-top));
    }

    .site-header {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .frame-body {
        grid-template-columns: 1fr;
    }

    .mini-nav {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-overview-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body {
        /* reduce mobile top padding to a reasonable header offset */
        padding-top: calc(84px + constant(safe-area-inset-top));
        padding-top: calc(84px + env(safe-area-inset-top));
    }

    .hero {
        border-radius: 20px;
        padding: 22px;
    }

    .status-strip,
    .feature-grid,
    .module-grid,
    .mini-nav,
    .dashboard-overview-gallery {
        grid-template-columns: 1fr;
    }

    .header-actions,
    .hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }
    /* ensure header respects the safe-area on mobile */
    .site-header {
        /* keep minimal safe-area padding but avoid large visual header */
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top);
        padding-bottom: 6px;
        min-height: 56px;
    }
}
