/* Raitis Šaripo — app hub. Graphite base with one volt accent, kept neutral so every app's own colours carry the page. */
:root {
    --bg: #0b0c0f;
    --surface: #14161b;
    --raised: #1c1f25;
    --border: #262a31;
    --border-hi: #3a3f48;
    --volt: #c3ff3d;
    --volt-soft: #e1ffa1;
    --volt-press: #9fd62b;
    --text: #f2f4ec;
    --muted: #9ba1a8;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;

    --r-md: 16px;
    --r-lg: 22px;
    --maxw: 1120px;
    --gutter: clamp(16px, 4vw, 32px);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--volt);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--volt);
    color: var(--bg);
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
}
.skip:focus {
    top: 12px;
}

.wrap {
    width: 100%;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.volt {
    color: var(--volt);
}
.nb {
    white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 12, 15, 0.72);
    -webkit-backdrop-filter: saturate(1.4) blur(18px);
    backdrop-filter: saturate(1.4) blur(18px);
    border-bottom: 1px solid var(--border);
}
.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.mark rect {
    fill: var(--text);
    opacity: 0.88;
}
.mark rect.hot {
    fill: var(--volt);
    opacity: 1;
}
.nav {
    display: flex;
    gap: 22px;
    font-size: 15px;
    color: var(--muted);
}
.nav a {
    text-decoration: none;
    transition: color 0.2s;
}
.nav a:hover {
    color: var(--text);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--volt);
    color: var(--bg);
    font: 650 16px/1 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, box-shadow 0.2s;
}
.btn:hover {
    background: var(--volt-soft);
    transform: translateY(-1px);
}
.btn:active {
    background: var(--volt-press);
    transform: none;
}
.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
}
.btn-lg {
    height: 54px;
    padding: 0 28px;
    font-size: 17px;
}
.btn-light {
    background: var(--text);
}
.btn-ghost {
    background: var(--surface);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border-hi);
}
.btn-ghost:hover {
    background: var(--raised);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(40px, 8vw, 96px) clamp(48px, 8vw, 104px);
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero::before {
    background: radial-gradient(50% 55% at 80% 40%, rgba(195, 255, 61, 0.09), transparent 70%),
        radial-gradient(40% 40% at 6% 0%, rgba(242, 244, 236, 0.05), transparent 70%);
}
.hero::after {
    background-image: radial-gradient(rgba(242, 244, 236, 0.16) 1px, transparent 1.6px);
    background-size: 30px 30px;
    -webkit-mask-image: radial-gradient(60% 70% at 80% 42%, #000, transparent 75%);
    mask-image: radial-gradient(60% 70% at 80% 42%, #000, transparent 75%);
}
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(36px, 6vw, 64px);
    align-items: center;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(20, 22, 27, 0.7);
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--volt);
    box-shadow: 0 0 10px rgba(195, 255, 61, 0.7);
}
h1 {
    margin-top: 22px;
    font-size: clamp(38px, 7.4vw, 66px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.lead {
    margin-top: 22px;
    max-width: 34em;
    font-size: clamp(17px, 2.3vw, 20px);
    line-height: 1.55;
    color: var(--muted);
}
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* Icon wall: the eight real app icons, staggered in a 4x2 grid. */
.wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 2.4vw, 22px);
    max-width: 460px;
    margin-inline: auto;
    width: 100%;
}
.wall li:nth-child(4n + 2),
.wall li:nth-child(4n + 4) {
    transform: translateY(22%);
}
.wall a {
    display: block;
}
.wall img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 22.37%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px -14px rgba(0, 0, 0, 0.85);
}

/* ---------- Sections ---------- */
.section {
    padding-block: clamp(40px, 7vw, 80px);
    border-top: 1px solid var(--border);
}
h2 {
    font-size: clamp(30px, 4.6vw, 42px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.025em;
}
.section-lead {
    margin-top: 12px;
    max-width: 38em;
    color: var(--muted);
    font-size: 18px;
}
.group {
    margin-top: clamp(28px, 4vw, 44px);
}
h3 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---------- App cards ---------- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
}
.card {
    height: 100%;
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-areas:
        "icon meta"
        "desc desc"
        "actions actions";
    grid-template-rows: auto 1fr auto;
    gap: 14px 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.card:hover {
    border-color: var(--border-hi);
    background: #171a20;
    transform: translateY(-2px);
}
.card:target {
    border-color: var(--volt);
}
.icon {
    grid-area: icon;
    width: 64px;
    height: 64px;
    border-radius: 22.37%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 24px -10px rgba(0, 0, 0, 0.8);
}
.meta {
    grid-area: meta;
    align-self: center;
    min-width: 0;
}
h4 {
    font-size: 21px;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -0.015em;
}
.cat {
    margin-top: 3px;
    font-size: 14px;
    color: var(--muted);
}
.desc {
    grid-area: desc;
    font-size: 15.5px;
    line-height: 1.5;
    color: #c4c8cc;
}
.actions {
    grid-area: actions;
    align-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}
.link {
    font-size: 15px;
    font-weight: 550;
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--border-hi);
    text-underline-offset: 4px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.link:hover {
    color: var(--text);
    text-decoration-color: var(--volt);
}

/* ---------- Support ---------- */
.mail {
    color: var(--text);
    font-weight: 550;
    text-decoration: underline;
    text-decoration-color: var(--border-hi);
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}
.mail:hover {
    text-decoration-color: var(--volt);
}
.legal-box {
    margin-top: clamp(28px, 4vw, 44px);
    padding: 22px clamp(18px, 3vw, 28px) 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
}
.legal-list {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: clamp(28px, 5vw, 64px);
    margin-top: 6px;
}
.legal-list li {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    padding-block: 12px;
    border-bottom: 1px solid var(--border);
}
.legal-list img {
    width: 28px;
    height: 28px;
    border-radius: 22.37%;
}
.legal-list .n {
    font-weight: 650;
}
.legal-list .l {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    font-size: 15px;
}
.legal-list .l a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--border-hi);
    text-underline-offset: 4px;
}
.legal-list .l a:hover {
    color: var(--text);
    text-decoration-color: var(--volt);
}

/* ---------- Footer ---------- */
.site-footer {
    padding-block: 32px 44px;
    border-top: 1px solid var(--border);
}
.foot-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
}
.fine {
    font-size: 14px;
    color: var(--muted);
}
.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
}
a.fine {
    text-decoration: none;
}
a.fine:hover {
    color: var(--text);
}
.legal {
    margin-top: 16px;
    max-width: 62em;
    font-size: 12.5px;
    line-height: 1.55;
    color: #868c93;
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 560px) {
    .legal-list li {
        grid-template-columns: 28px 1fr auto;
    }
    .legal-list .l {
        grid-column: 3;
    }
}
@media (min-width: 760px) {
    .legal-list {
        grid-template-columns: 1fr 1fr;
    }
}
@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
    .wall {
        margin-inline: 0;
        justify-self: end;
    }
}
@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "icon"
            "meta"
            "desc"
            "actions";
        grid-template-rows: auto auto 1fr auto;
        gap: 14px;
        padding: 20px;
    }
    .icon {
        width: 72px;
        height: 72px;
    }
    .meta {
        align-self: start;
    }
}
@media (max-width: 479px) {
    .nav {
        gap: 18px;
    }
    .nav a[href="#about"] {
        display: none;
    }
    .btn-lg {
        flex: 1 1 140px;
    }
}

/* ---------- Motion (only when the visitor allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .hero-copy > * {
        animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
    .hero-copy > :nth-child(2) {
        animation-delay: 0.07s;
    }
    .hero-copy > :nth-child(3) {
        animation-delay: 0.14s;
    }
    .hero-copy > :nth-child(4) {
        animation-delay: 0.21s;
    }
    .wall li {
        animation: pop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
        animation-delay: calc(0.1s + var(--i) * 0.06s);
    }
    .wall img {
        animation: drift 7s ease-in-out infinite;
        animation-delay: calc(var(--i) * -0.9s);
    }
    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(14px);
        }
    }
    @keyframes pop {
        from {
            opacity: 0;
            transform: translateY(16px) scale(0.92);
        }
    }
    @keyframes drift {
        50% {
            transform: translateY(-6px);
        }
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .card,
    .btn,
    .nav a,
    .link {
        transition: none;
    }
    .card:hover,
    .btn:hover {
        transform: none;
    }
}
.support-cta {
    margin-top: 24px;
}
