/* PDF Translation Reader website. Colors follow the app (GxTheme.qml): ink blue, paper, highlighter yellow. */

:root {
    --background: #F6F5F2;
    --surface: #FFFFFF;
    --surface-alt: #EFEDE8;
    --border: #E2DFD8;
    --text: #1C1D21;
    --text-secondary: #636771;
    --text-tertiary: #9EA1A8;
    --accent: #2B59D9;
    --accent-pressed: #1F45B3;
    --accent-soft: rgba(43, 89, 217, 0.10);
    --marker: rgba(255, 201, 51, 0.55);
    --brand: linear-gradient(135deg, #2B78F0 0%, #2A3092 100%);
    --shadow: 0 1px 2px rgba(20, 28, 54, 0.06), 0 10px 28px rgba(20, 28, 54, 0.10);
    --radius-medium: 12px;
    --radius-large: 16px;
    --radius-extra-large: 22px;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #121316;
        --surface: #1A1C21;
        --surface-alt: #23262C;
        --border: #33363D;
        --text: #ECEDEF;
        --text-secondary: #A3A6AD;
        --text-tertiary: #6F737B;
        --accent: #7C9CFF;
        --accent-pressed: #9DB4FF;
        --accent-soft: rgba(124, 156, 255, 0.16);
        --marker: rgba(255, 201, 51, 0.32);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.38);
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

body:lang(zh-Hant) {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", Roboto, sans-serif;
}

body:lang(ja) {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", Roboto, sans-serif;
}

body:lang(ko) {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", Roboto, sans-serif;
    word-break: keep-all;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-pressed);
    text-decoration: underline;
}

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

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(28px, 4vw, 38px);
    margin: 0 0 12px;
    text-align: center;
}

h3 {
    font-size: 19px;
    margin: 0 0 8px;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 72px 0;
}

.intro {
    max-width: 680px;
    margin: 0 auto 40px;
    color: var(--text-secondary);
    text-align: center;
}

/* Header */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--background) 86%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}

.top-row {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
}

.brand:hover {
    color: var(--text);
    text-decoration: none;
}

.brand img {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 22px;
    margin-left: auto;
    font-size: 15px;
}

.nav a {
    color: var(--text-secondary);
}

.nav a:hover {
    color: var(--text);
    text-decoration: none;
}

.languages {
    position: relative;
    font-size: 15px;
}

.languages summary {
    list-style: none;
    cursor: pointer;
    min-width: 40px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    text-align: center;
    user-select: none;
}

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

.language-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    min-width: 150px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow);
}

.language-list a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text);
}

.language-list a:hover {
    background: var(--surface-alt);
    text-decoration: none;
}

.language-list a[aria-current] {
    color: var(--accent);
    font-weight: 600;
}

/* Hero */

.hero {
    padding: 64px 0 40px;
    overflow: hidden;
}

.hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 48px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6.2vw, 66px);
    letter-spacing: -0.02em;
}

.hero h1 .accent {
    background: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 92%, transparent 92%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.lead {
    max-width: 560px;
    margin: 0 0 28px;
    color: var(--text-secondary);
    font-size: 19px;
}

.hint {
    margin: 14px 0 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.hero-shot {
    position: relative;
    justify-self: center;
    width: min(100%, 330px);
}

.hero-shot::before {
    content: "";
    position: absolute;
    inset: 10% -20% 4% -20%;
    background: var(--brand);
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.35;
    z-index: -1;
}

.hero-shot img {
    display: block;
    width: 100%;
    border-radius: 34px;
    box-shadow: var(--shadow), 0 0 0 1px var(--border);
}

/* Buttons */

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.store,
.button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 168px;
    min-height: 54px;
    padding: 8px 20px;
    border-radius: var(--radius-medium);
    background: var(--text);
    color: var(--background);
    line-height: 1.25;
}

.store:hover,
.button:hover {
    color: var(--background);
    text-decoration: none;
    opacity: 0.88;
}

.button {
    background: var(--brand);
    color: #FFFFFF;
    font-weight: 600;
    align-items: center;
}

.button:hover {
    color: #FFFFFF;
}

.store strong {
    font-size: 17px;
}

.store small {
    font-size: 12px;
    opacity: 0.75;
}

.store-soon {
    background: var(--surface-alt);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
}

.stores-large {
    justify-content: center;
}

.apk-details {
    margin: 20px auto 0;
    max-width: 680px;
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
    overflow-wrap: anywhere;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Three ways */

.steps {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.step {
    padding: 28px;
    border-radius: var(--radius-extra-large);
    background: var(--background);
}

.step-number {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--brand);
    color: #FFFFFF;
    font-weight: 700;
}

.step p,
.feature p {
    margin: 0;
    color: var(--text-secondary);
}

/* Features */

.features h2 {
    margin-bottom: 40px;
}

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

.feature {
    padding: 26px;
    border-radius: var(--radius-large);
    background: var(--surface);
    border: 1px solid var(--border);
}

.feature h3::before {
    content: "";
    display: block;
    width: 28px;
    height: 4px;
    margin-bottom: 14px;
    border-radius: 2px;
    background: var(--brand);
}

/* Gallery */

.gallery {
    padding-top: 24px;
}

.gallery h2 {
    margin-bottom: 40px;
}

.shots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 24px;
}

.shot {
    width: calc((100% - 3 * 24px) / 4);
    margin: 0;
}

.shot img {
    display: block;
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow), 0 0 0 1px var(--border);
}

.shot figcaption {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.shot-wide {
    width: 100%;
    max-width: 960px;
    margin-top: 20px;
}

.shot-wide img {
    border-radius: 14px;
}

/* Pricing */

.pricing {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.pricing h2 {
    margin-bottom: 40px;
}

.plans {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 860px;
    margin: 0 auto;
}

.plan {
    padding: 32px;
    border-radius: var(--radius-extra-large);
    background: var(--background);
    border: 1px solid var(--border);
}

.plan-pro {
    border: 2px solid var(--accent);
    background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--background);
}

.price {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
}

.plan-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.plan ul {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.plan li {
    position: relative;
    padding: 6px 0 6px 28px;
}

.plan li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 13px;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

/* Download and support */

.download h2 {
    margin-bottom: 32px;
}

.support .intro a {
    font-weight: 600;
}

.faq {
    max-width: 760px;
    margin: 0 auto;
}

.faq details {
    border-bottom: 1px solid var(--border);
}

.faq summary {
    cursor: pointer;
    padding: 18px 32px 18px 0;
    position: relative;
    font-weight: 600;
    list-style: none;
}

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

.faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 14px;
    color: var(--text-tertiary);
    font-size: 22px;
    font-weight: 400;
}

.faq details[open] summary::after {
    content: "\2212";
}

.faq details p {
    margin: 0 0 20px;
    color: var(--text-secondary);
}

/* Privacy and terms */

.document {
    max-width: 760px;
    padding-top: 48px;
    padding-bottom: 72px;
}

.document h1 {
    font-size: clamp(32px, 5vw, 44px);
    margin: 0 0 8px;
}

.document h2 {
    font-size: 21px;
    margin: 36px 0 8px;
    text-align: left;
}

.document p {
    color: var(--text-secondary);
}

.updated {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Footer */

.bottom {
    padding: 32px 0 40px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 14px;
}

.bottom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.bottom nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.bottom nav a {
    color: var(--text-secondary);
}

.bottom p {
    margin: 0;
}

.icp {
    margin-left: 12px;
    color: var(--text-tertiary);
}

/* Narrow screens */

@media (max-width: 960px) {
    .shot {
        width: calc((100% - 2 * 24px) / 3);
    }

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

@media (max-width: 760px) {
    section {
        padding: 56px 0;
    }

    .nav {
        display: none;
    }

    .languages {
        margin-left: auto;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-row,
    .step-grid,
    .feature-grid,
    .plans {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-text {
        text-align: center;
    }

    .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero .stores {
        justify-content: center;
    }

    .hero-shot {
        width: min(78%, 300px);
    }

    .shots {
        gap: 20px 14px;
    }

    .shot {
        width: calc((100% - 14px) / 2);
    }

    .shot-wide {
        width: 100%;
    }

    .store {
        flex: 1 1 100%;
    }

    .bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .icp {
        display: block;
        margin: 6px 0 0;
    }
}
