
:root {
    --bg: #111827;
    --card: #263449;
    --primary: #6366F1;
    --accent: #A5B4FC;
    --heading: #F8FAFC;
    --text: #CBD5E1;
    --placeholder: #1a2436;
    --placeholder-line: #334155;
    --focus: #A5B4FC;
    --radius: 1rem;
    --header-height: 4.25rem;
    --max: 72rem;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--heading);
}

a:focus-visible,
.nav-toggle:focus-visible + .nav-toggle-label,
.btn:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 0.75rem;
    color: #fff;
}

h1,
h2,
h3 {
    color: var(--heading);
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1rem;
}

.header-inner,
.hero,
.gallery-section,
.about,
.features,
.download,
.footer-inner {
    width: min(calc(100% - 2rem), var(--max));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(17, 24, 39, 0.92);
    border-bottom: 1px solid #1f2a3d;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--heading);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.15rem;
}

.brand:hover {
    color: var(--heading);
}

/* HelloPic logo in the header */

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-mark {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.25rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.6rem;
    cursor: pointer;
    background: var(--card);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--heading);
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-icon::before {
    top: -6px;
}

.nav-toggle-icon::after {
    top: 6px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--heading);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    color: #fff;
    filter: brightness(1.08);
}

/* Centred homepage hero */

.hero {
    display: block;
    padding: 4rem 0 4.5rem;
    text-align: center;
}

.hero-copy {
    max-width: 52rem;
    margin-inline: auto;
}

.hero h1 {
    max-width: 48rem;
    margin-inline: auto;
}

.eyebrow {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
}

.lede {
    font-size: 1.05rem;
    max-width: 38rem;
    margin-inline: auto;
    margin-bottom: 1.5rem;
}

.section-intro {
    margin-bottom: 1.5rem;
    max-width: 40rem;
    margin-inline: auto;
    text-align: center;
}

.gallery-section,
.about,
.features,
.download {
    padding: 0 0 3.5rem;
}

.gallery {
    column-count: 2;
    column-gap: 0.85rem;
}

.gallery-item {
    break-inside: avoid;
    margin: 0 0 0.85rem;
    background: var(--placeholder);
    border-radius: 0.85rem;
    overflow: hidden;
}

.gallery-item img,
.gallery-placeholder {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-placeholder {
    height: 100%;
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(165, 180, 252, 0.08), transparent 55%),
        var(--placeholder);
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.4rem 1.35rem;
}

.about .card {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.feature-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.feature-grid p:last-child,
.card p:last-child {
    margin-bottom: 0;
}

.download-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.download-card p {
    max-width: 36rem;
    margin-inline: auto;
}

/* HelloPic logo in the download section */

.download-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.download-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.download-brand h2 {
    margin-bottom: 0;
}

.site-footer {
    border-top: 1px solid #1f2a3d;
    padding: 1.75rem 0 2.25rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* HelloPic logo in the footer */

.footer-brand-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.footer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand {
    margin: 0;
    color: var(--heading);
    font-weight: 700;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
}

.site-footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    color: var(--heading);
}

@media (max-width: 719px) {
    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--header-height);
        background: #162033;
        border-bottom: 1px solid #1f2a3d;
        display: none;
        padding: 0.75rem 1rem 1rem;
    }

    .site-nav ul {
        display: grid;
        gap: 0.35rem;
    }

    .site-nav a {
        display: block;
        padding: 0.7rem 0.85rem;
        border-radius: 0.6rem;
    }

    .site-nav a:hover,
    .site-nav a[aria-current="page"] {
        background: var(--card);
    }

    .nav-toggle:checked ~ .site-nav {
        display: block;
    }

    .nav-toggle:focus + .nav-toggle-label {
        outline: 2px solid var(--focus);
        outline-offset: 3px;
    }
}

@media (min-width: 720px) {
    .nav-toggle,
    .nav-toggle-label {
        display: none;
    }

    .site-nav ul {
        display: flex;
        gap: 1.5rem;
    }

    .hero {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .gallery {
        column-count: 3;
        column-gap: 1rem;
    }

    .gallery-item {
        margin-bottom: 1rem;
    }

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

    .footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 1100px) {
    .gallery {
        column-count: 4;
    }

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