/* Client Harbor website. Colours come from the logo: navy, blue, teal and the lighthouse's gold. */

:root {
    --navy: #00193c;
    --blue: #0269b6;
    --teal: #028baa;
    --gold: #fcd947;

    --bg: #ffffff;
    --bg-soft: #f4f7fb;
    --bg-band: #00193c;
    --surface: #ffffff;
    --border: #dde4ee;
    --text: #13213a;
    --text-muted: #5a6a82;
    --heading: #00193c;
    --link: #0269b6;
    --accent: #0269b6;
    --accent-hover: #01569a;
    --accent-text: #ffffff;
    --code-bg: #eef2f8;
    --shadow: 0 1px 2px rgba(0, 25, 60, .06), 0 8px 24px rgba(0, 25, 60, .08);
    --radius: 14px;
    --max: 1160px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1220;
        --bg-soft: #101a2c;
        --bg-band: #060c18;
        --surface: #131f33;
        --border: #24324a;
        --text: #d9e2ef;
        --text-muted: #94a3ba;
        --heading: #f2f6fb;
        --link: #5cb8f0;
        --accent: #2b8fd8;
        --accent-hover: #47a3e6;
        --accent-text: #ffffff;
        --code-bg: #0d1726;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0b1220;
    --bg-soft: #101a2c;
    --bg-band: #060c18;
    --surface: #131f33;
    --border: #24324a;
    --text: #d9e2ef;
    --text-muted: #94a3ba;
    --heading: #f2f6fb;
    --link: #5cb8f0;
    --accent: #2b8fd8;
    --accent-hover: #47a3e6;
    --accent-text: #ffffff;
    --code-bg: #0d1726;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .88em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
pre {
    background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px;
    padding: .9rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: .6rem 0 1rem;
}
pre code { background: none; padding: 0; font-size: 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: .5rem 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
section { padding: 72px 0; }
@media (max-width: 719px) { section { padding: 52px 0; } }
.soft { background: var(--bg-soft); }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 46rem; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--teal); margin-bottom: .6rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.3rem; border-radius: 10px; border: 2px solid transparent;
    font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--border); color: var(--heading); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); }
.btn-light { background: #fff; color: var(--navy); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.center .btns { justify-content: center; }

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--heading); }
.brand img { height: 40px; width: auto; }
.brand span { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand b { color: var(--blue); font-weight: 800; }
:root[data-theme="dark"] .brand b { color: var(--link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand b { color: var(--link); } }
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
    display: block; padding: .5rem .8rem; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 550;
}
.nav-links a:hover { background: var(--bg-soft); }
.nav-links a[aria-current="page"] { color: var(--link); }
.nav-links .btn { margin-left: .5rem; padding: .55rem 1rem; color: var(--accent-text); }
.nav-links .btn:hover { background: var(--accent-hover); }
.nav-tools { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--heading); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }
@media (max-width: 879px) {
    .menu-btn { display: inline-flex; }
    .nav-links {
        position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--border); padding: .5rem 16px 1rem; display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .75rem .5rem; }
    .nav-links .btn { margin: .5rem 0 0; }
}
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-dark { display: block; }
    :root:not([data-theme="light"]) .theme-icon-light { display: none; }
}

/* ===== Hero ===== */
.hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%; z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--teal) 18%, transparent), transparent);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.1fr; } }
.hero h1 .hl { color: var(--blue); }
:root[data-theme="dark"] .hero h1 .hl { color: var(--link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero h1 .hl { color: var(--link); } }
.hero .lead { margin-bottom: 1.6rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1.4rem 0 0; padding: 0; list-style: none; color: var(--text-muted); font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--teal); font-weight: 800; margin-right: .4rem; }

/* Screenshots */
.shot {
    border-radius: 12px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
    overflow: hidden;
}
.shot-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.shot img { width: 100%; }
.shot figcaption { padding: .7rem 1rem; font-size: .9rem; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ===== Cards & grids ===== */
.grid { display: grid; gap: 20px; counter-reset: stage; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card h3 { display: flex; align-items: center; gap: .6rem; }
.ico {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border-radius: 10px; background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal);
}
.ico svg { width: 22px; height: 22px; }
.card.link-card { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.section-head { max-width: 46rem; margin-bottom: 36px; }
.center.section-head, .center .section-head { margin-left: auto; margin-right: auto; }

/* Feature split rows */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1.15fr; } .split.flip > :first-child { order: 2; } }
.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: .55rem; }
.checks li::before {
    content: ""; position: absolute; left: 0; top: .45em; width: 1rem; height: 1rem; border-radius: 50%;
    background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M6.4 11.2 3.2 8l1.1-1.1 2.1 2.1 5.3-5.3 1.1 1.1z'/%3E%3C/svg%3E") center/80% no-repeat;
}

/* Stages strip */
.stages { display: grid; gap: 12px; counter-reset: stage; }
@media (min-width: 720px) { .stages { grid-template-columns: repeat(4, 1fr); } }
.stage { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.stage::before {
    counter-increment: stage; content: counter(stage);
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: .6rem;
}
.stage strong { display: block; color: var(--heading); font-size: 1.1rem; }
.stage span { color: var(--text-muted); font-size: .95rem; }

/* Dark band */
.band { background: var(--bg-band); color: #c9d6ea; }
.band h2, .band h3 { color: #fff; }
.band .lead { color: #c9d6ea; }
.band a:not(.btn) { color: #8fd3ff; }
.band .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
.band .ico { background: rgba(252, 217, 71, .14); color: var(--gold); }

/* Install options */
.option-tag {
    display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px;
    background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); margin-bottom: .6rem;
}

/* ===== Page header (inner pages) ===== */
.page-head { padding: 56px 0 28px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.page-head .lead { margin-bottom: 0; }

/* ===== Docs layout ===== */
.docs { display: grid; gap: 40px; padding: 48px 0 72px; }
@media (min-width: 960px) { .docs { grid-template-columns: 240px 1fr; } }
.toc { font-size: .95rem; }
@media (min-width: 960px) { .toc nav { position: sticky; top: 92px; } }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .35rem; }
.toc a:not(.btn) { color: var(--text); text-decoration: none; }
.toc a:not(.btn):hover { color: var(--link); }
.toc .toc-title { font-weight: 700; color: var(--heading); margin-bottom: .5rem; }
.prose { min-width: 0; max-width: 50rem; }
.prose h2 { font-size: 1.7rem; margin-top: 2.6rem; padding-top: .4rem; scroll-margin-top: 84px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8rem; }
.prose li { margin-bottom: .4rem; }
.prose ol > li::marker { font-weight: 700; color: var(--heading); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0 1.4rem; }
.prose th, .prose td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--heading); }
.table-scroll { overflow-x: auto; }
.note {
    border-left: 4px solid var(--teal); background: color-mix(in srgb, var(--teal) 9%, transparent);
    padding: .9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 1rem 0 1.4rem;
}
.note.warn { border-color: #d39b00; background: color-mix(in srgb, #fcd947 16%, transparent); }
.note p:last-child { margin-bottom: 0; }

/* ===== Download ===== */
.dl-meta { font-size: .92rem; color: var(--text-muted); }
.status-msg { margin-top: .8rem; font-size: .95rem; }
.status-msg.error { color: #c0392b; }
[hidden] { display: none !important; }

/* Copy buttons on code blocks */
.pre-wrap { position: relative; }
.copy-btn {
    position: absolute; top: 8px; right: 8px; padding: .25rem .6rem; font: inherit; font-size: .78rem; font-weight: 600;
    border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-muted); cursor: pointer;
    opacity: 0; transition: opacity .15s;
}
.pre-wrap:hover .copy-btn, .copy-btn:focus { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: 1; } }
.pre-wrap pre { padding-right: 4.5rem; }

/* ===== Contact ===== */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; color: var(--heading); margin-bottom: .3rem; font-size: .95rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .65rem .8rem; font: inherit; font-size: 1rem; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { resize: vertical; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: .8rem; }

/* ===== Pricing ===== */
.price-grid { align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card .checks { flex: 1; margin-bottom: 1.4rem; }
.price-card .btn { align-self: flex-start; }
.price-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.price-card .option-tag { align-self: flex-start; }
.price { margin: .2rem 0 .4rem; color: var(--heading); }
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.price .from { font-weight: 650; color: var(--text-muted); }
.price .per { display: block; font-size: .92rem; color: var(--text-muted); }
.billing {
    display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.billing-btn {
    padding: .5rem 1rem; border: 0; border-radius: 9px; background: none; color: var(--text);
    font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.billing-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.launch-note { margin-top: 24px; }
.plan-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
.plan-table th, .plan-table td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); text-align: left; }
.plan-table thead th { color: var(--heading); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.plan-table tbody th { font-weight: 550; color: var(--text); }
.plan-table td { color: var(--teal); font-weight: 700; }
#others .plan-table td { color: var(--text); font-weight: 400; }
.plan-table .no { color: var(--text-muted); font-weight: 400; }
.plan-table tr.ours th, #others .plan-table tr.ours td { font-weight: 700; color: var(--heading); background: color-mix(in srgb, var(--teal) 9%, transparent); }
.table-scroll:has(.plan-table) { border: 1px solid var(--border); border-radius: var(--radius); }
.plan-table tbody tr:last-child > * { border-bottom: 0; }
.fine { font-size: .85rem; margin-top: .8rem; }

/* ===== FAQ ===== */
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 650; color: var(--heading); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--text-muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .7rem 0 0; color: var(--text-muted); }

/* ===== Footer ===== */
.site-footer { background: var(--bg-band); color: #9fb0c8; padding: 48px 0 32px; font-size: .95rem; }
.site-footer a { color: #d4e1f2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: .6rem; }
.footer-brand img { height: 36px; width: auto; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .card.link-card { transition: none; }
    .btn:hover, .card.link-card:hover { transform: none; }
}
