/*
 * Brand lander — shared stylesheet (docs/brand-landers.md).
 * Layout follows Figma «VPN WEB», NordVPN Land (Desktop 205:6929, Mobile 205:7791, Menu 205:8663).
 * Brand colours come from CSS variables set inline in <head> of every page; this file has no brand values.
 */
:root {
    --bg: #282b37;
    --hero-bg: #21242f;
    --footer-bg: #21242f;
    --card-bg: #3f4456;
    --accent: #3e5fff;
    --text: #fff;
    --hero-text: #fff;
    --footer-text: #fff;
    --card-text: #fff;
    --accent-text: #fff;
    /* Article publisher cards and borders: a tint of the page text, readable on dark and light pages. */
    --zz-sf: color-mix(in srgb, var(--text) 6%, transparent);
    --zz-bd: color-mix(in srgb, var(--text) 15%, transparent);
    --zz-mu: color-mix(in srgb, var(--text) 60%, transparent);
    --zz-r: 14px;
    --zz-w: 840px;
    --container: 1104px;
    --gutter: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

.icon {
    width: 24px;
    height: 24px;
    flex: none;
    fill: currentColor;
}

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

/* ── Header ─────────────────────────────────────────────── */
.header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 5;
    color: var(--hero-text);
}

.header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 36px;
    width: auto;
}

/* The brand's official name next to a logo drawing that spells another one: never broken into two lines. */
.logo span {
    white-space: nowrap;
}

.logo__mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    display: inline-grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 28px;
    min-width: 0;
    margin-left: 24px;
    font-size: 14px;
}

.nav a {
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.85;
}

.nav a:hover {
    opacity: 1;
}

/* Mobile menu: <details>, no JS. */
.menu {
    display: none;
}

.menu > summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
}

.menu > summary::-webkit-details-marker {
    display: none;
}

.menu__close {
    display: none;
}

.menu[open] .menu__open {
    display: none;
}

.menu[open] .menu__close {
    display: block;
}

.menu__panel {
    position: fixed;
    inset: 68px 0 0;
    overflow-y: auto;
    background: var(--hero-bg) url("/hero-net.svg") no-repeat center bottom / 200% auto;
    padding: 72px var(--gutter);
    text-align: center;
    z-index: 10;
    color: var(--hero-text);
}

.menu__panel a {
    display: block;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    padding: 18px 0;
    text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    background: var(--hero-bg);
    color: var(--hero-text);
    overflow: hidden;
    min-height: 730px;
    padding: 68px 0 64px;
}

.hero::before {
    content: "";
    position: absolute;
    left: -61px;
    right: -61px;
    bottom: -150px;
    height: 519px;
    background: url("/hero-net.svg") no-repeat center / 100% 100%;
    pointer-events: none;
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 538px 1fr;
    align-items: center;
    gap: 32px;
    min-height: 598px;
}

.hero__text {
    min-width: 0;
}

.hero__title {
    font-size: 50px;
    line-height: 60px;
    font-weight: 700;
}

.hero__subtitle {
    margin-top: 14px;
    font-size: 16px;
    line-height: 26px;
    opacity: 0.8;
    max-width: 495px;
}

.benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin-top: 20px;
}

.benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 18px;
}

.benefits .icon {
    color: var(--accent);
}

.platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 15px;
    margin-top: 50px;
}

/* DOM order is the mobile one (Android, Windows, iOS, Mac); desktop 2×2 is Android, iOS / Mac, Windows. */
.btn--ios {
    order: 1;
}

.btn--mac {
    order: 2;
}

.btn--windows {
    order: 3;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 16px 20px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.15s ease;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn__label {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.btn--wide {
    justify-content: center;
    width: 352px;
    max-width: 100%;
    margin: 40px auto 0;
}

.hero__visual {
    justify-self: end;
    width: 500px;
    max-width: 100%;
}

/* Device placeholder used while brand screenshots are not allowed (docs/brand-landers.md). */
.device {
    position: relative;
    margin: 0 auto;
    aspect-ratio: 9 / 19.5;
    width: 230px;
    border: 8px solid #10121a;
    border-radius: 36px;
    background: var(--card-bg);
    box-shadow: 0 30px 60px rgb(0 0 0 / 35%);
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--card-text);
}

.device::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 36%;
    height: 18px;
    border-radius: 10px;
    background: #10121a;
    transform: translateX(-50%);
}

.device__name {
    display: grid;
    gap: 14px;
    justify-items: center;
    font-size: 22px;
    font-weight: 700;
}

.device__name .logo__mark {
    width: 64px;
    height: 64px;
    font-size: 32px;
}

.device__bar {
    width: 70%;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
}

.hero__visual .device {
    width: 220px;
    margin: 0 0 0 30px;
    transform: rotate(-7deg);
}

.hero__visual .device + .device {
    position: absolute;
    top: -60px;
    right: 40px;
    margin: 0;
    transform: rotate(8deg);
}

.hero__visual--pair {
    position: relative;
    height: 500px;
    display: flex;
    align-items: flex-end;
}

.device--sm {
    width: 99px;
    border-width: 4px;
    border-radius: 14px;
    border-color: var(--card-bg);
}

.device--sm::before {
    top: 5px;
    height: 8px;
}

.device--sm .device__name {
    font-size: 11px;
    gap: 6px;
}

.device--sm .logo__mark {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.device--wide {
    aspect-ratio: 16 / 11;
    width: 160px;
    border-radius: 8px;
}

.device--wide::before {
    display: none;
}

/* ── Sections ───────────────────────────────────────────── */
.section {
    padding: 80px 0 0;
}

.section + .section,
.section + .articles-slot {
    padding-top: 140px;
}

main {
    padding-bottom: 100px;
}

/* Before the publisher runs, the slot holds only the marker comment: :empty ignores comments. */
.articles-slot:empty {
    display: none;
}

.section__title {
    font-size: 40px;
    line-height: 50px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.about {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.about__item img {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    object-fit: contain;
}

.about__title {
    font-size: 24px;
    line-height: 36px;
    font-weight: 700;
}

.about__text {
    margin-top: 10px;
    font-size: 18px;
    line-height: 28px;
    opacity: 0.7;
}

.notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.note {
    background: var(--card-bg);
    color: var(--card-text);
    border-radius: 20px;
    padding: 20px;
}

.note__label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
}

.note__title {
    margin-top: 14px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
}

.note__text {
    margin-top: 10px;
    font-size: 16px;
    line-height: 24px;
}

.downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 258px));
    justify-content: center;
    gap: 24px;
}

.download {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
}

.download__visual {
    height: 220px;
    display: grid;
    place-items: center;
}

.download__visual img {
    max-height: 220px;
    width: auto;
    border: 2px solid var(--card-bg);
    border-radius: 4px;
}

.download__caption {
    margin-top: -14px;
    font-size: 14px;
    line-height: 22px;
    opacity: 0.7;
    text-align: center;
}

.faq {
    max-width: 840px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.faq details {
    background: var(--card-bg);
    color: var(--card-text);
    border-radius: 14px;
    padding: 18px 22px;
}

.faq summary {
    cursor: pointer;
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
}

.faq summary::marker {
    color: var(--accent);
}

.faq dd,
.faq details p {
    margin-top: 10px;
    font-size: 16px;
    line-height: 26px;
    opacity: 0.8;
}

/* Block the article publisher fills in (<!-- fapnet:latest-articles -->). */
.articles-slot section {
    max-width: 840px;
    margin: 0 auto;
}

.articles-slot h2 {
    font-size: 40px;
    line-height: 50px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.articles-slot ul {
    display: grid;
    gap: 10px;
}

.articles-slot li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--card-text);
}

.articles-slot li a {
    text-decoration: none;
    font-weight: 700;
}

.articles-slot time {
    flex: none;
    opacity: 0.6;
    font-size: 14px;
}

.articles-slot p {
    margin-top: 16px;
    text-align: center;
    opacity: 0.8;
}

.articles-slot h2 + p {
    margin: 0 0 20px;
}

/* Links inside lander texts ([[anchor|type]] markers and the publisher's article links): the paragraph's colour,
   underlined in the brand accent. */
:is(.about__text, .note__text, .faq p, .section__title) a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Article and archive pages: LandingShell puts the publisher's article / archive section into <main>; the publisher
   renames its zz- classes per domain, so these rules match the structure, not class names. */
main > :not(.section, .articles-slot) h2 {
    font-size: 24px;
    line-height: 1.4;
    margin: 1.6em 0 0.6em;
}

main > :not(.section, .articles-slot) h3 {
    font-size: 19px;
    line-height: 1.4;
    margin: 1.4em 0 0.5em;
}

main > :not(.section, .articles-slot) :is(p, ul, ol, table) {
    margin: 0 0 1em;
    line-height: 1.8;
}

main > :not(.section, .articles-slot) :is(ul, ol) {
    padding-left: 1.4em;
}

main > :not(.section, .articles-slot) ul {
    list-style: disc;
}

main > :not(.section, .articles-slot) a {
    color: var(--accent);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 30px 0 40px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 228px 258px;
    gap: 32px;
}

.footer__brand p {
    margin-top: 20px;
    font-size: 18px;
    line-height: 28px;
}

.footer__note {
    font-size: 14px !important;
    line-height: 22px !important;
    opacity: 0.6;
    margin-top: 8px !important;
    max-width: 420px;
}

.footer__title {
    font-size: 18px;
    line-height: 28px;
    font-weight: 500;
}

.footer__links {
    margin-top: 10px;
    display: grid;
    gap: 10px;
    font-size: 14px;
    line-height: 20px;
}

.footer__links a {
    text-decoration: none;
    opacity: 0.6;
}

.footer__links a:hover {
    opacity: 1;
}

/* The router inserts a whiteLinks.txt link right before </footer>, outside .container. */
.footer > a {
    display: block;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 16px auto 0;
    padding: 0 var(--gutter);
    font-size: 14px;
    opacity: 0.6;
    text-decoration: none;
}

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .nav {
        column-gap: 18px;
        font-size: 13px;
    }

    .hero__grid {
        grid-template-columns: 1fr 380px;
    }

    .hero__visual--pair {
        height: 440px;
    }

    .downloads {
        row-gap: 40px;
    }
}

/* Narrow tablet: two hero buttons in a row no longer fit «Windows 版下载» with its icons — one column. */
@media (max-width: 960px) {
    .platforms {
        grid-template-columns: minmax(0, 300px);
    }
}

/* ── Mobile (Figma Mobile 375) ──────────────────────────── */
@media (max-width: 767px) {
    :root {
        --gutter: 16px;
    }

    .header {
        position: sticky;
        top: 0;
        background: var(--hero-bg);
    }

    .header__row {
        height: 56px;
        justify-content: flex-start;
        gap: 12px;
    }

    .nav {
        display: none;
    }

    .menu {
        display: block;
    }

    .menu__panel {
        inset: 56px 0 0;
    }

    .logo {
        font-size: 20px;
    }

    .logo img {
        height: 30px;
    }

    .hero {
        min-height: 0;
        padding: 56px 0 48px;
        text-align: center;
    }

    .hero::before {
        left: -340px;
        right: -340px;
        bottom: -230px;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero__title {
        font-size: 32px;
        line-height: 40px;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
        font-size: 14px;
        line-height: 22px;
    }

    .benefits {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        margin-top: 20px;
    }

    .benefits li {
        flex: 1;
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
        text-align: center;
    }

    .platforms {
        grid-template-columns: minmax(0, 300px);
        justify-content: center;
        gap: 20px;
        margin-top: 32px;
    }

    .platforms .btn {
        order: 0;
    }

    .hero__visual {
        display: none;
    }

    .section {
        padding-top: 56px;
    }

    .section + .section,
    .section + .articles-slot {
        padding-top: 80px;
    }

    .menu__panel a {
        padding: 25px 0;
    }

    main {
        padding-bottom: 64px;
    }

    .section__title {
        font-size: 30px;
        line-height: 40px;
        margin-bottom: 20px;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .about__title {
        font-size: 20px;
        line-height: 30px;
    }

    .about__text {
        font-size: 15px;
        line-height: 26px;
    }

    .btn--wide {
        width: 100%;
        margin-top: 32px;
    }

    /* Figma shows a one-card carousel: horizontal scroll-snap, no JS. */
    .notes {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        margin: 0 calc(-1 * var(--gutter));
        padding: 0 var(--gutter) 8px;
        scrollbar-width: none;
    }

    .notes::-webkit-scrollbar {
        display: none;
    }

    .note {
        flex: 0 0 calc(100% - 24px);
        scroll-snap-align: center;
    }

    .downloads {
        grid-template-columns: minmax(0, 300px);
        justify-content: center;
        gap: 20px;
    }

    .download {
        gap: 8px;
    }

    .download__visual {
        display: none;
    }

    .download__caption {
        margin: 0 0 8px;
        font-size: 13px;
    }

    .faq summary {
        font-size: 16px;
        line-height: 24px;
    }

    .faq details p {
        font-size: 15px;
    }

    .articles-slot h2 {
        font-size: 30px;
        line-height: 40px;
    }

    .articles-slot li {
        flex-direction: column;
        gap: 4px;
    }

    .footer {
        padding: 32px 0;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 16px;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .footer__brand p {
        margin-top: 14px;
    }
}
